Decompiled source of SirenHead v2.0.3

LethalSirenHead.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using LethalLib.Modules;
using LethalSirenHead.NetcodePatcher;
using Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("LethalSirenHead")]
[assembly: AssemblyDescription("Adds Trevor Henderson's Siren Head to Lethal Company")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ccode-lang")]
[assembly: AssemblyProduct("LethalSirenHead")]
[assembly: AssemblyCopyright("MIT License")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("22afcc53-9f27-49f9-b82d-3ff7e8026cce")]
[assembly: AssemblyFileVersion("2.0.2")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("2.0.2.0")]
[module: UnverifiableCode]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace LethalSirenHead
{
	[BepInPlugin("Ccode.SirenHead", "SirenHead", "2.0.2")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private const string MyGuid = "Ccode.SirenHead";

		private const string PluginName = "SirenHead";

		private const string VersionString = "2.0.2";

		private static readonly Harmony Harmony = new Harmony("Ccode.SirenHead");

		public static ManualLogSource Log;

		public static EnemyType SirenEnemy;

		public static ConfigEntry<string> AIStart;

		public static ConfigEntry<float> walkSpeed;

		public static ConfigEntry<float> runSpeed;

		public static ConfigEntry<string> Levels;

		public static AudioClip[] spotSound;

		public static AudioClip[] stepSound;

		public static AudioClip[] walkieChatter;

		public static AudioClip OhMyGodIts;

		public void Awake()
		{
			AIStart = ((BaseUnityPlugin)this).Config.Bind<string>("General", "AI Start Animation", "random", "Which animation Siren Head will spawn in");
			walkSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Siren Head Walk Speed", 3.5f, "Walking speed of Siren Head");
			runSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Siren Head Run Speed", 7f, "Running speed of Siren Head");
			Levels = ((BaseUnityPlugin)this).Config.Bind<string>("General", "Moons", "VowLevel:100;MarchLevel:100", "Moons that Siren Head will spawn on. Format as: \"MoonName:SpawnWeight\". Check README for more info.");
			Assets.PopulateAssets();
			SirenEnemy = Assets.MainAssetBundle.LoadAsset<EnemyType>("SirenHead");
			TerminalNode val = Assets.MainAssetBundle.LoadAsset<TerminalNode>("SirenHeadTN");
			TerminalKeyword val2 = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("SirenHeadKW");
			spotSound = Utils.LoadSounds(Assets.MainAssetBundle, "sirenheadspot");
			stepSound = Utils.LoadSounds(Assets.MainAssetBundle, "sirenfoot");
			walkieChatter = Utils.LoadSounds(Assets.MainAssetBundle, "sirenchatter");
			OhMyGodIts = Assets.MainAssetBundle.LoadAsset<AudioClip>("oh_my_god_its.wav");
			AudioClip[] array = spotSound;
			foreach (AudioClip val3 in array)
			{
				Debug.Log((object)((object)val3).ToString());
			}
			AudioClip[] array2 = stepSound;
			foreach (AudioClip val4 in array2)
			{
				Debug.Log((object)((object)val4).ToString());
			}
			AudioClip[] array3 = walkieChatter;
			foreach (AudioClip val5 in array3)
			{
				Debug.Log((object)((object)val5).ToString());
			}
			var (dictionary, dictionary2) = SolveLevels(Levels.Value);
			NetworkPrefabs.RegisterNetworkPrefab(SirenEnemy.enemyPrefab);
			Harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"SirenHead 2.0.2 loaded.");
			Enemies.RegisterEnemy(SirenEnemy, dictionary, dictionary2, val, val2);
			Log = ((BaseUnityPlugin)this).Logger;
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array4 = types;
			foreach (Type type in array4)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array5 = methods;
				foreach (MethodInfo methodInfo in array5)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}

		private (Dictionary<LevelTypes, int> spawnRateByLevelType, Dictionary<string, int> spawnRateByCustomLevelType) SolveLevels(string config)
		{
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			Dictionary<LevelTypes, int> dictionary = new Dictionary<LevelTypes, int>();
			Dictionary<string, int> dictionary2 = new Dictionary<string, int>();
			string[] array = config.Split(new char[1] { ';' });
			string[] array2 = array;
			foreach (string text in array2)
			{
				string[] array3 = text.Trim().Split(new char[1] { ':' });
				if (array3.Length != 2)
				{
					continue;
				}
				int result = 0;
				if (int.TryParse(array3[1], out result))
				{
					if (Enum.TryParse<LevelTypes>(array3[0], ignoreCase: true, out LevelTypes result2))
					{
						dictionary[result2] = result;
						((BaseUnityPlugin)this).Logger.LogInfo((object)$"Registered spawn rate for level type {result2} to {result}");
					}
					else
					{
						dictionary2[array3[0]] = result;
						((BaseUnityPlugin)this).Logger.LogInfo((object)$"Registered spawn rate for custom level type {array3[0]} to {result}");
					}
				}
			}
			return (dictionary, dictionary2);
		}
	}
	public static class Assets
	{
		public static AssetBundle MainAssetBundle;

		public static void PopulateAssets()
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			MainAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "sirenheadassets"));
			if ((Object)(object)MainAssetBundle == (Object)null)
			{
				Plugin.Log.LogError((object)"Failed to load custom assets.");
			}
		}
	}
	internal class Utils
	{
		public static AudioClip[] LoadSounds(AssetBundle bundle, string prefix)
		{
			List<AudioClip> list = new List<AudioClip>();
			string[] allAssetNames = bundle.GetAllAssetNames();
			foreach (string text in allAssetNames)
			{
				if (text.Contains(prefix))
				{
					list.Add(bundle.LoadAsset<AudioClip>(text));
				}
			}
			return list.ToArray();
		}
	}
}
namespace LethalSirenHead.Enemy
{
	public class SirenHeadAI : EnemyAI
	{
		public enum State
		{
			WANDERING,
			TREEING,
			CHASING
		}

