Decompiled source of JPOGTrex v1.1.2

plugins/JPOGTrex/JPOGTrex.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using GameNetcodeStuff;
using HarmonyLib;
using JPOGTrex.Configuration;
using JPOGTrex.NetcodePatcher;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Unity.Collections;
using Unity.Netcode;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("JPOGTrex")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.1.2.0")]
[assembly: AssemblyInformationalVersion("1.1.2+d66f90890e196be7da4f4d0085fb0ff2ed92f1c5")]
[assembly: AssemblyProduct("JPOGTrex")]
[assembly: AssemblyTitle("JPOGTrex")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.1.2.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace JPOGTrex
{
	internal class JPOGTrexAI : EnemyAI, IVisibleThreat
	{
		private enum State
		{
			SearchingForPlayer,
			SpottedPlayer,
			ChasingPlayer,
			Roaring,
			AttackingEntity,
			GrabPlayer,
			GrabbedPlayer,
			GrabbingPlayer,
			EatingPlayer,
			Eating,
			Idle
		}

		public Transform turnCompass;

		public Transform attackArea;

		public Transform mouthGrip;

		public Transform mouthAttackHitBox;

		public AudioSource trexRoarSFX;

		public AudioSource trexSubRoarSFX;

		private Transform? mouthBone;

		private List<DeadBodyInfo> carryingBodies = new List<DeadBodyInfo>();

		private List<int> hitPlayerIds = new List<int>();

		private GameObject modelD;

		public float scrutiny = 1f;

		private Coroutine? killPlayerCoroutine;

		private float timeSinceHittingLocalPlayer;

		private float timeSinceNewRandPos;

		private Vector3 positionRandomness;

		private Random enemyRandom;

		private bool isDeadAnimationDone;

		private bool isHungry = true;

		private float defaultSpeed = 6f;

		private State previousState = State.Idle;

		private bool inKillAnimation;

		private bool inEatingAnimation;

		private bool roaring;

		private bool isRoaringStarted;

		private bool isSniffingStarted;

		private bool sniffing;

		private bool beginningGrab;

		private bool hitConnect;

		private PlayerControllerB? movingPlayer;

		private float localPlayerTurnDistance;

		private float attackRange;

		private bool doneEating;

		private bool shakingBoddies;

		private int visionRangeSearching = 70;

		private int visionRangeWidth = 60;

		private int visionRangeChase = 50;

		private float suspicionLevel;

		private float maxSuspicionLevel;

		private float increasRateSuspicion;

		private float decreaseRateSuspicion;

		private float timeSinceSeeingPlayerMove;

		private float decreaseSuspicionTimer;

		private float timeSinceLostPlayer;

		private float maxSearchtime = 20f;

		private float stopChaseHeight = 12f;

		private float previousSpeed;

		private Vector3 lastKnownPositionTargetPlayer;

		private bool isMovingTowardsLastKnownPosition;

		private bool foundPlayerInCloseProx;

		private bool inGrabAttack;

		private int maxPlayersToEat;

		private int playersEaten;

		private float stoppingThreshold = 9f;

		private float lastSuspicionDecreaseTime;

		private bool inAttackEnemyAnimation;

		private EnemyAI? targetEntity;

		ThreatType IVisibleThreat.type => (ThreatType)4;

		public int GetThreatLevel(Vector3 seenByPosition)
		{
			return 18;
		}

		public int GetInterestLevel()
		{
			return 0;
		}

		public Transform GetThreatLookTransform()
		{
			return base.eye;
		}

		public Transform GetThreatTransform()
		{
			return ((Component)this).transform;
		}

		public Vector3 GetThreatVelocity()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			if (((NetworkBehaviour)this).IsOwner)
			{
				return base.agent.velocity;
			}
			return Vector3.zero;
		}

		public float GetVisibility()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			if (base.isEnemyDead)
			{
				return 0f;
			}
			Vector3 velocity = base.agent.velocity;
			if (((Vector3)(ref velocity)).sqrMagnitude > 0f)
			{
				return 1f;
			}
			return 0.75f;
		}

		public int SendSpecialBehaviour(int id)
		{
			return 0;
		}

		[Conditional("DEBUG")]
		private void LogIfDebugBuild(string text)
		{
			Plugin.Logger.LogInfo((object)text);
		}

		private void AssignConfigVariables()
		{
			visionRangeSearching = SyncedInstance<PluginConfig>.Instance.VisionRangeLength.Value;
			visionRangeChase = SyncedInstance<PluginConfig>.Instance.VisionRangeLength.Value - 20;
			visionRangeWidth = SyncedInstance<PluginConfig>.Instance.VisionRangeWidth.Value;
			defaultSpeed = SyncedInstance<PluginConfig>.Instance.DefaultSpeed.Value;
			maxSuspicionLevel = SyncedInstance<PluginConfig>.Instance.MaxSuspicionLevel.Value;
			increasRateSuspicion = SyncedInstance<PluginConfig>.Instance.SuspicionIncrement.Value;
			decreaseRateSuspicion = SyncedInstance<PluginConfig>.Instance.SuspicionDecrement.Value;
			decreaseSuspicionTimer = SyncedInstance<PluginConfig>.Instance.SuspiciontDecreaseTime.Value;
			maxPlayersToEat = 2;
		}

		public override void Start()
		{
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			AssignConfigVariables();
			base.agent.stoppingDistance = 0f;
			((EnemyAI)this).Start();
			attackRange = 8f;
			timeSinceHittingLocalPlayer = 0f;
			SetWalkingAnimationServerRpc(defaultSpeed);
			timeSinceNewRandPos = 0f;
			positionRandomness = new Vector3(0f, 0f, 0f);
			enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex);
			isDeadAnimationDone = false;
			SwitchToBehaviourStateServerRpc(0);
		}

		public override void Update()
		{
			//IL_00fb: 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)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).Update();
			if (base.isEnemyDead)
			{
				if (!isDeadAnimationDone)
				{
					isDeadAnimationDone = true;
					base.creatureVoice.Stop();
					base.creatureVoice.PlayOneShot(base.dieSFX);
				}
				return;
			}
			if (base.enemyHP <= 0 && !base.isEnemyDead)
			{
				((MonoBehaviour)this).StopAllCoroutines();
				((MonoBehaviour)this).StopCoroutine(base.searchCoroutine);
				((EnemyAI)this).KillEnemyOnOwnerClient(false);
				return;
			}
			if (isMovingTowardsLastKnownPosition)
			{
				timeSinceLostPlayer += Time.deltaTime;
			}
			timeSinceHittingLocalPlayer += Time.deltaTime;
			timeSinceNewRandPos += Time.deltaTime;
			timeSinceSeeingPlayerMove += Time.deltaTime;
			int currentBehaviourStateIndex = base.currentBehaviourStateIndex;
			if ((Object)(object)base.targetPlayer != (Object)null && (currentBehaviourStateIndex == 5 || currentBehaviourStateIndex == 6 || currentBehaviourStateIndex == 7 || currentBehaviourStateIndex == 8 || currentBehaviourStateIndex == 1 || currentBehaviourStateIndex == 1))
			{
				turnCompass.LookAt(((Component)base.targetPlayer.gameplayCamera).transform.position);
				((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, turnCompass.eulerAngles.y, 0f)), 4f * Time.deltaTime);
			}
			if (base.stunNormalizedTimer > 0f)
			{
				base.agent.speed = 0f;
				SetWalkingAnimationServerRpc(base.agent.speed);
			}
		}

		public override void DoAIInterval()
		{
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0304: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			//IL_0383: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0441: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_048a: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).DoAIInterval();
			if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead)
			{
				return;
			}
			switch (base.currentBehaviourStateIndex)
			{
			case 0:
				if (previousState != 0)
				{
					((MonoBehaviour)this).StopAllCoroutines();
					base.movingTowardsTargetPlayer = false;
					base.agent.speed = defaultSpeed;
					base.agent.autoBraking = true;
					SetWalkingAnimationServerRpc(base.agent.speed);
					((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
					previousState = State.SearchingForPlayer;
				}
				FoundClosestPlayerInRangeServerRpc();
				if (foundPlayerInCloseProx)
				{
					((EnemyAI)this).StopSearch(base.currentSearch, true);
					foundPlayerInCloseProx = false;
					SwitchToBehaviourStateServerRpc(1);
					break;
				}
				CheckLineOfSightServerRpc();
				DecreaseSuspicionServerRpc();
				if ((Object)(object)movingPlayer != (Object)null && suspicionLevel == maxSuspicionLevel)
				{
					base.targetPlayer = movingPlayer;
					movingPlayer = null;
					((EnemyAI)this).StopSearch(base.currentSearch, true);
					SwitchToBehaviourStateServerRpc(1);
				}
				break;
			case 1:
				if (previousState != State.SpottedPlayer && !isSniffingStarted)
				{
					base.agent.speed = 2f;
					sniffing = true;
					SetWalkingAnimationServerRpc(base.agent.speed);
					((MonoBehaviour)this).StartCoroutine(FoundPlayer());
					isSniffingStarted = true;
					previousState = State.SpottedPlayer;
				}
				if (!sniffing)
				{
					isSniffingStarted = false;
					SwitchToBehaviourStateServerRpc(3);
				}
				break;
			case 3:
			{
				if (previousState != State.SpottedPlayer && previousState != State.Roaring)
				{
					base.agent.speed = 0f;
					SetWalkingAnimationServerRpc(base.agent.speed);
					previousState = State.Roaring;
				}
				int animationNumber = enemyRandom.Next(1, 4);
				if (previousState != State.Roaring && !isRoaringStarted)
				{
					roaring = true;
					((MonoBehaviour)this).StartCoroutine(BeginChase(animationNumber));
					isRoaringStarted = true;
				}
				if (!roaring)
				{
					isRoaringStarted = false;
					SwitchToBehaviourStateServerRpc(2);
				}
				break;
			}
			case 2:
				if (previousState != State.ChasingPlayer)
				{
					base.agent.speed = defaultSpeed * 2f;
					previousState = State.ChasingPlayer;
					base.movingTowardsTargetPlayer = true;
					SetWalkingAnimationServerRpc(base.agent.speed);
				}
				if ((Object)(object)base.targetPlayer != (Object)null)
				{
					((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer).transform.position, false);
					CheckForPlayersInRangeOfGrabAttackServerRpc();
					if (base.targetPlayer.isInHangarShipRoom)
					{
						base.targetPlayer = null;
						suspicionLevel = maxSuspicionLevel / 100f * 60f;
						timeSinceLostPlayer = 0f;
						((EnemyAI)this).SwitchToBehaviourServerRpc(0);
					}
				}
				if ((Object)(object)base.targetPlayer != (Object)null)
				{
					float num = Mathf.Abs(((Component)this).transform.position.y - ((Component)base.targetPlayer).transform.position.y);
					if (num > stopChaseHeight)
					{
						base.targetPlayer = null;
						isMovingTowardsLastKnownPosition = false;
						suspicionLevel = maxSuspicionLevel / 100f * 60f;
						timeSinceLostPlayer = 0f;
						((EnemyAI)this).SwitchToBehaviourServerRpc(0);
					}
				}
				CheckIfPlayerIsTargetableServerRpc();
				if ((Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > (float)visionRangeChase && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer).transform.position, 45f, 60, -1f, (Transform)null))
				{
					lastKnownPositionTargetPlayer = ((Component)base.targetPlayer).transform.position;
					base.targetPlayer = null;
					isMovingTowardsLastKnownPosition = true;
					((EnemyAI)this).SetDestinationToPosition(lastKnownPositionTargetPlayer, false);
					break;
				}
				if (timeSinceLostPlayer >= maxSearchtime)
				{
					isMovingTowardsLastKnownPosition = false;
					suspicionLevel = maxSuspicionLevel / 100f * 60f;
					timeSinceLostPlayer = 0f;
					((EnemyAI)this).SwitchToBehaviourServerRpc(0);
				}
				if (isMovingTowardsLastKnownPosition && Vector3.Distance(((Component)this).transform.position, lastKnownPositionTargetPlayer) < 10f)
				{
					isMovingTowardsLastKnownPosition = false;
					if (!FoundClosestPlayerInRange())
					{
						suspicionLevel = maxSuspicionLevel / 100f * 60f;
						((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null);
						SwitchToBehaviourStateServerRpc(0);
						break;
					}
				}
				if ((Object)(object)base.targetPlayer == (Object)null && !isMovingTowardsLastKnownPosition)
				{
					suspicionLevel = maxSuspicionLevel / 100f * 60f;
					SwitchToBehaviourStateServerRpc(0);
				}
				break;
			case 4:
				previousState = State.AttackingEntity;
				DoAnimationClientRpc("attackEnemy");
				previousState = State.AttackingEntity;
				break;
			case 5:
				if (previousState != State.GrabPlayer)
				{
					previousState = State.GrabPlayer;
					if (timeSinceHittingLocalPlayer >= 4f)
					{
						beginningGrab = true;
						((MonoBehaviour)this).StartCoroutine(BeginGrab());
					}
					if ((Object)(object)base.targetPlayer != (Object)null && base.targetPlayer.isInHangarShipRoom)
					{
						base.targetPlayer = null;
						suspicionLevel = maxSuspicionLevel / 100f * 60f;
						timeSinceLostPlayer = 0f;
						((EnemyAI)this).SwitchToBehaviourServerRpc(0);
					}
				}
				if (!beginningGrab)
				{
					if (hitConnect)
					{
						base.agent.speed = defaultSpeed / 2f;
						SetWalkingAnimationServerRpc(base.agent.speed);
						hitConnect = false;
						SwitchToBehaviourStateServerRpc(7);
					}
					else if (!hitConnect && !inGrabAttack)
					{
						hitConnect = false;
						SwitchToBehaviourStateServerRpc(2);
					}
				}
				break;
			case 6:
				DoAnimationClientRpc("grabbedPlayer");
				previousState = State.GrabbedPlayer;
				SwitchToBehaviourStateServerRpc(7);
				break;
			case 7:
				if (previousState != State.GrabbingPlayer)
				{
					base.agent.speed = 0f;
					previousState = State.GrabbingPlayer;
					base.movingTowardsTargetPlayer = false;
					SetWalkingAnimationServerRpc(base.agent.speed);
					ShakingBodiesServerRpc();
				}
				if (!shakingBoddies && isHungry)
				{
					SwitchToBehaviourStateServerRpc(8);
				}
				else if (!shakingBoddies && !isHungry)
				{
					DropcarriedBodyServerRpc();
					SwitchToBehaviourStateServerRpc(0);
				}
				break;
			case 8:
				if (previousState != State.EatingPlayer)
				{
					base.agent.speed = 0f;
					SetWalkingAnimationServerRpc(base.agent.speed);
					previousState = State.EatingPlayer;
				}
				if (isHungry)
				{
					EatPlayerServerRpc();
				}
				if (doneEating)
				{
					doneEating = false;
					suspicionLevel = maxSuspicionLevel / 100f * 20f;
					SwitchToBehaviourStateServerRpc(0);
				}
				break;
			case 10:
				switch (enemyRandom.Next(4))
				{
				case 1:
					base.agent.speed = 1f;
					DoAnimationClientRpc("lookingIdle");
					previousState = State.Idle;
					break;
				case 2:
					base.agent.speed = 1f;
					DoAnimationClientRpc("sniffingIdle");
					previousState = State.Idle;
					break;
				case 3:
					base.agent.speed = 0f;
					DoAnimationClientRpc("eatingIdle01");
					previousState = State.Idle;
					SwitchToBehaviourStateServerRpc(9);
					break;
				}
				break;
			case 9:
				DoAnimationClientRpc("eatingIdle02");
				previousState = State.Idle;
				SwitchToBehaviourStateServerRpc(9);
				break;
			default:
				isRoaringStarted = false;
				SwitchToBehaviourStateServerRpc(0);
				break;
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void SwitchToBehaviourStateServerRpc(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(4044504695u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, state);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4044504695u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					((EnemyAI)this).SwitchToBehaviourClientRpc(state);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void IncreaseSuspicionServerRpc()
		{
			//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(383933774u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 383933774u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					IncreaseSuspicionClientRpc();
				}
			}
		}

		[ClientRpc]
		private void IncreaseSuspicionClientRpc()
		{
			//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(68062461u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 68062461u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					IncreaseSuspicion();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void DecreaseSuspicionServerRpc()
		{
			//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(196265841u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 196265841u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					DecreaseSuspicionClientRpc();
				}
			}
		}

		[ClientRpc]
		private void DecreaseSuspicionClientRpc()
		{
			//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(1406359588u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1406359588u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					DecreaseSuspicion();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void EatPlayerServerRpc()
		{
			//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(2761139281u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2761139281u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					EatPlayerClientRpc();
				}
			}
		}

		[ClientRpc]
		private void EatPlayerClientRpc()
		{
			//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(1552663799u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1552663799u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					EatPlayer();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void CheckLineOfSightServerRpc()
		{
			//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(1007749407u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1007749407u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					CheckLineOfSightClientRpc();
				}
			}
		}

		[ClientRpc]
		private void CheckLineOfSightClientRpc()
		{
			//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(2462409149u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2462409149u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					CheckLineOfSight();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void CheckIfPlayerIsTargetableServerRpc()
		{
			//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(1616780182u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1616780182u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					CheckIfPlayerIsTargetableClientRpc();
				}
			}
		}

		[ClientRpc]
		private void CheckIfPlayerIsTargetableClientRpc()
		{
			//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(3965041338u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3965041338u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					CheckIfPlayerIsTargetable();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void CheckIfPlayerIsReachableServerRpc()
		{
			//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(2426246370u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2426246370u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					CheckIfPlayerIsReachableClientRpc();
				}
			}
		}

		[ClientRpc]
		private void CheckIfPlayerIsReachableClientRpc()
		{
			//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(1574665774u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1574665774u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					CheckIfPlayerIsReachable();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void FoundClosestPlayerInRangeServerRpc()
		{
			//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(2543335442u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2543335442u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					FoundClosestPlayerInRangeClientRpc();
				}
			}
		}

		[ClientRpc]
		private void FoundClosestPlayerInRangeClientRpc()
		{
			//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(4266601933u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4266601933u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					FoundClosestPlayerInRange();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void CheckLineOfSightDuringChaseServerRpc()
		{
			//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(1113121824u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1113121824u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					CheckLineOfSightDuringChaseClientRpc();
				}
			}
		}

		[ClientRpc]
		private void CheckLineOfSightDuringChaseClientRpc()
		{
			//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(1693104752u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1693104752u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					CheckLineOfSightDuringChase();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void SetWalkingAnimationServerRpc(float speed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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)
			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(2878721726u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speed, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2878721726u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetWalkingAnimation(speed);
				}
			}
		}

		[ClientRpc]
		private void SetWalkingAnimationClientRpc(float speed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: 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_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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)
			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(706373814u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speed, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 706373814u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && !networkManager.IsClient && networkManager.IsHost)
				{
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void SetBonesServerRpc()
		{
			//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(790609705u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 790609705u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetBonesClientRpc();
				}
			}
		}

		[ClientRpc]
		private void SetBonesClientRpc()
		{
			//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(1630151927u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1630151927u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					SetBones();
				}
			}
		}

		[ClientRpc]
		private void UpdateMouthGripLocationToTargetBoneLocationClientRpc()
		{
			//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(2236595176u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2236595176u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					UpdateMouthGripLocationToTargetBoneLocation();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void CheckForPlayersInRangeOfGrabAttackServerRpc()
		{
			//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(425862865u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 425862865u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					CheckForPlayersInRangeOfGrabAttack();
				}
			}
		}

		[ClientRpc]
		public void DoAnimationClientRpc(string animationName)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: 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_00ba: 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(2366721070u, val, (RpcDelivery)0);
				bool flag = animationName != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false);
				}
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2366721070u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				base.creatureAnimator.SetTrigger(animationName);
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void StartGrabCheckServerRpc()
		{
			//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(2585592854u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2585592854u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					inGrabAttack = true;
					StartGrabCheckClientRpc();
				}
			}
		}

		[ClientRpc]
		private void StartGrabCheckClientRpc()
		{
			//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(142709209u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 142709209u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((MonoBehaviour)this).StartCoroutine(CheckIfGrabHitDuringAnimation());
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void StopGrabCheckServerRpc()
		{
			//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(813321880u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 813321880u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					StopGrabCheckClientRpc();
				}
			}
		}

		[ClientRpc]
		private void StopGrabCheckClientRpc()
		{
			//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(179337775u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 179337775u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					StopGrabCheckCoroutine();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void GrabAttackHitServerRpc()
		{
			//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(2535332498u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2535332498u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					GrabAttackHit();
				}
			}
		}

		[ClientRpc]
		public void CancelKillAnimationWithPlayerClientRpc(int playerObjectId)
		{
			//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(402060824u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerObjectId);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 402060824u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					StartOfRound.Instance.allPlayerScripts[playerObjectId].inAnimationWithEnemy = null;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void BeginGrabAttackServerRpc()
		{
			//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(4162285103u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4162285103u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					BeginGrabAttackClientRpc();
				}
			}
		}

		[ClientRpc]
		public void BeginGrabAttackClientRpc()
		{
			//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(274539382u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 274539382u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((MonoBehaviour)this).StartCoroutine(BeginGrab());
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void StopGrabAttackServerRpc()
		{
			//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(1014319066u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1014319066u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					StopGrabAttackClientRpc();
				}
			}
		}

		[ClientRpc]
		public void StopGrabAttackClientRpc()
		{
			//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(2377210929u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2377210929u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					((MonoBehaviour)this).StopCoroutine(BeginGrab());
				}
			}
		}

		[ServerRpc]
		private void ShakingBodiesServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Invalid comparison between Unknown and I4
			//IL_00a5: 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_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1138974225u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1138974225u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				ShakingBodiesClientRpc();
			}
		}

		[ClientRpc]
		private void ShakingBodiesClientRpc()
		{
			//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(1014053066u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1014053066u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					ShakkingBodies();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void KillPlayerServerRpc(int playerId)
		{
			//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)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(961814835u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 961814835u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				if (!inKillAnimation)
				{
					inKillAnimation = true;
					KillPlayerClientRpc(playerId);
				}
				else
				{
					CancelKillAnimationWithPlayerClientRpc(playerId);
				}
			}
		}

		[ClientRpc]
		public void KillPlayerClientRpc(int playerId)
		{
			//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)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3678506734u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3678506734u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (killPlayerCoroutine != null)
				{
					((MonoBehaviour)this).StopCoroutine(killPlayerCoroutine);
				}
				killPlayerCoroutine = ((MonoBehaviour)this).StartCoroutine(KillPlayer(playerId));
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TakeBodyInMouthServerRpc(int killPlayerId)
		{
			//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(3087441486u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, killPlayerId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3087441486u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TakeBodyInMouthClientRpc(killPlayerId);
				}
			}
		}

		[ClientRpc]
		public void TakeBodyInMouthClientRpc(int killPlayerId)
		{
			//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(767250546u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, killPlayerId);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 767250546u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					TakeBodyInMouth(killPlayerId);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void DropcarriedBodyServerRpc()
		{
			//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(1541272386u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1541272386u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					DropcarriedBodyClientRpc();
				}
			}
		}

		[ClientRpc]
		public void DropcarriedBodyClientRpc()
		{
			//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(975871412u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 975871412u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					DropCarriedBody();
				}
			}
		}

		private bool TargetClosestPlayerInAnyCase()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			base.mostOptimalDistance = 2000f;
			base.targetPlayer = null;
			for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++)
			{
				base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position);
				if (base.tempDist < base.mostOptimalDistance)
				{
					base.mostOptimalDistance = base.tempDist;
					base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i];
				}
			}
			if ((Object)(object)base.targetPlayer == (Object)null)
			{
				return false;
			}
			return true;
		}

		private bool FoundClosestPlayerInRange(float range = 15f, float senseRange = 5f)
		{
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).TargetClosestPlayer(1.5f, true, 60f);
			if ((Object)(object)base.targetPlayer == (Object)null)
			{
				((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f);
				range = senseRange;
			}
			if ((Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range && !base.targetPlayer.isInHangarShipRoom)
			{
				foundPlayerInCloseProx = true;
				return true;
			}
			base.targetPlayer = null;
			return false;
		}

		private void CheckLineOfSightDuringChase()
		{
			PlayerControllerB[] allPlayersInLineOfSight = ((EnemyAI)this).GetAllPlayersInLineOfSight((float)visionRangeWidth, visionRangeChase, base.eye, 3f, StartOfRound.Instance.collidersRoomDefaultAndFoliage);
			if (allPlayersInLineOfSight == null)
			{
				return;
			}
			PlayerControllerB[] array = allPlayersInLineOfSight;
			foreach (PlayerControllerB val in array)
			{
				if (!((Object)(object)val == (Object)null) && !((Object)(object)base.targetPlayer == (Object)null) && val.playerClientId == base.targetPlayer.playerClientId)
				{
					base.targetPlayer = val;
				}
			}
			if ((Object)(object)base.targetPlayer != (Object)null && !IsPlayerInLineOfSight(base.targetPlayer))
			{
				base.targetPlayer = null;
			}
		}

		private bool IsPlayerInLineOfSight(PlayerControllerB player)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return ((EnemyAI)this).CheckLineOfSightForPosition(((Component)player).transform.position, 45f, 60, -1f, (Transform)null);
		}

		private void IncreaseSuspicion()
		{
			suspicionLevel = Mathf.Clamp(suspicionLevel + increasRateSuspicion, 0f, maxSuspicionLevel);
			timeSinceSeeingPlayerMove = 0f;
		}

		private void DecreaseSuspicion()
		{
			if (Time.time - lastSuspicionDecreaseTime >= decreaseSuspicionTimer)
			{
				suspicionLevel = Mathf.Clamp(suspicionLevel - decreaseRateSuspicion, 0f, maxSuspicionLevel);
				lastSuspicionDecreaseTime = Time.time;
			}
		}

		private void CheckLineOfSight()
		{
			PlayerControllerB[] allPlayersInLineOfSight = ((EnemyAI)this).GetAllPlayersInLineOfSight((float)visionRangeWidth, visionRangeSearching, base.eye, 3f, StartOfRound.Instance.collidersRoomDefaultAndFoliage);
			if (allPlayersInLineOfSight == null)
			{
				return;
			}
			PlayerControllerB[] array = allPlayersInLineOfSight;
			foreach (PlayerControllerB val in array)
			{
				if ((Object)(object)val != (Object)null && !val.isPlayerDead && !base.isInsidePlayerShip && CheckIfPlayerIsmoving(val))
				{
					IncreaseSuspicionServerRpc();
					movingPlayer = val;
					timeSinceSeeingPlayerMove += Time.deltaTime;
					lastSuspicionDecreaseTime = Time.time;
					break;
				}
			}
		}

		private bool CheckIfPlayerIsmoving(PlayerControllerB playerToCheck)
		{
			//IL_002a: 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)
			localPlayerTurnDistance += StartOfRound.Instance.playerLookMagnitudeThisFrame;
			if (localPlayerTurnDistance > 0.1f && Vector3.Distance(((Component)playerToCheck).transform.position, ((Component)this).transform.position) < 10f)
			{
				return true;
			}
			if (playerToCheck.performingEmote)
			{
				return true;
			}
			if (Time.realtimeSinceStartup - StartOfRound.Instance.timeAtMakingLastPersonalMovement < 0.25f)
			{
				return true;
			}
			if (playerToCheck.timeSincePlayerMoving < 0.05f)
			{
				return true;
			}
			return false;
		}

		private void CheckForPlayersInRangeOfGrabAttack()
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)movingPlayer != (Object)null || (Object)(object)base.targetPlayer != (Object)null)
			{
				float num = Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position);
				if (num <= attackRange)
				{
					SwitchToBehaviourStateServerRpc(5);
				}
			}
		}

		private void CheckIfPlayerIsTargetable()
		{
			if ((Object)(object)base.targetPlayer != (Object)null && !((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false))
			{
				base.targetPlayer = null;
				suspicionLevel = 60f;
				SwitchToBehaviourStateServerRpc(0);
			}
		}

		private void CheckIfPlayerIsReachable()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)base.targetPlayer != (Object)null && !base.agent.CalculatePath(((Component)base.targetPlayer).transform.position, base.path1))
			{
				base.targetPlayer = null;
				suspicionLevel = 60f;
				SwitchToBehaviourStateServerRpc(0);
			}
		}

		public void GrabAttackHit()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			float num = 10f;
			if ((Object)(object)base.targetPlayer != (Object)null)
			{
				float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position);
				if (num2 <= num)
				{
					timeSinceHittingLocalPlayer = 0f;
					hitConnect = true;
				}
				else
				{
					hitConnect = false;
				}
			}
		}

		public void OnAnimationEventStartGrabCheck()
		{
			if (((NetworkBehaviour)this).IsOwner)
			{
				inGrabAttack = true;
				((MonoBehaviour)this).StartCoroutine(CheckIfGrabHitDuringAnimation());
				StartGrabCheckServerRpc();
			}
		}

		public void OnAnimationEventEndGrabCheck()
		{
			if (((NetworkBehaviour)this).IsOwner)
			{
				inGrabAttack = false;
				StopGrabCheckCoroutine();
				StopGrabCheckServerRpc();
			}
		}

		private void StopGrabCheckCoroutine()
		{
			inGrabAttack = false;
			((MonoBehaviour)this).StopCoroutine(CheckIfGrabHitDuringAnimation());
		}

		public void GrabAttackHitAnimation()
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			int num = 8;
			Collider[] array = Physics.OverlapBox(mouthAttackHitBox.position, mouthAttackHitBox.localScale, Quaternion.identity, num);
			bool flag = false;
			if (array.Length != 0)
			{
				Collider[] array2 = array;
				foreach (Collider val in array2)
				{
					PlayerControllerB val2 = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(val, false, false);
					if ((Object)(object)val2 != (Object)null)
					{
						int num2 = (int)val2.playerClientId;
						if (!hitPlayerIds.Contains((int)val2.playerClientId))
						{
							timeSinceHittingLocalPlayer = 0f;
							flag = true;
							KillPlayerServerRpc((int)val2.playerClientId);
							hitPlayerIds.Add((int)val2.playerClientId);
						}
					}
				}
			}
			if (flag)
			{
				SetHitConnectToTrueServerRpc();
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void SetHitConnectToTrueServerRpc()
		{
			//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(448008859u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 448008859u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetHitConnectToTrueClientRpc();
				}
			}
		}

		[ClientRpc]
		private void SetHitConnectToTrueClientRpc()
		{
			//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(4090198766u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4090198766u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					SetHitConnectToTrue();
				}
			}
		}

		private void SetHitConnectToTrue()
		{
			hitConnect = true;
		}

		private void TakeBodyInMouth(int playerId)
		{
			DeadBodyInfo deadBody = StartOfRound.Instance.allPlayerScripts[playerId].deadBody;
			if ((Object)(object)deadBody != (Object)null)
			{
				deadBody.attachedTo = mouthGrip;
				deadBody.attachedLimb = deadBody.bodyParts[5];
				deadBody.matchPositionExactly = true;
				deadBody.MakeCorpseBloody();
				carryingBodies.Add(deadBody);
			}
		}

		private void HandleBraking()
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)base.targetPlayer != (Object)null)
			{
				float num = Vector3.Distance(((Component)base.agent).transform.position, ((Component)base.targetPlayer).transform.position);
				if (num < stoppingThreshold)
				{
					base.agent.stoppingDistance = 7f;
					base.agent.autoBraking = true;
					SetWalkingAnimationServerRpc(base.agent.speed);
				}
				else
				{
					base.agent.stoppingDistance = 0f;
					base.agent.autoBraking = false;
					base.agent.speed = defaultSpeed * 2f;
					SetWalkingAnimationServerRpc(base.agent.speed);
				}
			}
		}

		private void DropCarriedBody()
		{
			if (carryingBodies.Count <= 0)
			{
				return;
			}
			foreach (DeadBodyInfo carryingBody in carryingBodies)
			{
				if (!((Object)(object)carryingBody == (Object)null))
				{
					carryingBody.speedMultiplier = 12f;
					carryingBody.attachedTo = null;
					carryingBody.attachedLimb = null;
					carryingBody.matchPositionExactly = false;
				}
			}
			carryingBodies.Clear();
		}

		private void EatPlayer()
		{
			if (!inEatingAnimation && isHungry)
			{
				inEatingAnimation = true;
				((MonoBehaviour)this).StartCoroutine(EatPlayerCoroutine());
			}
		}

		private void ShakeCamera()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
			float num = Vector3.Distance(((Component)this).transform.position, ((Component)localPlayerController).transform.position);
			if (!(num > 40f))
			{
				if (num <= 5f)
				{
					HUDManager.Instance.ShakeCamera((ScreenShakeType)3);
				}
				else if (num > 5f && num <= 20f)
				{
					HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
				}
				else if (num > 20f && num <= 40f)
				{
					HUDManager.Instance.ShakeCamera((ScreenShakeType)0);
				}
			}
		}

		private void TrexStartsChasingPlayerEffect(PlayerControllerB playerControllerB)
		{
			if (!playerControllerB.isPlayerDead && !playerControllerB.isInsideFactory && base.currentBehaviourStateIndex == 0 && (Object)(object)playerControllerB == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				base.targetPlayer.JumpToFearLevel(10f, true);
			}
		}

		private void TrexSeePlayerEffect()
		{
			PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
			if (!((Object)(object)localPlayerController == (Object)null) && !localPlayerController.isPlayerDead && !localPlayerController.isInsideFactory && (Object)(object)localPlayerController == (Object)(object)movingPlayer)
			{
				GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.2f, 1f);
			}
		}

		public override void OnCollideWithPlayer(Collider other)
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			((EnemyAI)this).OnCollideWithPlayer(other);
			if (!(timeSinceHittingLocalPlayer < 1f))
			{
				PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false);
				if ((Object)(object)val != (Object)null)
				{
					timeSinceHittingLocalPlayer = 0f;
					val.DamagePlayer(20, true, true, (CauseOfDeath)0, 0, false, default(Vector3));
				}
			}
		}

		public override void OnCollideWithEnemy(Collider other, EnemyAI collidedEnemy = null)
		{
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Invalid comparison between Unknown and I4
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Invalid comparison between Unknown and I4
			((EnemyAI)this).OnCollideWithEnemy(other, collidedEnemy);
			if (!base.isEnemyDead && !collidedEnemy.isEnemyDead && CheckIfInNotAnimation())
			{
				targetEntity = collidedEnemy;
				LookAtTargetEntityServerRpc();
				if ((int)collidedEnemy.enemyType.SizeLimit == 2)
				{
					((MonoBehaviour)this).StartCoroutine(AttackEnemyLow());
				}
				else if ((int)collidedEnemy.enemyType.SizeLimit == 1)
				{
					((MonoBehaviour)this).StartCoroutine(AttackEnemyHigh());
				}
				else
				{
					((MonoBehaviour)this).StartCoroutine(AttackEnemyLow());
				}
			}
		}

		public bool CheckIfInNotAnimation()
		{
			if (!inGrabAttack && !inKillAnimation && !inEatingAnimation && !beginningGrab && !inAttackEnemyAnimation)
			{
				return true;
			}
			return false;
		}

		public IEnumerator AttackEnemyLow()
		{
			inAttackEnemyAnimation = true;
			DoAnimationClientRpc("attackEnemyLow");
			yield return (object)new WaitForSeconds(1.2f);
			if ((Object)(object)targetEntity != (Object)null && Object.op_Implicit((Object)(object)targetEntity.enemyType))
			{
				targetEntity.HitEnemy(15, (PlayerControllerB)null, true, -1);
			}
			inAttackEnemyAnimation = false;
		}

		public IEnumerator AttackEnemyHigh()
		{
			inAttackEnemyAnimation = true;
			DoAnimationClientRpc("attackEnemyHigh");
			yield return (object)new WaitForSeconds(1.2f);
			if ((Object)(object)targetEntity != (Object)null)
			{
				targetEntity.HitEnemy(10, (PlayerControllerB)null, true, -1);
			}
			inAttackEnemyAnimation = false;
		}

		[ServerRpc(RequireOwnership = false)]
		private void LookAtTargetEntityServerRpc()
		{
			//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(2581050023u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2581050023u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					LookAtTargetEntityClientRpc();
				}
			}
		}

		[ClientRpc]
		private void LookAtTargetEntityClientRpc()
		{
			//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(2221332555u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2221332555u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					LookAtTargetEntity();
				}
			}
		}

		private void LookAtTargetEntity()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)targetEntity != (Object)null)
			{
				turnCompass.LookAt(((Component)targetEntity).transform.position);
			}
		}

		public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1)
		{
			((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID);
			if (base.isEnemyDead)
			{
				return;
			}
			base.enemyHP -= force;
			if (base.enemyHP > 0 && base.previousBehaviourStateIndex != 8 && base.previousBehaviourStateIndex != 7 && base.previousBehaviourStateIndex != 5)
			{
				base.targetPlayer = playerWhoHit;
				if (base.previousBehaviourStateIndex != 2)
				{
					suspicionLevel = maxSuspicionLevel;
					((EnemyAI)this).SwitchToBehaviourServerRpc(2);
				}
			}
		}

		private void ShakkingBodies()
		{
			if (!shakingBoddies)
			{
				shakingBoddies = true;
				((MonoBehaviour)this).StartCoroutine(ShakeGrabbedBody());
			}
		}

		public override void KillEnemy(bool destroy = false)
		{
			SetWalkingAnimationServerRpc(0f);
			DoAnimationClientRpc("killEnemy");
			base.creatureVoice.Stop();
			base.creatureSFX.Stop();
			((EnemyAI)this).KillEnemy(destroy);
		}

		private void SetWalkingAnimation(float currentSpeed)
		{
			if (currentSpeed != previousSpeed)
			{
				if (currentSpeed == 0f)
				{
					DoAnimationClientRpc("stopWalk");
					previousSpeed = currentSpeed;
				}
				else if (currentSpeed > 2f && currentSpeed <= 6f)
				{
					DoAnimationClientRpc("startWalk");
					previousSpeed = currentSpeed;
				}
				else if (currentSpeed > 6f && currentSpeed <= 12f)
				{
					DoAnimationClientRpc("chasingRun");
					previousSpeed = currentSpeed;
				}
				else if (currentSpeed > 0f && currentSpeed <= 2f)
				{
					DoAnimationClientRpc("slowDown");
					previousSpeed = currentSpeed;
				}
				else if (currentSpeed > 12f)
				{
					DoAnimationClientRpc("speedUp");
					previousSpeed = currentSpeed;
				}
			}
		}

		private void SetBones()
		{
			modelD = GameObject.Find("D");
			if ((Object)(object)modelD != (Object)null)
			{
				mouthBone = FindChildRecursive(modelD.transform, "Mouth");
				_ = (Object)(object)mouthBone != (Object)null;
			}
		}

		private Transform? FindChildRecursive(Transform parent, string childName)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Expected O, but got Unknown
			foreach (Transform item in parent)
			{
				Transform val = item;
				if (((Object)val).name == childNam