Decompiled source of SirenHead v0.7.6

LethalSirenHead.dll

Decompiled 2 hours ago
using System;
using System.Collections;
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("LeathalSirenHead")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LeathalSirenHead")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("22afcc53-9f27-49f9-b82d-3ff7e8026cce")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace LethalSirenHead
{
	[BepInPlugin("Ccode.SirenHead", "SirenHead", "0.0.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[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 = "0.0.1";

		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 void Awake()
		{
			AIStart = ((BaseUnityPlugin)this).Config.Bind<string>("General", "AI Start", "standard", "The AI option to use. (tree or standard)");
			walkSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Walk Speed", 3.5f, "Walking speed.");
			runSpeed = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Run Speed", 7f, "Running speed.");
			Assets.PopulateAssets();
			SirenEnemy = Assets.MainAssetBundle.LoadAsset<EnemyType>("SirenHead");
			TerminalNode val = Assets.MainAssetBundle.LoadAsset<TerminalNode>("SirenHeadTN");
			TerminalKeyword val2 = Assets.MainAssetBundle.LoadAsset<TerminalKeyword>("SirenHeadKW");
			NetworkPrefabs.RegisterNetworkPrefab(SirenEnemy.enemyPrefab);
			Harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"SirenHead 0.0.1 loaded.");
			Enemies.RegisterEnemy(SirenEnemy, 100, (LevelTypes)16, (SpawnType)2, val, val2);
			Log = ((BaseUnityPlugin)this).Logger;
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}
	}
	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.");
			}
		}
	}
}
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 State LastState = State.WANDERING;

		public override void Start()
		{
			((EnemyAI)this).Start();
			if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
			{
				ConfigSyncClientRpc(AIStart, walkSpeed, runSpeed);
			}
			if (AIStart == "tree")
			{
				((EnemyAI)this).SwitchToBehaviourClientRpc(1);
			}
		}

		public override void DoAIInterval()
		{
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).DoAIInterval();
			players = ((EnemyAI)this).GetAllPlayersInLineOfSight(50f, 70, base.eye, 3f, StartOfRound.Instance.collidersRoomDefaultAndFoliage);
			closePlayers = ((EnemyAI)this).GetAllPlayersInLineOfSight(50f, 20, base.eye, 3f, StartOfRound.Instance.collidersRoomDefaultAndFoliage);
			switch (base.currentBehaviourStateIndex)
			{
			case 0:
				if (!wander.inProgress)
				{
					base.agent.speed = walkSpeed;
					((EnemyAI)this).StartSearch(((Component)this).transform.position, wander);
				}
				if (players != null)
				{
					((EnemyAI)this).StopSearch(wander, true);
					((EnemyAI)this).SwitchToBehaviourClientRpc(2);
				}
				break;
			case 1:
				if (LastState != State.TREEING)
				{
					base.creatureAnimator.SetBool("Tree", true);
					base.agent.speed = 0f;
					base.agent.angularSpeed = 0f;
				}
				if (closePlayers != null)
				{
					if (((NetworkBehaviour)this).IsHost || ((NetworkBehaviour)this).IsServer)
					{
						UntreeClientRpc(2);
					}
					else
					{
						RequestUntreeServerRpc(2);
					}
				}
				break;
			case 2:
				if (LastState != State.CHASING)
				{
					base.agent.speed = runSpeed;
				}
				if (players == null)
				{
					((EnemyAI)this).SwitchToBehaviourClientRpc(0);
					return;
				}
				((EnemyAI)this).SetDestinationToPosition(((Component)players[0]).transform.position, false);
				break;
			}
			LastState = (State)base.currentBehaviourStateIndex;
		}

		public void LateUpdate()
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: 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_00a4: 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)
			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.rotation = Quaternion.Euler(component.holdPlayerPoint.rotation.x, component.holdPlayerPoint.rotation.y + 180f, component.holdPlayerPoint.rotation.z);
			}
		}

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

		[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;
			}
		}

		[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(int state)
		{
			//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(3629251939u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, state);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3629251939u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					UntreeClientRpc(state);
				}
			}
		}

		[ClientRpc]
		public void UntreeClientRpc(int state)
		{
			//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(667594671u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, state);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 667594671u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Plugin.Log.LogInfo((object)"UnTreeing");
					((MonoBehaviour)this).StartCoroutine(UntreeAndSwitch((State)state));
				}
			}
		}

		public IEnumerator UntreeAndSwitch(State state)
		{
			base.inSpecialAnimation = true;
			base.creatureAnimator.SetBool("UnTree", true);
			base.creatureAnimator.SetBool("Tree", false);
			yield return (object)new WaitForSeconds(2.5416f);
			base.creatureAnimator.SetBool("UnTree", false);
			((EnemyAI)this).SwitchToBehaviourClientRpc((int)state);
			base.agent.angularSpeed = 100f;
			base.inSpecialAnimation = false;
		}

		public IEnumerator EatPlayer(ulong player)
		{
			PlayerControllerB PlayerObject = StartOfRound.Instance.allPlayerScripts[player];
			base.creatureAnimator.SetBool("Eating", true);
			base.inSpecialAnimation = true;
			PlayerObject.isInElevator = false;
			PlayerObject.isInHangarShipRoom = false;
			yield return (object)new WaitForSeconds(7.29f);
			base.inSpecialAnimation = false;
			PlayerObject.KillPlayer(Vector3.zero, false, (CauseOfDeath)8, 0);
			((EnemyAI)this).SwitchToBehaviourState(0);
			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
			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(3629251939u, new RpcReceiveHandler(__rpc_handler_3629251939));
			NetworkManager.__rpc_func_table.Add(667594671u, new RpcReceiveHandler(__rpc_handler_667594671));
		}

		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_3629251939(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 state = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref state);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((SirenHeadAI)(object)target).RequestUntreeServerRpc(state);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_667594671(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 state = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref state);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SirenHeadAI)(object)target).UntreeClientRpc(state);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		protected internal override string __getTypeName()
		{
			return "SirenHeadAI";
		}
	}
	internal class SirenHeadVars : MonoBehaviour
	{
		public Transform holdPlayerPoint;
	}
}
namespace LethalSirenHead.NetcodePatcher
{
	[AttributeUsage(AttributeTargets.Module)]
	internal class NetcodePatchedAssemblyAttribute : Attribute
	{
	}
}