		private AISearchRoutine wander = new AISearchRoutine();

		private PlayerControllerB[] players;

		private PlayerControllerB[] closePlayers;

		private string AIStart = Plugin.AIStart.Value;

		private float walkSpeed = Plugin.walkSpeed.Value;

		private float runSpeed = Plugin.runSpeed.Value;

		private float walkieTimer = 0f;

		private float walkieInterval = 0f;

		public Transform headPos;

		private ulong playerIdOfCaughtPlayer = 10000uL;

		public override void Start()
		{
			((EnemyAI)this).Start();
			int num = Random.Range(0, 2);
			string value = Plugin.AIStart.Value;
			if (value == "random")
			{
				if (num == 0)
				{
					AIStart = "tree";
				}
				else
				{
					AIStart = "standard";
				}
			}
			else if (value == "tree")
			{
				AIStart = "tree";
			}
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				walkieInterval = Random.Range(60f, 90f);
				ConfigSyncClientRpc(AIStart, walkSpeed, runSpeed);
			}
		}

		public PlayerControllerB[] CheckLineOfSightForPositionCompat(float width = 45f, int range = 60, Transform eyeObject = null, float proximityCheck = -1f, int layerMask = -1)
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Invalid comparison between Unknown and I4
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			if (layerMask == -1)
			{
				layerMask = StartOfRound.Instance.collidersAndRoomMaskAndDefault;
			}
			if ((Object)(object)eyeObject == (Object)null)
			{
				eyeObject = base.eye;
			}
			if (base.isOutside && !base.enemyType.canSeeThroughFog && (int)TimeOfDay.Instance.currentLevelWeather == 3)
			{
				range = Mathf.Clamp(range, 0, 30);
			}
			List<PlayerControllerB> list = new List<PlayerControllerB>(4);
			for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++)
			{
				if (!((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false))
				{
					continue;
				}
				Vector3 position = ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position;
				if (Vector3.Distance(base.eye.position, position) < (float)range && !Physics.Linecast(eyeObject.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))
				{
					Vector3 val = position - eyeObject.position;
					if (Vector3.Angle(eyeObject.forward, val) < width || Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position) < proximityCheck)
					{
						list.Add(StartOfRound.Instance.allPlayerScripts[i]);
					}
				}
			}
			if (list.Count == 4)
			{
				return StartOfRound.Instance.allPlayerScripts;
			}
			if (list.Count > 0)
			{
				return list.ToArray();
			}
			return null;
		}

		public bool LineOfSightForPositionCompat(Vector3 objectPosition, float width = 45f, int range = 60, float proximityAwareness = -1f, Transform overrideEye = null)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			if (!base.isOutside)
			{
				if (objectPosition.y > -80f)
				{
					return false;
				}
			}
			else if (objectPosition.y < -100f)
			{
				return false;
			}
			Transform val = (((Object)(object)overrideEye != (Object)null) ? overrideEye : ((!((Object)(object)base.eye == (Object)null)) ? base.eye : ((Component)this).transform));
			RaycastHit val2 = default(RaycastHit);
			if (Vector3.Distance(val.position, objectPosition) < (float)range && !Physics.Linecast(val.position, objectPosition, ref val2, StartOfRound.Instance.collidersAndRoomMaskAndDefault))
			{
				Vector3 val3 = objectPosition - val.position;
				if (base.debugEnemyAI)
				{
					Debug.DrawRay(val.position, objectPosition - val.position, Color.green, 2f);
				}
				if (Vector3.Angle(val.forward, val3) < width || Vector3.Distance(((Component)this).transform.position, objectPosition) < proximityAwareness)
				{
					return true;
				}
			}
			return false;
		}

		public void PlaySound(AudioClip clip, float volume = 1f)
		{
			base.creatureVoice.PlayOneShot(clip);
			WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, clip, 1f);
		}

		public void BroadcastOnWalkie(AudioClip clip, float volume = 1f)
		{
			for (int i = 0; i < WalkieTalkie.allWalkieTalkies.Count; i++)
			{
				if (((GrabbableObject)WalkieTalkie.allWalkieTalkies[i]).isBeingUsed)
				{
					WalkieTalkie.allWalkieTalkies[i].target.PlayOneShot(clip, volume);
				}
			}
		}

		[ClientRpc]
		public void playSpotOneshotClientRpc(int index)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3190762093u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, index);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3190762093u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlaySound(Plugin.spotSound[index]);
				}
			}
		}

		[ClientRpc]
		public void playWalkOneshotClientRpc(int index)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2872467106u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, index);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2872467106u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlaySound(Plugin.stepSound[index], 0.4f);
				}
			}
		}

		[ClientRpc]
		public void walkieChatterClientRpc(int index)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2456587085u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, index);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2456587085u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					BroadcastOnWalkie(Plugin.walkieChatter[index], 0.5f);
				}
			}
		}

		[ClientRpc]
		public void maketreeClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3470109575u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3470109575u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer))
				{
					base.creatureAnimator.SetBool("Tree", true);
					base.agent.speed = 0f;
					base.agent.angularSpeed = 0f;
					((EnemyAI)this).SwitchToBehaviourClientRpc(1);
				}
			}
		}

		[ClientRpc]
		public void makewanderClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2775163830u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2775163830u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.agent.speed = walkSpeed;
					((EnemyAI)this).StartSearch(((Component)this).transform.position, wander);
					((EnemyAI)this).SwitchToBehaviourClientRpc(0);
				}
			}
		}

		[ClientRpc]
		public void makechaseClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1886140381u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1886140381u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					base.agent.speed = runSpeed;
					playSpotOneshotClientRpc(Random.Range(0, Plugin.spotSound.Length));
					((EnemyAI)this).SwitchToBehaviourClientRpc(2);
				}
			}
		}

		public override void DoAIInterval()
		{
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).DoAIInterval();
			players = CheckLineOfSightForPositionCompat(50f, 70, base.eye, 15f, StartOfRound.Instance.collidersRoomDefaultAndFoliage);
			closePlayers = CheckLineOfSightForPositionCompat(50f, 20, base.eye, 10f, StartOfRound.Instance.collidersRoomDefaultAndFoliage);
			switch (base.currentBehaviourStateIndex)
			{
			case 0:
				if (players != null)
				{
					((EnemyAI)this).StopSearch(wander, true);
					makechaseClientRpc();
				}
				break;
			case 1:
				if (closePlayers != null)
				{
					if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
					{
						UntreeClientRpc();
					}
					else
					{
						RequestUntreeServerRpc();
					}
				}
				break;
			case 2:
				if (players == null)
				{
					makewanderClientRpc();
				}
				else
				{
					((EnemyAI)this).SetDestinationToPosition(((Component)players[0]).transform.position, false);
				}
				break;
			}
		}

		public override void Update()
		{
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).Update();
			if (((NetworkBehaviour)this).IsServer || ((NetworkBehaviour)this).IsHost)
			{
				walkieTimer += Time.deltaTime;
				if (walkieTimer >= walkieInterval)
				{
					walkieChatterClientRpc(Random.Range(0, Plugin.walkieChatter.Length));
					walkieTimer -= walkieInterval;
					walkieInterval = Random.Range(60f, 90f);
				}
			}
			if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)
			{
				return;
			}
			if (players != null && base.currentBehaviourStateIndex == 2 && (Object)(object)players[0] == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(1.4f, 1f);
			}
			else if (LineOfSightForPositionCompat(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, 45f, 70))
			{
				if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 15f)
				{
					GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.7f, true);
				}
				else
				{
					GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true);
				}
			}
		}

		public void LateUpdate()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null)
			{
				SirenHeadVars component = ((Component)this).gameObject.GetComponent<SirenHeadVars>();
				((Component)base.inSpecialAnimationWithPlayer).transform.position = new Vector3(component.holdPlayerPoint.position.x, component.holdPlayerPoint.position.y - 0.2f, component.holdPlayerPoint.position.z);
				((Component)base.inSpecialAnimationWithPlayer).transform.LookAt(headPos);
			}
			if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerIdOfCaughtPlayer)
			{
				((Renderer)GameNetworkManager.Instance.localPlayerController.thisPlayerModelArms).enabled = false;
				((Renderer)((Component)GameNetworkManager.Instance.localPlayerController.localVisor).gameObject.GetComponentsInChildren<MeshRenderer>()[0]).enabled = false;
				((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.LookAt(headPos);
			}
			else
			{
				((Renderer)((Component)GameNetworkManager.Instance.localPlayerController.localVisor).gameObject.GetComponentsInChildren<MeshRenderer>()[0]).enabled = true;
			}
		}

		public override void OnCollideWithPlayer(Collider other)
		{
			((EnemyAI)this).OnCollideWithPlayer(other);
			if (StartOfRound.Instance.shipIsLeaving)
			{
				return;
			}
			PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
			if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null && component.playerClientId == base.inSpecialAnimationWithPlayer.playerClientId)
			{
				return;
			}
			base.inSpecialAnimationWithPlayer = component;
			base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = true;
			base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this;
			if ((Object)(object)component != (Object)null && !component.isPlayerDead && component.AllowPlayerDeath())
			{
				if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
				{
					StartEatingPlayerClientRpc(component.playerClientId);
				}
				else
				{
					RequestStartEatingPlayerServerRpc(component.playerClientId);
				}
			}
		}

		[ClientRpc]
		public void UpdatePlayerIdOfCaughtPlayerClientRpc(ulong id)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1240534196u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, id);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1240534196u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Plugin.Log.LogInfo((object)id);
					playerIdOfCaughtPlayer = id;
				}
			}
		}

		public void PlayFootstep()
		{
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				playWalkOneshotClientRpc(Random.Range(0, Plugin.stepSound.Length));
			}
		}

		[ClientRpc]
		public void ConfigSyncClientRpc(string AIStart, float walkSpeed, float runSpeed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3822494571u, val, (RpcDelivery)0);
				bool flag = AIStart != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(AIStart, false);
				}
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref walkSpeed, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref runSpeed, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3822494571u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				this.AIStart = AIStart;
				this.walkSpeed = walkSpeed;
				this.runSpeed = runSpeed;
				if (AIStart == "tree")
				{
					maketreeClientRpc();
				}
				else
				{
					makewanderClientRpc();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void RequestStartEatingPlayerServerRpc(ulong player)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1905488255u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, player);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1905488255u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					StartEatingPlayerClientRpc(player);
				}
			}
		}

		[ClientRpc]
		public void StartEatingPlayerClientRpc(ulong player)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1290495213u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, player);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1290495213u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((MonoBehaviour)this).StartCoroutine(EatPlayer(player));
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void RequestUntreeServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2632362978u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2632362978u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					UntreeClientRpc();
				}
			}
		}

		[ClientRpc]
		public void UntreeClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3081810346u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3081810346u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Plugin.Log.LogInfo((object)"UnTreeing");
					((MonoBehaviour)this).StartCoroutine(UntreeAndSwitch());
				}
			}
		}

		public IEnumerator UntreeAndSwitch()
		{
			base.inSpecialAnimation = true;
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				base.creatureAnimator.SetBool("UnTree", true);
				base.creatureAnimator.SetBool("Tree", false);
			}
			yield return (object)new WaitForSeconds(2.5416f);
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				base.creatureAnimator.SetBool("UnTree", false);
			}
			makechaseClientRpc();
			base.agent.angularSpeed = 100f;
			base.inSpecialAnimation = false;
		}

		[ClientRpc]
		public void startThePartyClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1383007285u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1383007285u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlaySound(Plugin.OhMyGodIts);
				}
			}
		}

		public IEnumerator EatPlayer(ulong player)
		{
			PlayerControllerB PlayerObject = StartOfRound.Instance.allPlayerScripts[player];
			UpdatePlayerIdOfCaughtPlayerClientRpc(PlayerObject.playerClientId);
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				base.creatureAnimator.SetBool("Eating", true);
				try
				{
					if (((object)PlayerObject.currentlyHeldObjectServer).GetType().Name == "NoisemakerProp" && ((Object)((Component)PlayerObject.currentlyHeldObjectServer).gameObject.GetComponent<MeshFilter>().sharedMesh).name == "Airhorn" && Random.Range(0, 9) == 0)
					{
						startThePartyClientRpc();
					}
				}
				catch
				{
				}
			}
			base.inSpecialAnimation = true;
			PlayerObject.isInElevator = false;
			PlayerObject.isInHangarShipRoom = false;
			yield return (object)new WaitForSeconds(5f);
			base.inSpecialAnimation = false;
			PlayerObject.KillPlayer(Vector3.zero, false, (CauseOfDeath)8, 0, default(Vector3));
			UpdatePlayerIdOfCaughtPlayerClientRpc(10000uL);
			makewanderClientRpc();
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				base.creatureAnimator.SetBool("Eating", false);
			}
			base.inSpecialAnimationWithPlayer = null;
			PlayerObject.inSpecialInteractAnimation = false;
			PlayerObject.inAnimationWithEnemy = null;
		}

		protected override void __initializeVariables()
		{
			((EnemyAI)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_SirenHeadAI()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Expected O, but got Unknown
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Expected O, but got Unknown
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3190762093u, new RpcReceiveHandler(__rpc_handler_3190762093));
			NetworkManager.__rpc_func_table.Add(2872467106u, new RpcReceiveHandler(__rpc_handler_2872467106));
			NetworkManager.__rpc_func_table.Add(2456587085u, new RpcReceiveHandler(__rpc_handler_2456587085));
			NetworkManager.__rpc_func_table.Add(3470109575u, new RpcReceiveHandler(__rpc_handler_3470109575));
			NetworkManager.__rpc_func_table.Add(2775163830u, new RpcReceiveHandler(__rpc_handler_2775163830));
			NetworkManager.__rpc_func_table.Add(1886140381u, new RpcReceiveHandler(__rpc_handler_1886140381));
			NetworkManager.__rpc_func_table.Add(1240534196u, new RpcReceiveHandler(__rpc_handler_1240534196));
			NetworkManager.__rpc_func_table.Add(3822494571u, new RpcReceiveHandler(__rpc_handler_3822494571));
			NetworkManager.__rpc_func_table.Add(1905488255u, new RpcReceiveHandler(__rpc_handler_1905488255));
			NetworkManager.__rpc_func_table.Add(1290495213u, new RpcReceiveHandler(__rpc_handler_1290495213));
			NetworkManager.__rpc_func_table.Add(2632362978u, new RpcReceiveHandler(__rpc_handler_2632362978));
			NetworkManager.__rpc_func_table.Add(3081810346u, new RpcReceiveHandler(__rpc_handler_3081810346));
			NetworkManager.__rpc_func_table.Add(1383007285u, new RpcReceiveHandler(__rpc_handler_1383007285));
		}

		private static void __rpc_handler_3190762093(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int index = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref index);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).playSpotOneshotClientRpc(index);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2872467106(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int index = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref index);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).playWalkOneshotClientRpc(index);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2456587085(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int index = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref index);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).walkieChatterClientRpc(index);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3470109575(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).maketreeClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2775163830(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).makewanderClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1886140381(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).makechaseClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1240534196(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong id = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref id);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).UpdatePlayerIdOfCaughtPlayerClientRpc(id);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3822494571(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				string aIStart = null;
				if (flag)
				{
					((FastBufferReader)(ref reader)).ReadValueSafe(ref aIStart, false);
				}
				float num = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num, default(ForPrimitives));
				float num2 = default(float);
				((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref num2, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).ConfigSyncClientRpc(aIStart, num, num2);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1905488255(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong player = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref player);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((SirenHeadAI)(object)target).RequestStartEatingPlayerServerRpc(player);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1290495213(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				ulong player = default(ulong);
				ByteUnpacker.ReadValueBitPacked(reader, ref player);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).StartEatingPlayerClientRpc(player);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2632362978(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((SirenHeadAI)(object)target).RequestUntreeServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3081810346(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).UntreeClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1383007285(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).startThePartyClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "SirenHeadAI";
		}
	}
	public class SirenHeadAnimationCalls : MonoBehaviour
	{
		public void PlayFootstep(float filler)
		{
			((Component)this).gameObject.GetComponentInParent<SirenHeadAI>().PlayFootstep();
		}
	}
	internal class SirenHeadVars : MonoBehaviour
	{
		public Transform holdPlayerPoint;

		public AudioSource sfx;
	}
}
namespace LethalSirenHead.NetcodePatcher
{
	[AttributeUsage(AttributeTargets.Module)]
	internal class NetcodePatchedAssemblyAttribute : Attribute
	{
	}
}