using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using GameNetcodeStuff; using Microsoft.CodeAnalysis; using UhhSomething.NetcodePatcher; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations.Rigging; using UnityEngine.Events; using UnityEngine.Rendering.HighDefinition; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: AssemblyCompany("UhhSomething")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("UhhSomething")] [assembly: AssemblyTitle("UhhSomething")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] 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; } } } public class AmbushWolfAI : EnemyAI, IVisibleThreat { [CompilerGenerated] private sealed class <>c__DisplayClass144_0 { public float time; public PlayerControllerB player; internal bool b__0() { if (!(Time.realtimeSinceStartup - time > 1f)) { return (Object)(object)player.deadBody != (Object)null; } return true; } } [CompilerGenerated] private sealed class d__144 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayerControllerB player; private <>c__DisplayClass144_0 <>8__1; public AmbushWolfAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__144(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown int num = <>1__state; AmbushWolfAI ambushWolfAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass144_0(); <>8__1.player = player; <>8__1.time = Time.realtimeSinceStartup; <>2__current = (object)new WaitUntil((Func)(() => Time.realtimeSinceStartup - <>8__1.time > 1f || (Object)(object)<>8__1.player.deadBody != (Object)null)); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)<>8__1.player.deadBody != (Object)null) { ambushWolfAI.body = <>8__1.player.deadBody; ambushWolfAI.body.matchPositionExactly = true; ambushWolfAI.body.attachedTo = ambushWolfAI.playerBodyHeadPoint; ambushWolfAI.body.attachedLimb = <>8__1.player.deadBody.bodyParts[0]; } <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 2; return true; case 2: <>1__state = -1; ambushWolfAI.DropBody(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("Bush Wolf Variables")] public float changeNestRangeSpeed = 0.75f; public float dragForce = 7f; public float nestRange = 15f; private float baseNestRange; public float attackDistance = 5f; private float baseAttackDistance; public float speedMultiplier; [Space(5f)] public Transform[] proceduralBodyTargets; public Transform[] IKTargetContainers; private float resetIKOffsetsInterval; private RaycastHit hit; public bool hideBodyOnTerrain; private int previousState = -1; private int[] nearbyMoldPositions; private Vector3 aggressivePosition; private Vector3 mostHiddenPosition; private bool foundSpawningPoint; private bool inKillAnimation; private float velX; private float velZ; private Vector3 previousPosition; private Vector3 agentLocalVelocity; public Transform animationContainer; private float timeSpentHiding; private float timeSinceAdjustingPosition; private Vector3 currentHidingSpot; public bool isHiding; public PlayerControllerB staringAtPlayer; public PlayerControllerB lastPlayerStaredAt; private bool backedUpFromWatchingPlayer; private float staringAtPlayerTimer; public float spottedMeter; private int checkForPlayerDistanceInterval; private int checkPlayer; public Vector3 rotAxis; public Transform turnCompass; private float maxAnimSpeed = 1.25f; private bool looking; private bool dragging; private bool startedShootingTongue; private float shootTongueTimer; public Transform tongue; public Transform tongueStartPoint; private float tongueLengthNormalized; private bool failedTongueShoot; private float randomForceInterval; private PlayerControllerB lastHitByPlayer; private float timeSinceTakingDamage; private float timeSinceKillingPlayer; private Coroutine killPlayerCoroutine; private DeadBodyInfo body; public Transform playerBodyHeadPoint; private float timeSinceChangingState; private Transform tongueTarget; private float tongueScale; public AudioClip snarlSFX; public AudioClip[] growlSFX; public AudioSource growlAudio; public AudioClip shootTongueSFX; private float timeAtLastGrowl; private bool playedTongueAudio; public AudioSource tongueAudio; public AudioClip tongueShootSFX; private bool changedHidingSpot; public ParticleSystem spitParticle; public Transform playerAnimationHeadPoint; public PlayerControllerB draggingPlayer; private float timeSinceCheckHomeBase; private int timesFailingTongueShoot; public Rig bendHeadBack; private float timeSinceLOSBlocked; public AudioClip killSFX; private float timeSinceCall; public AudioSource callClose; public AudioSource callFar; private float matingCallTimer; public AudioClip[] callsClose; public AudioClip[] callsFar; public AudioClip hitBushWolfSFX; private float timeSinceHitting; private float noTargetTimer; private float waitOutsideShipTimer; private MoldSpreadManager moldManager; private Vector3 hiddenPos; private bool runningAwayToNest; ThreatType IVisibleThreat.type => (ThreatType)8; bool IVisibleThreat.IsThreatDead() { return base.isEnemyDead; } GrabbableObject IVisibleThreat.GetHeldObject() { return null; } int IVisibleThreat.SendSpecialBehaviour(int id) { return 0; } int IVisibleThreat.GetThreatLevel(Vector3 seenByPosition) { int num = 0; if (dragging && !startedShootingTongue) { return 1; } num = ((base.enemyHP >= 2) ? 3 : 2); if (Time.realtimeSinceStartup - timeSinceCall < 5f) { num += 3; } return num; } int IVisibleThreat.GetInterestLevel() { return 0; } Transform IVisibleThreat.GetThreatLookTransform() { return base.eye; } Transform IVisibleThreat.GetThreatTransform() { return ((Component)this).transform; } Vector3 IVisibleThreat.GetThreatVelocity() { //IL_0015: 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 agentLocalVelocity; } float IVisibleThreat.GetVisibility() { //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) if (base.isEnemyDead) { return 0f; } if ((dragging && !startedShootingTongue) || Time.realtimeSinceStartup - timeSinceCall < 5f) { return 0.8f; } if (Vector3.Distance(((Component)this).transform.position, currentHidingSpot) < baseNestRange - 3f) { return 0.18f; } return 0.5f; } public override void AnimationEventA() { ((EnemyAI)this).AnimationEventA(); spitParticle.Play(true); } public override void Start() { //IL_0075: 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_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); moldManager = Object.FindObjectOfType(); resetIKOffsetsInterval = 15f; nearbyMoldPositions = new int[20]; ((EnemyAI)this).EnableEnemyMesh(false, false, true); base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; baseAttackDistance = attackDistance; if (((NetworkBehaviour)this).IsServer) { if (!moldManager.GetWeeds()) { ((EnemyAI)this).KillEnemyOnOwnerClient(true); return; } mostHiddenPosition = moldManager.mostHiddenPosition; aggressivePosition = moldManager.aggressivePosition; CalculateNestRange(useCurrentHidingSpot: false); SyncWeedPositionsServerRpc(moldManager.mostHiddenPosition, moldManager.aggressivePosition, nestRange); } } private void CalculateNestRange(bool useCurrentHidingSpot) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)$"Calculating nest range! use current hiding spot: {useCurrentHidingSpot}"); Vector3 val = mostHiddenPosition; if (useCurrentHidingSpot) { val = currentHidingSpot; } int allMoldPositionsInRadius = moldManager.GetAllMoldPositionsInRadius(val, 50f, true); if (allMoldPositionsInRadius == 0) { Debug.Log((object)"Got no weeds for nest range"); return; } Debug.Log((object)$"Nearby weeds: {allMoldPositionsInRadius}"); float num = 0f; List list = new List(40); for (int i = 0; i < allMoldPositionsInRadius; i++) { list.Add(Vector3.Distance(val, moldManager.grassInstancer.batchedPositions[moldManager.moldPositions[i]])); } list = list.OrderByDescending((float x) => x).ToList(); num = list[list.Count / 2]; RoundManager.Instance.tempTransform.position = mostHiddenPosition; RoundManager.Instance.tempTransform.localEulerAngles = new Vector3(0f, 0f, 0f); float num2 = 0f; for (int j = 0; j < 360; j += 45) { RoundManager.Instance.tempTransform.Rotate(new Vector3(0f, 45f, 0f)); Vector3 val2 = RoundManager.Instance.tempTransform.position + RoundManager.Instance.tempTransform.forward * num; Debug.DrawLine(val2, RoundManager.Instance.tempTransform.position, Color.yellow, 20f); float closestMoldDistance = moldManager.GetClosestMoldDistance(val2); if (closestMoldDistance > num2) { num2 = closestMoldDistance; } } nestRange = num - num2 + 5f; Debug.Log((object)$"Nest range: {nestRange} ; '({num} - {num2}) + 5'"); baseNestRange = nestRange; } public override void OnDrawGizmos() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnDrawGizmos(); if (base.debugEnemyAI) { Gizmos.DrawWireSphere(mostHiddenPosition, nestRange); Gizmos.DrawSphere(hiddenPos, 5f); } } [ServerRpc] public void SyncWeedPositionsServerRpc(Vector3 hiddenPosition, Vector3 aggressivePosition, float nest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Invalid comparison between Unknown and I4 //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_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(2297760435u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref hiddenPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref aggressivePosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2297760435u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncWeedPositionsClientRpc(hiddenPosition, aggressivePosition, nest); } } [ClientRpc] public void SyncWeedPositionsClientRpc(Vector3 hiddenPosition, Vector3 agg, float nest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2653613967u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref hiddenPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref agg); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2653613967u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; mostHiddenPosition = hiddenPosition; aggressivePosition = agg; currentHidingSpot = mostHiddenPosition; nestRange = nest; baseNestRange = nest; } } } public PlayerControllerB GetClosestPlayerToNest() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB result = null; base.mostOptimalDistance = 2000f; for (int i = 0; i < 4; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true)) { base.tempDist = Vector3.Distance(currentHidingSpot, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position); if (base.tempDist < base.mostOptimalDistance) { base.mostOptimalDistance = base.tempDist; result = StartOfRound.Instance.allPlayerScripts[i]; } } } return result; } public override void DoAIInterval() { //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0251: 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_0336: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_036e: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.livingPlayers == 0 || !foundSpawningPoint || base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (runningAwayToNest) { break; } if (checkForPlayerDistanceInterval < 1) { checkForPlayerDistanceInterval++; break; } checkForPlayerDistanceInterval = 0; PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[checkPlayer]; if (((EnemyAI)this).PlayerIsTargetable(val, false, false, true) && !((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)val).transform.position, true, false, false)) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position); bool flag = (val.timeSincePlayerMoving > 0.7f && num < attackDistance - 4.75f) || num < attackDistance - 7f; if (timeSinceChangingState > 0.35f && flag && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.6f, ((Component)val.gameplayCamera).transform.position - Vector3.up * 0.3f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { base.targetPlayer = val; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); SyncTargetPlayerAndAttackServerRpc((int)val.playerClientId); } else if (base.pathDistance < nestRange && Vector3.Distance(((Component)val).transform.position, currentHidingSpot) < nestRange) { Debug.Log((object)$"Beginning attack on '{val.playerUsername}'; distance: {base.pathDistance}"); base.targetPlayer = val; ((EnemyAI)this).SwitchToBehaviourState(1); } } checkPlayer = (checkPlayer + 1) % StartOfRound.Instance.allPlayerScripts.Length; break; } case 1: { bool flag2 = false; PlayerControllerB closestPlayer = ((EnemyAI)this).GetClosestPlayer(false, false, false); if ((Object)(object)closestPlayer != (Object)null) { flag2 = true; float mostOptimalDistance = base.mostOptimalDistance; PlayerControllerB closestPlayerToNest = GetClosestPlayerToNest(); if ((Object)(object)closestPlayerToNest != (Object)null && (Object)(object)closestPlayerToNest != (Object)(object)base.targetPlayer && (mostOptimalDistance > 9f || spottedMeter > 0.45f) && Vector3.Distance(((Component)this).transform.position, ((Component)closestPlayerToNest).transform.position) - mostOptimalDistance < 15f) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(closestPlayerToNest); } else { ((EnemyAI)this).SetMovingTowardsTargetPlayer(closestPlayer); } } if (flag2) { noTargetTimer = 0f; float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position); bool flag3 = (base.targetPlayer.timeSincePlayerMoving > 0.7f && num2 < attackDistance - 5f) || num2 < attackDistance - 7f; if (Vector3.Distance(currentHidingSpot, ((Component)base.targetPlayer).transform.position) > nestRange + 9f) { timeSinceAdjustingPosition = 0f; ((EnemyAI)this).SwitchToBehaviourState(0); } else if (timeSinceChangingState > 0.35f && flag3 && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.6f, ((Component)base.targetPlayer.gameplayCamera).transform.position - Vector3.up * 0.3f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); SyncTargetPlayerAndAttackServerRpc((int)base.targetPlayer.playerClientId); } else { ChooseClosestNodeToPlayer(); } } else if (timeSinceChangingState > 0.25f) { if (noTargetTimer > 0.5f) { noTargetTimer = 0f; timeSinceAdjustingPosition = 0f; ((EnemyAI)this).SwitchToBehaviourState(0); } else { noTargetTimer += base.AIIntervalTime; } } break; } case 2: if (dragging && !startedShootingTongue && (((EnemyAI)this).PathIsIntersectedByLineOfSight(currentHidingSpot, false, false, false) || shootTongueTimer > 35f || (shootTongueTimer > 12f && Vector3.Distance(((Component)this).transform.position, currentHidingSpot) > 20f))) { timesFailingTongueShoot++; ((EnemyAI)this).SwitchToBehaviourState(1); } break; } } [ServerRpc] public void SyncTargetPlayerAndAttackServerRpc(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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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(2652754198u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2652754198u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncTargetPlayerAndAttackClientRpc(playerId); } } [ClientRpc] public void SyncTargetPlayerAndAttackClientRpc(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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1317746892u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1317746892u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { base.targetPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); } } } [ServerRpc] public void SyncNewHidingSpotServerRpc(Vector3 newHidingSpot, float nest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Invalid comparison between Unknown and I4 //IL_012f: 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_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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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(2569300201u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newHidingSpot); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2569300201u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncNewHidingSpotClientRpc(newHidingSpot, nest); } } [ClientRpc] public void SyncNewHidingSpotClientRpc(Vector3 newHidingSpot, float nest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1637531219u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newHidingSpot); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1637531219u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { currentHidingSpot = newHidingSpot; nestRange = nest; baseNestRange = nest; } } } public Transform ChooseClosestHiddenNode(Vector3 pos) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) base.nodesTempArray = base.allAINodes.OrderBy((GameObject x) => Vector3.Distance(pos, x.transform.position)).ToArray(); Transform val = null; if ((Object)(object)base.targetNode != (Object)null) { Physics.Linecast(((Component)base.targetPlayer.gameplayCamera).transform.position, ((Component)base.targetNode).transform.position, 1024, (QueryTriggerInteraction)1); } for (int i = 0; i < base.nodesTempArray.Length; i++) { if (!(Vector3.Distance(base.nodesTempArray[i].transform.position, currentHidingSpot) > nestRange) && !((EnemyAI)this).PathIsIntersectedByLineOfSight(base.nodesTempArray[i].transform.position, false, true, false)) { base.mostOptimalDistance = Vector3.Distance(pos, base.nodesTempArray[i].transform.position); if ((Object)(object)val != (Object)null && base.mostOptimalDistance - Vector3.Distance(val.position, pos) > 10f) { break; } if (Physics.Linecast(((Component)base.targetPlayer.gameplayCamera).transform.position, base.nodesTempArray[i].transform.position, 1024, (QueryTriggerInteraction)1)) { val = base.nodesTempArray[i].transform; break; } if (!base.targetPlayer.HasLineOfSightToPosition(base.nodesTempArray[i].transform.position + Vector3.up * 1.5f, 110f, 40, -1f, -1)) { val = base.nodesTempArray[i].transform; break; } if (spottedMeter > 0.9f && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < 12f) { val = base.nodesTempArray[i].transform; } } } if ((Object)(object)val != (Object)null) { base.mostOptimalDistance = Vector3.Distance(pos, ((Component)val).transform.position); } return val; } public void ChooseClosestNodeToPlayer() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: 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) //IL_0063: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.targetNode == (Object)null) { base.targetNode = base.allAINodes[0].transform; } Transform val = ChooseClosestHiddenNode(((Component)base.targetPlayer).transform.position); if ((Object)(object)val != (Object)null) { base.targetNode = val; } Vector3 val2 = Vector3.Normalize((((Component)this).transform.position - ((Component)base.targetPlayer).transform.position) * 100f) * 4f; val2.y = 0f; if ((Object)(object)base.targetNode != (Object)null) { base.mostOptimalDistance = Vector3.Distance(((Component)this).transform.position, base.targetNode.position + val2); } float num = base.targetPlayer.LineOfSightToPositionAngle(((Component)this).transform.position + Vector3.up * 0.75f, 70, -1f, -1); float num2 = Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position); bool flag = num != -361f && num2 < 10f && ((num < 10f && spottedMeter > 0.25f) || (num > 90f && Vector3.Distance(((Component)base.targetPlayer).transform.position, currentHidingSpot) < nestRange - 7f)); if (base.targetPlayer.isInElevator) { if (waitOutsideShipTimer > 18f && Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.elevatorTransform.position) < 27f) { base.movingTowardsTargetPlayer = true; } else { ((EnemyAI)this).SetDestinationToPosition(base.targetNode.position + val2, true); } } else if (flag || (num2 - base.mostOptimalDistance < 0.5f && (!((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)base.targetPlayer).transform.position, false, true, false) || num2 < 8f))) { base.movingTowardsTargetPlayer = true; } else { ((EnemyAI)this).SetDestinationToPosition(base.targetNode.position + val2, true); } } [ServerRpc(RequireOwnership = false)] public void SetAnimationSpeedServerRpc(float animSpeed) { //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) //IL_00dc: 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(821084172u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref animSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 821084172u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationSpeedClientRpc(animSpeed); } } } [ClientRpc] public void SetAnimationSpeedClientRpc(float animSpeed) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1367591999u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref animSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1367591999u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { maxAnimSpeed = animSpeed; } } } public override void SetEnemyStunned(bool setToStunned, float setToStunTime = 1f, PlayerControllerB setStunnedByPlayer = null) { ((EnemyAI)this).SetEnemyStunned(setToStunned, setToStunTime, setStunnedByPlayer); ((EnemyAI)this).SwitchToBehaviourState(0); CancelKillAnimation(); if (dragging && !startedShootingTongue && (Object)(object)base.targetPlayer != (Object)null) { dragging = false; base.targetPlayer.inShockingMinigame = false; base.targetPlayer.inSpecialInteractAnimation = false; } if ((Object)(object)setStunnedByPlayer != (Object)null) { lastHitByPlayer = setStunnedByPlayer; } timeSinceTakingDamage = 0f; } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); base.enemyHP -= force; if (base.enemyHP <= 0 && !base.isEnemyDead && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } base.creatureAnimator.SetTrigger("HitEnemy"); timeSinceTakingDamage = 0f; if ((Object)(object)playerWhoHit != (Object)null) { lastHitByPlayer = playerWhoHit; } if (((NetworkBehaviour)this).IsOwner) { CancelKillAnimation(); if (base.currentBehaviourStateIndex == 2) { ((EnemyAI)this).SwitchToBehaviourState(0); } } CancelReelingPlayerIn(); base.creatureVoice.PlayOneShot(hitBushWolfSFX); } private void CancelReelingPlayerIn() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (previousState == 2 || previousState == 1 || base.currentBehaviourStateIndex == 2) { if (dragging) { base.creatureVoice.Stop(); } growlAudio.Stop(); tongueAudio.Stop(); playedTongueAudio = false; tongueTarget = null; tongue.localScale = Vector3.one; base.creatureAnimator.SetBool("ReelingPlayerIn", false); base.creatureAnimator.SetBool("ShootTongue", false); shootTongueTimer = 0f; timeSinceAdjustingPosition = 0f; if ((Object)(object)draggingPlayer != (Object)null) { draggingPlayer.inShockingMinigame = false; draggingPlayer.inSpecialInteractAnimation = false; draggingPlayer.shockingTarget = null; draggingPlayer.disableInteract = false; } draggingPlayer = null; dragging = false; startedShootingTongue = false; } } private void DoGrowlLocalClient() { timeAtLastGrowl = Time.realtimeSinceStartup; growlAudio.PlayOneShot(growlSFX[Random.Range(0, growlSFX.Length)]); if (((NetworkBehaviour)this).IsOwner) { DoGrowlServerRpc(); } } [ServerRpc] public void DoGrowlServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(3735194043u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3735194043u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoGrowlClientRpc(); } } [ClientRpc] public void DoGrowlClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3928884262u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3928884262u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { DoGrowlLocalClient(); } } } [ServerRpc] public void SeeBushWolfServerRpc(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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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(2278982227u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2278982227u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SeeBushWolfClientRpc(playerId); } } [ClientRpc] public void SeeBushWolfClientRpc(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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3455050024u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3455050024u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (playerId == (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { SetFearLevelFromBushWolf(); } } } private void SetFearLevelFromBushWolf() { //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; if (Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)this).transform.position) < 10f) { localPlayerController.JumpToFearLevel(0.6f, true); } else { localPlayerController.JumpToFearLevel(0.3f, true); } } public override void OnDestroy() { ((EnemyAI)this).OnDestroy(); CancelReelingPlayerIn(); } public override void KillEnemy(bool destroy = false) { //IL_0081: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).KillEnemy(destroy); if (!destroy) { growlAudio.Stop(); callClose.Stop(); callFar.Stop(); base.creatureSFX.Stop(); base.creatureVoice.Stop(); CancelKillAnimation(); base.creatureVoice.PlayOneShot(base.dieSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, base.dieSFX, 1f); RoundManager.Instance.PlayAudibleNoise(((Component)base.creatureVoice).transform.position, 20f, 0.7f, 0, base.isInsidePlayerShip && StartOfRound.Instance.hangarDoorsClosed, 0); CancelReelingPlayerIn(); } } public void HitTongue(PlayerControllerB playerWhoHit, int hitID) { if (dragging && !startedShootingTongue) { int playerWhoHit2 = -1; if ((Object)(object)playerWhoHit != (Object)null) { playerWhoHit2 = (int)playerWhoHit.playerClientId; HitTongueLocalClient(); } HitTongueServerRpc(playerWhoHit2); } } private void HitTongueLocalClient() { timeSinceTakingDamage = 0f; base.creatureVoice.PlayOneShot(hitBushWolfSFX); base.creatureAnimator.ResetTrigger("HitEnemy"); base.creatureAnimator.SetTrigger("HitEnemy"); CancelReelingPlayerIn(); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); } [ServerRpc(RequireOwnership = false)] public void HitTongueServerRpc(int playerWhoHit) { //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) //IL_00ce: 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(888615432u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoHit); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 888615432u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitTongueClientRpc(playerWhoHit); } } } [ClientRpc] public void HitTongueClientRpc(int playerWhoHit) { //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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3168228498u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoHit); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3168228498u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerWhoHit) { HitTongueLocalClient(); } } } private void CheckHomeBase(bool overrideInterval = false) { //IL_003e: 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) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || ((!overrideInterval || !(Time.realtimeSinceStartup - timeSinceCheckHomeBase > 5f)) && !(Time.realtimeSinceStartup - timeSinceCheckHomeBase > 30f))) { return; } timeSinceCheckHomeBase = Time.realtimeSinceStartup; Vector3 val = mostHiddenPosition; if (moldManager.GetWeeds()) { mostHiddenPosition = moldManager.mostHiddenPosition; aggressivePosition = moldManager.aggressivePosition; if (val != mostHiddenPosition || changedHidingSpot) { CalculateNestRange(useCurrentHidingSpot: false); } changedHidingSpot = false; SyncWeedPositionsClientRpc(mostHiddenPosition, aggressivePosition, nestRange); } } private void DoMatingCall() { if (((NetworkBehaviour)this).IsOwner) { MatingCallServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void MatingCallServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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(1734476257u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1734476257u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; MatingCallClientRpc(); } } } [ClientRpc] public void MatingCallClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2179972878u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2179972878u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; matingCallTimer = 2.2f; base.creatureAnimator.SetTrigger("MatingCall"); int num = Random.Range(0, callsClose.Length); callClose.PlayOneShot(callsClose[num]); WalkieTalkie.TransmitOneShotAudio(callClose, callsClose[num], 1f); callFar.PlayOneShot(callsFar[num]); WalkieTalkie.TransmitOneShotAudio(callFar, callsFar[num], 1f); RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 20f, 0.6f, 0, false, 245403); } } } public override void Update() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_128f: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Unknown result type (might be due to invalid IL or missing references) //IL_0c5f: Unknown result type (might be due to invalid IL or missing references) //IL_0c6a: Unknown result type (might be due to invalid IL or missing references) //IL_0c75: Unknown result type (might be due to invalid IL or missing references) //IL_0c85: Unknown result type (might be due to invalid IL or missing references) //IL_0c8a: Unknown result type (might be due to invalid IL or missing references) //IL_0c94: Unknown result type (might be due to invalid IL or missing references) //IL_0c99: Unknown result type (might be due to invalid IL or missing references) //IL_0ca3: Unknown result type (might be due to invalid IL or missing references) //IL_0ca8: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0ed8: Unknown result type (might be due to invalid IL or missing references) //IL_0ee8: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_04bd: Unknown result type (might be due to invalid IL or missing references) //IL_04d3: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_0756: Unknown result type (might be due to invalid IL or missing references) //IL_0761: Unknown result type (might be due to invalid IL or missing references) //IL_0766: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_0775: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_053a: Unknown result type (might be due to invalid IL or missing references) //IL_0d47: Unknown result type (might be due to invalid IL or missing references) //IL_0d52: Unknown result type (might be due to invalid IL or missing references) //IL_0d71: Unknown result type (might be due to invalid IL or missing references) //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07ac: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_055e: Unknown result type (might be due to invalid IL or missing references) //IL_0565: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_0586: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Unknown result type (might be due to invalid IL or missing references) //IL_05a8: Unknown result type (might be due to invalid IL or missing references) //IL_0fc2: Unknown result type (might be due to invalid IL or missing references) //IL_0fd2: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05f4: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_1539: Unknown result type (might be due to invalid IL or missing references) //IL_153e: Unknown result type (might be due to invalid IL or missing references) //IL_1548: Unknown result type (might be due to invalid IL or missing references) //IL_155d: Unknown result type (might be due to invalid IL or missing references) //IL_1562: Unknown result type (might be due to invalid IL or missing references) //IL_149b: Unknown result type (might be due to invalid IL or missing references) //IL_14ab: Unknown result type (might be due to invalid IL or missing references) //IL_14bb: Unknown result type (might be due to invalid IL or missing references) //IL_14d0: Unknown result type (might be due to invalid IL or missing references) //IL_14e5: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_0946: Unknown result type (might be due to invalid IL or missing references) //IL_0954: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_0655: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_105e: Unknown result type (might be due to invalid IL or missing references) //IL_1063: Unknown result type (might be due to invalid IL or missing references) //IL_106d: Unknown result type (might be due to invalid IL or missing references) //IL_1072: Unknown result type (might be due to invalid IL or missing references) //IL_068a: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_10d2: Unknown result type (might be due to invalid IL or missing references) //IL_10d8: Unknown result type (might be due to invalid IL or missing references) //IL_1632: Unknown result type (might be due to invalid IL or missing references) //IL_1638: Unknown result type (might be due to invalid IL or missing references) //IL_1660: Unknown result type (might be due to invalid IL or missing references) //IL_166b: Unknown result type (might be due to invalid IL or missing references) //IL_1675: Unknown result type (might be due to invalid IL or missing references) //IL_167a: Unknown result type (might be due to invalid IL or missing references) //IL_167f: Unknown result type (might be due to invalid IL or missing references) //IL_1689: Unknown result type (might be due to invalid IL or missing references) //IL_168e: Unknown result type (might be due to invalid IL or missing references) //IL_1693: Unknown result type (might be due to invalid IL or missing references) //IL_0e43: Unknown result type (might be due to invalid IL or missing references) //IL_0e53: Unknown result type (might be due to invalid IL or missing references) //IL_1196: Unknown result type (might be due to invalid IL or missing references) //IL_11a6: Unknown result type (might be due to invalid IL or missing references) //IL_1143: Unknown result type (might be due to invalid IL or missing references) //IL_1152: Unknown result type (might be due to invalid IL or missing references) //IL_15e6: Unknown result type (might be due to invalid IL or missing references) //IL_15a8: Unknown result type (might be due to invalid IL or missing references) //IL_15b8: Unknown result type (might be due to invalid IL or missing references) //IL_0b0b: Unknown result type (might be due to invalid IL or missing references) //IL_0b33: Unknown result type (might be due to invalid IL or missing references) //IL_0b38: Unknown result type (might be due to invalid IL or missing references) //IL_0b3f: Unknown result type (might be due to invalid IL or missing references) //IL_0b45: Unknown result type (might be due to invalid IL or missing references) //IL_0b4c: Unknown result type (might be due to invalid IL or missing references) //IL_11cd: Unknown result type (might be due to invalid IL or missing references) //IL_1c67: Unknown result type (might be due to invalid IL or missing references) //IL_1c80: Unknown result type (might be due to invalid IL or missing references) //IL_1c85: Unknown result type (might be due to invalid IL or missing references) //IL_1c8f: Unknown result type (might be due to invalid IL or missing references) //IL_1c94: Unknown result type (might be due to invalid IL or missing references) //IL_16ef: Unknown result type (might be due to invalid IL or missing references) //IL_16f4: Unknown result type (might be due to invalid IL or missing references) //IL_16c8: Unknown result type (might be due to invalid IL or missing references) //IL_16d7: Unknown result type (might be due to invalid IL or missing references) //IL_1cb1: Unknown result type (might be due to invalid IL or missing references) //IL_1cc5: Unknown result type (might be due to invalid IL or missing references) //IL_17c8: Unknown result type (might be due to invalid IL or missing references) //IL_17cd: Unknown result type (might be due to invalid IL or missing references) //IL_175f: Unknown result type (might be due to invalid IL or missing references) //IL_17f1: Unknown result type (might be due to invalid IL or missing references) //IL_17f6: Unknown result type (might be due to invalid IL or missing references) //IL_1800: Unknown result type (might be due to invalid IL or missing references) //IL_1805: Unknown result type (might be due to invalid IL or missing references) //IL_180a: Unknown result type (might be due to invalid IL or missing references) //IL_1817: Unknown result type (might be due to invalid IL or missing references) //IL_181c: Unknown result type (might be due to invalid IL or missing references) //IL_1821: Unknown result type (might be due to invalid IL or missing references) //IL_182b: Unknown result type (might be due to invalid IL or missing references) //IL_1830: Unknown result type (might be due to invalid IL or missing references) //IL_183a: Unknown result type (might be due to invalid IL or missing references) //IL_18ea: Unknown result type (might be due to invalid IL or missing references) //IL_18ec: Unknown result type (might be due to invalid IL or missing references) //IL_18f9: Unknown result type (might be due to invalid IL or missing references) //IL_18fe: Unknown result type (might be due to invalid IL or missing references) //IL_1908: Unknown result type (might be due to invalid IL or missing references) //IL_190d: Unknown result type (might be due to invalid IL or missing references) //IL_1918: Unknown result type (might be due to invalid IL or missing references) //IL_191f: Unknown result type (might be due to invalid IL or missing references) //IL_193f: Unknown result type (might be due to invalid IL or missing references) //IL_1944: Unknown result type (might be due to invalid IL or missing references) //IL_1949: Unknown result type (might be due to invalid IL or missing references) //IL_177b: Unknown result type (might be due to invalid IL or missing references) //IL_1880: Unknown result type (might be due to invalid IL or missing references) //IL_1860: Unknown result type (might be due to invalid IL or missing references) //IL_1865: Unknown result type (might be due to invalid IL or missing references) //IL_186f: Unknown result type (might be due to invalid IL or missing references) //IL_1874: Unknown result type (might be due to invalid IL or missing references) //IL_1879: Unknown result type (might be due to invalid IL or missing references) //IL_1a57: Unknown result type (might be due to invalid IL or missing references) //IL_1797: Unknown result type (might be due to invalid IL or missing references) //IL_179c: Unknown result type (might be due to invalid IL or missing references) //IL_17aa: Unknown result type (might be due to invalid IL or missing references) //IL_18ab: Unknown result type (might be due to invalid IL or missing references) //IL_18b0: Unknown result type (might be due to invalid IL or missing references) //IL_18ba: Unknown result type (might be due to invalid IL or missing references) //IL_18bf: Unknown result type (might be due to invalid IL or missing references) //IL_18c4: Unknown result type (might be due to invalid IL or missing references) //IL_1a99: Unknown result type (might be due to invalid IL or missing references) //IL_1a9e: Unknown result type (might be due to invalid IL or missing references) //IL_1aa0: Unknown result type (might be due to invalid IL or missing references) //IL_1aa5: Unknown result type (might be due to invalid IL or missing references) //IL_1ab5: Unknown result type (might be due to invalid IL or missing references) //IL_1ac0: Unknown result type (might be due to invalid IL or missing references) //IL_1ac5: Unknown result type (might be due to invalid IL or missing references) //IL_1ada: Unknown result type (might be due to invalid IL or missing references) //IL_1ae5: Unknown result type (might be due to invalid IL or missing references) //IL_1aea: Unknown result type (might be due to invalid IL or missing references) //IL_1976: Unknown result type (might be due to invalid IL or missing references) //IL_1995: Unknown result type (might be due to invalid IL or missing references) //IL_19b4: Unknown result type (might be due to invalid IL or missing references) //IL_19d3: Unknown result type (might be due to invalid IL or missing references) //IL_19e6: Unknown result type (might be due to invalid IL or missing references) //IL_1a02: Unknown result type (might be due to invalid IL or missing references) //IL_1a17: Unknown result type (might be due to invalid IL or missing references) //IL_1a3d: Unknown result type (might be due to invalid IL or missing references) //IL_1a3f: Unknown result type (might be due to invalid IL or missing references) //IL_1a49: Unknown result type (might be due to invalid IL or missing references) //IL_1a4e: Unknown result type (might be due to invalid IL or missing references) //IL_1a53: Unknown result type (might be due to invalid IL or missing references) //IL_1a23: Unknown result type (might be due to invalid IL or missing references) //IL_1a25: Unknown result type (might be due to invalid IL or missing references) //IL_1a2f: Unknown result type (might be due to invalid IL or missing references) //IL_1a34: Unknown result type (might be due to invalid IL or missing references) //IL_1a39: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (looking) { looking = false; } else { base.agent.updateRotation = true; } if (!foundSpawningPoint) { if (!(mostHiddenPosition != Vector3.zero)) { return; } Debug.DrawRay(mostHiddenPosition, Vector3.up * 2f, Color.red, 15f); foundSpawningPoint = true; Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(mostHiddenPosition, default(NavMeshHit), 12f, -1); if (!RoundManager.Instance.GotNavMeshPositionResult) { navMeshPosition = RoundManager.Instance.GetNavMeshPosition(aggressivePosition, default(NavMeshHit), 12f, -1); if (!RoundManager.Instance.GotNavMeshPositionResult && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(true); } } ((Component)this).transform.position = navMeshPosition; currentHidingSpot = navMeshPosition; base.inSpecialAnimation = false; ((EnemyAI)this).EnableEnemyMesh(true, false, false); isHiding = true; if (((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SetDestinationToPosition(mostHiddenPosition, false); } return; } if (!base.ventAnimationFinished) { base.serverPosition = mostHiddenPosition; ((Component)this).transform.position = mostHiddenPosition; } if (inKillAnimation || base.isEnemyDead) { tongueTarget = null; } if (StartOfRound.Instance.livingPlayers == 0 || base.isEnemyDead || !foundSpawningPoint) { return; } base.creatureAnimator.SetBool("stunned", base.stunNormalizedTimer > 0f); if (base.stunNormalizedTimer > 0f || matingCallTimer >= 0f) { matingCallTimer -= Time.deltaTime; base.agent.speed = 0f; return; } timeSinceTakingDamage += Time.deltaTime; timeSinceKillingPlayer += Time.deltaTime; timeSinceHitting += Time.deltaTime; CalculateAnimationDirection(maxAnimSpeed); timeSinceChangingState += Time.deltaTime; switch (base.currentBehaviourStateIndex) { case 0: { if (previousState != base.currentBehaviourStateIndex) { SetAnimationSpeedServerRpc(1.3f); backedUpFromWatchingPlayer = false; base.moveTowardsDestination = true; base.movingTowardsTargetPlayer = false; timeSpentHiding = 0f; timeSinceChangingState = 0f; CancelReelingPlayerIn(); nestRange = Mathf.Clamp(nestRange / 2f, baseNestRange * 0.75f, 140f); previousState = base.currentBehaviourStateIndex; } if (((NetworkBehaviour)this).IsOwner && Vector3.Distance(((Component)this).transform.position, currentHidingSpot) < Mathf.Clamp(baseNestRange + 2f, 14f, 30f) && timeSinceChangingState > 0.5f && timeSinceTakingDamage < 2.5f && (Object)(object)lastHitByPlayer != (Object)null) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(lastHitByPlayer); base.agent.speed = 6f * speedMultiplier; runningAwayToNest = false; break; } if (timeSinceKillingPlayer < 2f || timeSinceTakingDamage < 0.35f) { base.agent.speed = 0f; break; } if (timeSinceTakingDamage < 4f && base.enemyHP < 4 && Vector3.Distance(((Component)this).transform.position, currentHidingSpot) > baseNestRange) { base.agent.speed = 12f; ((EnemyAI)this).SetDestinationToPosition(currentHidingSpot, false); runningAwayToNest = true; } else { runningAwayToNest = false; inKillAnimation = false; } isHiding = true; if (!((NetworkBehaviour)this).IsOwner) { break; } timeSpentHiding += Time.deltaTime; if (Object.op_Implicit((Object)(object)staringAtPlayer)) { LookAtPosition(((Component)staringAtPlayer).transform.position); staringAtPlayerTimer += Time.deltaTime; if (staringAtPlayerTimer > 4f) { spottedMeter = 0f; backedUpFromWatchingPlayer = false; staringAtPlayer = null; } else if (staringAtPlayerTimer > 0.55f) { if (backedUpFromWatchingPlayer) { break; } backedUpFromWatchingPlayer = true; if (Vector3.Distance(((Component)this).transform.position, currentHidingSpot) < 6f) { Vector3 val4 = ((Component)this).transform.position - ((Component)staringAtPlayer).transform.position; val4.y = 0f; Ray val5 = default(Ray); ((Ray)(ref val5))..ctor(((Component)this).transform.position + Vector3.up * 0.5f, val4); val4 = ((!Physics.Raycast(val5, ref hit, 4.6f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) ? ((Ray)(ref val5)).GetPoint(4.6f) : ((Ray)(ref val5)).GetPoint(Mathf.Clamp(((RaycastHit)(ref hit)).distance - 1f, 0f, ((RaycastHit)(ref hit)).distance))); val4 = RoundManager.Instance.GetNavMeshPosition(val4, default(NavMeshHit), 5f, -1); Debug.DrawRay(((Component)this).transform.position + Vector3.up * 0.5f, ((Ray)(ref val5)).direction, Color.red, 5f); Debug.DrawRay(val4, Vector3.up, Color.green, 5f); if (RoundManager.Instance.GotNavMeshPositionResult) { ((EnemyAI)this).SetDestinationToPosition(val4, false); base.moveTowardsDestination = true; base.agent.speed = 5f * speedMultiplier; if (Vector3.Distance(((Component)this).transform.position, ((Component)staringAtPlayer).transform.position) < 18f && Random.Range(0, 100) < 50 && Time.realtimeSinceStartup - timeAtLastGrowl > 5f) { DoGrowlLocalClient(); } if (Physics.Linecast(((Component)staringAtPlayer.gameplayCamera).transform.position, ((Component)this).transform.position + Vector3.up * 0.5f, ref hit, 1024, (QueryTriggerInteraction)1) && Vector3.Distance(((RaycastHit)(ref hit)).point, ((Component)this).transform.position) < 6f) { SeeBushWolfServerRpc((int)staringAtPlayer.playerClientId); } } } else { base.agent.speed = 0f; } } else { base.agent.speed = 0f; } break; } int num3 = 0; int num4 = 0; int num5 = -1; float num6 = 2555f; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (StartOfRound.Instance.allPlayerScripts[i].isPlayerDead || !StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled || Object.op_Implicit((Object)(object)StartOfRound.Instance.allPlayerScripts[i].inAnimationWithEnemy) || Physics.Linecast(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, ((Component)this).transform.position + Vector3.up * 0.5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { continue; } float num7 = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position, ((Component)this).transform.position); float num8 = StartOfRound.Instance.allPlayerScripts[i].LineOfSightToPositionAngle(((Component)this).transform.position, 40, -1f, -1); if (num8 == -361f || num7 > 70f) { continue; } if (num8 < 10f || (num8 < 20f && num7 < 20f)) { num3 += 2; num4++; if (num7 < num6) { num6 = num7; num5 = i; } } else if (num8 < 20f) { num4++; num3++; if (num7 < num6) { num6 = num7; num5 = i; } } } if (num4 <= 0) { spottedMeter = Mathf.Max(spottedMeter - Time.deltaTime * 0.75f, 0f); } else if (num4 >= Mathf.Max(StartOfRound.Instance.livingPlayers - 2, 0)) { spottedMeter = Mathf.Min(spottedMeter + 0.25f * Time.deltaTime * (float)num3, 1f); } if (spottedMeter >= 1f && timeSinceChangingState > 1.2f) { staringAtPlayerTimer = 0f; backedUpFromWatchingPlayer = false; staringAtPlayer = StartOfRound.Instance.allPlayerScripts[num5]; lastPlayerStaredAt = staringAtPlayer; } float num9 = 15f; if (timeSpentHiding > 70f && spottedMeter <= 0f && !changedHidingSpot) { changedHidingSpot = true; currentHidingSpot = aggressivePosition; CalculateNestRange(useCurrentHidingSpot: true); SyncNewHidingSpotServerRpc(aggressivePosition, nestRange); } if (timeSpentHiding > 36f) { num9 = 4f; } else if (timeSpentHiding > 25f) { num9 = 7f; } else if (timeSpentHiding > 15f) { num9 = 10f; } if (spottedMeter > 0.2f) { nestRange = Mathf.Clamp(nestRange - changeNestRangeSpeed * Mathf.Clamp(spottedMeter * 4f, 1f, 4f) * Time.deltaTime, baseNestRange * 0.75f, baseNestRange + 20f); } else if (nestRange - baseNestRange > 15f) { nestRange = Mathf.Clamp(nestRange + changeNestRangeSpeed * Time.deltaTime * 0.15f, baseNestRange * 0.75f, baseNestRange + 18f); } else { nestRange = Mathf.Clamp(nestRange + changeNestRangeSpeed * Time.deltaTime, baseNestRange * 0.75f, baseNestRange + 18f); } if (matingCallTimer <= 0f && timeSpentHiding > 10f && spottedMeter < 0.6f && Time.realtimeSinceStartup - timeSinceCall > 7f) { timeSinceCall = Time.realtimeSinceStartup; if (Random.Range(0, 100) < 8) { DoMatingCall(); } } if (Time.realtimeSinceStartup - timeSinceAdjustingPosition > num9) { timeSinceAdjustingPosition = Time.realtimeSinceStartup; ((EnemyAI)this).SetDestinationToPosition(RoundManager.Instance.GetNavMeshPosition(currentHidingSpot + new Vector3(Random.Range(-3f, 3f), 0f, Random.Range(-3f, 3f)), default(NavMeshHit), 5f, -1), false); if (timeSinceTakingDamage < 2f) { base.agent.speed = 14f * speedMultiplier; } else { base.agent.speed = 10f * speedMultiplier; } } CheckHomeBase(); break; } case 1: { if (previousState != base.currentBehaviourStateIndex) { spottedMeter = 0f; staringAtPlayer = null; timeSpentHiding = 0f; noTargetTimer = 0f; waitOutsideShipTimer = 0f; CancelReelingPlayerIn(); previousState = base.currentBehaviourStateIndex; } if (timeSinceKillingPlayer < 2f || timeSinceTakingDamage < 0.35f) { base.agent.speed = 0f; break; } inKillAnimation = false; if (!((NetworkBehaviour)this).IsOwner || (Object)(object)base.targetPlayer == (Object)null) { break; } int num10 = 0; float num11 = 4f; bool flag = false; bool flag2 = (Object)(object)base.targetNode != (Object)null && Vector3.Distance(((Component)this).transform.position, base.targetNode.position + Vector3.Normalize((((Component)this).transform.position - ((Component)base.targetPlayer).transform.position) * 100f) * 4f) < 0.8f; bool flag3 = false; float num12; for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { flag3 = false; if (StartOfRound.Instance.allPlayerScripts[j].isPlayerDead || !StartOfRound.Instance.allPlayerScripts[j].isPlayerControlled || Object.op_Implicit((Object)(object)StartOfRound.Instance.allPlayerScripts[j].inAnimationWithEnemy) || (StartOfRound.Instance.allPlayerScripts[j].isInHangarShipRoom && base.isInsidePlayerShip)) { continue; } num12 = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position, ((Component)this).transform.position); float num13 = StartOfRound.Instance.allPlayerScripts[j].LineOfSightToPositionAngle(((Component)this).transform.position, 40, -1f, -1); if (num13 == -361f || num12 > 80f) { continue; } if (num13 < 10f || (num13 < 20f && num12 < 20f)) { num10++; spottedMeter += Time.deltaTime * 0.6f; flag3 = true; } else if (num13 < 30f && num12 < 35f) { num10++; spottedMeter += Time.deltaTime * 0.33f; flag3 = true; } if (!flag3 || flag || !((Object)(object)base.targetNode != (Object)null)) { continue; } if (Physics.Linecast(((Component)StartOfRound.Instance.allPlayerScripts[j].gameplayCamera).transform.position, ((Component)base.targetNode).transform.position, 1024, (QueryTriggerInteraction)1)) { if (flag2) { num11 = 0f; } else if (num11 < 8f) { num11 = 10f; } continue; } num11 = 8f; flag = true; if (num12 < 14f && spottedMeter < 0.5f && !backedUpFromWatchingPlayer) { backedUpFromWatchingPlayer = true; SetFearLevelFromBushWolf(); } } num12 = Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position); if (num10 <= 0) { spottedMeter = Mathf.Max(spottedMeter - Time.deltaTime, 0f); base.agent.speed = 6f * speedMultiplier; } else if (spottedMeter > 0.8f) { base.agent.speed = 10f * speedMultiplier; waitOutsideShipTimer = Mathf.Max(waitOutsideShipTimer - Time.deltaTime * 1.3f, 0f); } else { base.agent.speed = num11; } if (((StartOfRound.Instance.livingPlayers > 1 && num10 == StartOfRound.Instance.livingPlayers) || (spottedMeter > 0.95f && !flag2) || (spottedMeter <= 0f && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < 11f)) && Time.realtimeSinceStartup - timeAtLastGrowl > 8f) { DoGrowlLocalClient(); } if (matingCallTimer <= 0f && num12 > 12f && Time.realtimeSinceStartup - timeSinceCall > 7f) { timeSinceCall = Time.realtimeSinceStartup; if (Random.Range(0, 100) < 15) { DoMatingCall(); } } if (spottedMeter > 0.05f && base.targetPlayer.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.5f, 60f, 30, -1f, -1)) { nestRange = Mathf.Clamp(nestRange - changeNestRangeSpeed * Mathf.Clamp(spottedMeter * 4f, 0.4f, 4f) * Time.deltaTime, baseNestRange * 0.75f, Vector3.Distance(((Component)base.targetPlayer).transform.position, currentHidingSpot) + 15f); } else { nestRange = Mathf.Clamp(nestRange + changeNestRangeSpeed * Time.deltaTime, 0f, baseNestRange + 30f); } if (base.targetPlayer.isInHangarShipRoom && spottedMeter < 0.5f && Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.elevatorTransform.position) < 25f) { waitOutsideShipTimer = Mathf.Min(waitOutsideShipTimer + Time.deltaTime, 20f); } if ((Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < attackDistance + 6.5f) { LookAtPosition(((Component)base.targetPlayer).transform.position); } break; } case 2: { if (previousState != base.currentBehaviourStateIndex) { base.agent.speed = 0f; base.movingTowardsTargetPlayer = false; shootTongueTimer = 0f; spottedMeter = 0f; isHiding = false; failedTongueShoot = false; timeSinceChangingState = 0f; previousState = base.currentBehaviourStateIndex; } if ((Object)(object)base.targetPlayer == (Object)null) { break; } if (timeSinceKillingPlayer < 2f || timeSinceTakingDamage < 0.35f) { base.agent.speed = 0f; break; } inKillAnimation = false; if (((NetworkBehaviour)this).IsOwner) { LookAtPosition(((Component)base.targetPlayer).transform.position); } if (failedTongueShoot) { base.agent.speed = 0f; CancelReelingPlayerIn(); if (((NetworkBehaviour)this).IsOwner && Time.realtimeSinceStartup - timeAtLastGrowl > 4f && Random.Range(0, 100) < 40) { DoGrowlLocalClient(); } if (tongueLengthNormalized < -0.25f && ((NetworkBehaviour)this).IsOwner) { if (timesFailingTongueShoot >= 1) { ((EnemyAI)this).SwitchToBehaviourState(0); break; } timesFailingTongueShoot++; ((EnemyAI)this).SwitchToBehaviourState(1); } break; } VehicleController val = Object.FindObjectOfType(); if (base.targetPlayer.isPlayerDead || !base.targetPlayer.isPlayerControlled || Object.op_Implicit((Object)(object)base.targetPlayer.inAnimationWithEnemy) || base.stunNormalizedTimer > 0f || (base.targetPlayer.isInHangarShipRoom && StartOfRound.Instance.hangarDoorsClosed && !base.isInsidePlayerShip) || ((Object)(object)val != (Object)null && (Object)(object)base.targetPlayer.physicsParent != (Object)null && (Object)(object)base.targetPlayer.physicsParent == (Object)(object)((Component)val).transform && !val.backDoorOpen)) { base.agent.speed = 0f; CancelReelingPlayerIn(); if (((NetworkBehaviour)this).IsOwner && tongueLengthNormalized < -0.25f) { ((EnemyAI)this).SwitchToBehaviourState(0); } } else if (dragging) { if (startedShootingTongue) { startedShootingTongue = false; shootTongueTimer = 0f; base.creatureVoice.clip = snarlSFX; base.creatureVoice.Play(); draggingPlayer = base.targetPlayer; base.targetPlayer.disableInteract = true; timesFailingTongueShoot = 0; if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)base.targetPlayer) { base.targetPlayer.CancelSpecialTriggerAnimations(); base.targetPlayer.DropAllHeldItemsAndSync(((Component)base.targetPlayer).transform.position, base.targetPlayer.localItemHolder.position, base.targetPlayer.localItemHolder.eulerAngles, ((Component)base.targetPlayer.playerEye).transform.position, ((Component)base.targetPlayer.playerEye).transform.eulerAngles); } CheckHomeBase(); } if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)draggingPlayer) { draggingPlayer.shockingTarget = ((Component)this).transform; } base.agent.speed = 8f; Vector3 position = ((Component)base.targetPlayer).transform.position; position.y = ((Component)this).transform.position.y; float num = Vector3.Distance(((Component)this).transform.position, position); if (((NetworkBehaviour)this).IsOwner) { if ((num > 3f && shootTongueTimer < 1.3f) || num > attackDistance - 3f || (num > 4.2f && Physics.Linecast(tongueStartPoint.position, ((Component)tongueTarget).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(draggingPlayer); } else { base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(currentHidingSpot, false); } } if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)base.targetPlayer) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(1f, true); base.creatureAnimator.SetBool("mouthOpen", Vector3.Distance(((Component)this).transform.position, currentHidingSpot) < 3f); if (num > 0.7f) { Vector3 val2 = ((Component)this).transform.position + ((Component)this).transform.forward * 2f + Vector3.up * 1.15f; float num2 = 1f; if (base.targetPlayer.activatingItem) { num2 = 1.35f; } if (base.targetPlayer.isInElevator && Vector3.Distance(((Component)base.targetPlayer).transform.position, StartOfRound.Instance.elevatorTransform.position) < 25f) { num2 = 1.7f; } Vector3 zero = Vector3.zero; timeSinceLOSBlocked = Mathf.Max(timeSinceLOSBlocked - Time.deltaTime, 0f); if (timeSinceLOSBlocked > 0f || base.targetPlayer.isInHangarShipRoom) { if (timeSinceLOSBlocked <= 0f) { timeSinceLOSBlocked = 0.5f; } if (base.targetPlayer.isInHangarShipRoom && ((Component)base.targetPlayer).transform.position.x < -14.3f && ((Component)base.targetPlayer).transform.position.x > -13.6f) { val2 = ((Component)base.targetPlayer).transform.position; val2.z = StartOfRound.Instance.middleOfShipNode.position.z; } else { val2 = StartOfRound.Instance.middleOfSpaceNode.position; } } else if (randomForceInterval <= 0f) { Ray val3 = default(Ray); ((Ray)(ref val3))..ctor(((Component)base.targetPlayer).transform.position + Vector3.up * 0.4f, val2 - ((Component)base.targetPlayer).transform.position + Vector3.up * 0.4f); if (Physics.Raycast(val3, 0.8f, 268435456, (QueryTriggerInteraction)1)) { randomForceInterval = 0.8f; PlayerControllerB targetPlayer = base.targetPlayer; targetPlayer.externalForceAutoFade += Vector3.up * 22f; } else if (Physics.Raycast(val3, 0.8f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { randomForceInterval = 0.32f; PlayerControllerB targetPlayer2 = base.targetPlayer; targetPlayer2.externalForceAutoFade += Random.onUnitSphere * 6f; } else { randomForceInterval = 0.45f; } } else { randomForceInterval -= Time.deltaTime; } zero += Vector3.Normalize((val2 - ((Component)base.targetPlayer).transform.position) * 1000f) * dragForce * num2 * Mathf.Clamp(shootTongueTimer / 2.5f, 1.15f, 2.55f); if (base.targetPlayer.isInElevator && !base.targetPlayer.isInHangarShipRoom && ((Component)base.targetPlayer).transform.position.x < -6f && ((Component)base.targetPlayer).transform.position.x > -9.1f && ((Component)base.targetPlayer).transform.position.z < -10.8f && ((Component)base.targetPlayer).transform.position.z > -17.3f) { zero.x = Mathf.Min(zero.x, 0f); zero = ((!(((Component)this).transform.position.z > ((Component)base.targetPlayer).transform.position.z)) ? (zero + Vector3.forward * -10f) : (zero + Vector3.forward * 10f)); } zero.y = Mathf.Max(zero.y, 0f); if (num > attackDistance + 6f && shootTongueTimer > 1.6f) { ((EnemyAI)this).SwitchToBehaviourState(1); break; } PlayerControllerB targetPlayer3 = base.targetPlayer; targetPlayer3.externalForces += zero; Debug.DrawRay(((Component)base.targetPlayer).transform.position, base.targetPlayer.externalForces, Color.red); Debug.DrawRay(((Component)base.targetPlayer).transform.position, base.targetPlayer.externalForceAutoFade, Color.blue); } } base.creatureAnimator.SetBool("ReelingPlayerIn", true); shootTongueTimer += Time.deltaTime; if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)base.targetPlayer) { tongueTarget = base.targetPlayer.upperSpineLocalPoint; } else { tongueTarget = base.targetPlayer.upperSpine; } } else if (!startedShootingTongue) { startedShootingTongue = true; base.creatureAnimator.SetBool("ShootTongue", true); base.creatureVoice.PlayOneShot(shootTongueSFX); tongueLengthNormalized = 0f; } else { if (timeSinceChangingState < 0.28f) { break; } if (!playedTongueAudio) { playedTongueAudio = true; tongueAudio.PlayOneShot(tongueShootSFX); tongueAudio.Play(); } shootTongueTimer += Time.deltaTime; if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)base.targetPlayer) { tongueTarget = base.targetPlayer.upperSpineLocalPoint; } else { tongueTarget = base.targetPlayer.upperSpine; } if (tongueLengthNormalized < 1f) { tongueLengthNormalized = Mathf.Min(tongueLengthNormalized + Time.deltaTime * 3f, 1f); } else if ((Object)(object)base.targetPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) { if (!Physics.Linecast(tongueStartPoint.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position - Vector3.up * 0.3f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < attackDistance) { HitByEnemyServerRpc(); } else { DodgedEnemyHitServerRpc(); } } else if (shootTongueTimer > 3f) { TongueShootWasUnsuccessful(); } } break; } } } private void TongueShootWasUnsuccessful() { shootTongueTimer = 0f; failedTongueShoot = true; } [ServerRpc(RequireOwnership = false)] public void HitByEnemyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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(2076785111u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2076785111u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!failedTongueShoot) { HitByEnemyClientRpc(); } } } [ClientRpc] public void HitByEnemyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(706795357u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 706795357u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; dragging = true; } } } [ServerRpc(RequireOwnership = false)] public void DodgedEnemyHitServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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(1441721452u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1441721452u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DodgedEnemyHitClientRpc(); } } } [ClientRpc] public void DodgedEnemyHitClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3409163355u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3409163355u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TongueShootWasUnsuccessful(); } } } private void LookAtPosition(Vector3 pos) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) looking = true; base.agent.updateRotation = false; pos.y = ((Component)this).transform.position.y; ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.LookRotation(pos - ((Component)this).transform.position, Vector3.up), 4f * Time.deltaTime); } public override void OnCollideWithEnemy(Collider other, EnemyAI collidedEnemy = null) { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithEnemy(other, collidedEnemy); if (!((Object)(object)collidedEnemy.enemyType == (Object)(object)base.enemyType) && !(timeSinceHitting < 0.75f) && !dragging && !startedShootingTongue && !(base.stunNormalizedTimer > 0f) && !base.isEnemyDead) { timeSinceHitting = 0f; base.creatureAnimator.ResetTrigger("Hit"); base.creatureAnimator.SetTrigger("Hit"); base.creatureSFX.PlayOneShot(base.enemyType.audioClips[5]); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, base.enemyType.audioClips[0], 1f); RoundManager.Instance.PlayAudibleNoise(((Component)base.creatureSFX).transform.position, 8f, 0.6f, 0, false, 0); collidedEnemy.HitEnemy(1, (PlayerControllerB)null, true, -1); } } public override void OnCollideWithPlayer(Collider other) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (foundSpawningPoint && !inKillAnimation && !base.isEnemyDead && (Object)(object)((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, inKillAnimation, false) != (Object)null) { float num = Vector3.Distance(((Component)this).transform.position, currentHidingSpot); bool flag = false; if (timeSinceTakingDamage < 2.5f && (Object)(object)lastHitByPlayer != (Object)null && num < 16f) { flag = true; } else if (num < 7f && dragging && !startedShootingTongue && (Object)(object)base.targetPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) { flag = true; } if (flag) { GameNetworkManager.Instance.localPlayerController.KillPlayer(Vector3.up * 15f, true, (CauseOfDeath)6, 8, default(Vector3), false); DoKillPlayerAnimationServerRpc((int)base.targetPlayer.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void DoKillPlayerAnimationServerRpc(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) //IL_00ce: 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(3347768617u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3347768617u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoKillPlayerAnimationClientRpc(playerId); } } } [ClientRpc] public void DoKillPlayerAnimationClientRpc(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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1049318751u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1049318751u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger("killPlayer"); if ((Object)(object)StartOfRound.Instance.allPlayerScripts[playerId] == (Object)(object)GameNetworkManager.Instance.localPlayerController) { GameNetworkManager.Instance.localPlayerController.overrideGameOverSpectatePivot = playerAnimationHeadPoint; } timeSinceKillingPlayer = 0f; if (killPlayerCoroutine != null) { CancelKillAnimation(); } inKillAnimation = true; growlAudio.PlayOneShot(killSFX); WalkieTalkie.TransmitOneShotAudio(growlAudio, killSFX, 1f); killPlayerCoroutine = ((MonoBehaviour)this).StartCoroutine(KillAnimationOnPlayer(StartOfRound.Instance.allPlayerScripts[playerId])); } } private void CancelKillAnimation() { if (inKillAnimation) { base.creatureAnimator.SetTrigger("cancelKillAnim"); inKillAnimation = false; } DropBody(); if (killPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killPlayerCoroutine); } } private void DropBody() { if ((Object)(object)body != (Object)null) { body.matchPositionExactly = false; body.speedMultiplier = 12f; body.attachedTo = null; body.attachedLimb = null; body = null; } } [IteratorStateMachine(typeof(d__144))] private IEnumerator KillAnimationOnPlayer(PlayerControllerB player) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__144(0) { <>4__this = this, player = player }; } private void LateUpdate() { //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011a: 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_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) AddProceduralOffsetToLimbsOverTerrain(); if ((Object)(object)tongueTarget != (Object)null) { if (!((Component)tongue).gameObject.activeSelf) { ((Component)tongue).gameObject.SetActive(true); } tongueLengthNormalized = Mathf.Min(tongueLengthNormalized + Time.deltaTime * 3f, 1f); if (tongueLengthNormalized < 1f || dragging) { Vector3 val = ((Component)tongueTarget).transform.position - tongueStartPoint.position; if (!dragging) { Ray val2 = default(Ray); ((Ray)(ref val2))..ctor(tongueStartPoint.position, val); val = ((!Physics.Raycast(val2, ref hit, attackDistance, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) ? ((Ray)(ref val2)).GetPoint(attackDistance) : ((RaycastHit)(ref hit)).point); } else { val = ((Component)tongueTarget).transform.position; } tongue.position = tongueStartPoint.position; tongue.LookAt(val, Vector3.up); tongue.localScale = Vector3.Lerp(tongue.localScale, new Vector3(1f, 1f, Vector3.Distance(tongueStartPoint.position, tongueTarget.position)), tongueLengthNormalized); } } else { tongueLengthNormalized = Mathf.Max(tongueLengthNormalized - Time.deltaTime * 3f, -1f); if (tongueLengthNormalized > 0f) { tongue.position = tongueStartPoint.position; tongue.localScale = Vector3.Lerp(tongue.localScale, new Vector3(1f, 1f, 0.5f), tongueLengthNormalized); } else if (((Component)tongue).gameObject.activeSelf) { ((Component)tongue).gameObject.SetActive(false); } } } private void CalculateAnimationDirection(float maxSpeed = 1f) { //IL_000d: 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) //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) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 2f)); hideBodyOnTerrain = ((Vector3)(ref agentLocalVelocity)).magnitude == 0f || isHiding; velX = Mathf.Lerp(velX, agentLocalVelocity.x, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("WalkX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, agentLocalVelocity.z, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("WalkZ", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); base.creatureAnimator.SetBool("idling", agentLocalVelocity.x == 0f && agentLocalVelocity.z == 0f); previousPosition = ((Component)this).transform.position; } private void AddProceduralOffsetToLimbsOverTerrain() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_02a1: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Unknown result type (might be due to invalid IL or missing references) //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) bool flag = base.stunNormalizedTimer < 0f && !dragging && !inKillAnimation && !base.isEnemyDead && timeSinceTakingDamage > 0.4f && matingCallTimer <= 0f; if (flag && Physics.Raycast(((Component)this).transform.position + Vector3.up * 1.25f, ((Component)this).transform.forward, ref hit, 3.15f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { bendHeadBack.weight = Mathf.Lerp(1f, 0f, ((RaycastHit)(ref hit)).distance / 3.15f); } else { bendHeadBack.weight = Mathf.Lerp(bendHeadBack.weight, 0f, Time.deltaTime * 5f); } if (resetIKOffsetsInterval < 0f || !hideBodyOnTerrain || !flag) { resetIKOffsetsInterval = 8f; for (int i = 0; i < proceduralBodyTargets.Length; i++) { proceduralBodyTargets[i].localPosition = Vector3.zero; } animationContainer.rotation = Quaternion.Lerp(animationContainer.rotation, ((Component)this).transform.rotation, 10f * Time.deltaTime); return; } resetIKOffsetsInterval -= Time.deltaTime; if (Physics.Raycast(((Component)this).transform.position + Vector3.up, Vector3.down, ref hit, 2f, 1073744129, (QueryTriggerInteraction)1) && Vector3.Angle(((RaycastHit)(ref hit)).normal, Vector3.up) < 75f) { Quaternion val = Quaternion.FromToRotation(animationContainer.up, ((RaycastHit)(ref hit)).normal) * ((Component)this).transform.rotation; animationContainer.rotation = Quaternion.Lerp(animationContainer.rotation, val, Time.deltaTime * 10f); } float num = 0f; for (int j = 0; j < proceduralBodyTargets.Length; j++) { if (j == 4 && base.currentBehaviourStateIndex == 2) { proceduralBodyTargets[j].localPosition = Vector3.zero; break; } if (Physics.Raycast(proceduralBodyTargets[j].position + ((Component)this).transform.up * 1.5f, -((Component)this).transform.up, ref hit, 5f, 1073744129, (QueryTriggerInteraction)1)) { Debug.DrawRay(proceduralBodyTargets[j].position + ((Component)this).transform.up * 1.5f, -((Component)this).transform.up * 5f, Color.white); num = Mathf.Clamp(((RaycastHit)(ref hit)).point.y, ((Component)this).transform.position.y - 1.25f, ((Component)this).transform.position.y + 1.25f); } else { num = ((Component)this).transform.position.y; } if (j == 4) { proceduralBodyTargets[j].position = new Vector3(IKTargetContainers[j].position.x, Mathf.Lerp(proceduralBodyTargets[j].position.y, num + 0.4f, 40f * Time.deltaTime), IKTargetContainers[j].position.z); } else { proceduralBodyTargets[j].position = new Vector3(IKTargetContainers[j].position.x, Mathf.Lerp(proceduralBodyTargets[j].position.y, num, 40f * Time.deltaTime), IKTargetContainers[j].position.z); } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2297760435u, new RpcReceiveHandler(__rpc_handler_2297760435), "SyncWeedPositionsServerRpc"); ((NetworkBehaviour)this).__registerRpc(2653613967u, new RpcReceiveHandler(__rpc_handler_2653613967), "SyncWeedPositionsClientRpc"); ((NetworkBehaviour)this).__registerRpc(2652754198u, new RpcReceiveHandler(__rpc_handler_2652754198), "SyncTargetPlayerAndAttackServerRpc"); ((NetworkBehaviour)this).__registerRpc(1317746892u, new RpcReceiveHandler(__rpc_handler_1317746892), "SyncTargetPlayerAndAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(2569300201u, new RpcReceiveHandler(__rpc_handler_2569300201), "SyncNewHidingSpotServerRpc"); ((NetworkBehaviour)this).__registerRpc(1637531219u, new RpcReceiveHandler(__rpc_handler_1637531219), "SyncNewHidingSpotClientRpc"); ((NetworkBehaviour)this).__registerRpc(821084172u, new RpcReceiveHandler(__rpc_handler_821084172), "SetAnimationSpeedServerRpc"); ((NetworkBehaviour)this).__registerRpc(1367591999u, new RpcReceiveHandler(__rpc_handler_1367591999), "SetAnimationSpeedClientRpc"); ((NetworkBehaviour)this).__registerRpc(3735194043u, new RpcReceiveHandler(__rpc_handler_3735194043), "DoGrowlServerRpc"); ((NetworkBehaviour)this).__registerRpc(3928884262u, new RpcReceiveHandler(__rpc_handler_3928884262), "DoGrowlClientRpc"); ((NetworkBehaviour)this).__registerRpc(2278982227u, new RpcReceiveHandler(__rpc_handler_2278982227), "SeeBushWolfServerRpc"); ((NetworkBehaviour)this).__registerRpc(3455050024u, new RpcReceiveHandler(__rpc_handler_3455050024), "SeeBushWolfClientRpc"); ((NetworkBehaviour)this).__registerRpc(888615432u, new RpcReceiveHandler(__rpc_handler_888615432), "HitTongueServerRpc"); ((NetworkBehaviour)this).__registerRpc(3168228498u, new RpcReceiveHandler(__rpc_handler_3168228498), "HitTongueClientRpc"); ((NetworkBehaviour)this).__registerRpc(1734476257u, new RpcReceiveHandler(__rpc_handler_1734476257), "MatingCallServerRpc"); ((NetworkBehaviour)this).__registerRpc(2179972878u, new RpcReceiveHandler(__rpc_handler_2179972878), "MatingCallClientRpc"); ((NetworkBehaviour)this).__registerRpc(2076785111u, new RpcReceiveHandler(__rpc_handler_2076785111), "HitByEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(706795357u, new RpcReceiveHandler(__rpc_handler_706795357), "HitByEnemyClientRpc"); ((NetworkBehaviour)this).__registerRpc(1441721452u, new RpcReceiveHandler(__rpc_handler_1441721452), "DodgedEnemyHitServerRpc"); ((NetworkBehaviour)this).__registerRpc(3409163355u, new RpcReceiveHandler(__rpc_handler_3409163355), "DodgedEnemyHitClientRpc"); ((NetworkBehaviour)this).__registerRpc(3347768617u, new RpcReceiveHandler(__rpc_handler_3347768617), "DoKillPlayerAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(1049318751u, new RpcReceiveHandler(__rpc_handler_1049318751), "DoKillPlayerAnimationClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2297760435(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } Vector3 hiddenPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hiddenPosition); Vector3 val = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val); float nest = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref nest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SyncWeedPositionsServerRpc(hiddenPosition, val, nest); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_2653613967(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) //IL_0069: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 hiddenPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hiddenPosition); Vector3 agg = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref agg); float nest = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref nest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SyncWeedPositionsClientRpc(hiddenPosition, agg, nest); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2652754198(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SyncTargetPlayerAndAttackServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1317746892(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SyncTargetPlayerAndAttackClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2569300201(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 newHidingSpot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newHidingSpot); float nest = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref nest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SyncNewHidingSpotServerRpc(newHidingSpot, nest); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1637531219(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newHidingSpot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newHidingSpot); float nest = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref nest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SyncNewHidingSpotClientRpc(newHidingSpot, nest); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_821084172(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float animationSpeedServerRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationSpeedServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SetAnimationSpeedServerRpc(animationSpeedServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1367591999(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float animationSpeedClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationSpeedClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SetAnimationSpeedClientRpc(animationSpeedClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3735194043(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).DoGrowlServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3928884262(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).DoGrowlClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2278982227(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SeeBushWolfServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3455050024(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).SeeBushWolfClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_888615432(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerWhoHit = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).HitTongueServerRpc(playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3168228498(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerWhoHit = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).HitTongueClientRpc(playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1734476257(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).MatingCallServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2179972878(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).MatingCallClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2076785111(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).HitByEnemyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_706795357(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).HitByEnemyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1441721452(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).DodgedEnemyHitServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3409163355(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).DodgedEnemyHitClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3347768617(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).DoKillPlayerAnimationServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1049318751(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((AmbushWolfAI)(object)target).DoKillPlayerAnimationClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "AmbushWolfAI"; } } public class EnemyAICollisionBTest : MonoBehaviour, IHittable, INoiseListener, IShockableWithGun { public EnemyAI mainScript; public bool canCollideWithEnemies; public bool onlyCollideWhenGrounded; public bool alwaysAllowHitting; private void OnTriggerStay(Collider other) { if (((Component)other).CompareTag("Player")) { if (onlyCollideWhenGrounded) { CharacterController component = ((Component)other).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null) || !component.isGrounded) { return; } mainScript.OnCollideWithPlayer(other); } mainScript.OnCollideWithPlayer(other); } else if (!onlyCollideWhenGrounded && canCollideWithEnemies && ((Component)other).CompareTag("Enemy")) { EnemyAICollisionDetect component2 = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2.mainScript != (Object)(object)mainScript) { mainScript.OnCollideWithEnemy(other, component2.mainScript); } } } bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) if (onlyCollideWhenGrounded && !alwaysAllowHitting) { Debug.Log((object)"Enemy collision detect returned false"); return false; } mainScript.HitEnemyOnLocalClient(force, hitDirection, playerWhoHit, playHitSFX, hitID); return true; } void INoiseListener.DetectNoise(Vector3 noisePosition, float noiseLoudness, int timesNoisePlayedInOneSpot, int noiseID) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) if (!onlyCollideWhenGrounded) { mainScript.DetectNoise(noisePosition, noiseLoudness, timesNoisePlayedInOneSpot, noiseID); } } bool IShockableWithGun.CanBeShocked() { if (!onlyCollideWhenGrounded && mainScript.postStunInvincibilityTimer <= 0f && mainScript.enemyType.canBeStunned) { return !mainScript.isEnemyDead; } return false; } Vector3 IShockableWithGun.GetShockablePosition() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)mainScript.eye != (Object)null) { return mainScript.eye.position; } return ((Component)this).transform.position + Vector3.up * 0.5f; } float IShockableWithGun.GetDifficultyMultiplier() { return mainScript.enemyType.stunGameDifficultyMultiplier; } void IShockableWithGun.ShockWithGun(PlayerControllerB shockedByPlayer) { mainScript.SetEnemyStunned(true, 0.25f, shockedByPlayer); EnemyAI obj = mainScript; obj.stunnedIndefinitely++; } Transform IShockableWithGun.GetShockableTransform() { return ((Component)this).transform; } NetworkObject IShockableWithGun.GetNetworkObject() { return ((NetworkBehaviour)mainScript).NetworkObject; } void IShockableWithGun.StopShockingWithGun() { mainScript.stunnedIndefinitely = Mathf.Clamp(mainScript.stunnedIndefinitely - 1, 0, 100); } } public class GazAI : EnemyAI { [CompilerGenerated] private sealed class <>c__DisplayClass39_0 { public PlayerControllerB playerScript; public float startTime; internal bool b__0() { if (!((Object)(object)playerScript.deadBody != (Object)null)) { return Time.realtimeSinceStartup - startTime > 2f; } return true; } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private <>c__DisplayClass39_0 <>8__1; public int playerKilled; public GazAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Expected O, but got Unknown int num = <>1__state; GazAI gazAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass39_0(); <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; <>8__1.playerScript = StartOfRound.Instance.allPlayerScripts[playerKilled]; <>8__1.startTime = Time.realtimeSinceStartup; <>2__current = (object)new WaitUntil((Func)(() => (Object)(object)<>8__1.playerScript.deadBody != (Object)null || Time.realtimeSinceStartup - <>8__1.startTime > 2f)); <>1__state = 2; return true; case 2: <>1__state = -1; if ((Object)(object)<>8__1.playerScript.deadBody == (Object)null) { Debug.Log((object)"Blob: Player body was not spawned or found within 2 seconds."); return false; } <>8__1.playerScript.deadBody.attachedLimb = <>8__1.playerScript.deadBody.bodyParts[6]; <>8__1.playerScript.deadBody.attachedTo = gazAI.centerPoint; <>8__1.playerScript.deadBody.matchPositionExactly = false; <>2__current = (object)new WaitForSeconds(2f); <>1__state = 3; return true; case 3: <>1__state = -1; <>8__1.playerScript.deadBody.attachedTo = null; <>8__1.playerScript.deadBody.ChangeMesh(gazAI.emptySuitMesh, (Material)null); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [Header("Fluid simulation")] public Transform centerPoint; public Transform[] SlimeRaycastTargets; public Rigidbody[] SlimeBones; private Vector3[] SlimeBonePositions = (Vector3[])(object)new Vector3[8]; public float slimeRange = 8f; public float currentSlimeRange; private float[] maxDistanceForSlimeRays = new float[8]; private float[] distanceOfRaysLastFrame = new float[8]; private int partsMovingUpSlope; private Ray slimeRay; private RaycastHit slimeRayHit; private RaycastHit slimePlayerRayHit; private float timeSinceHittingLocalPlayer; [Header("Behaviors")] public AISearchRoutine searchForPlayers; private float tamedTimer; private float angeredTimer; private Material thisSlimeMaterial; private float slimeJiggleAmplitude; private float slimeJiggleDensity; [Header("SFX")] public AudioSource movableAudioSource; public AudioClip agitatedSFX; public AudioClip jiggleSFX; public AudioClip hitSlimeSFX; public AudioClip killPlayerSFX; public AudioClip idleSFX; private Collider[] ragdollColliders; private Coroutine eatPlayerBodyCoroutine; private DeadBodyInfo bodyBeingCarried; private int slimeMask = 268470529; public Mesh emptySuitMesh; public override void Start() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) ragdollColliders = (Collider[])(object)new Collider[4]; ((EnemyAI)this).Start(); thisSlimeMaterial = ((Renderer)base.skinnedMeshRenderers[0]).material; for (int i = 0; i < maxDistanceForSlimeRays.Length; i++) { maxDistanceForSlimeRays[i] = 3.7f; SlimeBonePositions[i] = ((Component)SlimeBones[i]).transform.position; } } public override void DoAIInterval() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } if (((EnemyAI)this).TargetClosestPlayer(4f, false, 70f, false, false, true)) { ((EnemyAI)this).StopSearch(searchForPlayers, true); base.movingTowardsTargetPlayer = true; return; } base.movingTowardsTargetPlayer = false; if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } } private void SimulateSurfaceTensionInRaycasts(int i) { float num = distanceOfRaysLastFrame[(i + 1) % SlimeRaycastTargets.Length]; float num2 = ((i != 0) ? distanceOfRaysLastFrame[i - 1] : distanceOfRaysLastFrame[SlimeRaycastTargets.Length - 1]); float num3 = Mathf.Clamp((num2 + num) / 2f, 0.5f, 200f); float num4 = 1f; if (num3 < 2f) { num4 = 2f; } maxDistanceForSlimeRays[i] = Mathf.Clamp(num3 * 2f * num4, 0f, currentSlimeRange); } public override void Update() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_05b7: Unknown result type (might be due to invalid IL or missing references) //IL_05c4: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Unknown result type (might be due to invalid IL or missing references) //IL_064d: Unknown result type (might be due to invalid IL or missing references) //IL_05f0: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (!base.ventAnimationFinished || !((Object)(object)base.creatureAnimator != (Object)null)) { return; } ((Behaviour)base.creatureAnimator).enabled = false; if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } timeSinceHittingLocalPlayer += Time.deltaTime; partsMovingUpSlope = 0; Vector3 serverPosition = base.serverPosition; for (int i = 0; i < SlimeRaycastTargets.Length; i++) { SimulateSurfaceTensionInRaycasts(i); Vector3 val = SlimeRaycastTargets[i].position - centerPoint.position; slimeRay = new Ray(serverPosition, val); RaycastCollisionWithPlayers(Vector3.Distance(serverPosition, ((Component)SlimeBones[i]).transform.position)); if (Physics.Raycast(slimeRay, ref slimeRayHit, maxDistanceForSlimeRays[i], slimeMask, (QueryTriggerInteraction)1)) { MoveSlimeBoneToRaycastHit(0f, i); continue; } Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(((Ray)(ref slimeRay)).GetPoint(maxDistanceForSlimeRays[i]), default(NavMeshHit), 5f, -1); SlimeBonePositions[i] = Vector3.Lerp(SlimeBonePositions[i], navMeshPosition, 1f * Time.deltaTime); distanceOfRaysLastFrame[i] = maxDistanceForSlimeRays[i]; } if (base.stunNormalizedTimer > 0f) { thisSlimeMaterial.SetFloat("_Frequency", 4f); slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 1f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.17f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Amplitude", slimeJiggleAmplitude); base.agent.speed = 0f; currentSlimeRange = Mathf.Lerp(currentSlimeRange, 2f, Time.deltaTime * 4f); angeredTimer = 7f; } else if (angeredTimer > 0f) { angeredTimer -= Time.deltaTime; currentSlimeRange = Mathf.Lerp(currentSlimeRange, slimeRange + 6f, Time.deltaTime * 3f); thisSlimeMaterial.SetFloat("_Frequency", 3f); slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 1f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.14f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Amplitude", slimeJiggleAmplitude); if ((Object)(object)base.creatureSFX.clip != (Object)(object)agitatedSFX) { base.creatureSFX.clip = agitatedSFX; base.creatureSFX.Play(); } if (((NetworkBehaviour)this).IsOwner) { base.agent.stoppingDistance = 0.1f; base.agent.speed = 0.6f; } } else if (tamedTimer > 0f) { tamedTimer -= Time.deltaTime; currentSlimeRange = 1.5f; thisSlimeMaterial.SetFloat("_Frequency", 4.3f); slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 1.3f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.2f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Amplitude", slimeJiggleAmplitude); if ((Object)(object)base.creatureSFX.clip != (Object)(object)jiggleSFX) { base.creatureSFX.clip = jiggleSFX; base.creatureSFX.Play(); } if (((NetworkBehaviour)this).IsOwner) { base.agent.stoppingDistance = 5f; base.agent.speed = Mathf.Lerp(base.agent.speed, 3f, 0.7f * Time.deltaTime); } } else { if (partsMovingUpSlope >= 2) { currentSlimeRange = Mathf.Clamp(slimeRange / 2f, 1.5f, 100f); } else { currentSlimeRange = slimeRange; } thisSlimeMaterial.SetFloat("_Frequency", 2f); slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 0.6f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.15f, 10f * Time.deltaTime); thisSlimeMaterial.SetFloat("_Amplitude", slimeJiggleAmplitude); if ((Object)(object)base.creatureSFX.clip != (Object)(object)idleSFX) { base.creatureSFX.clip = idleSFX; base.creatureSFX.Play(); } if (((NetworkBehaviour)this).IsOwner) { base.agent.stoppingDistance = 0.1f; base.agent.speed = 0.5f; } } for (int j = 0; j < SlimeBonePositions.Length; j++) { if (Vector3.Distance(centerPoint.position, SlimeBonePositions[j]) > distanceOfRaysLastFrame[j]) { ((Component)SlimeBones[j]).transform.position = Vector3.Lerp(SlimeBones[j].position, SlimeBonePositions[j], 10f * Time.deltaTime); } else { ((Component)SlimeBones[j]).transform.position = Vector3.Lerp(SlimeBones[j].position, SlimeBonePositions[j], 5f * Time.deltaTime); } } } private void MoveSlimeBoneToRaycastHit(float currentRangeOfRaycast, int i) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) float num = 1.8f; if (((RaycastHit)(ref slimeRayHit)).distance + currentRangeOfRaycast < distanceOfRaysLastFrame[i]) { num = 5f; } SlimeBonePositions[i] = Vector3.Lerp(SlimeBonePositions[i], ((Ray)(ref slimeRay)).GetPoint(((RaycastHit)(ref slimeRayHit)).distance), num * Time.deltaTime); distanceOfRaysLastFrame[i] = ((RaycastHit)(ref slimeRayHit)).distance + currentRangeOfRaycast; } private void RaycastCollisionWithPlayers(float maxDistance) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) maxDistance -= 1.55f; if (Physics.SphereCast(slimeRay, 0.7f, ref slimePlayerRayHit, maxDistance, 2312) && ((Component)((RaycastHit)(ref slimePlayerRayHit)).collider).gameObject.CompareTag("Player")) { ((EnemyAI)this).OnCollideWithPlayer(((RaycastHit)(ref slimePlayerRayHit)).collider); } } public override void OnCollideWithPlayer(Collider other) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (timeSinceHittingLocalPlayer < 0.25f || (tamedTimer > 0f && angeredTimer <= 0f)) { return; } PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { timeSinceHittingLocalPlayer = 0f; val.DamagePlayer(35, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); if (val.isPlayerDead) { SlimeKillPlayerEffectServerRpc((int)val.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void SlimeKillPlayerEffectServerRpc(int playerKilled) { //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) //IL_00ce: 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(3121186312u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerKilled); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3121186312u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SlimeKillPlayerEffectClientRpc(playerKilled); } } } [ClientRpc] public void SlimeKillPlayerEffectClientRpc(int playerKilled) { //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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3200208346u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerKilled); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3200208346u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureSFX.PlayOneShot(killPlayerSFX); angeredTimer = 0f; if (eatPlayerBodyCoroutine == null) { eatPlayerBodyCoroutine = ((MonoBehaviour)this).StartCoroutine(eatPlayerBody(playerKilled)); } } } [IteratorStateMachine(typeof(d__39))] private IEnumerator eatPlayerBody(int playerKilled) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { <>4__this = this, playerKilled = playerKilled }; } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); angeredTimer = 18f; if ((Object)(object)playerWhoHit != (Object)null) { ((Component)movableAudioSource).transform.position = ((Component)playerWhoHit.gameplayCamera).transform.position + ((Component)playerWhoHit.gameplayCamera).transform.forward * 1.5f; } else { ((Component)movableAudioSource).transform.position = centerPoint.position; } movableAudioSource.PlayOneShot(hitSlimeSFX); } public override void DetectNoise(Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot = 0, int noiseID = 0) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: 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) //IL_0038: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DetectNoise(noisePosition, noiseLoudness, timesPlayedInOneSpot, noiseID); if (noiseID == 5 && !Physics.Linecast(((Component)this).transform.position, noisePosition, StartOfRound.Instance.collidersAndRoomMask) && Vector3.Distance(((Component)this).transform.position, noisePosition) < 12f) { tamedTimer = 2f; } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3121186312u, new RpcReceiveHandler(__rpc_handler_3121186312), "SlimeKillPlayerEffectServerRpc"); ((NetworkBehaviour)this).__registerRpc(3200208346u, new RpcReceiveHandler(__rpc_handler_3200208346), "SlimeKillPlayerEffectClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3121186312(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerKilled = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerKilled); target.__rpc_exec_stage = (__RpcExecStage)1; ((GazAI)(object)target).SlimeKillPlayerEffectServerRpc(playerKilled); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3200208346(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerKilled = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerKilled); target.__rpc_exec_stage = (__RpcExecStage)1; ((GazAI)(object)target).SlimeKillPlayerEffectClientRpc(playerKilled); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GazAI"; } } public class GuardianAI : EnemyAI { [CompilerGenerated] private sealed class d__94 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GuardianAI <>4__this; public Vector3 enemyPos; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__94(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Expected O, but got Unknown //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Expected O, but got Unknown int num = <>1__state; GuardianAI guardianAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; guardianAI.aimingGun = true; if (guardianAI.lastPlayerSeenMoving == guardianAI.previousPlayerSeenWhenAiming) { guardianAI.timesSeeingSamePlayer++; } else { guardianAI.previousPlayerSeenWhenAiming = guardianAI.lastPlayerSeenMoving; guardianAI.timesSeeingSamePlayer = 1; } RoundManager.PlayRandomClip(guardianAI.longRangeAudio, guardianAI.aimSFX, true, 1f, 0, 1000); if (guardianAI.timesSeeingSamePlayer >= 3) { guardianAI.speedWhileAiming = 2.25f; } else { guardianAI.speedWhileAiming = 0f; } ((EnemyAI)guardianAI).updatePositionThreshold = 0.45f; ((EnemyAI)guardianAI).serverPosition = enemyPos; if (((EnemyAI)guardianAI).enemyHP <= guardianAI.berserkThreshold) { <>2__current = (object)new WaitForSeconds(guardianAI.berserkAimTime); <>1__state = 1; return true; } if (guardianAI.gun.shellsLoaded <= guardianAI.gun.maxAmmo / 2) { <>2__current = (object)new WaitForSeconds(guardianAI.shellBAimTime); <>1__state = 2; return true; } <>2__current = (object)new WaitForSeconds(guardianAI.shellAAimtTime); <>1__state = 3; return true; case 1: <>1__state = -1; goto IL_0152; case 2: <>1__state = -1; goto IL_0152; case 3: <>1__state = -1; goto IL_0152; case 4: <>1__state = -1; if (((NetworkBehaviour)guardianAI).IsOwner) { guardianAI.FireGunServerRpc(); } guardianAI.timeSinceFiringGun = 0f; <>2__current = (object)new WaitForSeconds(0.35f); <>1__state = 5; return true; case 5: { <>1__state = -1; guardianAI.aimingGun = false; ((EnemyAI)guardianAI).inSpecialAnimation = false; ((EnemyAI)guardianAI).updatePositionThreshold = 1f; ((EnemyAI)guardianAI).creatureVoice.Play(); ((EnemyAI)guardianAI).creatureVoice.pitch = Random.Range(guardianAI.minPitchAngry, guardianAI.maxPitchAngry); return false; } IL_0152: <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 4; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__82 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GuardianAI <>4__this; private int 5__2; private int 5__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__82(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown int num = <>1__state; GuardianAI guardianAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 1; return true; case 1: <>1__state = -1; guardianAI.isInspecting = true; guardianAI.NutcrackerRandom = new Random(guardianAI.randomSeedNumber + guardianAI.timesDoingInspection); 5__2 = 0; 5__3 = 1; 5__4 = 0; goto IL_017f; case 2: { <>1__state = -1; if (5__2 >= 360) { break; } 5__4++; goto IL_017f; } IL_017f: if (5__4 < 8) { 5__2 = Mathf.Min(5__2 + guardianAI.NutcrackerRandom.Next(45, 95), 360); if (Physics.Raycast(((EnemyAI)guardianAI).eye.position, ((EnemyAI)guardianAI).eye.forward, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { 5__3 = 1; } else { int num2 = ((!((float)5__3 > 2f)) ? 4 : (5__3 / 3)); 5__3 = guardianAI.NutcrackerRandom.Next(1, Mathf.Max(num2, 3)); } guardianAI.targetTorsoDegrees = 5__2; guardianAI.torsoTurnSpeed = guardianAI.NutcrackerRandom.Next(275, 855) / 5__3; <>2__current = (object)new WaitForSeconds((float)5__3); <>1__state = 2; return true; } break; } if (((NetworkBehaviour)guardianAI).IsOwner) { ((EnemyAI)guardianAI).SwitchToBehaviourState(0); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__90 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GuardianAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__90(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown int num = <>1__state; GuardianAI guardianAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; guardianAI.reloadingGun = true; ((EnemyAI)guardianAI).creatureSFX.PlayOneShot(((EnemyAI)guardianAI).enemyType.audioClips[2]); ((EnemyAI)guardianAI).creatureAnimator.SetBool("Reloading", true); <>2__current = (object)new WaitForSeconds(0.32f); <>1__state = 1; return true; case 1: <>1__state = -1; guardianAI.gun.gunAnimator.SetBool("Reloading", true); <>2__current = (object)new WaitForSeconds(0.92f); <>1__state = 2; return true; case 2: <>1__state = -1; guardianAI.gun.gunAnimator.SetBool("Reloading", false); ((EnemyAI)guardianAI).creatureAnimator.SetBool("Reloading", false); <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 3; return true; case 3: <>1__state = -1; guardianAI.reloadingGun = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__112 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GuardianAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__112(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown int num = <>1__state; GuardianAI guardianAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 1; return true; case 1: <>1__state = -1; guardianAI.SpawnShotgunShells(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__97 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GuardianAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__97(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown int num = <>1__state; GuardianAI CS$<>8__locals0 = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitUntil((Func)(() => ((EnemyAI)CS$<>8__locals0).stunNormalizedTimer <= 0f)); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; case 2: <>1__state = -1; CS$<>8__locals0.FireGunClientRpc(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private int previousBehaviourState = -1; private int previousBehaviourStateAIInterval = -1; public static float timeAtNextInspection; private bool inspectingLocalPlayer; private float localPlayerTurnDistance; private bool isInspecting; private bool hasGun; private int randomSeedNumber; public GameObject gunPrefab; public PumpGunItem gun; public Transform gunPoint; private NetworkObjectReference gunObjectRef; public AISearchRoutine patrol; public AISearchRoutine attackSearch; public Transform torsoContainer; public float currentTorsoRotation; public int targetTorsoDegrees; public float torsoTurnSpeed = 2f; public AudioSource torsoTurnAudio; public AudioSource longRangeAudio; public AudioClip[] torsoFinishTurningClips; public AudioClip[] aimSFX; public AudioClip kickSFX; public GameObject shotgunShellPrefab; [Tooltip("I forgor this shit is used in the Gun Script which is not currently done AND it not even in this script, meaning these are all useless")] [Header("Gun Damage Stuff")] public float gunDamageClose; public float gunDamageMidrange; public float gunDamageFar; public float gunRangeClose; public float gunRangeMidrange; public float gunRangeFar; public int gunValue; [Header("Shooting stuff")] [Tooltip("Amount of health the enemy needs to reach to enter Berserk (shoots faster)")] public int berserkThreshold = 1; public float berserkAimTime = 0.5f; public float shellBAimTime = 1.3f; public float shellAAimtTime = 1.75f; [Header("LOS")] public float losWidth = 45f; public int losRange = 60; public int losProxAwareness = -1; [Header("Pitch control")] public float minPitchAngry = 0.9f; public float maxPitchAngry = 1.1f; public AudioClip[] hitSoundCover; public AudioClip[] hitSound; public AudioClip[] stunSFX; private bool torsoTurning; private Random NutcrackerRandom; private int timesDoingInspection; private Coroutine inspectionCoroutine; public int lastPlayerSeenMoving = -1; private float timeSinceSeeingTarget; private float timeSinceInspecting; private float timeSinceFiringGun; private bool aimingGun; private bool reloadingGun; private Vector3 lastSeenPlayerPos; private RaycastHit rayHit; private Coroutine gunCoroutine; private bool isLeaderScript; private Vector3 positionLastCheck; private Vector3 strafePosition; private bool reachedStrafePosition; private bool lostPlayerInChase; private float timeSinceHittingPlayer; private Coroutine waitToFireGunCoroutine; private float walkCheckInterval; private int timesSeeingSamePlayer; private int previousPlayerSeenWhenAiming = -1; private float speedWhileAiming; public override void Start() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); if (((NetworkBehaviour)this).IsServer) { InitializeNutcrackerValuesServerRpc(); if (base.enemyType.numberSpawned <= 1) { isLeaderScript = true; } } rayHit = default(RaycastHit); } [ServerRpc] public void InitializeNutcrackerValuesServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //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(3414496557u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3414496557u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate(gunPrefab, ((Component)this).transform.position + Vector3.up * 0.5f, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); val3.GetComponent().Spawn(false); GrabGun(val3); randomSeedNumber = Random.Range(0, 10000); InitializeNutcrackerValuesClientRpc(randomSeedNumber, NetworkObjectReference.op_Implicit(val3.GetComponent())); } } [ClientRpc] public void InitializeNutcrackerValuesClientRpc(int randomSeed, NetworkObjectReference gunObject) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3558977068u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, randomSeed); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref gunObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3558977068u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; randomSeedNumber = randomSeed; gunObjectRef = gunObject; } } } private void GrabGun(GameObject gunObject) { gun = gunObject.GetComponent(); if ((Object)(object)gun == (Object)null) { ((EnemyAI)this).LogEnemyError("Gun in GrabGun function did not contain ShotgunItem component."); return; } Debug.Log((object)"Setting gun scrap value"); ((GrabbableObject)gun).SetScrapValue(gunValue); RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)((GrabbableObject)gun).scrapValue; ((GrabbableObject)gun).parentObject = gunPoint; ((GrabbableObject)gun).isHeldByEnemy = true; ((GrabbableObject)gun).grabbableToEnemies = false; ((GrabbableObject)gun).grabbable = false; gun.shellsLoaded = gun.maxAmmo; ((GrabbableObject)gun).GrabItemFromEnemy((EnemyAI)(object)this); } private void DropGun(Vector3 dropPosition) { if ((Object)(object)gun == (Object)null) { ((EnemyAI)this).LogEnemyError("Could not drop gun since no gun was held!"); return; } ((GrabbableObject)gun).DiscardItemFromEnemy(); ((GrabbableObject)gun).isHeldByEnemy = false; ((GrabbableObject)gun).grabbableToEnemies = true; ((GrabbableObject)gun).grabbable = true; } private void SpawnShotgunShells() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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) //IL_0031: 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) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner) { for (int i = 0; i < 2; i++) { Vector3 val = ((Component)this).transform.position + Vector3.up * 0.6f; val += new Vector3(Random.Range(-0.8f, 0.8f), 0f, Random.Range(-0.8f, 0.8f)); GameObject val2 = Object.Instantiate(shotgunShellPrefab, val, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); val2.GetComponent().fallTime = 0f; val2.GetComponent().Spawn(false); } } } [ServerRpc] public void DropGunServerRpc(Vector3 dropPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //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_00cf: 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(991458358u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref dropPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 991458358u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropGunClientRpc(dropPosition); } } [ClientRpc] public void DropGunClientRpc(Vector3 dropPosition) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2819834864u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref dropPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2819834864u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)gun == (Object)null)) { DropGun(dropPosition); } } } public override void DoAIInterval() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0307: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || base.stunNormalizedTimer > 0f || (Object)(object)gun == (Object)null) { return; } switch (base.currentBehaviourStateIndex) { case 0: if (previousBehaviourStateAIInterval != base.currentBehaviourStateIndex) { previousBehaviourStateAIInterval = base.currentBehaviourStateIndex; base.agent.stoppingDistance = 0.02f; } if (!patrol.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, patrol); } break; case 1: if (previousBehaviourStateAIInterval != base.currentBehaviourStateIndex) { previousBehaviourStateAIInterval = base.currentBehaviourStateIndex; if (patrol.inProgress) { ((EnemyAI)this).StopSearch(patrol, true); } } break; case 2: if (previousBehaviourStateAIInterval != base.currentBehaviourStateIndex) { previousBehaviourStateAIInterval = base.currentBehaviourStateIndex; if (patrol.inProgress) { ((EnemyAI)this).StopSearch(patrol, true); } } if (!((NetworkBehaviour)this).IsOwner) { break; } if (timeSinceSeeingTarget < 0.5f) { if (attackSearch.inProgress) { ((EnemyAI)this).StopSearch(attackSearch, true); } reachedStrafePosition = false; ((EnemyAI)this).SetDestinationToPosition(lastSeenPlayerPos, false); base.agent.stoppingDistance = 1f; if (lostPlayerInChase) { lostPlayerInChase = false; SetLostPlayerInChaseServerRpc(lostPlayer: false); } break; } base.agent.stoppingDistance = 0.02f; if (timeSinceSeeingTarget > 12f) { if (!reloadingGun && timeSinceFiringGun > 0.5f) { ((EnemyAI)this).SwitchToBehaviourState(1); } } else if (!reachedStrafePosition) { if (!base.agent.CalculatePath(lastSeenPlayerPos, base.path1)) { break; } if (base.DebugEnemy) { for (int i = 1; i < base.path1.corners.Length; i++) { Debug.DrawLine(base.path1.corners[i - 1], base.path1.corners[i], Color.red, base.AIIntervalTime); } } if (base.path1.corners.Length > 1) { Ray val = default(Ray); ((Ray)(ref val))..ctor(base.path1.corners[base.path1.corners.Length - 1], base.path1.corners[base.path1.corners.Length - 1] - base.path1.corners[base.path1.corners.Length - 2]); if (Physics.Raycast(val, ref rayHit, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { strafePosition = RoundManager.Instance.GetNavMeshPosition(((Ray)(ref val)).GetPoint(Mathf.Max(0f, ((RaycastHit)(ref rayHit)).distance - 2f)), default(NavMeshHit), 5f, -1); } else { strafePosition = RoundManager.Instance.GetNavMeshPosition(((Ray)(ref val)).GetPoint(6f), default(NavMeshHit), 5f, -1); } } else { strafePosition = lastSeenPlayerPos; } ((EnemyAI)this).SetDestinationToPosition(strafePosition, false); if (Vector3.Distance(((Component)this).transform.position, strafePosition) < 2f) { reachedStrafePosition = true; } } else { if (!lostPlayerInChase) { lostPlayerInChase = true; SetLostPlayerInChaseServerRpc(lostPlayer: true); } if (!attackSearch.inProgress) { ((EnemyAI)this).StartSearch(strafePosition, attackSearch); } } break; } } [ServerRpc(RequireOwnership = false)] public void SetLostPlayerInChaseServerRpc(bool lostPlayer) { //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) //IL_00dc: 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(3984441056u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lostPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3984441056u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetLostPlayerInChaseClientRpc(lostPlayer); } } } [ClientRpc] public void SetLostPlayerInChaseClientRpc(bool lostPlayer) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2597650960u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lostPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2597650960u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { lostPlayerInChase = lostPlayer; if (!lostPlayer) { timeSinceSeeingTarget = 0f; } } } private bool GrabGunIfNotHolding() { if ((Object)(object)gun != (Object)null) { return true; } NetworkObject val = default(NetworkObject); if (((NetworkObjectReference)(ref gunObjectRef)).TryGet(ref val, (NetworkManager)null)) { gun = ((Component)val).gameObject.GetComponent(); GrabGun(((Component)gun).gameObject); } return (Object)(object)gun != (Object)null; } public void TurnTorsoToTargetDegrees() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) currentTorsoRotation = Mathf.MoveTowardsAngle(currentTorsoRotation, (float)targetTorsoDegrees, Time.deltaTime * torsoTurnSpeed); torsoContainer.localEulerAngles = new Vector3(currentTorsoRotation + 90f, 90f, 90f); if (Mathf.Abs(currentTorsoRotation - (float)targetTorsoDegrees) > 5f) { if (!torsoTurning) { torsoTurning = true; torsoTurnAudio.Play(); } } else if (torsoTurning) { torsoTurning = false; torsoTurnAudio.Stop(); RoundManager.PlayRandomClip(torsoTurnAudio, torsoFinishTurningClips, true, 1f, 0, 1000); } torsoTurnAudio.volume = Mathf.Lerp(torsoTurnAudio.volume, 1f, Time.deltaTime * 2f); } private void SetTargetDegreesToPosition(Vector3 pos) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) pos.y = ((Component)this).transform.position.y; Vector3 val = pos - ((Component)this).transform.position; targetTorsoDegrees = (int)Vector3.Angle(val, ((Component)this).transform.forward); if (Vector3.Cross(((Component)this).transform.forward, val).y > 0f) { targetTorsoDegrees = 360 - targetTorsoDegrees; } torsoTurnSpeed = 455f; } private void StartInspectionTurn() { if (!isInspecting && !base.isEnemyDead) { timesDoingInspection++; if (inspectionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(inspectionCoroutine); } inspectionCoroutine = ((MonoBehaviour)this).StartCoroutine(InspectionTurn()); } } [IteratorStateMachine(typeof(d__82))] private IEnumerator InspectionTurn() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__82(0) { <>4__this = this }; } public void StopInspection() { if (isInspecting) { isInspecting = false; } if (inspectionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(inspectionCoroutine); } } [ServerRpc(RequireOwnership = false)] public void SeeMovingThreatServerRpc(int playerId, bool enterAttackFromPatrolMode = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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(3932575684u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3932575684u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SeeMovingThreatClientRpc(playerId, enterAttackFromPatrolMode); } } } [ClientRpc] public void SeeMovingThreatClientRpc(int playerId, bool enterAttackFromPatrolMode = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(810327591u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 810327591u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.currentBehaviourStateIndex == 1 || (enterAttackFromPatrolMode && base.currentBehaviourStateIndex == 0)) { SwitchTargetToPlayer(playerId); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); } } } private void GlobalNutcrackerClock() { if (isLeaderScript && Time.realtimeSinceStartup - timeAtNextInspection > 2f) { timeAtNextInspection = Time.realtimeSinceStartup + Random.Range(6f, 15f); } } public override void Update() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04b8: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0648: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_05af: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); TurnTorsoToTargetDegrees(); if (base.isEnemyDead) { StopInspection(); return; } GlobalNutcrackerClock(); if (!base.isEnemyDead && !GrabGunIfNotHolding()) { return; } if (walkCheckInterval <= 0f) { walkCheckInterval = 0.1f; Animator creatureAnimator = base.creatureAnimator; Vector3 val = ((Component)this).transform.position - positionLastCheck; creatureAnimator.SetBool("IsWalking", ((Vector3)(ref val)).sqrMagnitude > 0.001f); positionLastCheck = ((Component)this).transform.position; } else { walkCheckInterval -= Time.deltaTime; } if (base.stunNormalizedTimer >= 0f) { base.agent.speed = 0f; return; } timeSinceSeeingTarget += Time.deltaTime; timeSinceInspecting += Time.deltaTime; timeSinceFiringGun += Time.deltaTime; timeSinceHittingPlayer += Time.deltaTime; base.creatureAnimator.SetInteger("State", base.currentBehaviourStateIndex); base.creatureAnimator.SetBool("Aiming", aimingGun); switch (base.currentBehaviourStateIndex) { case 0: if (previousBehaviourState != base.currentBehaviourStateIndex) { base.creatureAnimator.SetBool("AimDown", false); isInspecting = false; lostPlayerInChase = false; base.creatureVoice.Stop(); previousBehaviourState = base.currentBehaviourStateIndex; } base.agent.speed = 5.5f; targetTorsoDegrees = 0; torsoTurnSpeed = 525f; if (((NetworkBehaviour)this).IsOwner && Time.realtimeSinceStartup > timeAtNextInspection && timeSinceInspecting > 4f) { if (Random.Range(0, 100) < 40 || ((Object)(object)((EnemyAI)this).GetClosestPlayer(false, false, false) != (Object)null && base.mostOptimalDistance < 27f)) { ((EnemyAI)this).SwitchToBehaviourState(1); } else { timeSinceInspecting = 2f; } } break; case 1: if (previousBehaviourState != base.currentBehaviourStateIndex) { base.creatureAnimator.SetBool("AimDown", false); localPlayerTurnDistance = 0f; StartInspectionTurn(); base.creatureVoice.Stop(); if (previousBehaviourState != 2) { longRangeAudio.PlayOneShot(base.enemyType.audioClips[3]); } lostPlayerInChase = false; previousBehaviourState = base.currentBehaviourStateIndex; } timeSinceInspecting = 0f; base.agent.speed = 0f; if (isInspecting && CheckLineOfSightForLocalPlayer(70f, 60, 1) && IsLocalPlayerMoving()) { isInspecting = false; SeeMovingThreatServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } break; case 2: if (previousBehaviourState != base.currentBehaviourStateIndex) { if (previousBehaviourState != 1) { longRangeAudio.PlayOneShot(base.enemyType.audioClips[3]); } StopInspection(); previousBehaviourState = base.currentBehaviourStateIndex; } if (((NetworkBehaviour)this).IsOwner) { if (reloadingGun || aimingGun || (timeSinceFiringGun < 1.2f && timeSinceSeeingTarget < 0.5f) || timeSinceHittingPlayer < 1f) { if (aimingGun && !reloadingGun) { base.agent.speed = speedWhileAiming; } else { base.agent.speed = 0f; } } else { base.agent.speed = 7f; } } if (((NetworkBehaviour)this).IsOwner && timeSinceFiringGun > 0.75f && gun.shellsLoaded <= 0 && !reloadingGun && !aimingGun) { reloadingGun = true; ReloadGunServerRpc(); } if (lastPlayerSeenMoving == -1) { break; } if (lostPlayerInChase) { targetTorsoDegrees = 0; } else { SetTargetDegreesToPosition(lastSeenPlayerPos); } if (((EnemyAI)this).CheckLineOfSightForPosition(((Component)StartOfRound.Instance.allPlayerScripts[lastPlayerSeenMoving].gameplayCamera).transform.position, 70f, 60, 1f, (Transform)null)) { timeSinceSeeingTarget = 0f; lastSeenPlayerPos = ((Component)StartOfRound.Instance.allPlayerScripts[lastPlayerSeenMoving]).transform.position; base.creatureAnimator.SetBool("AimDown", Vector3.Distance(lastSeenPlayerPos, ((Component)this).transform.position) < 2f && lastSeenPlayerPos.y - ((Component)this).transform.position.y < 1f); } if (!CheckLineOfSightForLocalPlayer(70f, 25, 1)) { break; } if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == lastPlayerSeenMoving && timeSinceSeeingTarget < 8f) { if (timeSinceFiringGun > 0.75f && !reloadingGun && !aimingGun && timeSinceHittingPlayer > 1f && Vector3.Angle(gun.shotgunRayPoint.forward, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position - gun.shotgunRayPoint.position) < 30f) { timeSinceFiringGun = 0f; base.agent.speed = 0f; AimGunServerRpc(((Component)this).transform.position); } if (lostPlayerInChase) { lostPlayerInChase = false; SetLostPlayerInChaseServerRpc(lostPlayer: false); } timeSinceSeeingTarget = 0f; lastSeenPlayerPos = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position; } else if (IsLocalPlayerMoving()) { bool flag = (int)GameNetworkManager.Instance.localPlayerController.playerClientId == lastPlayerSeenMoving; if (flag) { timeSinceSeeingTarget = 0f; } if (Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[lastPlayerSeenMoving]).transform.position) - Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) > 3f || (timeSinceSeeingTarget > 3f && !flag)) { lastPlayerSeenMoving = (int)GameNetworkManager.Instance.localPlayerController.playerClientId; SwitchTargetServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } break; } } [ServerRpc] public void ReloadGunServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(794426525u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 794426525u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (aimingGun) { reloadingGun = false; } else { ReloadGunClientRpc(); } } } [ClientRpc] public void ReloadGunClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1720810859u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1720810859u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopAimingGun(); gun.shellsLoaded = gun.maxAmmo; gunCoroutine = ((MonoBehaviour)this).StartCoroutine(ReloadGun()); } } } [IteratorStateMachine(typeof(d__90))] private IEnumerator ReloadGun() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__90(0) { <>4__this = this }; } private void StopReloading() { reloadingGun = false; gun.gunAnimator.SetBool("Reloading", false); base.creatureAnimator.SetBool("Reloading", false); if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } } [ServerRpc(RequireOwnership = false)] public void AimGunServerRpc(Vector3 enemyPos) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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(947914261u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enemyPos); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 947914261u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!reloadingGun) { if (gun.shellsLoaded <= 0) { aimingGun = false; ReloadGunClientRpc(); } else if (!reloadingGun) { aimingGun = true; AimGunClientRpc(enemyPos); } } } [ClientRpc] public void AimGunClientRpc(Vector3 enemyPos) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1122053899u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enemyPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1122053899u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopReloading(); gunCoroutine = ((MonoBehaviour)this).StartCoroutine(AimGun(enemyPos)); } } } [IteratorStateMachine(typeof(d__94))] private IEnumerator AimGun(Vector3 enemyPos) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__94(0) { <>4__this = this, enemyPos = enemyPos }; } [ServerRpc] public void FireGunServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(2749573980u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2749573980u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.stunNormalizedTimer <= 0f) { FireGunClientRpc(); } else { ((MonoBehaviour)this).StartCoroutine(waitToFireGun()); } } } [ClientRpc] public void FireGunClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(710249883u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 710249883u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; FireGun(gun.shotgunRayPoint.position, gun.shotgunRayPoint.forward); } } } [IteratorStateMachine(typeof(d__97))] private IEnumerator waitToFireGun() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__97(0) { <>4__this = this }; } private void StopAimingGun() { base.inSpecialAnimation = false; base.updatePositionThreshold = 1f; aimingGun = false; if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } } private void FireGun(Vector3 gunPosition, Vector3 gunForward) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) base.creatureAnimator.ResetTrigger("ShootGun"); base.creatureAnimator.SetTrigger("ShootGun"); if ((Object)(object)gun == (Object)null) { ((EnemyAI)this).LogEnemyError("No gun held on local client, unable to shoot"); } else { gun.ShootGun(gunPosition, gunForward); } } [ServerRpc(RequireOwnership = false)] public void SwitchTargetServerRpc(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) //IL_00ce: 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(1237474503u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1237474503u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SwitchTargetClientRpc(playerId); } } } [ClientRpc] public void SwitchTargetClientRpc(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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1883966538u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1883966538u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SwitchTargetToPlayer(playerId); } } } private void SwitchTargetToPlayer(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) lastPlayerSeenMoving = playerId; timeSinceSeeingTarget = 0f; lastSeenPlayerPos = ((Component)StartOfRound.Instance.allPlayerScripts[playerId]).transform.position; } public bool CheckLineOfSightForLocalPlayer(float width, int range, int proximityAwareness) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) width = losWidth; range = losRange; proximityAwareness = losProxAwareness; Vector3 position = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position; if (Vector3.Distance(position, base.eye.position) < (float)range && !Physics.Linecast(base.eye.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault) && !Physics.Linecast(position, base.eye.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { Vector3 val = position - base.eye.position; if (Vector3.Angle(base.eye.forward, val) < width || (proximityAwareness != -1 && Vector3.Distance(base.eye.position, position) < (float)proximityAwareness)) { return true; } } return false; } private bool IsLocalPlayerMoving() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) localPlayerTurnDistance += StartOfRound.Instance.playerLookMagnitudeThisFrame; if (localPlayerTurnDistance > 0.1f && Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) < 10f) { return true; } if (GameNetworkManager.Instance.localPlayerController.performingEmote) { return true; } if (Time.realtimeSinceStartup - StartOfRound.Instance.timeAtMakingLastPersonalMovement < 0.25f) { return true; } if (GameNetworkManager.Instance.localPlayerController.timeSincePlayerMoving < 0.05f) { return true; } return false; } public override void SetEnemyStunned(bool setToStunned, float setToStunTime = 1f, PlayerControllerB setStunnedByPlayer = null) { Debug.Log((object)"Set Guardian stunned called!"); if (base.isEnemyDead || !base.enemyType.canBeStunned) { return; } if (setToStunned) { if (!(base.postStunInvincibilityTimer >= 0f)) { if (base.stunNormalizedTimer <= 0f && (Object)(object)base.creatureVoice != (Object)null) { RoundManager.PlayRandomClip(base.creatureSFX, stunSFX, true, 1f, 0, 1000); } base.stunnedByPlayer = setStunnedByPlayer; base.postStunInvincibilityTimer = 0.5f; base.stunNormalizedTimer = setToStunTime; } } else { base.stunnedByPlayer = null; if (base.stunNormalizedTimer > 0f) { base.stunNormalizedTimer = 0f; } } } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); if (!base.isEnemyDead && !(timeSinceHittingPlayer < 1f) && !(base.stunNormalizedTimer >= 0f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, reloadingGun || aimingGun, false); if ((Object)(object)val != (Object)null) { timeSinceHittingPlayer = 0f; LegKickPlayerServerRpc((int)val.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void LegKickPlayerServerRpc(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) //IL_00ce: 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(2113519853u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2113519853u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LegKickPlayerClientRpc(playerId); } } } [ClientRpc] public void LegKickPlayerClientRpc(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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2161881859u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2161881859u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LegKickPlayer(playerId); } } } private void LegKickPlayer(int playerId) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) timeSinceHittingPlayer = 0f; PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId]; RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(((Component)val).transform.position); ((Component)this).transform.eulerAngles = new Vector3(0f, RoundManager.Instance.tempTransform.eulerAngles.y, 0f); base.serverRotation = new Vector3(0f, RoundManager.Instance.tempTransform.eulerAngles.y, 0f); Vector3 val2 = Vector3.Normalize((((Component)val).transform.position + Vector3.up * 0.75f - ((Component)this).transform.position) * 100f) * 25f; val.KillPlayer(val2, true, (CauseOfDeath)12, 0, default(Vector3), false); base.creatureAnimator.SetTrigger("Kick"); base.creatureSFX.Stop(); torsoTurnAudio.volume = 0f; base.creatureSFX.PlayOneShot(kickSFX); if (base.currentBehaviourStateIndex != 2) { SwitchTargetToPlayer(playerId); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); } } 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) { if (isInspecting || base.currentBehaviourStateIndex == 2) { RoundManager.PlayRandomClip(base.creatureVoice, hitSound, true, 1f, 0, 1000); base.enemyHP -= force; } else { RoundManager.PlayRandomClip(base.creatureSFX, hitSoundCover, true, 1f, 0, 1000); } if ((Object)(object)playerWhoHit != (Object)null) { SeeMovingThreatServerRpc((int)playerWhoHit.playerClientId, enterAttackFromPatrolMode: true); } if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } public override void KillEnemy(bool destroy = false) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).KillEnemy(destroy); targetTorsoDegrees = 0; StopInspection(); StopReloading(); if (((NetworkBehaviour)this).IsOwner) { DropGunServerRpc(gunPoint.position); ((MonoBehaviour)this).StartCoroutine(spawnShotgunShellsOnDelay()); } base.creatureVoice.Stop(); torsoTurnAudio.Stop(); base.creatureSFX.Stop(); } [IteratorStateMachine(typeof(d__112))] private IEnumerator spawnShotgunShellsOnDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__112(0) { <>4__this = this }; } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3414496557u, new RpcReceiveHandler(__rpc_handler_3414496557), "InitializeNutcrackerValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(3558977068u, new RpcReceiveHandler(__rpc_handler_3558977068), "InitializeNutcrackerValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(991458358u, new RpcReceiveHandler(__rpc_handler_991458358), "DropGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(2819834864u, new RpcReceiveHandler(__rpc_handler_2819834864), "DropGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(3984441056u, new RpcReceiveHandler(__rpc_handler_3984441056), "SetLostPlayerInChaseServerRpc"); ((NetworkBehaviour)this).__registerRpc(2597650960u, new RpcReceiveHandler(__rpc_handler_2597650960), "SetLostPlayerInChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(3932575684u, new RpcReceiveHandler(__rpc_handler_3932575684), "SeeMovingThreatServerRpc"); ((NetworkBehaviour)this).__registerRpc(810327591u, new RpcReceiveHandler(__rpc_handler_810327591), "SeeMovingThreatClientRpc"); ((NetworkBehaviour)this).__registerRpc(794426525u, new RpcReceiveHandler(__rpc_handler_794426525), "ReloadGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(1720810859u, new RpcReceiveHandler(__rpc_handler_1720810859), "ReloadGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(947914261u, new RpcReceiveHandler(__rpc_handler_947914261), "AimGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(1122053899u, new RpcReceiveHandler(__rpc_handler_1122053899), "AimGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(2749573980u, new RpcReceiveHandler(__rpc_handler_2749573980), "FireGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(710249883u, new RpcReceiveHandler(__rpc_handler_710249883), "FireGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(1237474503u, new RpcReceiveHandler(__rpc_handler_1237474503), "SwitchTargetServerRpc"); ((NetworkBehaviour)this).__registerRpc(1883966538u, new RpcReceiveHandler(__rpc_handler_1883966538), "SwitchTargetClientRpc"); ((NetworkBehaviour)this).__registerRpc(2113519853u, new RpcReceiveHandler(__rpc_handler_2113519853), "LegKickPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2161881859u, new RpcReceiveHandler(__rpc_handler_2161881859), "LegKickPlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3414496557(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).InitializeNutcrackerValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3558977068(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int randomSeed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref randomSeed); NetworkObjectReference gunObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gunObject, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).InitializeNutcrackerValuesClientRpc(randomSeed, gunObject); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_991458358(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 dropPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dropPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).DropGunServerRpc(dropPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2819834864(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 dropPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dropPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).DropGunClientRpc(dropPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3984441056(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lostPlayerInChaseServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lostPlayerInChaseServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).SetLostPlayerInChaseServerRpc(lostPlayerInChaseServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2597650960(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lostPlayerInChaseClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lostPlayerInChaseClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).SetLostPlayerInChaseClientRpc(lostPlayerInChaseClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3932575684(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool enterAttackFromPatrolMode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).SeeMovingThreatServerRpc(playerId, enterAttackFromPatrolMode); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_810327591(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool enterAttackFromPatrolMode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).SeeMovingThreatClientRpc(playerId, enterAttackFromPatrolMode); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_794426525(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).ReloadGunServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1720810859(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).ReloadGunClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_947914261(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 enemyPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).AimGunServerRpc(enemyPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1122053899(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 enemyPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).AimGunClientRpc(enemyPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2749573980(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).FireGunServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_710249883(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).FireGunClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1237474503(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).SwitchTargetServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1883966538(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).SwitchTargetClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2113519853(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).LegKickPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2161881859(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).LegKickPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GuardianAI"; } } public class IronMaidenAI : EnemyAI { [CompilerGenerated] private sealed class d__37 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NavMeshAgent agent; public float height; public float duration; public IronMaidenAI <>4__this; private OffMeshLinkData 5__2; private Vector3 5__3; private Vector3 5__4; private float 5__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__37(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; IronMaidenAI ironMaidenAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; 5__2 = agent.currentOffMeshLinkData; 5__3 = ((Component)agent).transform.position; 5__4 = ((OffMeshLinkData)(ref 5__2)).endPos + Vector3.up * agent.baseOffset; 5__5 = 0f; break; case 1: <>1__state = -1; break; } if (5__5 < 1f && ((OffMeshLinkData)(ref 5__2)).valid && ((OffMeshLinkData)(ref 5__2)).activated && ((NetworkBehaviour)ironMaidenAI).IsOwner) { float num2 = height * 4f * (5__5 - 5__5 * 5__5); ((Component)agent).transform.position = Vector3.Lerp(5__3, 5__4, 5__5) + num2 * Vector3.up; 5__5 += Time.deltaTime / duration; <>2__current = null; <>1__state = 1; return true; } agent.CompleteOffMeshLink(); ironMaidenAI.offMeshLinkCoroutine = null; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public AISearchRoutine searchForPlayers; private bool stoppingMovement; private bool hasStopped; public AnimationStopPoints animStopPoints; [SerializeField] private float currentChaseSpeed = 14.5f; public float agentSpeedNotChase = 6f; public float hitPlayerInvertal = 0.12f; private float currentAnimSpeed = 1f; private PlayerControllerB previousTarget; private bool wasOwnerLastFrame; private float stopAndGoMinimumInterval; private float hitPlayerTimer; public AudioClip[] springNoises; public AudioClip enterCooldownSFX; public Collider mainCollider; private float loseAggroTimer; private float timeSinceHittingPlayer; private Coroutine offMeshLinkCoroutine; private float stopMovementTimer; public float timeSpentMoving; public float onCooldownPhase; private bool setOnCooldown; public float timeAtLastCooldown; private bool inCooldownAnimation; private Vector3 previousPosition; private float checkPositionInterval; private bool isMakingDistance; public float energySpending; public float cooldownTimerA = 20f; public float cooldownTimerB = 11f; public int playerDamage = 90; public CauseOfDeath causeOfDeath; public float cooldownModeThreshold = 9f; [ServerRpc(RequireOwnership = false)] public void SetCoilheadOnCooldownServerRpc(bool setTrue) { //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) //IL_00dc: 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(3285131436u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3285131436u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetCoilheadOnCooldownClientRpc(setTrue); } } } [ClientRpc] public void SetCoilheadOnCooldownClientRpc(bool setTrue) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1553388443u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1553388443u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeSpentMoving = 0f; if (setTrue) { onCooldownPhase = cooldownTimerA; setOnCooldown = true; inCooldownAnimation = true; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); base.creatureVoice.PlayOneShot(enterCooldownSFX); } else { onCooldownPhase = 0f; setOnCooldown = false; timeAtLastCooldown = Time.realtimeSinceStartup; } } } public bool PlayerHasHorizontalLOS(PlayerControllerB player) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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) Vector3 val = ((Component)this).transform.position - ((Component)player).transform.position; val.y = 0f; return Vector3.Angle(((Component)player).transform.forward, val) < 68f; } public override void DoAIInterval() { //IL_0071: 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_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) //IL_0410: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead || base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (!((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); break; } if (onCooldownPhase > 0f) { base.agent.speed = 0f; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); onCooldownPhase -= base.AIIntervalTime; break; } if (setOnCooldown) { setOnCooldown = false; SetCoilheadOnCooldownClientRpc(setTrue: false); } loseAggroTimer = 0f; for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[j], false, false, true)) { if ((StartOfRound.Instance.allPlayerScripts[j].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[j].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 1.6f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[j])) { base.targetPlayer = StartOfRound.Instance.allPlayerScripts[j]; ((EnemyAI)this).SwitchToBehaviourState(1); } if (!((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position, false, false, false) && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.5f, ((Component)StartOfRound.Instance.allPlayerScripts[j].gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault) && Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position) < 30f) { ((EnemyAI)this).SwitchToBehaviourState(1); return; } } } base.agent.speed = agentSpeedNotChase; if (!searchForPlayers.inProgress) { base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } break; } case 1: { if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { if ((Object)(object)previousTarget != (Object)(object)base.targetPlayer) { previousTarget = base.targetPlayer; ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } if (!(Time.realtimeSinceStartup - timeSinceHittingPlayer > 7f) || stoppingMovement) { break; } if (Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) > 40f && !((EnemyAI)this).CheckLineOfSightForPosition(((Component)base.targetPlayer.gameplayCamera).transform.position, 180f, 140, -1f, (Transform)null)) { loseAggroTimer += base.AIIntervalTime; if (loseAggroTimer > 4.5f) { ((EnemyAI)this).SwitchToBehaviourState(0); ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } } else { loseAggroTimer = 0f; } break; } bool flag = false; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if ((StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 3f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[i])) { flag = true; break; } } if (!flag) { loseAggroTimer += base.AIIntervalTime; if (loseAggroTimer > 1f) { ((EnemyAI)this).SwitchToBehaviourState(0); ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } } break; } } } [IteratorStateMachine(typeof(d__37))] private IEnumerator Parabola(NavMeshAgent agent, float height, float duration) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__37(0) { <>4__this = this, agent = agent, height = height, duration = duration }; } private void StopOffMeshLinkMovement() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0060: 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_0074: Unknown result type (might be due to invalid IL or missing references) if (offMeshLinkCoroutine == null) { return; } ((MonoBehaviour)this).StopCoroutine(offMeshLinkCoroutine); offMeshLinkCoroutine = null; OffMeshLinkData currentOffMeshLinkData = base.agent.currentOffMeshLinkData; base.agent.CompleteOffMeshLink(); if (((OffMeshLinkData)(ref currentOffMeshLinkData)).valid) { if (Vector3.Distance(((Component)this).transform.position, ((OffMeshLinkData)(ref currentOffMeshLinkData)).startPos) < Vector3.Distance(((Component)this).transform.position, ((OffMeshLinkData)(ref currentOffMeshLinkData)).endPos)) { base.agent.Warp(((OffMeshLinkData)(ref currentOffMeshLinkData)).startPos); } else { base.agent.Warp(((OffMeshLinkData)(ref currentOffMeshLinkData)).endPos); } } } private void DoSpringAnimation(bool springPopUp = false) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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) //IL_0057: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 70f, 25, -1f, -1)) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num < 4f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.9f, true); } else if (num < 9f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true); } } if (currentAnimSpeed > 2f || springPopUp) { RoundManager.PlayRandomClip(base.creatureVoice, springNoises, false, 1f, 0, 1000); if (animStopPoints.animationPosition == 1) { base.creatureAnimator.SetTrigger("springBoing"); } else { base.creatureAnimator.SetTrigger("springBoingPosition2"); } } } public override void Update() { //IL_0083: 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_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Unknown result type (might be due to invalid IL or missing references) //IL_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { return; } if (hitPlayerTimer >= 0f) { hitPlayerTimer -= Time.deltaTime; } if (!((NetworkBehaviour)this).IsOwner) { stopMovementTimer = 5f; loseAggroTimer = 0f; if (offMeshLinkCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(offMeshLinkCoroutine); } } if (((NetworkBehaviour)this).IsOwner) { if (base.agent.isOnOffMeshLink) { if (!stoppingMovement) { OffMeshLinkData currentOffMeshLinkData = base.agent.currentOffMeshLinkData; if (((OffMeshLinkData)(ref currentOffMeshLinkData)).activated) { if (offMeshLinkCoroutine == null) { offMeshLinkCoroutine = ((MonoBehaviour)this).StartCoroutine(Parabola(base.agent, 0.6f, 0.5f)); } goto IL_00d4; } } StopOffMeshLinkMovement(); } else if (offMeshLinkCoroutine != null) { StopOffMeshLinkMovement(); } } goto IL_00d4; IL_00d4: base.creatureAnimator.SetBool("OnCooldown", setOnCooldown); if (setOnCooldown) { mainCollider.isTrigger = true; stoppingMovement = true; hasStopped = true; return; } switch (base.currentBehaviourStateIndex) { case 0: base.agent.autoTraverseOffMeshLink = false; base.creatureAnimator.SetFloat("walkSpeed", 4.7f); stoppingMovement = false; hasStopped = false; break; case 1: { if (((NetworkBehaviour)this).IsOwner) { if (onCooldownPhase > 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); break; } if (stopAndGoMinimumInterval > 0f) { stopAndGoMinimumInterval -= Time.deltaTime; } if (!wasOwnerLastFrame) { wasOwnerLastFrame = true; if (!stoppingMovement && hitPlayerTimer < hitPlayerInvertal) { base.agent.speed = currentChaseSpeed; } else { base.agent.speed = 0f; } } bool flag = false; for (int i = 0; i < 4; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && (StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.6f, 68f, 60, -1f, -1) || StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 3f, 68f, 60, -1f, -1)) && PlayerHasHorizontalLOS(StartOfRound.Instance.allPlayerScripts[i]) && Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, base.eye.position) > 0.3f) { flag = true; } } if (base.stunNormalizedTimer > 0f) { flag = true; } if (flag != stoppingMovement && stopAndGoMinimumInterval <= 0f) { stopAndGoMinimumInterval = 0.15f; if (flag) { SetAnimationStopServerRpc(); } else { SetAnimationGoServerRpc(); } stoppingMovement = flag; } } float num = 0f; if (stoppingMovement) { if (animStopPoints.canAnimationStop || stopMovementTimer > 0.27f) { if (!hasStopped) { hasStopped = true; DoSpringAnimation(); } else if (inCooldownAnimation) { inCooldownAnimation = false; DoSpringAnimation(springPopUp: true); } if ((Object)(object)RoundManager.Instance.currentMineshaftElevator != (Object)null && Vector3.Distance(((Component)this).transform.position, RoundManager.Instance.currentMineshaftElevator.elevatorInsidePoint.position) < 1f) { num = 0.5f; } if (mainCollider.isTrigger && Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) > 0.75f) { mainCollider.isTrigger = false; } base.creatureAnimator.SetFloat("walkSpeed", 0f); currentAnimSpeed = 0f; if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 0f; base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(((Component)this).transform.position, false); } } else { stopMovementTimer += Time.deltaTime; } } else { stopMovementTimer = 0f; if (hasStopped) { hasStopped = false; mainCollider.isTrigger = true; isMakingDistance = true; } currentAnimSpeed = Mathf.Lerp(currentAnimSpeed, 6f, 5f * Time.deltaTime); base.creatureAnimator.SetFloat("walkSpeed", currentAnimSpeed); inCooldownAnimation = false; if (((NetworkBehaviour)this).IsServer) { if (checkPositionInterval <= 0f) { checkPositionInterval = 0.65f; isMakingDistance = Vector3.Distance(((Component)this).transform.position, previousPosition) > 0.5f; previousPosition = ((Component)this).transform.position; } else { checkPositionInterval -= Time.deltaTime; } num = ((!isMakingDistance) ? 0.2f : 1f); } if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = Mathf.Lerp(base.agent.speed, currentChaseSpeed, 4.5f * Time.deltaTime); base.movingTowardsTargetPlayer = true; } } if (((NetworkBehaviour)this).IsServer) { if (num > 0f) { timeSpentMoving += Time.deltaTime * num; } if (timeSpentMoving > cooldownModeThreshold) { onCooldownPhase = cooldownTimerB; setOnCooldown = true; inCooldownAnimation = true; SetCoilheadOnCooldownClientRpc(setTrue: true); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); } } break; } } } [ServerRpc] public void SetAnimationStopServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(1762133975u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1762133975u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationStopClientRpc(); } } [ClientRpc] public void SetAnimationStopClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1239065759u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1239065759u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = true; } } } [ServerRpc] public void SetAnimationGoServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(195778708u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 195778708u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationGoClientRpc(); } } [ClientRpc] public void SetAnimationGoClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1249567451u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1249567451u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = false; } } } public override void OnCollideWithPlayer(Collider other) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!stoppingMovement && base.currentBehaviourStateIndex == 1 && !(hitPlayerTimer >= 0f) && !setOnCooldown && !((double)(Time.realtimeSinceStartup - timeAtLastCooldown) < 0.45)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { hitPlayerTimer = 0.2f; val.DamagePlayer(playerDamage, true, true, causeOfDeath, 2, false, default(Vector3)); val.JumpToFearLevel(1f, true); timeSinceHittingPlayer = Time.realtimeSinceStartup; } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3285131436u, new RpcReceiveHandler(__rpc_handler_3285131436), "SetCoilheadOnCooldownServerRpc"); ((NetworkBehaviour)this).__registerRpc(1553388443u, new RpcReceiveHandler(__rpc_handler_1553388443), "SetCoilheadOnCooldownClientRpc"); ((NetworkBehaviour)this).__registerRpc(1762133975u, new RpcReceiveHandler(__rpc_handler_1762133975), "SetAnimationStopServerRpc"); ((NetworkBehaviour)this).__registerRpc(1239065759u, new RpcReceiveHandler(__rpc_handler_1239065759), "SetAnimationStopClientRpc"); ((NetworkBehaviour)this).__registerRpc(195778708u, new RpcReceiveHandler(__rpc_handler_195778708), "SetAnimationGoServerRpc"); ((NetworkBehaviour)this).__registerRpc(1249567451u, new RpcReceiveHandler(__rpc_handler_1249567451), "SetAnimationGoClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3285131436(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool coilheadOnCooldownServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref coilheadOnCooldownServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((IronMaidenAI)(object)target).SetCoilheadOnCooldownServerRpc(coilheadOnCooldownServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1553388443(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool coilheadOnCooldownClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref coilheadOnCooldownClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((IronMaidenAI)(object)target).SetCoilheadOnCooldownClientRpc(coilheadOnCooldownClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1762133975(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((IronMaidenAI)(object)target).SetAnimationStopServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1239065759(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((IronMaidenAI)(object)target).SetAnimationStopClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_195778708(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((IronMaidenAI)(object)target).SetAnimationGoServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1249567451(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((IronMaidenAI)(object)target).SetAnimationGoClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "IronMaidenAI"; } } public class ParadesmanAI : EnemyAI { public float minDistance; public float maxDistance; [Space(5f)] public float jumpSpeed = 5f; public float jumpTime = 0.25f; public float startingInterval = 2f; public float endingInterval = 0.2f; public int snareBeatAmount; [Space(3f)] public float currentInterval; private float beatTimer; public float disappearingDistance; [Space(5f)] public ParadesmanAI master; private bool isMaster; [Space(5f)] public bool isJumping; private float jumpTimer; private bool jumpingLastFrame; private int beatsSinceSeeingPlayer; private bool hasLOS; public SimpleEvent SendDanceBeat; private int currentHour; private bool jumpCycle; public AISearchRoutine searchRoutine; private float timeSinceSnip; private float snareIntervalTimer; public AudioSource musicAudio; public AudioSource musicAudio2; public AudioClip snareDrum; public AudioClip[] paradeClips; public AudioClip snipScissors; private int previousParadeClip; public List allClaySurgeons; private int snareNum; public float snareOffset; public MeshRenderer[] scissorBlades; public SkinnedMeshRenderer skin; public Material scissorGuyMat; private Material thisMaterial; private RaycastHit hit; private bool listeningToMasterSurgeon; private bool choseMasterSurgeon; public override void Awake() { ((EnemyAI)this).Awake(); thisMaterial = ((Renderer)scissorBlades[0]).material; ((Renderer)scissorBlades[1]).sharedMaterial = thisMaterial; ((Renderer)skin).sharedMaterial = thisMaterial; } [ClientRpc] public void SyncMasterClaySurgeonClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Expected O, but got Unknown NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3091038341u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3091038341u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { return; } master = this; isMaster = true; TimeOfDay.Instance.onHourChanged.AddListener(new UnityAction(HourChanged)); SendDanceBeat = new SimpleEvent(); allClaySurgeons = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); for (int i = 0; i < allClaySurgeons.Count; i++) { if (!((Object)(object)allClaySurgeons[i] == (Object)(object)this)) { allClaySurgeons[i].master = this; allClaySurgeons[i].ListenToMasterSurgeon(); Object.Destroy((Object)(object)((Component)allClaySurgeons[i].musicAudio2).gameObject); } } } public void ListenToMasterSurgeon() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (!listeningToMasterSurgeon) { listeningToMasterSurgeon = true; ((UnityEvent)master.SendDanceBeat).AddListener(new UnityAction(DanceBeat)); if ((Object)(object)musicAudio2 != (Object)null) { Object.Destroy((Object)(object)((Component)musicAudio2).gameObject); } if (!master.allClaySurgeons.Contains(this)) { master.allClaySurgeons.Add(this); } } } public override void Start() { ((EnemyAI)this).Start(); HourChanged(); } private void LateUpdate() { if (!choseMasterSurgeon) { choseMasterSurgeon = true; ChooseMasterSurgeon(); } } private void ChooseMasterSurgeon() { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown if (!((NetworkBehaviour)this).IsServer) { return; } if (((NetworkBehaviour)this).IsServer && !listeningToMasterSurgeon) { ParadesmanAI[] array = Object.FindObjectsByType((FindObjectsSortMode)0); int num = 1000; int num2 = -50; for (int i = 0; i < array.Length; i++) { if (((EnemyAI)array[i]).thisEnemyIndex < num) { num = ((EnemyAI)array[i]).thisEnemyIndex; num2 = i; } } master = array[num2]; if ((Object)(object)master == (Object)(object)this) { isMaster = true; TimeOfDay.Instance.onHourChanged.AddListener(new UnityAction(HourChanged)); SendDanceBeat = new SimpleEvent(); allClaySurgeons = array.ToList(); for (int j = 0; j < allClaySurgeons.Count; j++) { if (!((Object)(object)allClaySurgeons[j] == (Object)(object)this)) { allClaySurgeons[j].master = this; allClaySurgeons[j].ListenToMasterSurgeon(); } } SyncMasterClaySurgeonClientRpc(); } if (!isMaster && (Object)(object)musicAudio2 != (Object)null) { Object.Destroy((Object)(object)((Component)musicAudio2).gameObject); } } else if ((Object)(object)musicAudio2 != (Object)null) { Object.Destroy((Object)(object)((Component)musicAudio2).gameObject); } } public override void OnDestroy() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown ((EnemyAI)this).OnDestroy(); if (isMaster) { TimeOfDay.Instance.onHourChanged.RemoveListener(new UnityAction(HourChanged)); } else if ((Object)(object)master != (Object)null) { master.allClaySurgeons.Remove(this); if (master.SendDanceBeat != null) { ((UnityEvent)master.SendDanceBeat).RemoveListener(new UnityAction(DanceBeat)); } } } public override void DoAIInterval() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } PlayerControllerB targetPlayer = base.targetPlayer; if (((EnemyAI)this).TargetClosestPlayer(5f, true, 120f, false, false, true)) { hasLOS = true; beatsSinceSeeingPlayer = 0; if (searchRoutine.inProgress) { ((EnemyAI)this).StopSearch(searchRoutine, true); } } else if (beatsSinceSeeingPlayer > 6) { if (hasLOS) { hasLOS = false; } if (!searchRoutine.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchRoutine); } } else if ((Object)(object)targetPlayer != (Object)null) { base.targetPlayer = targetPlayer; } } private void PlayMusic() { if (snareIntervalTimer <= 0f) { snareIntervalTimer = 100f; musicAudio.PlayOneShot(snareDrum); WalkieTalkie.TransmitOneShotAudio(musicAudio, snareDrum, 1f); if (isMaster) { musicAudio2.PlayOneShot(snareDrum); } } else { snareIntervalTimer -= Time.deltaTime; } } private void SetMusicVolume() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) float num = 0f; float num2 = 1000f; for (int i = 0; i < allClaySurgeons.Count; i++) { if (!((Object)(object)allClaySurgeons[i] == (Object)null) && !((EnemyAI)allClaySurgeons[i]).isEnemyDead) { num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)allClaySurgeons[i]).transform.position); if (num < num2) { num2 = num; } } } if (num2 < 40f) { float num3 = ((!(num2 < 20f)) ? Mathf.Lerp(1f, 0.25f, num2 / 50f) : Mathf.Lerp(0.4f, 0f, num2 / 10f)); musicAudio2.volume = Mathf.Lerp(musicAudio2.volume, num3, 2.5f * Time.deltaTime); } else { musicAudio2.volume = Mathf.Lerp(musicAudio2.volume, 0f, 4f * Time.deltaTime); } } private void SetVisibility() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position + Vector3.up * 0.7f); thisMaterial.SetFloat("_AlphaCutoff", (num - minDistance) / (maxDistance - minDistance)); PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!localPlayerController.isPlayerDead && (Object)(object)localPlayerController != (Object)null && num < 15f && num > maxDistance + 2f) { localPlayerController.IncreaseFearLevelOverTime(0.37f, 0.25f); } } public override void Update() { ((EnemyAI)this).Update(); SetVisibility(); if (isMaster) { SetDanceClock(); SetMusicVolume(); } if (StartOfRound.Instance.allPlayersDead || (Object)(object)master == (Object)null) { return; } if (isMaster) { PlayMusic(); } timeSinceSnip += Time.deltaTime; if (!((NetworkBehaviour)this).IsOwner) { return; } if (base.isEnemyDead || base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else if (isJumping) { if (timeSinceSnip < 0.7f) { timeSinceSnip += Time.deltaTime; base.agent.speed = 0f; } jumpTimer -= Time.deltaTime; if (jumpTimer <= 0f) { isJumping = false; base.agent.speed = 0f; } else { base.agent.speed = jumpSpeed; } } if (isMaster) { if (beatTimer <= 0f) { beatTimer = currentInterval; DoBeatOnOwnerClient(); } else { beatTimer -= Time.deltaTime; } } } public override void OnCollideWithPlayer(Collider other) { //IL_0028: 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) //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 (!(timeSinceSnip < 1f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { val.KillPlayer(Vector3.up * 14f, true, (CauseOfDeath)17, 7, default(Vector3), false); KillPlayerServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void KillPlayerServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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(528521869u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 528521869u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; KillPlayerClientRpc(); } } } [ClientRpc] public void KillPlayerClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4205814782u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4205814782u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 0f; beatTimer += 2f; } snareIntervalTimer = Mathf.Min(snareIntervalTimer + 2f, 4f); timeSinceSnip = 0f; base.creatureAnimator.SetTrigger("snip"); base.creatureSFX.PlayOneShot(snipScissors); } } private void DoBeatOnOwnerClient() { DanceBeat(); ((UnityEvent)SendDanceBeat).Invoke(); DoBeatServerRpc(); } [ServerRpc] public void DoBeatServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(2364941467u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2364941467u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoBeatClientRpc(); } } [ClientRpc] public void DoBeatClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3837217769u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3837217769u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { if (isMaster) { DanceBeat(); } if (SendDanceBeat != null) { ((UnityEvent)SendDanceBeat).Invoke(); } } } private void HourChanged() { currentInterval = Mathf.Clamp(Mathf.Lerp(startingInterval, endingInterval, (float)TimeOfDay.Instance.hour / (float)TimeOfDay.Instance.numberOfHours), endingInterval, startingInterval); } private void DanceBeat() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) if (base.stunNormalizedTimer > 0f) { return; } isJumping = true; jumpTimer = jumpTime; jumpCycle = !jumpCycle; base.creatureAnimator.SetBool("walkCycle", jumpCycle); if (!((NetworkBehaviour)this).IsOwner) { return; } beatsSinceSeeingPlayer++; if (hasLOS && (Object)(object)base.targetPlayer != (Object)null) { Vector3 val = ((Component)base.targetPlayer).transform.position; if (Physics.Raycast(((Component)base.targetPlayer).transform.position + Vector3.up * 0.5f, Vector3.down, ref hit, 7f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { val = ((RaycastHit)(ref hit)).point; } Vector3 onUnitSphere = Random.onUnitSphere; onUnitSphere.y = 0f; Ray val2 = default(Ray); ((Ray)(ref val2))..ctor(val, onUnitSphere); float num = Vector3.Distance(((Component)this).transform.position, val); val = ((!Physics.Raycast(val2, ref hit, num, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) ? ((Ray)(ref val2)).GetPoint(num) : ((RaycastHit)(ref hit)).point); ((EnemyAI)this).SetDestinationToPosition(val, false); } } public override void AnimationEventA() { //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).AnimationEventA(); if (((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SyncPositionToClients(); } if (!(timeSinceSnip < 0.4f)) { int num = Random.Range(0, paradeClips.Length); if (num == previousParadeClip) { num = (num + 1) % paradeClips.Length; } previousParadeClip = num; float pitch = Random.Range(0.95f, 1.05f); musicAudio.pitch = pitch; musicAudio.PlayOneShot(paradeClips[num]); WalkieTalkie.TransmitOneShotAudio(musicAudio, paradeClips[num], 1f); snareIntervalTimer = currentInterval - snareOffset; snareNum = 0; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!localPlayerController.isPlayerDead && localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.7f, 70f, (int)maxDistance - 1, -1f, -1)) { localPlayerController.JumpToFearLevel(0.85f, true); } if (isMaster) { musicAudio2.pitch = pitch; musicAudio2.PlayOneShot(paradeClips[num]); } } } private void SetDanceClock() { } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3091038341u, new RpcReceiveHandler(__rpc_handler_3091038341), "SyncMasterClaySurgeonClientRpc"); ((NetworkBehaviour)this).__registerRpc(528521869u, new RpcReceiveHandler(__rpc_handler_528521869), "KillPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(4205814782u, new RpcReceiveHandler(__rpc_handler_4205814782), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2364941467u, new RpcReceiveHandler(__rpc_handler_2364941467), "DoBeatServerRpc"); ((NetworkBehaviour)this).__registerRpc(3837217769u, new RpcReceiveHandler(__rpc_handler_3837217769), "DoBeatClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3091038341(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ParadesmanAI)(object)target).SyncMasterClaySurgeonClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_528521869(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ParadesmanAI)(object)target).KillPlayerServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4205814782(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ParadesmanAI)(object)target).KillPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2364941467(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((ParadesmanAI)(object)target).DoBeatServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3837217769(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ParadesmanAI)(object)target).DoBeatClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ParadesmanAI"; } } public class RotwaspAI : EnemyAI { private float timeAtLastHurtingPlayer; public AISearchRoutine searchForPlayers; private float chasePlayerTimer; private float timeAtSpawning; public AudioSource buzzing; public int playerDamage = 10; public override void Start() { ((EnemyAI)this).Start(); timeAtSpawning = Time.realtimeSinceStartup; } public override void OnCollideWithPlayer(Collider other) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(Time.realtimeSinceStartup - timeAtSpawning < 1.7f) && !(Time.realtimeSinceStartup - timeAtLastHurtingPlayer < 0.5f)) { timeAtLastHurtingPlayer = Time.realtimeSinceStartup; PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null && (Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { val.DamagePlayer(playerDamage, true, true, (CauseOfDeath)14, 0, false, default(Vector3)); } } } public override void DoAIInterval() { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead) { return; } if (!((EnemyAI)this).TargetClosestPlayer(4f, true, 180f, false, false, true)) { if (base.movingTowardsTargetPlayer) { buzzing.pitch = Mathf.Lerp(buzzing.pitch, 1.15f, Time.deltaTime * 5f); base.agent.speed = Mathf.Max(base.agent.speed - base.AIIntervalTime, 4f); chasePlayerTimer += base.AIIntervalTime; if (chasePlayerTimer > 3f) { base.movingTowardsTargetPlayer = false; } } else { if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } buzzing.pitch = Mathf.Lerp(buzzing.pitch, 1f, Time.deltaTime * 5f); base.agent.speed = 3f; } } else { base.movingTowardsTargetPlayer = true; chasePlayerTimer = 0f; float num = 5.4f; if (StartOfRound.Instance.connectedPlayersAmount == 0) { num = 4.25f; } base.agent.speed = Mathf.Min(base.agent.speed + base.AIIntervalTime * 0.75f, num); buzzing.pitch = Mathf.Lerp(buzzing.pitch, 1.3f, Time.deltaTime * 5f); if (base.currentOwnershipOnThisClient != (int)base.targetPlayer.playerClientId) { ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { ((EnemyAI)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "RotwaspAI"; } } public class SmallKiwiAI : EnemyAI { private float timeAtLastHurtingPlayer; public AISearchRoutine searchForPlayers; private float chasePlayerTimer; private float timeAtSpawning; public int playerDamage = 10; public float explodeRange = 6f; private Vector3 kiwiPos; public Vector3 forwardPos; public AudioSource explosionAudio; public AudioClip[] explosionClip; public GameObject explosionPrefab; private AnimationCurve damageCurve; public int explosionDamage = 60; public float explosionRange = 9f; public float killRange = 1f; public float explosionPushForceA = 65f; public float explosionPushForceB = 35f; public float intrestRange = 14f; public float excitementRange = 6f; public float excitementRate = -2f; public float excitementRateBase = -2f; public float explosionThreshold = 10f; public float maxSpeed = 5f; public float maxSpeedSolo = 3.5f; public bool hasHopped; private string name = "Gib"; public string[] nameList; public float maxChaseTimer = 3f; public MeshRenderer mapDotRenderer; public ScanNodeProperties scanNode; private float moveSpeed; [Tooltip("This gets randomized btw")] public float waitTimeBetweenBok = 2.2f; internal static ManualLogSource Logger { get; private set; } public override void Start() { ((EnemyAI)this).Start(); timeAtSpawning = Time.realtimeSinceStartup; int num = Random.Range(0, 15); name = nameList[num]; scanNode.headerText = name; if (base.debugEnemyAI) { Logger.LogInfo((object)"SmallKiwi name chosen"); } if (num > 14) { int num2 = Random.Range(0, 100); if (num2 < 3) { scanNode.headerText = name; if (base.debugEnemyAI) { Logger.LogInfo((object)"SmallKiwi : I have chosen Malice"); } } else { if (base.debugEnemyAI) { Logger.LogInfo((object)"SmallKiwi : Too bad bro, the name chosen wasn't Malice :<"); } num = Random.Range(0, 14); name = nameList[num]; scanNode.headerText = name; } } if (base.debugEnemyAI) { Logger.LogInfo((object)"SmallKiwi has arrived haiiiii *^v^*"); } } 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) { base.creatureSFX.PlayOneShot(base.enemyType.audioClips[0]); ((EnemyAI)this).KillEnemyOnOwnerClient(false); base.creatureAnimator.SetBool("Shockface", true); } } public override void OnCollideWithPlayer(Collider other) { if (base.debugEnemyAI) { Logger.LogInfo((object)"SmallKiwi cuddles the player *°_°*"); } } public override void DoAIInterval() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) moveSpeed = base.agent.speed; base.creatureAnimator.SetFloatID(0, moveSpeed); ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead) { ExplodeAction(((Component)this).transform.position - ((Component)this).transform.forward * 0.5f, ((Component)this).transform.forward); } if (!((EnemyAI)this).TargetClosestPlayer(4f, true, 50f, false, false, true)) { if (base.movingTowardsTargetPlayer) { base.agent.speed = Mathf.Max(base.agent.speed - base.AIIntervalTime, 4f); chasePlayerTimer += base.AIIntervalTime; if (chasePlayerTimer > maxChaseTimer) { base.movingTowardsTargetPlayer = false; hasHopped = false; if (base.debugEnemyAI) { Logger.LogInfo((object)"SmallKiwi lost their crush T_T"); } } } else { if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } base.agent.speed = 3f; } return; } if (hasHopped = false) { base.creatureAnimator.SetBool("Hopping", true); base.agent.speed = 0f; new WaitForSeconds(1f); hasHopped = true; } base.movingTowardsTargetPlayer = true; chasePlayerTimer = 0f; float num = maxSpeed; if (StartOfRound.Instance.connectedPlayersAmount == 0) { num = maxSpeedSolo; } base.agent.speed = Mathf.Min(base.agent.speed + base.AIIntervalTime * 0.75f, num); if (base.currentOwnershipOnThisClient != (int)base.targetPlayer.playerClientId) { if (base.debugEnemyAI) { Logger.LogInfo((object)"SmallKiwi changes crush T_T"); } ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } if (!(Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, kiwiPos - forwardPos * 0.1f) < intrestRange)) { return; } if (Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, kiwiPos - forwardPos * 0.1f) < excitementRange) { excitementRate += 0.1f * Time.deltaTime; if (excitementRate > explosionThreshold) { ExplodeAction(((Component)this).transform.position - ((Component)this).transform.forward * 0.5f, ((Component)this).transform.forward); } } else if (excitementRate >= 0f) { excitementRate = Mathf.Clamp(-0.1f * Time.deltaTime, 0f, explosionThreshold + 1f); } else { excitementRate = Mathf.Clamp(-0.1f * Time.deltaTime, excitementRateBase, explosionThreshold + 1f); } } private void ExplodeAction(Vector3 explosionPosition, Vector3 forwardRotation, bool calledByClient = false) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) if (base.debugEnemyAI) { Logger.LogInfo((object)"Oh it's gore of my favorite character the SmallKiwi 0_0"); } if (((NetworkBehaviour)this).IsServer) { SetExplosion(explosionPosition, forwardRotation); SetExplosionClientRpc(explosionPosition, forwardRotation); } else if (calledByClient) { SetExplosionServerRpc(explosionPosition, forwardRotation); } } [ServerRpc(RequireOwnership = false)] public void SetExplosionServerRpc(Vector3 explosionPosition, Vector3 forwardRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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(3985976455u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref forwardRotation); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3985976455u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetExplosionClientRpc(explosionPosition, forwardRotation, calledByClient: true); } } } [ClientRpc] public void SetExplosionClientRpc(Vector3 explosionPosition, Vector3 forwardRotation, bool calledByClient = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3507565093u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref forwardRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref calledByClient, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3507565093u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer || calledByClient) { SetExplosion(explosionPosition, forwardRotation); } } } public void SetExplosion(Vector3 explosionPosition, Vector3 forwardRotation) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: 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_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_0032: 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) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition - forwardRotation * 0.1f) < explosionRange) { Landmine.SpawnExplosion(explosionPosition - forwardRotation * 0.1f, true, killRange, explosionRange - killRange, explosionDamage, explosionPushForceA, explosionPrefab, false); } else { Landmine.SpawnExplosion(explosionPosition - forwardRotation * 0.1f, true, killRange, explosionRange - killRange, explosionDamage, explosionPushForceB, explosionPrefab, false); } ((Component)explosionAudio).transform.position = explosionPosition + Vector3.up * 0.5f; RoundManager.PlayRandomClip(explosionAudio, explosionClip, true, 1f, 0, 1000); ((Renderer)mapDotRenderer).enabled = false; ((EnemyAI)this).KillEnemy(false); } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3985976455u, new RpcReceiveHandler(__rpc_handler_3985976455), "SetExplosionServerRpc"); ((NetworkBehaviour)this).__registerRpc(3507565093u, new RpcReceiveHandler(__rpc_handler_3507565093), "SetExplosionClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3985976455(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 explosionPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explosionPosition); Vector3 forwardRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref forwardRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((SmallKiwiAI)(object)target).SetExplosionServerRpc(explosionPosition, forwardRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3507565093(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) //IL_0069: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 explosionPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explosionPosition); Vector3 forwardRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref forwardRotation); bool calledByClient = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref calledByClient, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SmallKiwiAI)(object)target).SetExplosionClientRpc(explosionPosition, forwardRotation, calledByClient); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SmallKiwiAI"; } } public class SuperMechAI : EnemyAI, IVisibleThreat { [CompilerGenerated] private sealed class <>c__DisplayClass156_0 { public SuperMechAI <>4__this; public float startTime; internal bool b__0() { if (!<>4__this.blowtorchActivated) { return Time.realtimeSinceStartup - startTime > 6f; } return true; } } [CompilerGenerated] private sealed class d__156 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SuperMechAI <>4__this; private <>c__DisplayClass156_0 <>8__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__156(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; SuperMechAI superMechAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass156_0(); <>8__1.<>4__this = <>4__this; ((EnemyAI)superMechAI).creatureAnimator.SetBool("AttemptingGrab", true); ((EnemyAI)superMechAI).creatureAnimator.SetBool("GrabSuccessful", true); ((EnemyAI)superMechAI).creatureAnimator.SetBool("GrabUnsuccessful", false); <>8__1.startTime = Time.realtimeSinceStartup; <>2__current = (object)new WaitUntil((Func)(() => <>8__1.<>4__this.blowtorchActivated || Time.realtimeSinceStartup - <>8__1.startTime > 6f)); <>1__state = 1; return true; case 1: <>1__state = -1; <>8__1.startTime = Time.realtimeSinceStartup; goto IL_0106; case 2: <>1__state = -1; ((EnemyAI)superMechAI).inSpecialAnimationWithPlayer.DamagePlayer(20, true, true, (CauseOfDeath)13, 6, false, default(Vector3)); goto IL_0106; case 3: { <>1__state = -1; superMechAI.CancelTorchPlayerAnimation(); if (((NetworkBehaviour)superMechAI).IsServer) { superMechAI.inTorchPlayerAnimation = false; ((EnemyAI)superMechAI).inSpecialAnimationWithPlayer = null; ((EnemyAI)superMechAI).inSpecialAnimation = false; ((Behaviour)((EnemyAI)superMechAI).agent).enabled = true; } return false; } IL_0106: if (superMechAI.blowtorchActivated && Time.realtimeSinceStartup - <>8__1.startTime < 6f) { <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 2; return true; } if ((Object)(object)((EnemyAI)superMechAI).inSpecialAnimationWithPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController && !((EnemyAI)superMechAI).inSpecialAnimationWithPlayer.isPlayerDead) { ((EnemyAI)superMechAI).inSpecialAnimationWithPlayer.KillPlayer(Vector3.zero, true, (CauseOfDeath)13, 6, default(Vector3), false); } <>2__current = (object)new WaitForSeconds(1.5f); <>1__state = 3; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__179 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SuperMechAI <>4__this; private int 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__179(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown int num = <>1__state; SuperMechAI superMechAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; 5__2 = 0; break; case 1: <>1__state = -1; superMechAI.spotlight.SetActive(false); ((Renderer)((EnemyAI)superMechAI).skinnedMeshRenderers[0]).sharedMaterial = superMechAI.defaultMat; 5__2++; break; } if (5__2 < 5) { superMechAI.spotlight.SetActive(true); ((Renderer)((EnemyAI)superMechAI).skinnedMeshRenderers[0]).sharedMaterial = superMechAI.spotlightMat; <>2__current = (object)new WaitForSeconds(Random.Range(0.06f, 0.3f)); <>1__state = 1; return true; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public Vector3 lookVector; private int previousBehaviour; public AISearchRoutine searchForPlayers; [Header("Sight variables")] public float fov; [Header("Movement Variables")] public float timeBetweenSteps; public float timeToTakeStep; public float stepMovementSpeed; private float walkStepTimer = 1f; private bool takingStep; private bool leftFoot; private bool disableWalking; public Transform torsoContainer; public Threat targetedThreat; public Transform focusedThreatTransform; private Collider targetedThreatCollider; private Coroutine spotlightCoroutine; public Material defaultMat; public Material spotlightMat; public GameObject spotlight; public AudioClip spotlightOff; public AudioClip spotlightFlicker; public Collider ownCollider; public Transform leftFootPoint; public Transform rightFootPoint; public ParticleSystem rightFootParticle; public ParticleSystem leftFootParticle; public ParticleSystem bothFeetParticle; private int visibleThreatsMask = 524296; private bool lostCreatureInChase; private bool lostCreatureInChaseDebounce; private float losTimer; private bool hasLOS; private float syncLOSInterval; private bool SyncedLOSState; private int checkForPathInterval; public bool isAlerted; public float alertTimer; public AudioSource LocalLRADAudio; public AudioSource LocalLRADAudio2; private float LRADAudio2BroadcastTimer; public GameObject lradAudioPrefab; public GameObject lradAudio2Prefab; public Transform torsoDefaultRotation; public GameObject missilePrefab; private float explodeMissileTimer; private float currentMissileSpeed; public GameObject explosionPrefab; public GameObject blastMarkPrefab; public ParticleSystem gunArmParticle; public bool aimingGun; private bool waitingForNextShot; private float shootTimer; public Coroutine aimGunCoroutine; public Transform gunPoint; public Transform gunArm; public AudioClip[] shootGunSFX; public AudioClip[] largeExplosionSFX; public AudioSource explosionAudio; public float forwardAngleCompensation = 0.25f; private bool hadLOSDuringLastShot; public Transform defaultArmRotation; private float shootCooldown; private bool inFlyingMode; private bool inSky; private Vector3 flightDestination; private Coroutine flyingCoroutine; private Vector3 landingPosition; private bool finishingFlight; private bool changedDirectionInFlight; private float flyTimer; public Transform flyingModeEye; public ParticleSystem smokeRightLeg; public ParticleSystem smokeLeftLeg; public static List PooledBlastMarks = new List(); private Vector3 previousExplosionPosition; [Header("Grab and torch players")] public ParticleSystem blowtorchParticle; public AudioSource blowtorchAudio; public bool attemptingGrab; private bool waitingToAttemptGrab; public bool inTorchPlayerAnimation; public Coroutine torchPlayerCoroutine; public Transform AttemptGrabPoint; private float attemptGrabTimer; private float timeSinceGrabbingPlayer; public Transform centerPosition; public Transform holdPlayerPoint; private bool blowtorchActivated; private bool startedUpdatePlayerPosCoroutine; public AudioSource flyingDistantAudio; public AudioSource spotlightOnAudio; [Header("Firing variables")] public int missilesFired; public float missileWarbleLevel = 1f; public float fireRate; public float fireRateVariance = 0.4f; public float missileSpeed = 0.5f; public float gunArmSpeed = 80f; [Space(3f)] public float shootUptime = 1.25f; public float shootDowntime = 0.92f; [Space(5f)] public bool chargingForward; public float chargeForwardSpeed; public GameObject startChargingEffectContainer; private bool startedChargeEffect; private float beginChargingTimer; public AudioSource chargeForwardAudio; public AudioSource engineSFX; public ParticleSystem chargeParticle; ThreatType IVisibleThreat.type => (ThreatType)6; bool IVisibleThreat.IsThreatDead() { return base.isEnemyDead; } GrabbableObject IVisibleThreat.GetHeldObject() { return null; } int IVisibleThreat.SendSpecialBehaviour(int id) { return 0; } int IVisibleThreat.GetThreatLevel(Vector3 seenByPosition) { int num = 0; num = 7; if (isAlerted) { num += 3; } return num; } int IVisibleThreat.GetInterestLevel() { return 0; } Transform IVisibleThreat.GetThreatLookTransform() { return base.eye; } Transform IVisibleThreat.GetThreatTransform() { return ((Component)this).transform; } Vector3 IVisibleThreat.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; } float IVisibleThreat.GetVisibility() { if (base.isEnemyDead) { return 0f; } if (spotlight.activeSelf) { if (isAlerted) { return 1f; } return 0.85f; } return 0.5f; } public override void Start() { ((EnemyAI)this).Start(); } private void SpawnBlastMark(Vector3 pos, Quaternion rot) { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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) //IL_0059: Unknown result type (might be due to invalid IL or missing references) if (PooledBlastMarks.Count >= 64) { for (int num = 63; num >= 0; num--) { if ((Object)(object)PooledBlastMarks[num] == (Object)null) { PooledBlastMarks.RemoveAt(num); } else { PooledBlastMarks[num].transform.position = pos; PooledBlastMarks[num].transform.rotation = rot; } } } else { GameObject item = Object.Instantiate(blastMarkPrefab, pos, rot, RoundManager.Instance.mapPropsContainer.transform); PooledBlastMarks.Add(item); } } private void LateUpdate() { //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { if (base.inSpecialAnimationWithPlayer.isPlayerDead && (Object)(object)base.inSpecialAnimationWithPlayer.deadBody != (Object)null) { base.inSpecialAnimationWithPlayer.deadBody.matchPositionExactly = true; base.inSpecialAnimationWithPlayer.deadBody.attachedLimb = base.inSpecialAnimationWithPlayer.deadBody.bodyParts[5]; base.inSpecialAnimationWithPlayer.deadBody.attachedTo = holdPlayerPoint; } ((Component)base.inSpecialAnimationWithPlayer).transform.position = holdPlayerPoint.position - holdPlayerPoint.up * 0.7f; ((Component)base.inSpecialAnimationWithPlayer).transform.rotation = holdPlayerPoint.rotation; } if (((NetworkBehaviour)this).IsServer && !LocalLRADAudio2.isPlaying && isAlerted) { if (LRADAudio2BroadcastTimer > 0.05f) { LRADAudio2BroadcastTimer = 0f; int num = Random.Range(4, base.enemyType.audioClips.Length); LocalLRADAudio2.clip = base.enemyType.audioClips[num]; LocalLRADAudio2.Play(); ChangeBroadcastClipClientRpc(num); } else { LRADAudio2BroadcastTimer += Time.deltaTime; } } } [ClientRpc] public void ChangeBroadcastClipClientRpc(int clipIndex) { //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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3601178847u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, clipIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3601178847u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { LocalLRADAudio2.clip = base.enemyType.audioClips[clipIndex]; LocalLRADAudio2.Play(); } } } public void ChangeFlightLandingPosition(Vector3 newLandingPosition) { //IL_0015: 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) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer && inSky) { RoundManager.Instance.GetNavMeshPosition(newLandingPosition, default(NavMeshHit), 8f, -353); if (RoundManager.Instance.GotNavMeshPositionResult) { changedDirectionInFlight = true; landingPosition = newLandingPosition; ChangeFlightLandingPositionClientRpc(newLandingPosition); } } } [ClientRpc] public void ChangeFlightLandingPositionClientRpc(Vector3 newLandingPosition) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3292660881u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newLandingPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3292660881u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { landingPosition = newLandingPosition; base.serverPosition = newLandingPosition; } } } public void EndFlight() { if (((NetworkBehaviour)this).IsServer) { finishingFlight = true; flyTimer = 0f; EndFlightClientRpc(); } } [ClientRpc] public void EndFlightClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1911005037u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1911005037u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { finishingFlight = true; flyTimer = 0f; } } } public void SetChargingForward(bool setCharging) { if (chargingForward != setCharging) { SetChargingForwardOnLocalClient(setCharging); SetChargingForwardClientRpc(setCharging); } } [ClientRpc] public void SetChargingForwardClientRpc(bool charging) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3717474514u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref charging, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3717474514u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { SetChargingForwardOnLocalClient(charging); } } } public void SetChargingForwardOnLocalClient(bool charging) { if (charging != chargingForward) { base.creatureAnimator.SetBool("charging", charging); startChargingEffectContainer.SetActive(charging); beginChargingTimer = 0f; startedChargeEffect = false; if (charging) { StompBothFeet(); chargeParticle.Play(); base.agent.angularSpeed = 120f; base.agent.acceleration = 25f; } else { base.agent.speed = 0f; chargeParticle.Stop(); base.agent.angularSpeed = 220f; base.agent.acceleration = 60f; } chargingForward = charging; } } public void StartFlying() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: 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) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer && !inFlyingMode) { Vector3 val = ChooseLandingPosition(); if (val == Vector3.zero) { Debug.Log((object)$"Mech #{base.thisEnemyIndex} could not get a landing position!"); disableWalking = false; ((Behaviour)base.agent).enabled = true; ((EnemyAI)this).SwitchToBehaviourState(0); } else { EnterFlight(val); EnterFlightClientRpc(val); } } } private void EnterFlight(Vector3 newLandingPosition) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) base.creatureAnimator.SetBool("Flying", true); inFlyingMode = true; ((Behaviour)base.agent).enabled = false; base.inSpecialAnimation = true; base.serverPosition = newLandingPosition; flyTimer = 0f; smokeRightLeg.Play(); smokeLeftLeg.Play(); changedDirectionInFlight = false; inSky = false; landingPosition = newLandingPosition; } private Vector3 ChooseLandingPosition() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) for (int i = Random.Range(0, Mathf.Min(15, base.allAINodes.Length)); i < base.allAINodes.Length; i++) { Transform val = ((EnemyAI)this).ChooseFarthestNodeFromPosition(((Component)this).transform.position, false, i, false, 50, -1); if (!Physics.Raycast(val.position, Vector3.up, 15f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(val.position, default(NavMeshHit), 10f, -353); if (RoundManager.Instance.GotNavMeshPositionResult) { return navMeshPosition; } } } return Vector3.zero; } [ClientRpc] public void EnterFlightClientRpc(Vector3 newLandingPosition) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2901250511u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newLandingPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2901250511u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { EnterFlight(newLandingPosition); } } } public void SetMechAlertedToThreat() { if (!isAlerted) { isAlerted = true; alertTimer = 0f; LocalLRADAudio.Play(); } } [ClientRpc] public void SetMechAlertedClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(707554549u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 707554549u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { isAlerted = true; alertTimer = 0f; } } } public void SetAimingGun(bool setAiming) { if (((NetworkBehaviour)this).IsServer) { if (setAiming) { shootCooldown = 0f; } aimingGun = setAiming; SetChargingForwardOnLocalClient(charging: false); if (!aimingGun) { base.creatureAnimator.SetBool("AimGun", false); } SetAimingClientRpc(setAiming); } } [ClientRpc] public void SetAimingClientRpc(bool aiming) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2562955260u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref aiming, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2562955260u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { aimingGun = aiming; SetChargingForwardOnLocalClient(charging: false); if (!aimingGun) { base.creatureAnimator.SetBool("AimGun", false); } } } public void StartShootGun() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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) //IL_003e: 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) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer) { Vector3 position = gunPoint.position; Quaternion rotation = gunPoint.rotation; ShootGun(position, ((Quaternion)(ref rotation)).eulerAngles); Vector3 position2 = gunPoint.position; rotation = gunPoint.rotation; ShootGunClientRpc(position2, ((Quaternion)(ref rotation)).eulerAngles); } } [ClientRpc] public void ShootGunClientRpc(Vector3 startPos, Vector3 startRot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2155879734u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startPos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2155879734u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { ShootGun(startPos, startRot); } } } public void ShootGun(Vector3 startPos, Vector3 startRot) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if (base.creatureAnimator.GetBool("AimGun")) { base.creatureAnimator.SetTrigger("ShootGun"); } currentMissileSpeed = 0.2f; GameObject val = Object.Instantiate(missilePrefab, startPos, Quaternion.Euler(startRot), RoundManager.Instance.mapPropsContainer.transform); missilesFired++; val.GetComponent().RadMechScript = this; gunArmParticle.Play(); RoundManager.PlayRandomClip(base.creatureSFX, shootGunSFX, true, 1f, 0, 1000); if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position) < 16f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } } public void StartExplosion(Vector3 explosionPosition, Vector3 forwardRotation, bool calledByClient = false) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer) { SetExplosion(explosionPosition, forwardRotation); SetExplosionClientRpc(explosionPosition, forwardRotation); } else if (calledByClient) { SetExplosionServerRpc(explosionPosition, forwardRotation); } } [ServerRpc(RequireOwnership = false)] public void SetExplosionServerRpc(Vector3 explosionPosition, Vector3 forwardRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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(1526697760u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref forwardRotation); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1526697760u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetExplosionClientRpc(explosionPosition, forwardRotation, calledByClient: true); } } } [ClientRpc] public void SetExplosionClientRpc(Vector3 explosionPosition, Vector3 forwardRotation, bool calledByClient = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(624355671u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref forwardRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref calledByClient, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 624355671u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer || calledByClient) { SetExplosion(explosionPosition, forwardRotation); } } } public void SetExplosion(Vector3 explosionPosition, Vector3 forwardRotation) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition - forwardRotation * 0.1f) < 8f) { Landmine.SpawnExplosion(explosionPosition - forwardRotation * 0.1f, true, 1f, 7f, 30, 65f, explosionPrefab, false); } else { Landmine.SpawnExplosion(explosionPosition - forwardRotation * 0.1f, true, 1f, 7f, 30, 35f, explosionPrefab, false); } ((Component)explosionAudio).transform.position = explosionPosition + Vector3.up * 0.5f; RoundManager.PlayRandomClip(explosionAudio, largeExplosionSFX, true, 1f, 0, 1000); if (!(Vector3.Distance(previousExplosionPosition, explosionPosition) < 4f)) { RaycastHit val = default(RaycastHit); if (Physics.Raycast(explosionPosition - forwardRotation * 0.1f, forwardRotation, ref val, 4f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { _ = ((RaycastHit)(ref val)).normal; } SpawnBlastMark(explosionPosition, Quaternion.Euler(forwardRotation)); } } public void AimGunArmTowardsTarget() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) if (!aimingGun || base.inSpecialAnimation) { gunArm.rotation = Quaternion.Lerp(gunArm.rotation, defaultArmRotation.rotation, 3f * Time.deltaTime); return; } RoundManager.Instance.tempTransform.position = gunArm.position; RoundManager.Instance.tempTransform.LookAt(targetedThreat.lastSeenPosition); Transform tempTransform = RoundManager.Instance.tempTransform; tempTransform.rotation *= Quaternion.Euler(90f, 0f, 0f); RoundManager.Instance.tempTransform.localEulerAngles = new Vector3(gunArm.eulerAngles.x, RoundManager.Instance.tempTransform.localEulerAngles.y, RoundManager.Instance.tempTransform.localEulerAngles.z); gunArm.rotation = Quaternion.RotateTowards(gunArm.rotation, RoundManager.Instance.tempTransform.rotation, gunArmSpeed * Time.deltaTime); gunArm.localEulerAngles = new Vector3(0f, 0f, gunArm.localEulerAngles.z); } public void CancelSpecialAnimations() { if (aimGunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(aimGunCoroutine); } } public override void FinishedCurrentSearchRoutine() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) ((EnemyAI)this).FinishedCurrentSearchRoutine(); if (base.currentBehaviourStateIndex == 0 && ((NetworkBehaviour)this).IsServer && !Physics.Raycast(((Component)this).transform.position + Vector3.up * 9.62f, Vector3.up, 60f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { ((EnemyAI)this).SwitchToBehaviourState(2); } } public override void DoAIInterval() { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_007c: 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: CheckSightForThreat(); break; case 1: if (base.inSpecialAnimation || attemptingGrab) { break; } MoveTowardsThreat(); if (!isAlerted) { if (alertTimer > 1.4f || (hasLOS && Vector3.Distance(((Component)this).transform.position, focusedThreatTransform.position) < 8f) || Vector3.Distance(((Component)this).transform.position, focusedThreatTransform.position) < 4f) { SetMechAlertedToThreat(); } } else { if (aimingGun || !(shootCooldown <= 1f)) { break; } float num = Vector3.Distance(((Component)this).transform.position, focusedThreatTransform.position); if (hasLOS) { if (num > 38f) { SetChargingForward(setCharging: true); } else if (!chargingForward) { SetAimingGun(setAiming: true); } else if (num < 25f) { SetAimingGun(setAiming: true); } } } break; } } private void LookForPlayersInFlight() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) IVisibleThreat val = default(IVisibleThreat); RaycastHit val2 = default(RaycastHit); for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (((EnemyAI)this).CheckLineOfSightForPosition(((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position, 35f, 120, -1f, flyingModeEye) && ((Component)StartOfRound.Instance.allPlayerScripts[i]).TryGetComponent(ref val) && !(val.GetVisibility() < 0.8f) && Physics.Raycast(((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position, Vector3.down, ref val2, 7f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { ChangeFlightLandingPosition(((RaycastHit)(ref val2)).point); break; } } } public void MoveTowardsThreat() { //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_0320: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) if (targetedThreat.threatScript == null || (Object)(object)focusedThreatTransform == (Object)null) { if (!CheckSightForThreat()) { losTimer = 0f; ((EnemyAI)this).SwitchToBehaviourState(0); } return; } if (!lostCreatureInChase) { if (lostCreatureInChaseDebounce) { lostCreatureInChaseDebounce = false; SetLostCreatureInChaseClientRpc(lostInChase: false); losTimer = 0f; } if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } hasLOS = ((EnemyAI)this).CheckLineOfSightForPosition(focusedThreatTransform.position, 45f, 60, -1f, (Transform)null) && targetedThreat.threatScript.GetVisibility() > 0f; if (hasLOS || (losTimer < 2f && Vector3.Distance(focusedThreatTransform.position, ((Component)this).transform.position) < 14f)) { losTimer = 0f; alertTimer += base.AIIntervalTime * Mathf.Max(targetedThreat.threatScript.GetVisibility(), 0.3f); } else { if (!aimingGun) { losTimer += base.AIIntervalTime; alertTimer = Mathf.Max(alertTimer - base.AIIntervalTime, 0f); } if (CheckSightForThreat()) { hasLOS = true; return; } } if (hasLOS != SyncedLOSState) { syncLOSInterval += base.AIIntervalTime; if (syncLOSInterval > 0.6f) { SyncedLOSState = hasLOS; SetHasLineOfSightClientRpc(hasLOS); } } checkForPathInterval = (checkForPathInterval + 1) % 10; if (!((EnemyAI)this).SetDestinationToPosition(targetedThreat.lastSeenPosition, checkForPathInterval == 0) || Vector3.Distance(base.agent.destination, ((Component)this).transform.position) < 1.75f || losTimer > 10f) { lostCreatureInChase = true; } return; } if (!lostCreatureInChaseDebounce) { lostCreatureInChaseDebounce = true; losTimer = 0f; SetLostCreatureInChaseClientRpc(lostInChase: true); SetChargingForwardOnLocalClient(charging: false); if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } } if (((EnemyAI)this).CheckLineOfSightForPosition(focusedThreatTransform.position, 45f, 60, -1f, (Transform)null) && targetedThreat.threatScript.GetVisibility() > 0f && ((EnemyAI)this).SetDestinationToPosition(targetedThreat.lastSeenPosition, true)) { targetedThreat.lastSeenPosition = focusedThreatTransform.position; lostCreatureInChase = false; } else if (CheckSightForThreat()) { lostCreatureInChase = false; } else if (!aimingGun) { losTimer += base.AIIntervalTime; if (losTimer > 10f || (losTimer > 5f && Vector3.Distance(((Component)this).transform.position, targetedThreat.lastSeenPosition) < 2f)) { losTimer = 0f; ((EnemyAI)this).SwitchToBehaviourState(0); } } } [ClientRpc] public void SetHasLineOfSightClientRpc(bool hasLineOfSight) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2091118880u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref hasLineOfSight, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2091118880u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { hasLOS = hasLineOfSight; } } } [ClientRpc] public void SetLostCreatureInChaseClientRpc(bool lostInChase) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2455997077u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lostInChase, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2455997077u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { lostCreatureInChase = lostInChase; SetChargingForwardOnLocalClient(charging: false); } } } public override void Update() { //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_050d: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0523: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_05a0: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); timeSinceGrabbingPlayer += Time.deltaTime; if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } beginChargingTimer += Time.deltaTime; if (chargingForward) { chargeForwardAudio.volume = Mathf.Lerp(chargeForwardAudio.volume, 0.35f, 2f * Time.deltaTime); if (!chargeForwardAudio.isPlaying) { chargeForwardAudio.Play(); } } else { if (!engineSFX.isPlaying && !inSky) { engineSFX.Play(); } if (chargeForwardAudio.volume > 0.02f) { chargeForwardAudio.volume = Mathf.Lerp(chargeForwardAudio.volume, 0f, 2f * Time.deltaTime); } else if (chargeForwardAudio.isPlaying) { chargeForwardAudio.Stop(); } } if (!base.ventAnimationFinished) { return; } switch (base.currentBehaviourStateIndex) { case 0: flyingDistantAudio.volume = Mathf.Lerp(flyingDistantAudio.volume, 0f, 2f * Time.deltaTime); if (!base.inSpecialAnimation) { if (base.currentBehaviourStateIndex != previousBehaviour) { lostCreatureInChase = false; timeBetweenSteps = 0.7f; DisableSpotlight(); isAlerted = false; alertTimer = 0f; LocalLRADAudio.Stop(); LocalLRADAudio2.Stop(); if (aimingGun && ((NetworkBehaviour)this).IsServer) { SetAimingGun(setAiming: false); } SetChargingForwardOnLocalClient(charging: false); previousBehaviour = base.currentBehaviourStateIndex; } if (!((NetworkBehaviour)this).IsServer) { break; } if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } } if (!((NetworkBehaviour)this).IsServer && base.currentBehaviourStateIndex != previousBehaviour && base.previousBehaviourStateIndex == 2) { finishingFlight = false; if (inFlyingMode) { inFlyingMode = false; disableWalking = false; } if (!inTorchPlayerAnimation) { base.inSpecialAnimation = false; } } break; case 1: flyingDistantAudio.volume = Mathf.Lerp(flyingDistantAudio.volume, 0f, 2f * Time.deltaTime); if (base.inSpecialAnimation) { break; } if (base.currentBehaviourStateIndex != previousBehaviour) { EnableSpotlight(); previousBehaviour = base.currentBehaviourStateIndex; } if (aimingGun) { shootCooldown = Mathf.Min(shootCooldown + Time.deltaTime * shootUptime, 10f); if (!base.inSpecialAnimation) { AimAndShootCycle(); } } else { shootCooldown = Mathf.Max(shootCooldown - Time.deltaTime * shootDowntime, 0f); } if (hasLOS && (Object)(object)focusedThreatTransform != (Object)null) { targetedThreat.lastSeenPosition = focusedThreatTransform.position + targetedThreat.threatScript.GetThreatVelocity(); } if (isAlerted) { timeBetweenSteps = 0.2f; } else if (lostCreatureInChase) { timeBetweenSteps = 0.7f; } else { timeBetweenSteps = 1.1f; } break; case 2: if (base.currentBehaviourStateIndex != previousBehaviour) { if (previousBehaviour == 1) { DisableSpotlight(); } previousBehaviour = base.currentBehaviourStateIndex; } if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); break; } if (finishingFlight) { base.creatureAnimator.SetBool("Flying", false); flyTimer += Time.deltaTime; if (!inSky || flyTimer > 10f) { inFlyingMode = false; ((Behaviour)base.agent).enabled = true; base.inSpecialAnimation = false; disableWalking = false; if (smokeRightLeg.isPlaying) { smokeRightLeg.Stop(); smokeLeftLeg.Stop(); } if (((NetworkBehaviour)this).IsServer) { disableWalking = false; ((Behaviour)base.agent).enabled = true; finishingFlight = false; ((EnemyAI)this).SwitchToBehaviourState(0); return; } } } else if (inFlyingMode) { flyTimer += Time.deltaTime; if (inSky || flyTimer > 10f) { flyingDistantAudio.volume = Mathf.Lerp(flyingDistantAudio.volume, 1f, 2f * Time.deltaTime); inSky = true; ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, landingPosition, 12f * Time.deltaTime); RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(landingPosition); ((Component)this).transform.eulerAngles = new Vector3(0f, Mathf.LerpAngle(((Component)this).transform.eulerAngles.y, RoundManager.Instance.tempTransform.eulerAngles.y, 2f * Time.deltaTime), 0f); if (((NetworkBehaviour)this).IsServer && Vector3.Distance(((Component)this).transform.position, new Vector3(landingPosition.x, ((Component)this).transform.position.y, landingPosition.z)) < 0.4f) { EndFlight(); } else if (((NetworkBehaviour)this).IsOwner) { if (inFlyingMode && inSky && !changedDirectionInFlight) { LookForPlayersInFlight(); } break; } } else { flyingDistantAudio.volume = Mathf.Lerp(flyingDistantAudio.volume, 0f, 2f * Time.deltaTime); } } if (!((NetworkBehaviour)this).IsServer) { return; } if (!inFlyingMode) { disableWalking = true; if (!takingStep) { StartFlying(); } } break; } if (!base.inSpecialAnimation) { AttemptGrabIfClose(); DoFootstepCycle(); AimGunArmTowardsTarget(); TurnTorsoToTarget(); } } public override void OnCollideWithPlayer(Collider other) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_007f: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(timeSinceGrabbingPlayer < 1f) && attemptingGrab && !base.inSpecialAnimation && !GameNetworkManager.Instance.localPlayerController.isInElevator) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null && !Physics.Linecast(centerPosition.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position + Vector3.up * 0.6f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { timeSinceGrabbingPlayer = 0f; GrabPlayerServerRpc((int)val.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void GrabPlayerServerRpc(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) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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(3780767121u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3780767121u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (attemptingGrab && !inTorchPlayerAnimation && !Object.op_Implicit((Object)(object)base.inSpecialAnimationWithPlayer) && !base.inSpecialAnimation && !StartOfRound.Instance.allPlayerScripts[playerId].isPlayerDead && !Object.op_Implicit((Object)(object)StartOfRound.Instance.allPlayerScripts[playerId].inAnimationWithEnemy)) { inTorchPlayerAnimation = true; base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; attemptingGrab = false; int enemyYRot = (int)((Component)this).transform.eulerAngles.y; RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(centerPosition.position, centerPosition.forward, ref val3, 6f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { enemyYRot = (int)RoundManager.Instance.YRotationThatFacesTheFarthestFromPosition(centerPosition.position, 20f, 5); } GrabPlayerClientRpc(playerId, ((Component)this).transform.position, enemyYRot); } } [ClientRpc] public void GrabPlayerClientRpc(int playerId, Vector3 enemyPosition, int enemyYRot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(513486734u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enemyPosition); BytePacker.WriteValueBitPacked(val2, enemyYRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 513486734u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BeginTorchPlayer(StartOfRound.Instance.allPlayerScripts[playerId], enemyPosition, enemyYRot); } } } private void BeginTorchPlayer(PlayerControllerB playerBeingTorched, Vector3 enemyPosition, int enemyYRot) { //IL_008a: Unknown result type (might be due to invalid IL or missing references) base.inSpecialAnimationWithPlayer = playerBeingTorched; if (base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation && (Object)(object)base.inSpecialAnimationWithPlayer.currentTriggerInAnimationWith != (Object)null) { base.inSpecialAnimationWithPlayer.currentTriggerInAnimationWith.CancelAnimationExternally(); } base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = true; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this; base.inSpecialAnimationWithPlayer.isInElevator = false; base.inSpecialAnimationWithPlayer.isInHangarShipRoom = false; base.inSpecialAnimationWithPlayer.freeRotationInInteractAnimation = true; if (torchPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(torchPlayerCoroutine); } torchPlayerCoroutine = ((MonoBehaviour)this).StartCoroutine(TorchPlayerAnimation(enemyPosition, enemyYRot)); } [IteratorStateMachine(typeof(d__156))] private IEnumerator TorchPlayerAnimation(Vector3 enemyPosition, int enemyYRot) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__156(0) { <>4__this = this }; } public void CancelTorchPlayerAnimation() { inTorchPlayerAnimation = false; base.inSpecialAnimation = false; disableWalking = false; attemptGrabTimer = 5f; if (((NetworkBehaviour)this).IsServer) { ((Behaviour)base.agent).enabled = true; } base.creatureAnimator.SetBool("GrabSuccessful", false); base.creatureAnimator.SetBool("AttemptingGrab", false); base.creatureAnimator.SetBool("GrabUnsuccessful", false); if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = false; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = null; base.inSpecialAnimationWithPlayer.freeRotationInInteractAnimation = false; if ((Object)(object)base.inSpecialAnimationWithPlayer.deadBody != (Object)null) { base.inSpecialAnimationWithPlayer.deadBody.matchPositionExactly = false; base.inSpecialAnimationWithPlayer.deadBody.attachedLimb = null; base.inSpecialAnimationWithPlayer.deadBody.attachedTo = null; } base.inSpecialAnimationWithPlayer.ResetZAndXRotation(); base.inSpecialAnimationWithPlayer = null; } if (blowtorchActivated) { DisableBlowtorch(); } if (torchPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(torchPlayerCoroutine); } } public void StartGrabAttempt() { if (base.currentBehaviourStateIndex != 2) { attemptingGrab = true; attemptGrabTimer = 1.5f; base.creatureAnimator.SetBool("AttemptingGrab", true); base.creatureAnimator.SetBool("GrabUnsuccessful", false); base.creatureAnimator.SetBool("GrabSuccessful", false); disableWalking = true; StartGrabAttemptClientRpc(); } } [ClientRpc] public void StartGrabAttemptClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2852653991u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2852653991u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { base.creatureAnimator.SetBool("AttemptingGrab", true); base.creatureAnimator.SetBool("GrabUnsuccessful", false); base.creatureAnimator.SetBool("GrabSuccessful", false); attemptingGrab = true; } } } public void FinishAttemptGrab() { attemptingGrab = false; attemptGrabTimer = 5f; base.creatureAnimator.SetBool("GrabUnsuccessful", true); base.creatureAnimator.SetBool("AttemptingGrab", false); disableWalking = false; FinishAttemptingGrabClientRpc(); } [ClientRpc] public void FinishAttemptingGrabClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(664064239u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 664064239u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { attemptingGrab = false; disableWalking = false; base.creatureAnimator.SetBool("GrabUnsuccessful", true); base.creatureAnimator.SetBool("AttemptingGrab", false); } } } public void AttemptGrabIfClose() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsServer || base.inSpecialAnimation || base.currentBehaviourStateIndex == 2) { return; } if (waitingToAttemptGrab) { if (!takingStep) { waitingToAttemptGrab = false; StartGrabAttempt(); } } else if (attemptingGrab) { attemptGrabTimer -= Time.deltaTime; if (attemptGrabTimer < 0f) { FinishAttemptGrab(); } } else if (attemptGrabTimer < 0f) { for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position) < 5.2f) { waitingToAttemptGrab = true; disableWalking = true; return; } } attemptGrabTimer = 0.4f; } else { attemptGrabTimer -= Time.deltaTime; } } public void AimAndShootCycle() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) if (takingStep || !(base.stunNormalizedTimer <= 0f)) { return; } base.creatureAnimator.SetBool("AimGun", true); if (!((NetworkBehaviour)this).IsServer) { return; } if (shootTimer > fireRate) { float num = Vector3.Distance(targetedThreat.lastSeenPosition, ((Component)this).transform.position); if (shootCooldown > 4.75f || chargingForward) { SetAimingGun(setAiming: false); return; } if (!hadLOSDuringLastShot && (!hasLOS || num < 6f)) { SetAimingGun(setAiming: false); return; } shootTimer = 0f + Random.Range((0f - fireRateVariance) * 0.5f, fireRateVariance * 0.5f); StartShootGun(); hadLOSDuringLastShot = hasLOS && num < 40f; } else { shootTimer += Time.deltaTime; } } public void TurnTorsoToTarget() { //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) if (base.currentBehaviourStateIndex == 1 && !lostCreatureInChase && Vector3.Distance(((Component)this).transform.position, targetedThreat.lastSeenPosition) > 3f) { RoundManager.Instance.tempTransform.position = torsoContainer.position + Vector3.up * 1f; RoundManager.Instance.tempTransform.LookAt(targetedThreat.lastSeenPosition); Transform tempTransform = RoundManager.Instance.tempTransform; tempTransform.rotation *= Quaternion.Euler(0f, 90f, 0f); float num = 0f; if (aimingGun) { num = Vector3.Angle(targetedThreat.lastSeenPosition - ((Component)this).transform.position, ((Component)this).transform.forward) * forwardAngleCompensation; } RoundManager.Instance.tempTransform.localEulerAngles = new Vector3(torsoContainer.eulerAngles.x, torsoContainer.eulerAngles.y, RoundManager.Instance.tempTransform.localEulerAngles.z + num); torsoContainer.rotation = Quaternion.RotateTowards(torsoContainer.rotation, RoundManager.Instance.tempTransform.rotation, 80f * Time.deltaTime); } else { torsoContainer.rotation = Quaternion.Lerp(torsoContainer.rotation, torsoDefaultRotation.rotation, 3f * Time.deltaTime); } } public bool CheckSightForThreat() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_02fa: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsServer) { return false; } int num = Physics.OverlapSphereNonAlloc(base.eye.position + base.eye.forward * 58f + -base.eye.up * 10f, 60f, RoundManager.Instance.tempColliderResults, visibleThreatsMask, (QueryTriggerInteraction)2); Collider val = null; RaycastHit val2 = default(RaycastHit); IVisibleThreat val3 = default(IVisibleThreat); for (int i = 0; i < num; i++) { if ((Object)(object)RoundManager.Instance.tempColliderResults[i] == (Object)(object)ownCollider) { continue; } if ((Object)(object)RoundManager.Instance.tempColliderResults[i] == (Object)(object)targetedThreatCollider && base.currentBehaviourStateIndex == 1) { val = RoundManager.Instance.tempColliderResults[i]; continue; } float num2 = Vector3.Distance(base.eye.position, ((Component)RoundManager.Instance.tempColliderResults[i]).transform.position); float num3 = Vector3.Angle(((Component)RoundManager.Instance.tempColliderResults[i]).transform.position - base.eye.position, base.eye.forward); if (num2 > 2f && num3 > fov) { continue; } if (Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.7f, ((Component)RoundManager.Instance.tempColliderResults[i]).transform.position + Vector3.up * 0.5f, ref val2, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { if (base.debugEnemyAI) { Debug.DrawRay(((RaycastHit)(ref val2)).point, Vector3.up * 0.5f, Color.magenta, base.AIIntervalTime); } continue; } EnemyAI component = ((Component)((Component)RoundManager.Instance.tempColliderResults[i]).transform).GetComponent(); if ((!((Object)(object)component != (Object)null) || !(((object)component).GetType() == typeof(RadMechAI))) && ((Component)((Component)RoundManager.Instance.tempColliderResults[i]).transform).TryGetComponent(ref val3)) { float visibility = val3.GetVisibility(); if (!(visibility < 0.2f) && (!(visibility <= 0.58f) || !(num2 > 30f))) { targetedThreatCollider = RoundManager.Instance.tempColliderResults[i]; SetTargetedThreat(val3, ((Component)RoundManager.Instance.tempColliderResults[i]).transform.position + Vector3.up * 0.5f, num2); focusedThreatTransform = val3.GetThreatTransform(); NetworkObject component2 = ((Component)focusedThreatTransform).gameObject.GetComponent(); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); SetTargetToThreatClientRpc(NetworkObjectReference.op_Implicit(component2), targetedThreat.lastSeenPosition); return true; } } } if (Object.op_Implicit((Object)(object)val)) { if (Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.7f, ((Component)val).transform.position + Vector3.up * 0.5f, ref val2, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { return false; } if (!((Component)((Component)val).transform).TryGetComponent(ref val3)) { return false; } if (val3.GetVisibility() < 0.2f) { return false; } return true; } return false; } [ClientRpc] public void SetTargetToThreatClientRpc(NetworkObjectReference netObject, Vector3 lastSeenPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0147: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3278404237u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref netObject, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lastSeenPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3278404237u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { return; } NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref netObject)).TryGet(ref val3, (NetworkManager)null)) { IVisibleThreat val4 = default(IVisibleThreat); if (!((Component)((Component)val3).transform).TryGetComponent(ref val4)) { Debug.LogError((object)"Error: RadMech could not get IVisibleThreat in transform of network object sent in RPC (SetTargetToThreatClientRpc)"); return; } focusedThreatTransform = val4.GetThreatTransform(); float dist = Vector3.Distance(base.eye.position, focusedThreatTransform.position); SetTargetedThreat(val4, lastSeenPos, dist); } else { Debug.LogError((object)$"Error: RadMech could not find threat NetworkObject sent by RPC through reference; ID: {((NetworkObjectReference)(ref netObject)).NetworkObjectId}"); } ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); } public void SetTargetedThreat(IVisibleThreat newThreat, Vector3 lastSeenPos, float dist) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) targetedThreat.type = newThreat.type; targetedThreat.timeLastSeen = Time.realtimeSinceStartup; targetedThreat.lastSeenPosition = lastSeenPos; targetedThreat.distanceToThreat = dist; targetedThreat.threatLevel = newThreat.GetThreatLevel(base.eye.position); targetedThreat.threatScript = newThreat; } private void DoFootstepCycle() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsServer) { return; } if (chargingForward && !disableWalking && !aimingGun) { if (beginChargingTimer < 0.4f) { base.agent.speed = 4f; return; } base.agent.speed = chargeForwardSpeed; if (startedChargeEffect) { return; } startedChargeEffect = true; startChargingEffectContainer.SetActive(true); engineSFX.Stop(); float num = Vector3.Distance(((Component)this).transform.position - ((Component)this).transform.forward * 5f, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num < 25f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); if (num < 12f) { Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up * 0.2f, false, 2f, 5f, 30, 45f, (GameObject)null, false); } } } else if (takingStep) { if (walkStepTimer <= 0f) { walkStepTimer = timeBetweenSteps; takingStep = false; base.agent.speed = 0f; } else { base.agent.speed = stepMovementSpeed; walkStepTimer -= Time.deltaTime; } } else if (!disableWalking && !aimingGun && !(base.stunNormalizedTimer > 0f)) { if (walkStepTimer <= 0f) { walkStepTimer = timeToTakeStep; leftFoot = !leftFoot; takingStep = true; TakeStepForwardAnimation(leftFoot); } else { walkStepTimer -= Time.deltaTime; } } } private void TakeStepForwardAnimation(bool leftFootForward) { if (((NetworkBehaviour)this).IsServer) { base.creatureAnimator.SetBool("leftFootForward", leftFootForward); if (leftFootForward) { TakeLeftStepForwardClientRpc(); } else { TakeRightStepForwardClientRpc(); } } } [ClientRpc] public void TakeLeftStepForwardClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1527135805u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1527135805u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool("leftFootForward", true); } } } [ClientRpc] public void TakeRightStepForwardClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(748693404u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 748693404u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool("leftFootForward", false); } } } public void EnableBlowtorch() { ((Component)blowtorchParticle).gameObject.SetActive(false); ((Component)blowtorchParticle).gameObject.SetActive(true); blowtorchParticle.Play(); blowtorchAudio.Play(); blowtorchActivated = true; } public void DisableBlowtorch() { blowtorchParticle.Stop(); blowtorchAudio.Stop(); blowtorchActivated = false; } public void DisableThrusterSmoke() { smokeLeftLeg.Stop(); smokeRightLeg.Stop(); } public void EnableThrusterSmoke() { smokeLeftLeg.Play(); smokeRightLeg.Play(); } public void HasEnteredSky() { inSky = true; engineSFX.Stop(); } public void FinishFlyingAnimation() { inSky = false; } public void FlickerFace() { base.creatureVoice.PlayOneShot(spotlightFlicker); if (spotlightCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(spotlightCoroutine); spotlightCoroutine = null; } spotlightCoroutine = ((MonoBehaviour)this).StartCoroutine(flickerSpotlightAnim()); } [IteratorStateMachine(typeof(d__179))] private IEnumerator flickerSpotlightAnim() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__179(0) { <>4__this = this }; } public void EnableSpotlight() { spotlight.SetActive(true); ((Renderer)base.skinnedMeshRenderers[0]).sharedMaterial = spotlightMat; spotlightOnAudio.Play(); } public void DisableSpotlight() { spotlight.SetActive(false); ((Renderer)base.skinnedMeshRenderers[0]).sharedMaterial = defaultMat; base.creatureVoice.PlayOneShot(spotlightOff); } public void StompLeftFoot() { Stomp(leftFootPoint, leftFootParticle); } public void StompRightFoot() { Stomp(rightFootPoint, rightFootParticle); } public void StompBothFeet() { Stomp(((Component)this).transform, leftFootParticle, rightFootParticle, 10f); } private void Stomp(Transform stompTransform, ParticleSystem particle, ParticleSystem particle2 = null, float radius = 5f) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; float num = Vector3.Distance(((Component)localPlayerController).transform.position, stompTransform.position); particle.Play(); if ((Object)(object)particle2 != (Object)null) { particle2.Play(); } RoundManager.PlayRandomClip(base.creatureSFX, base.enemyType.audioClips, true, 1f, 1115, 4); if (num < 12f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 24f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } Vector3 val = Vector3.Normalize(((Component)localPlayerController.gameplayCamera).transform.position - stompTransform.position) * 15f / Vector3.Distance(((Component)localPlayerController.gameplayCamera).transform.position, stompTransform.position); if (num < radius) { if ((double)num < (double)radius * 0.175) { localPlayerController.DamagePlayer(70, true, true, (CauseOfDeath)8, 0, false, Vector3.down * 40f); } else if (num < radius * 0.5f) { localPlayerController.DamagePlayer(30, true, true, (CauseOfDeath)8, 0, false, Vector3.down * 40f); } if (!((Object)(object)localPlayerController.physicsParent != (Object)null)) { localPlayerController.externalForceAutoFade += val; } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3601178847u, new RpcReceiveHandler(__rpc_handler_3601178847), "ChangeBroadcastClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(3292660881u, new RpcReceiveHandler(__rpc_handler_3292660881), "ChangeFlightLandingPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1911005037u, new RpcReceiveHandler(__rpc_handler_1911005037), "EndFlightClientRpc"); ((NetworkBehaviour)this).__registerRpc(3717474514u, new RpcReceiveHandler(__rpc_handler_3717474514), "SetChargingForwardClientRpc"); ((NetworkBehaviour)this).__registerRpc(2901250511u, new RpcReceiveHandler(__rpc_handler_2901250511), "EnterFlightClientRpc"); ((NetworkBehaviour)this).__registerRpc(707554549u, new RpcReceiveHandler(__rpc_handler_707554549), "SetMechAlertedClientRpc"); ((NetworkBehaviour)this).__registerRpc(2562955260u, new RpcReceiveHandler(__rpc_handler_2562955260), "SetAimingClientRpc"); ((NetworkBehaviour)this).__registerRpc(2155879734u, new RpcReceiveHandler(__rpc_handler_2155879734), "ShootGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(1526697760u, new RpcReceiveHandler(__rpc_handler_1526697760), "SetExplosionServerRpc"); ((NetworkBehaviour)this).__registerRpc(624355671u, new RpcReceiveHandler(__rpc_handler_624355671), "SetExplosionClientRpc"); ((NetworkBehaviour)this).__registerRpc(2091118880u, new RpcReceiveHandler(__rpc_handler_2091118880), "SetHasLineOfSightClientRpc"); ((NetworkBehaviour)this).__registerRpc(2455997077u, new RpcReceiveHandler(__rpc_handler_2455997077), "SetLostCreatureInChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(3780767121u, new RpcReceiveHandler(__rpc_handler_3780767121), "GrabPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(513486734u, new RpcReceiveHandler(__rpc_handler_513486734), "GrabPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2852653991u, new RpcReceiveHandler(__rpc_handler_2852653991), "StartGrabAttemptClientRpc"); ((NetworkBehaviour)this).__registerRpc(664064239u, new RpcReceiveHandler(__rpc_handler_664064239), "FinishAttemptingGrabClientRpc"); ((NetworkBehaviour)this).__registerRpc(3278404237u, new RpcReceiveHandler(__rpc_handler_3278404237), "SetTargetToThreatClientRpc"); ((NetworkBehaviour)this).__registerRpc(1527135805u, new RpcReceiveHandler(__rpc_handler_1527135805), "TakeLeftStepForwardClientRpc"); ((NetworkBehaviour)this).__registerRpc(748693404u, new RpcReceiveHandler(__rpc_handler_748693404), "TakeRightStepForwardClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3601178847(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int clipIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).ChangeBroadcastClipClientRpc(clipIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3292660881(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newLandingPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newLandingPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).ChangeFlightLandingPositionClientRpc(newLandingPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1911005037(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).EndFlightClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3717474514(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool chargingForwardClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chargingForwardClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetChargingForwardClientRpc(chargingForwardClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2901250511(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newLandingPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newLandingPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).EnterFlightClientRpc(newLandingPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_707554549(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetMechAlertedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2562955260(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool aimingClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref aimingClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetAimingClientRpc(aimingClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2155879734(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 startPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startPos); Vector3 startRot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startRot); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).ShootGunClientRpc(startPos, startRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1526697760(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 explosionPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explosionPosition); Vector3 forwardRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref forwardRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetExplosionServerRpc(explosionPosition, forwardRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_624355671(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) //IL_0069: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 explosionPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explosionPosition); Vector3 forwardRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref forwardRotation); bool calledByClient = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref calledByClient, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetExplosionClientRpc(explosionPosition, forwardRotation, calledByClient); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2091118880(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool hasLineOfSightClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hasLineOfSightClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetHasLineOfSightClientRpc(hasLineOfSightClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2455997077(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lostCreatureInChaseClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lostCreatureInChaseClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetLostCreatureInChaseClientRpc(lostCreatureInChaseClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3780767121(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).GrabPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_513486734(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 enemyPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyPosition); int enemyYRot = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref enemyYRot); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).GrabPlayerClientRpc(playerId, enemyPosition, enemyYRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2852653991(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).StartGrabAttemptClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_664064239(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).FinishAttemptingGrabClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3278404237(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObject, default(ForNetworkSerializable)); Vector3 lastSeenPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lastSeenPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).SetTargetToThreatClientRpc(netObject, lastSeenPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1527135805(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).TakeLeftStepForwardClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_748693404(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SuperMechAI)(object)target).TakeRightStepForwardClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SuperMechAI"; } } public class VelvetAI : EnemyAI { [CompilerGenerated] private sealed class <>c__DisplayClass89_0 { public int playerId; public float timeAtStartOfWait; internal bool b__0() { if (!((Object)(object)StartOfRound.Instance.allPlayerScripts[playerId].deadBody != (Object)null)) { return Time.timeSinceLevelLoad - timeAtStartOfWait > 10f; } return true; } } [CompilerGenerated] private sealed class d__89 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int playerId; private <>c__DisplayClass89_0 <>8__1; public VelvetAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__89(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>8__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown int num = <>1__state; VelvetAI velvetAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; <>8__1 = new <>c__DisplayClass89_0(); <>8__1.playerId = playerId; <>8__1.timeAtStartOfWait = Time.timeSinceLevelLoad; <>2__current = (object)new WaitUntil((Func)(() => (Object)(object)StartOfRound.Instance.allPlayerScripts[<>8__1.playerId].deadBody != (Object)null || Time.timeSinceLevelLoad - <>8__1.timeAtStartOfWait > 10f)); <>1__state = 1; return true; case 1: { <>1__state = -1; if ((Object)(object)StartOfRound.Instance.allPlayerScripts[<>8__1.playerId].deadBody == (Object)null) { Debug.LogError((object)"SandSpider: Grab body RPC was called, but body did not spawn within 10 seconds on this client."); } DeadBodyInfo deadBody = StartOfRound.Instance.allPlayerScripts[<>8__1.playerId].deadBody; velvetAI.GrabBody(deadBody); return false; } } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__79 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public VelvetAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__79(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown int num = <>1__state; VelvetAI velvetAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; if ((Object)(object)velvetAI.currentlyHeldBody == (Object)null) { Debug.LogError((object)"Sand Spider: Tried to wrap body but it could not be found."); return false; } velvetAI.spoolingPlayerBody = true; velvetAI.overrideAnimation = 4.05f; ((EnemyAI)velvetAI).creatureAnimator.SetTrigger("spool"); ((EnemyAI)velvetAI).creatureSFX.PlayOneShot(velvetAI.spoolPlayerSFX); <>2__current = (object)new WaitForSeconds(0.9f); <>1__state = 1; return true; case 1: <>1__state = -1; if ((Object)(object)velvetAI.currentlyHeldBody.attachedTo != (Object)(object)velvetAI.mouthTarget) { velvetAI.CancelSpoolingBody(); } velvetAI.currentlyHeldBody.ChangeMesh(velvetAI.playerBodyWebMesh, velvetAI.playerBodyWebMat); <>2__current = (object)new WaitForSeconds(3.105f); <>1__state = 2; return true; case 2: <>1__state = -1; velvetAI.spooledPlayerBody = true; velvetAI.spoolingPlayerBody = false; velvetAI.turnBodyIntoWebCoroutine = null; if ((Object)(object)velvetAI.currentlyHeldBody.attachedTo != (Object)(object)velvetAI.mouthTarget) { velvetAI.CancelSpoolingBody(); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private float[] legDistances = new float[12] { 2.2f, 2.2f, 1.8f, 1.8f, 1.3f, 1.3f, 1.5f, 1.5f, 1f, 1f, 0.6f, 0.6f }; public Vector3[] legPositions; public Transform[] legDefaultPositions; public Transform[] legTargets; public Transform abdomen; public Transform mouthTarget; public bool burrowing; public Transform turnCompass; public Vector3 wallPosition; public Vector3 wallNormal; public Vector3 floorPosition; private bool onWall; private RaycastHit rayHit; private Ray ray; public bool lookingForWallPosition; private bool gotWallPositionInLOS; private float tryWallPositionInterval; private bool reachedWallPosition; public Transform meshContainer; public Vector3 meshContainerPosition; public Vector3 meshContainerTarget; private Quaternion meshContainerTargetRotation; public float spiderSpeed; public float calculatePathToAgentInterval; public bool navigateMeshTowardsPosition; public Vector3 navigateToPositionTarget; public NavMeshHit navHit; public List webTraps = new List(); public GameObject webTrapPrefab; public int maxWebTrapsToPlace; private float timeSincePlacingWebTrap; public Vector3 meshContainerServerPosition; public Vector3 meshContainerServerRotation; private Vector3 refVel; public Transform homeNode; public AISearchRoutine patrolHomeBase; private bool setDestinationToHomeBase; private float chaseTimer; private bool overrideSpiderLookRotation; private bool watchFromDistance; public float overrideAnimation; private float overrideAnimationWeight; private float timeSinceHittingPlayer; private DeadBodyInfo currentlyHeldBody; public Mesh playerBodyWebMesh; public Material playerBodyWebMat; private bool spooledPlayerBody; private bool spoolingPlayerBody; private Coroutine turnBodyIntoWebCoroutine; private bool decidedChanceToHangBodyEarly; public GameObject hangBodyPhysicsPrefab; private Coroutine grabBodyCoroutine; private float waitOnWallTimer; public AudioClip[] footstepSFX; public AudioSource footstepAudio; public AudioClip hitWebSFX; public AudioClip attackSFX; public AudioClip spoolPlayerSFX; public AudioClip hangPlayerSFX; public AudioClip breakWebSFX; public AudioClip hitSpiderSFX; private float lookAtPlayerInterval; public Rigidbody meshContainerRigidbody; private RaycastHit rayHitB; public MeshRenderer spiderSafeModeMesh; public SkinnedMeshRenderer spiderNormalMesh; private bool spiderSafeEnabled; private int velocityAverageCount; private int velocityMovingAverageLength = 10; private Vector3 averageVelocity; public float baseSpeed; [Header("BerserkHPStuff")] public int berserkThresholdA = 2; public int berserkThresholdB = 1; public float berserkSpeedA; public float berserkSpeedB; public int playerDamage = 90; public CauseOfDeath causeOfDeath; public override void Start() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_008d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); meshContainerPosition = ((Component)this).transform.position; meshContainerTarget = ((Component)this).transform.position; navHit = default(NavMeshHit); rayHitB = default(RaycastHit); patrolHomeBase.searchWidth = 17f; patrolHomeBase.searchPrecision = 3f; maxWebTrapsToPlace = Random.Range(6, 9); homeNode = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 2); meshContainerTargetRotation = Quaternion.identity; } public override void DoAIInterval() { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_02af: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead) { return; } if (lookingForWallPosition && !gotWallPositionInLOS) { gotWallPositionInLOS = GetWallPositionForSpiderMesh(); } if (navigateMeshTowardsPosition) { CalculateSpiderPathToPosition(); } switch (base.currentBehaviourStateIndex) { case 0: setDestinationToHomeBase = false; lookingForWallPosition = false; reachedWallPosition = false; if (!patrolHomeBase.inProgress) { ((EnemyAI)this).StartSearch(homeNode.position, patrolHomeBase); } break; case 1: base.movingTowardsTargetPlayer = false; if (!lookingForWallPosition) { if (Vector3.Distance(((Component)this).transform.position, homeNode.position) > 7f) { patrolHomeBase.searchWidth = 6f; if (!patrolHomeBase.inProgress) { if (((EnemyAI)this).PathIsIntersectedByLineOfSight(homeNode.position, false, false, false)) { homeNode = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 2); } ((EnemyAI)this).StartSearch(homeNode.position, patrolHomeBase); } break; } if ((Object)(object)currentlyHeldBody != (Object)null && !spooledPlayerBody) { if (turnBodyIntoWebCoroutine == null) { turnBodyIntoWebCoroutine = ((MonoBehaviour)this).StartCoroutine(turnBodyIntoWeb()); SpiderTurnBodyIntoWebServerRpc(); } break; } if ((Object)(object)currentlyHeldBody != (Object)null && !decidedChanceToHangBodyEarly) { if (Random.Range(0, 100) < 150) { HangBodyFromCeiling(); SpiderHangBodyServerRpc(); } decidedChanceToHangBodyEarly = true; } if (patrolHomeBase.inProgress) { ((EnemyAI)this).StopSearch(patrolHomeBase, true); } lookingForWallPosition = true; reachedWallPosition = false; break; } if (reachedWallPosition) { if ((Object)(object)currentlyHeldBody != (Object)null) { HangBodyFromCeiling(); SpiderHangBodyServerRpc(); } for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && !Physics.Linecast(meshContainer.position, ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMask)) { float num = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, meshContainer.position); if (num < 5f) { TriggerChaseWithPlayer(StartOfRound.Instance.allPlayerScripts[i]); break; } if (num < 10f) { Vector3 position = ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position; float num2 = Vector3.Dot(position - meshContainer.position, wallNormal); Vector3 val = position - num2 * wallNormal; meshContainerTargetRotation = Quaternion.LookRotation(val, wallNormal); overrideSpiderLookRotation = true; break; } } } } overrideSpiderLookRotation = false; break; case 2: if (patrolHomeBase.inProgress) { ((EnemyAI)this).StopSearch(patrolHomeBase, true); } if (watchFromDistance && !((EnemyAI)this).TargetClosestPlayer(2f, true, 80f, false, false, true)) { StopChasing(); } if (!((Object)(object)base.targetPlayer == (Object)null)) { if (base.targetPlayer.isPlayerDead && (Object)(object)base.targetPlayer.deadBody != (Object)null && (!((EnemyAI)this).SetDestinationToPosition(((Component)base.targetPlayer.deadBody.bodyParts[6]).transform.position, true) || (Object)(object)base.targetPlayer.deadBody.attachedTo != (Object)null)) { base.targetPlayer = null; StopChasing(moveTowardsDeadPlayerBody: true); } if (watchFromDistance) { ((EnemyAI)this).SetDestinationToPosition(((Component)((EnemyAI)this).ChooseClosestNodeToPosition(((Component)base.targetPlayer).transform.position, false, 4)).transform.position, false); } } break; } } [IteratorStateMachine(typeof(d__79))] private IEnumerator turnBodyIntoWeb() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__79(0) { <>4__this = this }; } private void CancelSpoolingBody() { if (turnBodyIntoWebCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(turnBodyIntoWebCoroutine); } if ((Object)(object)currentlyHeldBody != (Object)null) { currentlyHeldBody.attachedLimb = null; currentlyHeldBody.attachedTo = null; currentlyHeldBody = null; } spooledPlayerBody = false; spoolingPlayerBody = false; } [ServerRpc] public void SpiderTurnBodyIntoWebServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(1759321646u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1759321646u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpiderTurnBodyIntoWebClientRpc(); } } [ClientRpc] public void SpiderTurnBodyIntoWebClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1006255886u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1006255886u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner && !base.isEnemyDead && turnBodyIntoWebCoroutine == null) { turnBodyIntoWebCoroutine = ((MonoBehaviour)this).StartCoroutine(turnBodyIntoWeb()); } } } [ServerRpc] public void SpiderHangBodyServerRpc() { //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_0107: Unknown result type (might be due to invalid IL or missing references) //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(1948636873u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1948636873u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpiderHangBodyClientRpc(); } } [ClientRpc] public void SpiderHangBodyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2284725053u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2284725053u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { HangBodyFromCeiling(); } } } private void HangBodyFromCeiling() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)currentlyHeldBody == (Object)null) { Debug.LogError((object)"Sand spider: Held body was null, couldn't hang up"); return; } Vector3 val = abdomen.position + Vector3.up * 6f; if (Physics.Raycast(abdomen.position, Vector3.up, ref rayHit, 25f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { val = ((RaycastHit)(ref rayHit)).point; } SetLineRendererPoints component = Object.Instantiate(hangBodyPhysicsPrefab, val, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform).GetComponent(); component.target.position = ((Component)currentlyHeldBody.bodyParts[6]).transform.position; currentlyHeldBody.attachedTo = component.target; decidedChanceToHangBodyEarly = false; currentlyHeldBody.bodyAudio.volume = 0.8f; currentlyHeldBody.bodyAudio.PlayOneShot(hangPlayerSFX); currentlyHeldBody = null; } [ServerRpc] public void GrabBodyServerRpc(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_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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(3221110976u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3221110976u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GrabBodyClientRpc(playerId); } } [ClientRpc] public void GrabBodyClientRpc(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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3870022479u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3870022479u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { if (grabBodyCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(grabBodyCoroutine); } grabBodyCoroutine = ((MonoBehaviour)this).StartCoroutine(WaitForBodyToGrab(playerId)); } } private void GrabBody(DeadBodyInfo body) { currentlyHeldBody = body; currentlyHeldBody.attachedLimb = currentlyHeldBody.bodyParts[6]; currentlyHeldBody.attachedTo = mouthTarget; currentlyHeldBody.matchPositionExactly = true; } [IteratorStateMachine(typeof(d__89))] private IEnumerator WaitForBodyToGrab(int playerId) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__89(0) { <>4__this = this, playerId = playerId }; } private void CalculateSpiderPathToPosition() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (NavMesh.CalculatePath(meshContainer.position, navigateToPositionTarget, base.agent.areaMask, base.path1)) { if (base.path1.corners.Length > 1) { meshContainerTarget = base.path1.corners[1]; if (!overrideSpiderLookRotation) { SetSpiderLookAtPosition(base.path1.corners[1]); } } else { meshContainerTarget = navigateToPositionTarget; if (!overrideSpiderLookRotation) { SetSpiderLookAtPosition(navigateToPositionTarget); } } } else { meshContainer.position = RoundManager.Instance.GetNavMeshPosition(meshContainer.position, navHit, 5f, base.agent.areaMask); meshContainerTarget = meshContainer.position; } } public override void Update() { //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0436: 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_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05fe: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_061a: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (spiderSafeEnabled != IngamePlayerSettings.Instance.unsavedSettings.spiderSafeMode) { spiderSafeEnabled = IngamePlayerSettings.Instance.unsavedSettings.spiderSafeMode; ((Renderer)spiderSafeModeMesh).enabled = spiderSafeEnabled; ((Renderer)spiderNormalMesh).enabled = !spiderSafeEnabled; } timeSinceHittingPlayer += Time.deltaTime; if (base.isEnemyDead) { base.agent.speed = 0f; spiderSpeed = 0f; base.creatureAnimator.SetBool("moving", false); return; } base.creatureAnimator.SetBool("moving", ((Vector3)(ref averageVelocity)).magnitude > 0.001f); if (((NetworkBehaviour)this).IsOwner) { SyncMeshContainerPositionToClients(); } CalculateMeshMovement(); if (!((NetworkBehaviour)this).IsOwner) { return; } switch (base.currentBehaviourStateIndex) { case 0: { setDestinationToHomeBase = false; lookingForWallPosition = false; base.movingTowardsTargetPlayer = false; overrideSpiderLookRotation = false; waitOnWallTimer = 11f; if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; spiderSpeed = 0f; } else { base.agent.speed = baseSpeed; spiderSpeed = baseSpeed; } PlayerControllerB closestPlayer = ((EnemyAI)this).GetClosestPlayer(true, false, false); if ((Object)(object)closestPlayer != (Object)null && ((EnemyAI)this).CheckLineOfSightForPosition(((Component)closestPlayer.gameplayCamera).transform.position, 80f, 15, 2f, (Transform)null)) { base.targetPlayer = closestPlayer; ((EnemyAI)this).SwitchToBehaviourState(2); chaseTimer = 12.5f; watchFromDistance = base.mostOptimalDistance > 8f; } if (timeSincePlacingWebTrap > 4f) { if (AttemptPlaceWebTrap()) { timeSincePlacingWebTrap = Random.Range(0.5f, 1f); } else { timeSincePlacingWebTrap = 0.17f; } if (webTraps.Count > maxWebTrapsToPlace) { ((EnemyAI)this).SwitchToBehaviourState(1); } } else { timeSincePlacingWebTrap += Time.deltaTime; } break; } case 1: if (spoolingPlayerBody || base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; spiderSpeed = 0f; } else { base.agent.speed = baseSpeed; spiderSpeed = baseSpeed - 0.75f; } if (webTraps.Count < maxWebTrapsToPlace && (Object)(object)currentlyHeldBody == (Object)null) { waitOnWallTimer -= Time.deltaTime; } if (waitOnWallTimer <= 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); } break; case 2: setDestinationToHomeBase = false; reachedWallPosition = false; lookingForWallPosition = false; waitOnWallTimer = 11f; if (spoolingPlayerBody) { CancelSpoolingBody(); } if ((Object)(object)base.targetPlayer == (Object)null) { StopChasing(); break; } if (onWall) { base.movingTowardsTargetPlayer = true; base.agent.speed = baseSpeed; spiderSpeed = baseSpeed; break; } if (watchFromDistance) { if (lookAtPlayerInterval <= 0f) { lookAtPlayerInterval = 3f; base.movingTowardsTargetPlayer = false; overrideSpiderLookRotation = true; Vector3 position = ((Component)base.targetPlayer).transform.position; position.y = meshContainer.position.y; SetSpiderLookAtPosition(position); } else { lookAtPlayerInterval -= Time.deltaTime; } base.agent.speed = 0f; spiderSpeed = 0f; if (Physics.Linecast(meshContainer.position, ((Component)base.targetPlayer.gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { StopChasing(); } else if (Vector3.Distance(((Component)base.targetPlayer.gameplayCamera).transform.position, ((Component)this).transform.position) < 5f || base.stunNormalizedTimer > 0f) { watchFromDistance = false; } break; } if (base.enemyHP <= berserkThresholdB) { base.agent.speed = berserkSpeedB; spiderSpeed = berserkSpeedB; } else if (base.enemyHP > berserkThresholdB && base.enemyHP <= berserkThresholdA) { base.agent.speed = berserkSpeedA; spiderSpeed = berserkSpeedA; } else if ((float)base.enemyHP > berserkSpeedA) { base.agent.speed = baseSpeed; spiderSpeed = baseSpeed; } base.movingTowardsTargetPlayer = true; overrideSpiderLookRotation = false; if (timeSinceHittingPlayer < 0.5f) { base.agent.speed = 0.7f; spiderSpeed = 0.4f; } if (base.targetPlayer.isPlayerDead && (Object)(object)base.targetPlayer.deadBody != (Object)null) { if (Vector3.Distance(((Component)base.targetPlayer.deadBody.bodyParts[6]).transform.position, meshContainer.position) < 3.7f) { spooledPlayerBody = false; GrabBody(base.targetPlayer.deadBody); GrabBodyServerRpc((int)base.targetPlayer.playerClientId); ((EnemyAI)this).SwitchToBehaviourState(1); } else { base.targetPlayer = null; StopChasing(); } } else if (!((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true) || (Vector3.Distance(((Component)base.targetPlayer).transform.position, homeNode.position) > 12f && Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) > 5f)) { chaseTimer -= Time.deltaTime; if (chaseTimer <= 0f) { base.targetPlayer = null; StopChasing(); } } break; } if (base.stunNormalizedTimer > 0f) { spiderSpeed = 0f; base.agent.speed = 0f; } } private void StopChasing(bool moveTowardsDeadPlayerBody = false) { overrideSpiderLookRotation = false; base.movingTowardsTargetPlayer = false; lookingForWallPosition = false; if (webTraps.Count > maxWebTrapsToPlace || moveTowardsDeadPlayerBody) { ((EnemyAI)this).SwitchToBehaviourState(1); } else { ((EnemyAI)this).SwitchToBehaviourState(0); } } private void CalculateMeshMovement() { //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) if (lookingForWallPosition && gotWallPositionInLOS) { if (!onWall) { base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)4; navigateMeshTowardsPosition = true; navigateToPositionTarget = floorPosition; if (!overrideSpiderLookRotation) { turnCompass.position = meshContainer.position; turnCompass.LookAt(floorPosition, Vector3.up); meshContainerTargetRotation = turnCompass.rotation; } if (Vector3.Distance(((Component)meshContainer).transform.position, floorPosition) < 0.7f) { onWall = true; } } else { base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)0; navigateMeshTowardsPosition = false; meshContainerTarget = wallPosition; if (!reachedWallPosition && Vector3.Distance(meshContainer.position, wallPosition) < 0.1f) { reachedWallPosition = true; } if (!overrideSpiderLookRotation) { turnCompass.position = meshContainer.position; turnCompass.LookAt(wallPosition, wallNormal); meshContainerTargetRotation = turnCompass.rotation; } } return; } if (!lookingForWallPosition) { gotWallPositionInLOS = false; reachedWallPosition = false; } if (!onWall) { base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)4; if (!navigateMeshTowardsPosition) { CalculateSpiderPathToPosition(); navigateMeshTowardsPosition = true; } navigateToPositionTarget = ((Component)this).transform.position + Vector3.Normalize(base.agent.desiredVelocity) * 2f; return; } base.agent.obstacleAvoidanceType = (ObstacleAvoidanceType)0; navigateMeshTowardsPosition = false; meshContainerTarget = floorPosition; if (!overrideSpiderLookRotation) { turnCompass.position = meshContainer.position; turnCompass.LookAt(floorPosition, wallNormal); meshContainerTargetRotation = turnCompass.rotation; } if (Vector3.Distance(((Component)meshContainer).transform.position, floorPosition) < 1.1f) { onWall = false; } } private void SetSpiderLookAtPosition(Vector3 lookAt) { //IL_000c: 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) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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) turnCompass.position = meshContainer.position; turnCompass.LookAt(lookAt, Vector3.up); meshContainerTargetRotation = turnCompass.rotation; } private bool GetWallPositionForSpiderMesh() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0140: 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) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) float num = 6f; if (Physics.Raycast(((Component)this).transform.position, Vector3.up, ref rayHit, 22f, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1)) { num = ((!((Object)(object)currentlyHeldBody != (Object)null)) ? (((RaycastHit)(ref rayHit)).distance - 1.3f) : (((RaycastHit)(ref rayHit)).distance - 2f)); } float num2 = RoundManager.Instance.YRotationThatFacesTheNearestFromPosition(((Component)this).transform.position + Vector3.up * num, 10f, 6); if (num2 != -777f) { turnCompass.eulerAngles = new Vector3(0f, num2, 0f); ray = new Ray(((Component)this).transform.position + Vector3.up * num, turnCompass.forward); if (Physics.Raycast(ray, ref rayHit, 10.1f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { wallPosition = ((Ray)(ref ray)).GetPoint(((RaycastHit)(ref rayHit)).distance - 0.2f); wallNormal = ((RaycastHit)(ref rayHit)).normal; if (Physics.Raycast(wallPosition, Vector3.down, ref rayHitB, 7f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { floorPosition = ((RaycastHit)(ref rayHitB)).point; return true; } } } return false; } public void LateUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) if (base.isEnemyDead) { meshContainer.eulerAngles = new Vector3(0f, meshContainer.eulerAngles.y, 0f); base.creatureAnimator.SetLayerWeight(base.creatureAnimator.GetLayerIndex("MoveLegs"), 0f); } if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } if (((NetworkBehaviour)this).IsOwner) { Vector3 val = meshContainerPosition; meshContainerPosition = Vector3.MoveTowards(meshContainerPosition, meshContainerTarget, spiderSpeed * Time.deltaTime); refVel = val - meshContainerPosition; velocityAverageCount++; if (velocityAverageCount > velocityMovingAverageLength) { averageVelocity += (refVel - averageVelocity) / (float)(velocityMovingAverageLength + 1); } else { averageVelocity += refVel; if (velocityAverageCount == velocityMovingAverageLength) { averageVelocity /= (float)velocityAverageCount; } } meshContainer.position = meshContainerPosition; meshContainer.rotation = Quaternion.Lerp(meshContainer.rotation, meshContainerTargetRotation, 8f * Time.deltaTime); } else { meshContainer.position = Vector3.SmoothDamp(meshContainerPosition, meshContainerServerPosition, ref refVel, 4f * Time.deltaTime); meshContainerPosition = meshContainer.position; meshContainer.rotation = Quaternion.Lerp(meshContainer.rotation, Quaternion.Euler(meshContainerServerRotation), 9f * Time.deltaTime); } if (overrideAnimation <= 0f && base.stunNormalizedTimer <= 0f) { if (overrideAnimationWeight > 0.05f) { overrideAnimationWeight = Mathf.Lerp(overrideAnimationWeight, 0f, 20f * Time.deltaTime); } else { overrideAnimationWeight = 0f; } MoveLegsProcedurally(); } else { overrideAnimation -= Time.deltaTime; overrideAnimationWeight = Mathf.Lerp(overrideAnimationWeight, 1f, 20f * Time.deltaTime); } base.creatureAnimator.SetBool("stunned", base.stunNormalizedTimer > 0f); base.creatureAnimator.SetLayerWeight(base.creatureAnimator.GetLayerIndex("MoveLegs"), overrideAnimationWeight); } public void MoveLegsProcedurally() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < legTargets.Length; i++) { legTargets[i].position = Vector3.Lerp(legTargets[i].position, legPositions[i], 35f * Time.deltaTime); } bool flag = false; for (int j = 0; j < legPositions.Length; j++) { Vector3 val = legPositions[j] - legDefaultPositions[j].position; if (((Vector3)(ref val)).sqrMagnitude > legDistances[j] * 1.4f) { legPositions[j] = legDefaultPositions[j].position; flag = true; } } if (flag) { footstepAudio.pitch = Random.Range(0.6f, 1.2f); footstepAudio.PlayOneShot(footstepSFX[Random.Range(0, footstepSFX.Length)], Random.Range(0.1f, 1f)); WalkieTalkie.TransmitOneShotAudio(footstepAudio, footstepSFX[Random.Range(0, footstepSFX.Length)], Mathf.Clamp(Random.Range(-0.4f, 0.8f), 0f, 1f)); } } [ServerRpc] public void SyncMeshContainerPositionServerRpc(Vector3 syncPosition, Vector3 syncRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //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_00dc: 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(2482066042u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncRotation); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2482066042u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncMeshContainerPositionClientRpc(syncPosition, syncRotation); } } [ClientRpc] public void SyncMeshContainerPositionClientRpc(Vector3 syncPosition, Vector3 syncRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2217823249u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncRotation); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2217823249u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { meshContainerServerPosition = syncPosition; meshContainerServerRotation = syncRotation; } } } public void SyncMeshContainerPositionToClients() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) if (Vector3.Distance(meshContainerServerPosition, ((Component)this).transform.position) > 0.5f || Vector3.SignedAngle(meshContainerServerRotation, meshContainer.eulerAngles, Vector3.up) > 30f) { meshContainerServerPosition = meshContainer.position; meshContainerServerRotation = meshContainer.eulerAngles; if (((NetworkBehaviour)this).IsServer) { SyncMeshContainerPositionClientRpc(meshContainerServerPosition, meshContainer.eulerAngles); } else { SyncMeshContainerPositionServerRpc(meshContainerServerPosition, meshContainer.eulerAngles); } } } private bool AttemptPlaceWebTrap() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < webTraps.Count; i++) { if (Vector3.Distance(((Component)webTraps[i]).transform.position, abdomen.position) < 0.6f) { return false; } } Vector3 val = Vector3.Scale(Random.onUnitSphere, new Vector3(1f, Random.Range(0.5f, 1f), 1f)); val.y = Mathf.Min(0f, val.y); ray = new Ray(abdomen.position + Vector3.up * 0.4f, val); if (Physics.Raycast(ray, ref rayHit, 7f, StartOfRound.Instance.collidersAndRoomMask)) { if (((RaycastHit)(ref rayHit)).distance < 2f) { return false; } Debug.Log((object)$"Got spider web raycast; end point: {((RaycastHit)(ref rayHit)).point}; {((RaycastHit)(ref rayHit)).distance}"); Vector3 point = ((RaycastHit)(ref rayHit)).point; if (Physics.Raycast(abdomen.position, Vector3.down, ref rayHit, 10f, StartOfRound.Instance.collidersAndRoomMask)) { Vector3 startPosition = ((RaycastHit)(ref rayHit)).point + Vector3.up * 0.2f; SpawnWebTrapServerRpc(startPosition, point); } } return false; } [ServerRpc] public void SpawnWebTrapServerRpc(Vector3 startPosition, Vector3 endPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //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_00dc: 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(315445242u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref endPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 315445242u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SpawnWebTrapClientRpc(startPosition, endPosition); } } [ClientRpc] public void SpawnWebTrapClientRpc(Vector3 startPosition, Vector3 endPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2775335651u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref endPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2775335651u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate(webTrapPrefab, startPosition, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform); val3.transform.LookAt(endPosition); VelvetWebScript componentInChildren = val3.GetComponentInChildren(); webTraps.Add(componentInChildren); componentInChildren.trapID = webTraps.Count - 1; componentInChildren.mainScript = this; componentInChildren.zScale = Vector3.Distance(startPosition, endPosition) / 4f; } } } [ServerRpc(RequireOwnership = false)] public void PlayerTripWebServerRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) 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(104150311u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, trapID); BytePacker.WriteValueBitPacked(val2, playerNum); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 104150311u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerTripWebClientRpc(trapID, playerNum); } } } [ClientRpc] public void PlayerTripWebClientRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3281900584u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, trapID); BytePacker.WriteValueBitPacked(val2, playerNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3281900584u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerNum]; if (webTraps.Count - 1 >= trapID && val3.isPlayerControlled) { webTraps[trapID].webAudio.Play(); webTraps[trapID].webAudio.PlayOneShot(hitWebSFX); if ((Object)(object)webTraps[trapID].currentTrappedPlayer != (Object)null) { webTraps[trapID].currentTrappedPlayer = val3; } if (((NetworkBehaviour)this).IsOwner) { TriggerChaseWithPlayer(val3); } } } private void ChasePlayer(PlayerControllerB player) { if (((NetworkBehaviour)this).IsOwner && ((EnemyAI)this).PlayerIsTargetable(player, false, false, true)) { TriggerChaseWithPlayer(player); } } [ServerRpc(RequireOwnership = false)] public void BreakWebServerRpc(int trapID, int playerWhoHit) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) 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(3531535527u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, trapID); BytePacker.WriteValueBitPacked(val2, playerWhoHit); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3531535527u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Vector3 position = webTraps[trapID].centerOfWeb.position; BreakWebClientRpc(position, trapID); ChasePlayer(StartOfRound.Instance.allPlayerScripts[playerWhoHit]); } } } [ClientRpc] public void BreakWebClientRpc(Vector3 webPosition, int trapID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2834332353u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref webPosition); BytePacker.WriteValueBitPacked(val2, trapID); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2834332353u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; AudioSource.PlayClipAtPoint(breakWebSFX, webPosition); RemoveWeb(trapID); } } } private void RemoveWeb(int trapID) { if ((Object)(object)webTraps[trapID].currentTrappedPlayer != (Object)null) { if ((Object)(object)webTraps[trapID].currentTrappedPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerControllerB currentTrappedPlayer = webTraps[trapID].currentTrappedPlayer; currentTrappedPlayer.isMovementHindered--; PlayerControllerB currentTrappedPlayer2 = webTraps[trapID].currentTrappedPlayer; currentTrappedPlayer2.hinderedMultiplier *= 0.5f; } webTraps[trapID].currentTrappedPlayer = null; } Object.Destroy((Object)(object)((Component)((Component)webTraps[trapID]).gameObject.transform.parent).gameObject); for (int i = 0; i < webTraps.Count; i++) { if (i > trapID) { webTraps[i].trapID--; } } webTraps.RemoveAt(trapID); } public void TriggerChaseWithPlayer(PlayerControllerB playerScript) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_007c: Unknown result type (might be due to invalid IL or missing references) if ((base.currentBehaviourStateIndex != 2 || watchFromDistance) && (base.currentBehaviourStateIndex != 1 || !((Object)(object)currentlyHeldBody != (Object)null) || !spooledPlayerBody) && !((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)playerScript).transform.position, false, false, false) && (Vector3.Distance(((Component)playerScript).transform.position, homeNode.position) < 25f || Vector3.Distance(((Component)playerScript).transform.position, meshContainer.position) < 15f)) { watchFromDistance = false; base.targetPlayer = playerScript; chaseTimer = 12.5f; ((EnemyAI)this).SwitchToBehaviourState(2); } } [ServerRpc(RequireOwnership = false)] public void PlayerLeaveWebServerRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) 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(1893716041u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, trapID); BytePacker.WriteValueBitPacked(val2, playerNum); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1893716041u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerLeaveWebClientRpc(trapID, playerNum); } } } [ClientRpc] public void PlayerLeaveWebClientRpc(int trapID, int playerNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1433906016u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, trapID); BytePacker.WriteValueBitPacked(val2, playerNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1433906016u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)webTraps[trapID].currentTrappedPlayer == (Object)(object)StartOfRound.Instance.allPlayerScripts[playerNum]) { webTraps[trapID].currentTrappedPlayer = null; webTraps[trapID].webAudio.Stop(); } } } public override void OnCollideWithPlayer(Collider other) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!base.isEnemyDead && !onWall) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, spoolingPlayerBody, false); if ((Object)(object)val != (Object)null && timeSinceHittingPlayer > 1f) { timeSinceHittingPlayer = 0f; val.DamagePlayer(playerDamage, true, true, causeOfDeath, 0, false, default(Vector3)); HitPlayerServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } 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) { base.creatureSFX.PlayOneShot(hitSpiderSFX, 1f); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, hitSpiderSFX, 1f); base.enemyHP -= force; if (base.enemyHP <= 0) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } else if (((NetworkBehaviour)this).IsOwner) { TriggerChaseWithPlayer(playerWhoHit); } } } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(destroy); CancelSpoolingBody(); overrideAnimation = 1f; } [ServerRpc(RequireOwnership = false)] public void HitPlayerServerRpc(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) //IL_00ce: 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(1012861003u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1012861003u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitPlayerClientRpc(playerId); } } } [ClientRpc] public void HitPlayerClientRpc(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) //IL_00ce: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3439152588u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3439152588u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger("attack"); overrideAnimation = 0.8f; base.creatureSFX.PlayOneShot(attackSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, attackSFX, 1f); } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1759321646u, new RpcReceiveHandler(__rpc_handler_1759321646), "SpiderTurnBodyIntoWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(1006255886u, new RpcReceiveHandler(__rpc_handler_1006255886), "SpiderTurnBodyIntoWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(1948636873u, new RpcReceiveHandler(__rpc_handler_1948636873), "SpiderHangBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2284725053u, new RpcReceiveHandler(__rpc_handler_2284725053), "SpiderHangBodyClientRpc"); ((NetworkBehaviour)this).__registerRpc(3221110976u, new RpcReceiveHandler(__rpc_handler_3221110976), "GrabBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3870022479u, new RpcReceiveHandler(__rpc_handler_3870022479), "GrabBodyClientRpc"); ((NetworkBehaviour)this).__registerRpc(2482066042u, new RpcReceiveHandler(__rpc_handler_2482066042), "SyncMeshContainerPositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(2217823249u, new RpcReceiveHandler(__rpc_handler_2217823249), "SyncMeshContainerPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(315445242u, new RpcReceiveHandler(__rpc_handler_315445242), "SpawnWebTrapServerRpc"); ((NetworkBehaviour)this).__registerRpc(2775335651u, new RpcReceiveHandler(__rpc_handler_2775335651), "SpawnWebTrapClientRpc"); ((NetworkBehaviour)this).__registerRpc(104150311u, new RpcReceiveHandler(__rpc_handler_104150311), "PlayerTripWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(3281900584u, new RpcReceiveHandler(__rpc_handler_3281900584), "PlayerTripWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(3531535527u, new RpcReceiveHandler(__rpc_handler_3531535527), "BreakWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(2834332353u, new RpcReceiveHandler(__rpc_handler_2834332353), "BreakWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(1893716041u, new RpcReceiveHandler(__rpc_handler_1893716041), "PlayerLeaveWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(1433906016u, new RpcReceiveHandler(__rpc_handler_1433906016), "PlayerLeaveWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(1012861003u, new RpcReceiveHandler(__rpc_handler_1012861003), "HitPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3439152588u, new RpcReceiveHandler(__rpc_handler_3439152588), "HitPlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1759321646(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SpiderTurnBodyIntoWebServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1006255886(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SpiderTurnBodyIntoWebClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1948636873(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SpiderHangBodyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2284725053(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SpiderHangBodyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3221110976(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).GrabBodyServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3870022479(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).GrabBodyClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2482066042(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 syncPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncPosition); Vector3 syncRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SyncMeshContainerPositionServerRpc(syncPosition, syncRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2217823249(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 syncPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncPosition); Vector3 syncRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SyncMeshContainerPositionClientRpc(syncPosition, syncRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_315445242(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 startPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startPosition); Vector3 endPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref endPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SpawnWebTrapServerRpc(startPosition, endPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2775335651(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 startPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startPosition); Vector3 endPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref endPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).SpawnWebTrapClientRpc(startPosition, endPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_104150311(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).PlayerTripWebServerRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3281900584(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).PlayerTripWebClientRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3531535527(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerWhoHit = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).BreakWebServerRpc(trapID, playerWhoHit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2834332353(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: 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) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 webPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref webPosition); int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).BreakWebClientRpc(webPosition, trapID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1893716041(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).PlayerLeaveWebServerRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1433906016(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int trapID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref trapID); int playerNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerNum); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).PlayerLeaveWebClientRpc(trapID, playerNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1012861003(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).HitPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3439152588(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VelvetAI)(object)target).HitPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "VelvetAI"; } } public class VelvetWebScript : MonoBehaviour, IHittable { public VelvetAI mainScript; private bool hinderingLocalPlayer; public PlayerControllerB currentTrappedPlayer; public Transform leftBone; public Transform rightBone; public Transform centerOfWeb; public int trapID; public float zScale = 1f; public AudioSource webAudio; private bool webHasBeenBroken; public bool Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (!webHasBeenBroken) { webHasBeenBroken = true; mainScript.BreakWebServerRpc(trapID, (int)playerWhoHit.playerClientId); } return true; } private void OnEnable() { ((UnityEvent)(object)StartOfRound.Instance.playerTeleportedEvent).AddListener((UnityAction)PlayerLeaveWeb); } private void OnDisable() { ((UnityEvent)(object)StartOfRound.Instance.playerTeleportedEvent).RemoveListener((UnityAction)PlayerLeaveWeb); PlayerLeaveWeb(GameNetworkManager.Instance.localPlayerController); } private void OnDestroy() { PlayerLeaveWeb(GameNetworkManager.Instance.localPlayerController); } public void Update() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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) if ((Object)(object)currentTrappedPlayer != (Object)null) { CallPlayerLeaveWebOnDeath(); if ((Object)(object)currentTrappedPlayer != (Object)null) { Vector3 val = ((Component)currentTrappedPlayer).transform.position + Vector3.up * 0.6f; rightBone.LookAt(val); leftBone.LookAt(val); } } else { rightBone.LookAt(centerOfWeb); leftBone.LookAt(centerOfWeb); } ((Component)this).transform.localScale = Vector3.Lerp(((Component)this).transform.localScale, new Vector3(1f, 1f, zScale), 8f * Time.deltaTime); } private void Awake() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = new Vector3(0.7f, 0.7f, 0.02f); } private void CallPlayerLeaveWebOnDeath() { if (!((Object)(object)NetworkManager.Singleton != (Object)null)) { return; } if (NetworkManager.Singleton.IsHost && !currentTrappedPlayer.isPlayerControlled && !currentTrappedPlayer.isPlayerDead) { mainScript.PlayerLeaveWebServerRpc(trapID, (int)currentTrappedPlayer.playerClientId); currentTrappedPlayer = null; } else if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)currentTrappedPlayer && (GameNetworkManager.Instance.localPlayerController.isPlayerDead || !GameNetworkManager.Instance.localPlayerController.isInsideFactory)) { PlayerControllerB obj = currentTrappedPlayer; obj.isMovementHindered--; if (GameNetworkManager.Instance.localPlayerController.isPlayerDead) { currentTrappedPlayer.hinderedMultiplier = 1f; } else { currentTrappedPlayer.hinderedMultiplier = Mathf.Clamp(currentTrappedPlayer.hinderedMultiplier * 0.4f, 0.25f, 100f); } hinderingLocalPlayer = false; mainScript.PlayerLeaveWebServerRpc(trapID, (int)currentTrappedPlayer.playerClientId); currentTrappedPlayer = null; } } private void OnTriggerStay(Collider other) { if ((Object)(object)GameNetworkManager.Instance == (Object)null || hinderingLocalPlayer) { return; } PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController) { component.isMovementHindered++; component.hinderedMultiplier *= 2.5f; hinderingLocalPlayer = true; if ((Object)(object)currentTrappedPlayer == (Object)null) { currentTrappedPlayer = GameNetworkManager.Instance.localPlayerController; } if ((Object)(object)mainScript != (Object)null) { mainScript.PlayerTripWebServerRpc(trapID, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } private void PlayerLeaveWeb(PlayerControllerB playerScript) { if (hinderingLocalPlayer) { hinderingLocalPlayer = false; playerScript.isMovementHindered--; playerScript.hinderedMultiplier *= 0.4f; if ((Object)(object)currentTrappedPlayer == (Object)(object)playerScript) { currentTrappedPlayer = null; } webAudio.Stop(); if ((Object)(object)mainScript != (Object)null) { mainScript.PlayerLeaveWebServerRpc(trapID, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } private void OnTriggerExit(Collider other) { if (hinderingLocalPlayer) { PlayerControllerB component = ((Component)other).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerLeaveWeb(component); } } } } public class GunShellItem : GrabbableObject { public int ammoType; protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GunShellItem"; } } public class PumpGunItem : GrabbableObject { [CompilerGenerated] private sealed class d__58 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float effectSeverity; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__58(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.6f); <>1__state = 1; return true; case 1: <>1__state = -1; SoundManager.Instance.earsRingingTimer = effectSeverity; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__65 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PumpGunItem <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__65(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Expected O, but got Unknown //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown int num = <>1__state; PumpGunItem pumpGunItem = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; pumpGunItem.isReloading = true; if (pumpGunItem.shellsLoaded <= 0) { ((GrabbableObject)pumpGunItem).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", true); ((Renderer)pumpGunItem.shotgunShellLeft).enabled = false; ((Renderer)pumpGunItem.shotgunShellRight).enabled = false; } else { ((GrabbableObject)pumpGunItem).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", true); ((Renderer)pumpGunItem.shotgunShellRight).enabled = false; } <>2__current = (object)new WaitForSeconds(0.3f); <>1__state = 1; return true; case 1: <>1__state = -1; pumpGunItem.gunAudio.PlayOneShot(pumpGunItem.gunReloadSFX); pumpGunItem.gunAnimator.SetBool("Reloading", true); pumpGunItem.ReloadGunEffectsServerRpc(); <>2__current = (object)new WaitForSeconds(0.95f); <>1__state = 2; return true; case 2: <>1__state = -1; ((Renderer)pumpGunItem.shotgunShellInHand).enabled = true; pumpGunItem.shotgunShellInHandTransform.SetParent(((GrabbableObject)pumpGunItem).playerHeldBy.leftHandItemTarget); pumpGunItem.shotgunShellInHandTransform.localPosition = new Vector3(-0.0555f, 0.1469f, -0.0655f); pumpGunItem.shotgunShellInHandTransform.localEulerAngles = new Vector3(-1.956f, 143.856f, -16.427f); <>2__current = (object)new WaitForSeconds(0.95f); <>1__state = 3; return true; case 3: <>1__state = -1; ((GrabbableObject)pumpGunItem).playerHeldBy.DestroyItemInSlotAndSync(pumpGunItem.ammoSlotToUse); pumpGunItem.ammoSlotToUse = -1; pumpGunItem.shellsLoaded = Mathf.Clamp(pumpGunItem.shellsLoaded + pumpGunItem.roundsLoadedPerAmmoUsed, 0, pumpGunItem.maxAmmo); ((Renderer)pumpGunItem.shotgunShellLeft).enabled = true; if (pumpGunItem.shellsLoaded == pumpGunItem.maxAmmo) { ((Renderer)pumpGunItem.shotgunShellRight).enabled = true; } ((Renderer)pumpGunItem.shotgunShellInHand).enabled = false; pumpGunItem.shotgunShellInHandTransform.SetParent(((Component)pumpGunItem).transform); <>2__current = (object)new WaitForSeconds(0.45f); <>1__state = 4; return true; case 4: <>1__state = -1; pumpGunItem.gunAudio.PlayOneShot(pumpGunItem.gunReloadFinishSFX); pumpGunItem.gunAnimator.SetBool("Reloading", false); ((GrabbableObject)pumpGunItem).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", false); ((GrabbableObject)pumpGunItem).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", false); pumpGunItem.isReloading = false; pumpGunItem.ReloadGunEffectsServerRpc(start: false); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public int gunCompatibleAmmoID = 69; public bool isReloading; public int shellsLoaded; public Animator gunAnimator; public AudioSource gunAudio; public AudioSource gunShootAudio; public AudioSource gunBulletsRicochetAudio; private Coroutine gunCoroutine; public AudioClip[] gunShootSFX; public AudioClip gunReloadSFX; public AudioClip gunReloadFinishSFX; public AudioClip noAmmoSFX; public AudioClip gunSafetySFX; public AudioClip switchSafetyOnSFX; public AudioClip switchSafetyOffSFX; public bool safetyOn; private float misfireTimer = 30f; private bool hasHitGroundWithSafetyOff = true; private int ammoSlotToUse = -1; private bool localClientSendingShootGunRPC; private PlayerControllerB previousPlayerHeldBy; public ParticleSystem gunShootParticle; public Transform shotgunRayPoint; public MeshRenderer shotgunShellLeft; public MeshRenderer shotgunShellRight; public MeshRenderer shotgunShellInHand; public Transform shotgunShellInHandTransform; private RaycastHit[] enemyColliders; private EnemyAI heldByEnemy; [Header("Player Modular damages")] [Tooltip("How much damages is dealt when in close range")] public int closeDamage; [Tooltip("How much damages is dealt when in mid range")] public int midDamage; [Tooltip("How much damages is dealt when in far range")] public int farDamage; [Tooltip("How far is close range")] public float closeRange; public float closeRangeRingingSeverity = 0.6f; [Tooltip("How far is mid range")] public float midRange; public float midRangeRingingSeverity = 0.3f; [Tooltip("How far is far range")] public float farRange; [Header("Enemy Modular Damages")] public int closeEDamage; public int midEDamage; public int farEDamage; public float closeERange; public float midERange; public float farERange; [Header("Reloading stuff")] public int maxAmmo; public int roundsLoadedPerAmmoUsed; [SerializeField] [Range(0f, 100f)] public int misfireChance = 5; public override void Start() { ((GrabbableObject)this).Start(); misfireTimer = 30f; hasHitGroundWithSafetyOff = true; } public override int GetItemDataToSave() { ((GrabbableObject)this).GetItemDataToSave(); return shellsLoaded; } public override void LoadItemSaveData(int saveData) { ((GrabbableObject)this).LoadItemSaveData(saveData); safetyOn = true; shellsLoaded = saveData; } public override void Update() { ((GrabbableObject)this).Update(); if (!((NetworkBehaviour)this).IsOwner || shellsLoaded <= 0 || isReloading || (Object)(object)heldByEnemy != (Object)null || base.isPocketed) { return; } if (base.hasHitGround && !safetyOn && !hasHitGroundWithSafetyOff && !base.isHeld) { if (misfireChance != 0 && Random.Range(0, 100) <= misfireChance) { ShootGunAndSync(heldByPlayer: false); } hasHitGroundWithSafetyOff = true; } else if (!safetyOn && misfireTimer <= 0f && !StartOfRound.Instance.inShipPhase) { if (Random.Range(0, 100) < 4) { ShootGunAndSync(base.isHeld); } if (Random.Range(0, 100) < 5) { misfireTimer = 2f; } else { misfireTimer = Random.Range(28f, 50f); } } else if (!safetyOn) { misfireTimer -= Time.deltaTime; } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); previousPlayerHeldBy = base.playerHeldBy; previousPlayerHeldBy.equippedUsableItemQE = true; hasHitGroundWithSafetyOff = false; } public override void GrabItemFromEnemy(EnemyAI enemy) { ((GrabbableObject)this).GrabItemFromEnemy(enemy); heldByEnemy = enemy; hasHitGroundWithSafetyOff = false; } public override void DiscardItemFromEnemy() { ((GrabbableObject)this).DiscardItemFromEnemy(); heldByEnemy = null; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!isReloading) { if (shellsLoaded < 1) { StartReloadGun(); } else if (safetyOn) { gunAudio.PlayOneShot(gunSafetySFX); } else if (((NetworkBehaviour)this).IsOwner) { ShootGunAndSync(heldByPlayer: true); } } } public void ShootGunAndSync(bool heldByPlayer) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0009: 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) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) Vector3 shotgunPosition; Vector3 forward; if (!heldByPlayer) { shotgunPosition = shotgunRayPoint.position; forward = shotgunRayPoint.forward; } else { shotgunPosition = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position - ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.up * 0.45f; forward = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward; } Debug.Log((object)"Calling shoot gun...."); ShootGun(shotgunPosition, forward); Debug.Log((object)"Calling shoot gun and sync"); localClientSendingShootGunRPC = true; ShootGunServerRpc(shotgunPosition, forward); } [ServerRpc(RequireOwnership = false)] public void ShootGunServerRpc(Vector3 shotgunPosition, Vector3 shotgunForward) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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(1661015780u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1661015780u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ShootGunClientRpc(shotgunPosition, shotgunForward); } } } [ClientRpc] public void ShootGunClientRpc(Vector3 shotgunPosition, Vector3 shotgunForward) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2113997267u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2113997267u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Debug.Log((object)"Shoot gun client rpc received"); if (localClientSendingShootGunRPC) { localClientSendingShootGunRPC = false; Debug.Log((object)"localClientSendingShootGunRPC was true"); } else { ShootGun(shotgunPosition, shotgunForward); } } } public void ShootGun(Vector3 shotgunPosition, Vector3 shotgunForward) { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) isReloading = false; bool flag = false; if (base.isHeld && (Object)(object)base.playerHeldBy != (Object)null && (Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { base.playerHeldBy.playerBodyAnimator.SetTrigger("ShootShotgun"); flag = true; } RoundManager.PlayRandomClip(gunShootAudio, gunShootSFX, true, 1f, 1840, 1000); WalkieTalkie.TransmitOneShotAudio(gunShootAudio, gunShootSFX[0], 1f); gunShootParticle.Play(true); shellsLoaded = Mathf.Clamp(shellsLoaded - 1, 0, maxAmmo); PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return; } float num = Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)shotgunRayPoint).transform.position); bool flag2 = false; int num2 = 0; float num3 = 0f; Vector3 val = localPlayerController.playerCollider.ClosestPoint(shotgunPosition); if (!flag && !Physics.Linecast(shotgunPosition, val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && Vector3.Angle(shotgunForward, val - shotgunPosition) < 30f) { flag2 = true; } if (num < closeRange) { num3 = closeRangeRingingSeverity; HUDManager.Instance.ShakeCamera((ScreenShakeType)1); num2 = closeDamage; } else if (num < midRange) { num3 = midRangeRingingSeverity; HUDManager.Instance.ShakeCamera((ScreenShakeType)0); num2 = midDamage; } else if (num < farRange) { num2 = farDamage; } if (num3 > 0f && SoundManager.Instance.timeSinceEarsStartedRinging > 16f) { ((MonoBehaviour)this).StartCoroutine(delayedEarsRinging(num3)); } Ray val2 = default(Ray); ((Ray)(ref val2))..ctor(shotgunPosition, shotgunForward); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, ref val3, 30f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { ((Component)gunBulletsRicochetAudio).transform.position = ((Ray)(ref val2)).GetPoint(((RaycastHit)(ref val3)).distance - 0.5f); gunBulletsRicochetAudio.Play(); } if (flag2) { localPlayerController.DamagePlayer(num2, true, true, (CauseOfDeath)7, 0, false, shotgunRayPoint.forward * 30f); } if (!((NetworkBehaviour)this).IsOwner) { return; } if (enemyColliders == null) { enemyColliders = (RaycastHit[])(object)new RaycastHit[10]; } ((Ray)(ref val2))..ctor(shotgunPosition - shotgunForward * 10f, shotgunForward); int num4 = Physics.SphereCastNonAlloc(val2, 5f, enemyColliders, farERange, 524288, (QueryTriggerInteraction)2); List list = new List(); IHittable val4 = default(IHittable); for (int i = 0; i < num4; i++) { if (!Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref enemyColliders[i])).transform).GetComponent())) { continue; } EnemyAI mainScript = ((Component)((RaycastHit)(ref enemyColliders[i])).transform).GetComponent().mainScript; if ((Object)(object)heldByEnemy != (Object)null && (Object)(object)heldByEnemy == (Object)(object)mainScript) { continue; } if (((RaycastHit)(ref enemyColliders[i])).distance == 0f) { Debug.Log((object)"Spherecast started inside enemy collider"); } else if (!Physics.Linecast(shotgunPosition, ((RaycastHit)(ref enemyColliders[i])).point, ref val3, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && ((Component)((RaycastHit)(ref enemyColliders[i])).transform).TryGetComponent(ref val4)) { float num5 = Vector3.Distance(shotgunPosition, ((RaycastHit)(ref enemyColliders[i])).point); int num6 = ((num5 < closeERange) ? closeEDamage : ((!(num5 < farERange)) ? farEDamage : midEDamage)); if (num5 < closeERange) { num6 = closeEDamage; } else if (num5 >= closeERange && num5 < midERange) { num6 = midEDamage; } else if (num5 >= midERange && num5 < farERange) { num6 = farEDamage; } EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref enemyColliders[i])).collider).GetComponent(); if ((!((Object)(object)component != (Object)null) || (!((Object)(object)component.mainScript == (Object)null) && !list.Contains(component.mainScript))) && val4.Hit(num6, shotgunForward, base.playerHeldBy, true, -1) && (Object)(object)component != (Object)null) { list.Add(component.mainScript); } } } } [IteratorStateMachine(typeof(d__58))] private IEnumerator delayedEarsRinging(float effectSeverity) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__58(0) { effectSeverity = effectSeverity }; } public override void ItemInteractLeftRight(bool right) { ((GrabbableObject)this).ItemInteractLeftRight(right); if ((Object)(object)base.playerHeldBy == (Object)null) { return; } Debug.Log((object)$"r/l activate: {right}"); if (!right) { if (safetyOn) { safetyOn = false; gunAudio.PlayOneShot(switchSafetyOffSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, switchSafetyOffSFX, 1f); SetSafetyControlTip(); } else { safetyOn = true; gunAudio.PlayOneShot(switchSafetyOnSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, switchSafetyOnSFX, 1f); SetSafetyControlTip(); } base.playerHeldBy.playerBodyAnimator.SetTrigger("SwitchGunSafety"); } else if (!isReloading && shellsLoaded < maxAmmo) { StartReloadGun(); } } public override void SetControlTipsForItem() { string[] toolTips = base.itemProperties.toolTips; if (toolTips.Length <= 2) { Debug.LogError((object)"Shotgun control tips array length is too short to set tips!"); return; } if (safetyOn) { toolTips[2] = "Turn safety off: [Q]"; } else { toolTips[2] = "Turn safety on: [Q]"; } HUDManager.Instance.ChangeControlTipMultiple(toolTips, true, base.itemProperties); } private void SetSafetyControlTip() { string text = ((!safetyOn) ? "Turn safety on: [Q]" : "Turn safety off: [Q]"); if (((NetworkBehaviour)this).IsOwner) { HUDManager.Instance.ChangeControlTip(3, text, false); } } private void StartReloadGun() { if (ReloadedGun()) { if (((NetworkBehaviour)this).IsOwner) { if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } gunCoroutine = ((MonoBehaviour)this).StartCoroutine(reloadGunAnimation()); } } else { gunAudio.PlayOneShot(noAmmoSFX); } } [ServerRpc] public void ReloadGunEffectsServerRpc(bool start = true) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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(3831630387u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3831630387u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReloadGunEffectsClientRpc(start); } } [ClientRpc] public void ReloadGunEffectsClientRpc(bool start = true) { //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) //IL_00dc: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(144910270u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 144910270u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { if (start) { gunAudio.PlayOneShot(gunReloadSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, gunReloadSFX, 1f); gunAnimator.SetBool("Reloading", true); isReloading = true; } else { shellsLoaded = Mathf.Clamp(shellsLoaded + roundsLoadedPerAmmoUsed, 0, maxAmmo); gunAudio.PlayOneShot(gunReloadFinishSFX); gunAnimator.SetBool("Reloading", false); isReloading = false; } } } [IteratorStateMachine(typeof(d__65))] private IEnumerator reloadGunAnimation() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__65(0) { <>4__this = this }; } private bool ReloadedGun() { int num = FindAmmoInInventory(); if (num == -1) { Debug.Log((object)"not reloading"); return false; } Debug.Log((object)"reloading!"); ammoSlotToUse = num; return true; } private int FindAmmoInInventory() { for (int i = 0; i < base.playerHeldBy.ItemSlots.Length; i++) { if (!((Object)(object)base.playerHeldBy.ItemSlots[i] == (Object)null)) { GrabbableObject obj = base.playerHeldBy.ItemSlots[i]; GunAmmo val = (GunAmmo)(object)((obj is GunAmmo) ? obj : null); if ((Object)(object)val != (Object)null && val.ammoType == gunCompatibleAmmoID) { return i; } } } if ((Object)(object)base.playerHeldBy.ItemOnlySlot != (Object)null) { GrabbableObject itemOnlySlot = base.playerHeldBy.ItemOnlySlot; GunAmmo val2 = (GunAmmo)(object)((itemOnlySlot is GunAmmo) ? itemOnlySlot : null); if ((Object)(object)val2 != (Object)null && val2.ammoType == gunCompatibleAmmoID) { return 50; } } return -1; } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); StopUsingGun(); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); StopUsingGun(); } private void StopUsingGun() { previousPlayerHeldBy.equippedUsableItemQE = false; if (isReloading) { if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } gunAnimator.SetBool("Reloading", false); gunAudio.Stop(); if ((Object)(object)previousPlayerHeldBy != (Object)null) { previousPlayerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", false); previousPlayerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", false); } ((Renderer)shotgunShellInHand).enabled = false; shotgunShellInHandTransform.SetParent(((Component)this).transform); isReloading = false; } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1661015780u, new RpcReceiveHandler(__rpc_handler_1661015780), "ShootGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(2113997267u, new RpcReceiveHandler(__rpc_handler_2113997267), "ShootGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(3831630387u, new RpcReceiveHandler(__rpc_handler_3831630387), "ReloadGunEffectsServerRpc"); ((NetworkBehaviour)this).__registerRpc(144910270u, new RpcReceiveHandler(__rpc_handler_144910270), "ReloadGunEffectsClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1661015780(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 shotgunPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunPosition); Vector3 shotgunForward = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)1; ((PumpGunItem)(object)target).ShootGunServerRpc(shotgunPosition, shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2113997267(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 shotgunPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunPosition); Vector3 shotgunForward = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)1; ((PumpGunItem)(object)target).ShootGunClientRpc(shotgunPosition, shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3831630387(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { bool start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PumpGunItem)(object)target).ReloadGunEffectsServerRpc(start); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_144910270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((PumpGunItem)(object)target).ReloadGunEffectsClientRpc(start); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "PumpGunItem"; } } public class SprayOrPlantReaperItem : GrabbableObject { public AudioSource sprayAudio; public AudioClip spraySFX; public AudioClip sprayNeedsShakingSFX; public AudioClip sprayStart; public AudioClip sprayStop; public AudioClip sprayCanEmptySFX; public AudioClip sprayCanNeedsShakingSFX; public AudioClip sprayCanShakeEmptySFX; public AudioClip[] sprayCanShakeSFX; public ParticleSystem sprayParticle; public ParticleSystem sprayCanNeedsShakingParticle; private bool isSpraying; private float sprayInterval; public float sprayIntervalSpeed = 0.2f; private Vector3 previousSprayPosition; public static List sprayPaintDecals = new List(); public static int sprayPaintDecalsIndex; public GameObject sprayPaintPrefab; public int maxSprayPaintDecals = 1000; [SerializeField] private float sprayCanTank = 1f; private float sprayCanShakeMeter; public static DecalProjector previousSprayDecal; private float shakingCanTimer; private bool tryingToUseEmptyCan; public Material[] sprayCanMats; public Material[] particleMats; private int sprayCanMatsIndex; private RaycastHit sprayHit; public bool debugSprayPaint; private int addSprayPaintWithFrameDelay; private DecalProjector delayedSprayPaintDecal; private int sprayPaintMask = 605030721; private bool makingAudio; private float audioInterval; [Space(5f)] public bool isWeedKillerSprayBottle; private Collider[] weedColliders; [SerializeField] private float addVehicleHPInterval; private MoldSpreadManager moldManager; private (int batchNum, int positionIndex) killingWeed; private (int batchNum, int positionIndex, int plantType) killingCadaverPlant; private CadaverGrowthAI cadaverGrowthAI; private float sprayOnPlayerMeter; private bool healingPlayerInfection; public float moldKillingRate = 1.7f; public float cadaverKillingRate = 2.2f; public override void Start() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Start(); weedColliders = (Collider[])(object)new Collider[3]; sprayHit = default(RaycastHit); killingWeed = (-1, -1); killingCadaverPlant = (-1, -1, -1); if (isWeedKillerSprayBottle) { moldManager = Object.FindObjectOfType(); return; } Random random = new Random(StartOfRound.Instance.randomMapSeed + 151); sprayCanMatsIndex = random.Next(0, sprayCanMats.Length); ((Renderer)((Component)sprayParticle).GetComponent()).material = particleMats[sprayCanMatsIndex]; ((Renderer)((Component)sprayCanNeedsShakingParticle).GetComponent()).material = particleMats[sprayCanMatsIndex]; } public override void LoadItemSaveData(int saveData) { ((GrabbableObject)this).LoadItemSaveData(saveData); sprayCanTank = (float)saveData / 100f; } public override int GetItemDataToSave() { return (int)(sprayCanTank * 100f); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); base.playerHeldBy.equippedUsableItemQE = true; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { Debug.Log((object)"Start using spray"); if (sprayCanTank <= 0f || sprayCanShakeMeter <= 0f) { Debug.Log((object)"Spray empty"); if (isSpraying) { StopSpraying(); } PlayCanEmptyEffect(sprayCanTank <= 0f); } else { Debug.Log((object)"Spray not empty"); StartSpraying(); } return; } Debug.Log((object)"Stop using spray"); if (tryingToUseEmptyCan) { addVehicleHPInterval = 0f; tryingToUseEmptyCan = false; sprayAudio.Stop(); sprayCanNeedsShakingParticle.Stop(true, (ParticleSystemStopBehavior)1); } if (isWeedKillerSprayBottle) { sprayCanShakeMeter = 1f; } if (isSpraying) { StopSpraying(); } } private void PlayCanEmptyEffect(bool isEmpty) { if (tryingToUseEmptyCan) { return; } tryingToUseEmptyCan = true; if (!isEmpty) { if (sprayCanNeedsShakingParticle.isPlaying) { sprayCanNeedsShakingParticle.Stop(true, (ParticleSystemStopBehavior)0); } sprayCanNeedsShakingParticle.Play(); sprayAudio.clip = sprayNeedsShakingSFX; sprayAudio.Play(); } else { sprayAudio.PlayOneShot(sprayCanEmptySFX); } } public override void ItemInteractLeftRight(bool right) { ((GrabbableObject)this).ItemInteractLeftRight(right); Debug.Log((object)$"interact {right} ; {(Object)(object)base.playerHeldBy == (Object)null}; {isSpraying}"); if (!isWeedKillerSprayBottle && !right && !((Object)(object)base.playerHeldBy == (Object)null) && !isSpraying) { if (sprayCanTank <= 0f) { sprayAudio.PlayOneShot(sprayCanShakeEmptySFX); WalkieTalkie.TransmitOneShotAudio(sprayAudio, sprayCanShakeEmptySFX, 1f); } else { RoundManager.PlayRandomClip(sprayAudio, sprayCanShakeSFX, true, 1f, 0, 1000); WalkieTalkie.TransmitOneShotAudio(sprayAudio, sprayCanShakeEmptySFX, 1f); } base.playerHeldBy.playerBodyAnimator.SetTrigger("shakeItem"); sprayCanShakeMeter = Mathf.Min(sprayCanShakeMeter + 0.15f, 1f); } } public static Vector3 ExtractScaleFromMatrix(Matrix4x4 matrix) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) Vector3 val = new Vector3(matrix.m00, matrix.m10, matrix.m20); float magnitude = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m01, matrix.m11, matrix.m21); float magnitude2 = ((Vector3)(ref val)).magnitude; val = new Vector3(matrix.m02, matrix.m12, matrix.m22); float magnitude3 = ((Vector3)(ref val)).magnitude; return new Vector3(magnitude, magnitude2, magnitude3); } public static Matrix4x4 ResizeMatrix(Matrix4x4 yourMatrix, float shrinkSpeed, bool shrink = true) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 val = yourMatrix; Vector3 val2 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(3)); Vector3 val3 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(0)); Vector3 val4 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(1)); Vector3 val5 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(2)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; float num = ((!shrink) ? (1f + shrinkSpeed * Time.deltaTime) : (1f - shrinkSpeed * Time.deltaTime)); magnitude = Mathf.Clamp(magnitude * num, 0.001f, 10f); magnitude2 = Mathf.Clamp(magnitude2 * num, 0.001f, 10f); magnitude3 = Mathf.Clamp(magnitude3 * num, 0.001f, 10f); val3 = ((Vector3)(ref val3)).normalized * magnitude; val4 = ((Vector3)(ref val4)).normalized * magnitude2; val5 = ((Vector3)(ref val5)).normalized * magnitude3; Matrix4x4 identity = Matrix4x4.identity; ((Matrix4x4)(ref identity)).SetColumn(0, Vector4.op_Implicit(val3)); ((Matrix4x4)(ref identity)).SetColumn(1, Vector4.op_Implicit(val4)); ((Matrix4x4)(ref identity)).SetColumn(2, Vector4.op_Implicit(val5)); ((Matrix4x4)(ref identity)).SetColumn(3, Vector4.op_Implicit(val2)); return identity; } public static Matrix4x4 SetMatrixScale(Matrix4x4 yourMatrix, float setScale) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) Matrix4x4 val = yourMatrix; Vector3 val2 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(3)); Vector3 val3 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(0)); Vector3 val4 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(1)); Vector3 val5 = Vector4.op_Implicit(((Matrix4x4)(ref val)).GetColumn(2)); float magnitude = ((Vector3)(ref val3)).magnitude; float magnitude2 = ((Vector3)(ref val4)).magnitude; float magnitude3 = ((Vector3)(ref val5)).magnitude; magnitude = Mathf.Clamp(setScale, 0.001f, 10f); magnitude2 = Mathf.Clamp(setScale, 0.001f, 10f); magnitude3 = Mathf.Clamp(setScale, 0.001f, 10f); val3 = ((Vector3)(ref val3)).normalized * magnitude; val4 = ((Vector3)(ref val4)).normalized * magnitude2; val5 = ((Vector3)(ref val5)).normalized * magnitude3; Matrix4x4 identity = Matrix4x4.identity; ((Matrix4x4)(ref identity)).SetColumn(0, Vector4.op_Implicit(val3)); ((Matrix4x4)(ref identity)).SetColumn(1, Vector4.op_Implicit(val4)); ((Matrix4x4)(ref identity)).SetColumn(2, Vector4.op_Implicit(val5)); ((Matrix4x4)(ref identity)).SetColumn(3, Vector4.op_Implicit(val2)); return identity; } public override void LateUpdate() { //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).LateUpdate(); if (isWeedKillerSprayBottle) { Matrix4x4 val2; if (killingCadaverPlant.batchNum != -1) { if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null) { killingCadaverPlant = (-1, -1, -1); } Debug.Log((object)$"planttype:{killingCadaverPlant.plantType}, batchnum:{killingCadaverPlant.batchNum}, index:{killingCadaverPlant.positionIndex}"); Matrix4x4 val = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; if (ExtractScaleFromMatrix(val).x < 3f && ((NetworkBehaviour)this).IsOwner) { val2 = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; Vector3 position = ((Matrix4x4)(ref val2)).GetPosition(); val2 = cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex]; Debug.Log((object)$"DPosition: {((Matrix4x4)(ref val2)).GetPosition()}"); KillCadaverPlantRpc(position); cadaverGrowthAI.DestroyPlantAtPosition(position, true); killingCadaverPlant = (-1, -1, -1); } else { cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex] = ResizeMatrix(val, cadaverKillingRate); } } else if (killingWeed.batchNum != -1) { Matrix4x4 val3 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; if (ExtractScaleFromMatrix(val3).x < 0.5f && ((NetworkBehaviour)this).IsOwner) { val2 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; Vector3 position2 = ((Matrix4x4)(ref val2)).GetPosition(); KillWeedRpc(position2); moldManager.DestroyMoldAtPosition(position2, true); killingWeed = (-1, -1); } else { moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex] = ResizeMatrix(val3, moldKillingRate); } } } if (makingAudio) { if (audioInterval <= 0f) { audioInterval = 1f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 10f, 0.65f, 0, base.isInShipRoom && StartOfRound.Instance.hangarDoorsClosed, 0); } else { audioInterval -= Time.deltaTime; } } if (addSprayPaintWithFrameDelay > 1) { addSprayPaintWithFrameDelay--; } else if (addSprayPaintWithFrameDelay == 1) { addSprayPaintWithFrameDelay = 0; ((Behaviour)delayedSprayPaintDecal).enabled = true; } if (isSpraying && base.isHeld) { if (isWeedKillerSprayBottle) { sprayCanTank = Mathf.Max(sprayCanTank - Time.deltaTime / 15f, 0f); sprayCanShakeMeter = Mathf.Max(sprayCanShakeMeter - Time.deltaTime * 2f, 0f); TrySprayingWeedKillerOnLocalPlayer(); } else { sprayCanTank = Mathf.Max(sprayCanTank - Time.deltaTime / 30f, 0f); sprayCanShakeMeter = Mathf.Max(sprayCanShakeMeter - Time.deltaTime / 10f, 0f); } if (sprayCanTank <= 0f || sprayCanShakeMeter <= 0f) { isSpraying = false; StopSpraying(); PlayCanEmptyEffect(sprayCanTank <= 0f); } else { if (!((NetworkBehaviour)this).IsOwner) { return; } if (sprayInterval <= 0f) { if (isWeedKillerSprayBottle) { sprayInterval = sprayIntervalSpeed; TrySprayingWeedKillerBottle(); } else if (TrySpraying()) { sprayInterval = sprayIntervalSpeed; } else { sprayInterval = 0.037f; } } else { sprayInterval -= Time.deltaTime; } } } else if (isWeedKillerSprayBottle) { StopKillingWeedLocalClient(); StopKillingCadaverPlantLocalClient(); } } private void TrySprayingWeedKillerBottle() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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) //IL_0044: 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) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) bool flag = false; Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position - ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 0.7f; if (Physics.Raycast(val, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward, ref sprayHit, 4.5f, 1073742080, (QueryTriggerInteraction)2)) { if (addVehicleHPInterval <= 0f) { addVehicleHPInterval = 0.3f; VehicleController val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null && Vector3.Distance(((RaycastHit)(ref sprayHit)).point, val2.oilPipePoint.position) < 5f) { StopKillingWeedLocalClient(); StopKillingCadaverPlantLocalClient(); flag = true; if (val2.carHP >= val2.baseCarHP) { val2.AddTurboBoost(); } else { val2.AddEngineOil(); } } Debug.DrawRay(((RaycastHit)(ref sprayHit)).point, Vector3.up * 0.5f, Color.red, 1f); Debug.DrawLine(val, ((RaycastHit)(ref sprayHit)).point, Color.green, 5f); } else { addVehicleHPInterval -= Time.deltaTime; } } if (!flag && !StartOfRound.Instance.inShipPhase) { if (base.isInFactory) { CheckForCadaverPlantsInSprayPath(); } else { CheckForWeedsInSprayPath(); } } } private void TrySprayingWeedKillerOnLocalPlayer() { //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI != (Object)null && (Object)(object)base.playerHeldBy != (Object)null && (Object)(object)base.playerHeldBy != (Object)(object)GameNetworkManager.Instance.localPlayerController && cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected) { Vector3 position = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position; position.y = ((Component)this).transform.position.y; if (Vector3.Distance(((Component)base.playerHeldBy).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 5f && Vector3.Angle(((Component)this).transform.forward, position - ((Component)this).transform.position) < 40f) { HealPlayerInfection(cadaverGrowthAI.playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId]); } } } private void HealPlayerInfection(PlayerInfection infection) { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: 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_0085: Unknown result type (might be due to invalid IL or missing references) if (sprayOnPlayerMeter > 0.33f) { sprayOnPlayerMeter = 0f; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (infection.burstMeter > 0f) { cadaverGrowthAI.BurstFromPlayer(GameNetworkManager.Instance.localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); cadaverGrowthAI.SyncBurstFromPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); return; } GameNetworkManager.Instance.localPlayerController.DamagePlayer(8, true, true, (CauseOfDeath)5, 0, false, default(Vector3)); cadaverGrowthAI.HealInfection((int)localPlayerController.playerClientId, 0.1f); if (GameNetworkManager.Instance.localPlayerController.criticallyInjured) { sprayOnPlayerMeter = -0.2f; } } else { sprayOnPlayerMeter += Time.deltaTime; } } private bool CheckForCadaverPlantsInSprayPath() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1.8f; if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } if ((Object)(object)cadaverGrowthAI == (Object)null || ((EnemyAI)cadaverGrowthAI).isEnemyDead) { return false; } if (cadaverGrowthAI.GetAllPlantPositionsInRadius(val, 2f, true)) { float num = 2000f; int num2 = 0; int num3 = -1; for (int i = 0; i < cadaverGrowthAI.plantBatchers.Length; i++) { int length = cadaverGrowthAI.moldPositions.GetLength(0); for (int j = 0; j < length && cadaverGrowthAI.moldPositions[j, i] != -1; j++) { if (!cadaverGrowthAI.growingRecentPlant || !(cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]] == cadaverGrowthAI.recentPlantPosition)) { float num4 = Vector3.Distance(val, cadaverGrowthAI.plantBatchers[i].batchedPositions[cadaverGrowthAI.moldPositions[j, i]]); if (num4 < num) { num = num4; num2 = j; num3 = i; } } } } if (num3 == -1) { Debug.LogError((object)"Error when finding index of closest plant in batches: plant type/batch number not defined"); return false; } killingCadaverPlant = cadaverGrowthAI.plantBatchers[num3].GetWeedPositionInMatrixListForCadaverPlants(cadaverGrowthAI.moldPositions[num2, num3], num3); Debug.Log((object)$"KillingCadaverPlant returned: ({killingCadaverPlant.batchNum}, {killingCadaverPlant.positionIndex}, {killingCadaverPlant.plantType})"); SyncKillingCadaverPlantRpc(killingCadaverPlant.batchNum, killingCadaverPlant.positionIndex, killingCadaverPlant.plantType); return true; } return false; } private bool CheckForWeedsInSprayPath() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)moldManager == (Object)null) { moldManager = Object.FindObjectOfType(); } if ((Object)(object)moldManager == (Object)null) { return false; } Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1.8f; int allMoldPositionsInRadius = moldManager.GetAllMoldPositionsInRadius(val, 2f, true); if (allMoldPositionsInRadius > 0) { float num = 2000f; int num2 = 0; for (int i = 0; i < allMoldPositionsInRadius; i++) { float num3 = Vector3.Distance(val, moldManager.grassInstancer.batchedPositions[moldManager.moldPositions[i]]); if (num3 < num) { num = num3; num2 = i; } } killingWeed = moldManager.grassInstancer.GetWeedPositionInMatrixList(moldManager.moldPositions[num2]); Debug.Log((object)$"Killingweed returned: ({killingWeed.batchNum}, {killingWeed.positionIndex})"); SyncKillingWeedRpc(killingWeed.batchNum, killingWeed.positionIndex); return true; } return false; } private void StopKillingWeedLocalClient() { (int, int) tuple = killingWeed; if (tuple.Item1 != -1 || tuple.Item2 != -1) { killingWeed = (-1, -1); StopKillingWeedServerRpc(); } } private void StopKillingCadaverPlantLocalClient() { (int, int, int) tuple = killingCadaverPlant; if (tuple.Item1 != -1 || tuple.Item2 != -1 || tuple.Item3 != -1) { killingCadaverPlant = (-1, -1, -1); StopKillingCadaverPlantServerRpc(); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingWeedRpc(int batchNum, int positionIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4129227705u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, batchNum); BytePacker.WriteValueBitPacked(val3, positionIndex); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4129227705u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum, positionIndex); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncKillingCadaverPlantRpc(int batchNum, int positionIndex, int plantType) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3570167176u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, batchNum); BytePacker.WriteValueBitPacked(val3, positionIndex); BytePacker.WriteValueBitPacked(val3, plantType); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3570167176u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingCadaverPlant = (batchNum, positionIndex, plantType); } } } [ServerRpc(RequireOwnership = false)] public void StopKillingCadaverPlantServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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(1243286966u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1243286966u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopKillingWeedClientRpc(); } } } [ClientRpc] public void StopKillingCadaverPlantClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2280366152u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2280366152u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { killingCadaverPlant = (-1, -1, -1); } } } [ServerRpc(RequireOwnership = false)] public void StopKillingWeedServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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(604645147u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 604645147u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopKillingWeedClientRpc(); } } } [ClientRpc] public void StopKillingWeedClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1231491146u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1231491146u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { killingWeed = (-1, -1); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void KillWeedRpc(Vector3 destroyAtPos) { //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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1348519823u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1348519823u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (-1, -1); moldManager.DestroyMoldAtPosition(destroyAtPos, true); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void KillCadaverPlantRpc(Vector3 destroyAtPos) { //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_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: 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) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3182182487u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3182182487u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)cadaverGrowthAI == (Object)null) { cadaverGrowthAI = Object.FindObjectOfType(); } killingCadaverPlant = (-1, -1, -1); cadaverGrowthAI.DestroyPlantAtPosition(destroyAtPos, true); } } public bool TrySpraying() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) Debug.DrawRay(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward, Color.magenta, 0.05f); if (AddSprayPaintLocal(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1f, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward)) { SprayPaintServerRpc(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 1f, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward); return true; } return false; } [ServerRpc] public void SprayPaintServerRpc(Vector3 sprayPos, Vector3 sprayRot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //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_00dc: 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(1370345779u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref sprayPos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref sprayRot); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1370345779u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SprayPaintClientRpc(sprayPos, sprayRot); } } [ClientRpc] public void SprayPaintClientRpc(Vector3 sprayPos, Vector3 sprayRot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(478503261u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref sprayPos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref sprayRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 478503261u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { AddSprayPaintLocal(sprayPos, sprayRot); } } } private void ToggleSprayCollisionOnHolder(bool enable) { if ((Object)(object)base.playerHeldBy == (Object)null) { Debug.Log((object)"playerheldby is null!!!!!"); } else if (!enable) { for (int i = 0; i < base.playerHeldBy.bodyPartSpraypaintColliders.Length; i++) { base.playerHeldBy.bodyPartSpraypaintColliders[i].enabled = false; ((Component)base.playerHeldBy.bodyPartSpraypaintColliders[i]).gameObject.layer = 2; } } else { for (int j = 0; j < base.playerHeldBy.bodyPartSpraypaintColliders.Length; j++) { base.playerHeldBy.bodyPartSpraypaintColliders[j].enabled = false; ((Component)base.playerHeldBy.bodyPartSpraypaintColliders[j]).gameObject.layer = 29; } } } private bool AddSprayPaintLocal(Vector3 sprayPos, Vector3 sprayRot) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04fc: Unknown result type (might be due to invalid IL or missing references) //IL_052a: Unknown result type (might be due to invalid IL or missing references) //IL_052f: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.playerHeldBy == (Object)null) { return false; } ToggleSprayCollisionOnHolder(enable: false); if ((Object)(object)RoundManager.Instance.mapPropsContainer == (Object)null) { RoundManager.Instance.mapPropsContainer = GameObject.FindGameObjectWithTag("MapPropsContainer"); } Ray val = default(Ray); ((Ray)(ref val))..ctor(sprayPos, sprayRot); if (!Physics.Raycast(val, ref sprayHit, 7f, sprayPaintMask, (QueryTriggerInteraction)2)) { ToggleSprayCollisionOnHolder(enable: true); return false; } if (Vector3.Distance(((RaycastHit)(ref sprayHit)).point, previousSprayPosition) < 0.175f) { ToggleSprayCollisionOnHolder(enable: true); return false; } if (debugSprayPaint) { Debug.DrawRay(sprayPos, sprayRot * 7f, Color.green, 5f); } int num = -1; Transform val2; if (((Component)((RaycastHit)(ref sprayHit)).collider).gameObject.layer == 11 || ((Component)((RaycastHit)(ref sprayHit)).collider).gameObject.layer == 8 || ((Component)((RaycastHit)(ref sprayHit)).collider).gameObject.layer == 0) { val2 = ((!base.playerHeldBy.isInElevator && !StartOfRound.Instance.inShipPhase && !((Object)(object)RoundManager.Instance.mapPropsContainer == (Object)null)) ? RoundManager.Instance.mapPropsContainer.transform : StartOfRound.Instance.elevatorTransform); } else { if (debugSprayPaint) { Debug.Log((object)("spray paint parenting to this object : " + ((Object)((Component)((RaycastHit)(ref sprayHit)).collider).gameObject).name)); Debug.Log((object)$"{((Component)((RaycastHit)(ref sprayHit)).collider).tag}; {((Component)((RaycastHit)(ref sprayHit)).collider).tag.Length}"); } if (((Component)((RaycastHit)(ref sprayHit)).collider).tag.StartsWith("PlayerBody")) { switch (((Component)((RaycastHit)(ref sprayHit)).collider).tag) { case "PlayerBody": num = 0; break; case "PlayerBody1": num = 1; break; case "PlayerBody2": num = 2; break; case "PlayerBody3": num = 3; break; } if (num == (int)base.playerHeldBy.playerClientId) { ToggleSprayCollisionOnHolder(enable: true); return false; } } else if (((Component)((RaycastHit)(ref sprayHit)).collider).tag.StartsWith("PlayerRagdoll")) { switch (((Component)((RaycastHit)(ref sprayHit)).collider).tag) { case "PlayerRagdoll": num = 0; break; case "PlayerRagdoll1": num = 1; break; case "PlayerRagdoll2": num = 2; break; case "PlayerRagdoll3": num = 3; break; } } val2 = ((Component)((RaycastHit)(ref sprayHit)).collider).transform; } sprayPaintDecalsIndex = (sprayPaintDecalsIndex + 1) % maxSprayPaintDecals; DecalProjector val3 = null; GameObject val4; if (sprayPaintDecals.Count <= sprayPaintDecalsIndex) { if (debugSprayPaint) { Debug.Log((object)"Adding to spray paint decals pool"); } for (int i = 0; i < 200; i++) { if (sprayPaintDecals.Count >= maxSprayPaintDecals) { break; } val4 = Object.Instantiate(sprayPaintPrefab, val2); sprayPaintDecals.Add(val4); val3 = val4.GetComponent(); if ((Object)(object)val3.material != (Object)(object)sprayCanMats[sprayCanMatsIndex]) { val3.material = sprayCanMats[sprayCanMatsIndex]; } } } if (debugSprayPaint) { Debug.Log((object)$"Spraypaint B {sprayPaintDecals.Count}; index: {sprayPaintDecalsIndex}"); } if ((Object)(object)sprayPaintDecals[sprayPaintDecalsIndex] == (Object)null) { Debug.LogError((object)$"ERROR: spray paint at index {sprayPaintDecalsIndex} is null; creating new object in its place"); val4 = Object.Instantiate(sprayPaintPrefab, val2); sprayPaintDecals[sprayPaintDecalsIndex] = val4; } else { if (!sprayPaintDecals[sprayPaintDecalsIndex].activeSelf) { sprayPaintDecals[sprayPaintDecalsIndex].SetActive(true); } val4 = sprayPaintDecals[sprayPaintDecalsIndex]; } val3 = val4.GetComponent(); if ((Object)(object)val3.material != (Object)(object)sprayCanMats[sprayCanMatsIndex]) { val3.material = sprayCanMats[sprayCanMatsIndex]; } if (debugSprayPaint) { Debug.Log((object)$"decal player num: {num}"); } switch (num) { case 0: val3.decalLayerMask = (DecalLayerEnum)16; break; case 1: val3.decalLayerMask = (DecalLayerEnum)32; break; case 2: val3.decalLayerMask = (DecalLayerEnum)64; break; case 3: val3.decalLayerMask = (DecalLayerEnum)128; break; case -1: val3.decalLayerMask = (DecalLayerEnum)1; break; } val4.transform.position = ((Ray)(ref val)).GetPoint(((RaycastHit)(ref sprayHit)).distance - 0.1f); val4.transform.forward = sprayRot; if ((Object)(object)val4.transform.parent != (Object)(object)val2) { val4.transform.SetParent(val2); } previousSprayPosition = ((RaycastHit)(ref sprayHit)).point; addSprayPaintWithFrameDelay = 2; delayedSprayPaintDecal = val3; ToggleSprayCollisionOnHolder(enable: true); return true; } public void StartSpraying() { sprayAudio.clip = spraySFX; sprayAudio.Play(); sprayParticle.Play(true); isSpraying = true; sprayAudio.PlayOneShot(sprayStart); } public void StopSpraying() { sprayAudio.Stop(); sprayParticle.Stop(true, (ParticleSystemStopBehavior)1); isSpraying = false; sprayAudio.PlayOneShot(sprayStop); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.activatingItem = false; base.playerHeldBy.equippedUsableItemQE = false; } StopSpraying(); } public override void DiscardItem() { if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.activatingItem = false; base.playerHeldBy.equippedUsableItemQE = false; } ((GrabbableObject)this).DiscardItem(); StopSpraying(); } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4129227705u, new RpcReceiveHandler(__rpc_handler_4129227705), "SyncKillingWeedRpc"); ((NetworkBehaviour)this).__registerRpc(3570167176u, new RpcReceiveHandler(__rpc_handler_3570167176), "SyncKillingCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(1243286966u, new RpcReceiveHandler(__rpc_handler_1243286966), "StopKillingCadaverPlantServerRpc"); ((NetworkBehaviour)this).__registerRpc(2280366152u, new RpcReceiveHandler(__rpc_handler_2280366152), "StopKillingCadaverPlantClientRpc"); ((NetworkBehaviour)this).__registerRpc(604645147u, new RpcReceiveHandler(__rpc_handler_604645147), "StopKillingWeedServerRpc"); ((NetworkBehaviour)this).__registerRpc(1231491146u, new RpcReceiveHandler(__rpc_handler_1231491146), "StopKillingWeedClientRpc"); ((NetworkBehaviour)this).__registerRpc(1348519823u, new RpcReceiveHandler(__rpc_handler_1348519823), "KillWeedRpc"); ((NetworkBehaviour)this).__registerRpc(3182182487u, new RpcReceiveHandler(__rpc_handler_3182182487), "KillCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(1370345779u, new RpcReceiveHandler(__rpc_handler_1370345779), "SprayPaintServerRpc"); ((NetworkBehaviour)this).__registerRpc(478503261u, new RpcReceiveHandler(__rpc_handler_478503261), "SprayPaintClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_4129227705(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).SyncKillingWeedRpc(batchNum, positionIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3570167176(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int batchNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref batchNum); int positionIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref positionIndex); int plantType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref plantType); target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).SyncKillingCadaverPlantRpc(batchNum, positionIndex, plantType); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1243286966(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).StopKillingCadaverPlantServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2280366152(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).StopKillingCadaverPlantClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_604645147(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).StopKillingWeedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1231491146(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).StopKillingWeedClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1348519823(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).KillWeedRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3182182487(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 destroyAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).KillCadaverPlantRpc(destroyAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1370345779(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 sprayPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayPos); Vector3 sprayRot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayRot); target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).SprayPaintServerRpc(sprayPos, sprayRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_478503261(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 sprayPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayPos); Vector3 sprayRot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref sprayRot); target.__rpc_exec_stage = (__RpcExecStage)1; ((SprayOrPlantReaperItem)(object)target).SprayPaintClientRpc(sprayPos, sprayRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SprayOrPlantReaperItem"; } } public class BogPlantAI : MonoBehaviour { [CompilerGenerated] private sealed class d__30 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BogPlantAI <>4__this; private float 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; BogPlantAI bogPlantAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; 5__2 = 0f; bogPlantAI.finalScale = Random.Range(bogPlantAI.finalScale - bogPlantAI.randomMinMaxSize, bogPlantAI.finalScale + bogPlantAI.randomMinMaxSize); break; case 1: <>1__state = -1; break; } if (5__2 < bogPlantAI.growTime) { 5__2 += Time.deltaTime; float num2 = 5__2 / bogPlantAI.growTime; float num3 = Mathf.Lerp(0f, bogPlantAI.finalScale, num2); bogPlantAI.plantMesh.transform.localScale = bogPlantAI.baseScale * num3; <>2__current = null; <>1__state = 1; return true; } bogPlantAI.plantMesh.transform.localScale = bogPlantAI.baseScale * bogPlantAI.finalScale; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__28 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BogPlantAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__28(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) int num = <>1__state; BogPlantAI bogPlantAI = <>4__this; switch (num) { default: return false; case 0: <>1__state = -1; if (!bogPlantAI.growthDone) { float num2 = Random.Range(0.02f, 0.05f); float num3 = Random.Range(0.02f, 0.05f); float num4 = Random.Range(0.02f, 0.05f); bogPlantAI.scaleX = Mathf.Clamp(bogPlantAI.scaleX + num2 * Time.deltaTime, 0f, 4f); bogPlantAI.scaleY = Mathf.Clamp(bogPlantAI.scaleY + num3 * Time.deltaTime, 0f, 4f); bogPlantAI.scaleZ = Mathf.Clamp(bogPlantAI.scaleZ + num4 * Time.deltaTime, 0f, 4f); bogPlantAI.plantMesh.transform.localScale = new Vector3(bogPlantAI.scaleX, bogPlantAI.scaleY, bogPlantAI.scaleZ); } <>2__current = null; <>1__state = 1; return true; case 1: <>1__state = -1; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public GameObject plantMesh; public Mesh plantMeshRenderer; public Material plantMat; public ParticleSystem plantAppearParticle; public List> Batches = new List>(); public ParticleSystem plantDie; public float scaleX; public float scaleY; public float scaleZ; private bool growthDone; public bool isLeafbush; public ParticleSystem leafbushParticle; public bool isMudfern; public GameObject radarHindererObject; public bool isSludgereed; private bool startedGrowth; public Vector3 baseScale; public float growTime; public float finalScale; public bool debugPlant; private bool leafbushParticleActive; public float randomMinMaxSize = 0.2f; internal static ManualLogSource Logger { get; private set; } public void Start() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) plantAppearParticle.Play(); plantMesh.transform.localScale = new Vector3(scaleX, scaleY, scaleZ); baseScale = ((Component)this).transform.localScale; ((MonoBehaviour)this).StartCoroutine(Grow()); new WaitForSeconds(0.1f); startedGrowth = true; new WaitForSeconds(1f * Time.deltaTime); if (isLeafbush) { if (!((Object)(object)leafbushParticle != (Object)null)) { return; } if (debugPlant) { Logger.LogInfo((object)"Plant is Leafbush"); } if (!leafbushParticleActive) { if (debugPlant) { Logger.LogInfo((object)"Leafbush Particle non-active"); } new WaitForSeconds(growTime - 1f); leafbushParticleActive = true; leafbushParticle.Play(); } } else if (isMudfern) { if (debugPlant) { Logger.LogInfo((object)"Plant is Mudfern"); } } else if (isSludgereed && debugPlant) { Logger.LogInfo((object)"Plant is Swampreed"); } } public void Update() { } [IteratorStateMachine(typeof(d__28))] private IEnumerator GrowStupid() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__28(0) { <>4__this = this }; } public void DestroyPlant() { if (isLeafbush) { leafbushParticle.Stop(); } else if (!isMudfern) { _ = isSludgereed; } } [IteratorStateMachine(typeof(d__30))] private IEnumerator Grow() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__30(0) { <>4__this = this }; } } public class SuperMechMissile : MonoBehaviour { private float currentMissileSpeed = 0.35f; public SuperMechAI RadMechScript; public bool isDefaultWarble = true; private bool hitWall = true; private float despawnTimer; private Random missileFlyRandom; private float forwardDistance; private float lastRotationDistance; private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) missileFlyRandom = new Random((int)(((Component)this).transform.position.x + ((Component)this).transform.position.y) + RadMechScript.missilesFired); hitWall = false; } private void FixedUpdate() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) if (hitWall) { return; } if (despawnTimer < 5f && (Object)(object)RadMechScript != (Object)null) { despawnTimer += Time.deltaTime; CheckCollision(); Transform transform = ((Component)this).transform; transform.position += ((Component)this).transform.forward * RadMechScript.missileSpeed * currentMissileSpeed; forwardDistance += RadMechScript.missileSpeed * currentMissileSpeed; if (forwardDistance - lastRotationDistance > 2f) { lastRotationDistance = forwardDistance; Transform transform2 = ((Component)this).transform; transform2.rotation *= Quaternion.Euler(new Vector3(15f * RadMechScript.missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * 2.0 - 1.0), 7f * RadMechScript.missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * 2.0 - 1.0), 15f * RadMechScript.missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * 2.0 - 1.0))); } currentMissileSpeed += 0.05f; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void CheckCollision() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) RaycastHit val = default(RaycastHit); if (!Physics.Raycast(((Component)this).transform.position, ((Component)this).transform.forward, ref val, 0.6f * currentMissileSpeed, 526592, (QueryTriggerInteraction)1) && !Physics.Raycast(((Component)this).transform.position, ((Component)this).transform.forward, ref val, 0.6f * currentMissileSpeed, 8, (QueryTriggerInteraction)2)) { return; } if (((Component)((RaycastHit)(ref val)).collider).gameObject.layer == 19) { EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).collider).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.mainScript == (Object)(object)RadMechScript) { return; } } bool calledByClient = false; if (((Component)((RaycastHit)(ref val)).collider).gameObject.layer == 3) { PlayerControllerB component2 = ((Component)((RaycastHit)(ref val)).collider).gameObject.GetComponent(); if ((Object)(object)component2 != (Object)null && (Object)(object)component2 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { calledByClient = true; } } hitWall = true; RadMechScript.StartExplosion(((Component)this).transform.position - ((Component)this).transform.forward * 0.5f, ((Component)this).transform.forward, calledByClient); Object.Destroy((Object)(object)((Component)this).gameObject); } } namespace UhhSomething { public static class MyPluginInfo { public const string PLUGIN_GUID = "UhhSomething"; public const string PLUGIN_NAME = "UhhSomething"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace Spectre { [BepInPlugin("Boom.SpectreLibrary.SpectreLib", "SpectreLib", "1.0.0")] public class SpectreMain : BaseUnityPlugin { private const string GUID = "Boom.SpectreLibrary.SpectreLib"; private const string NAME = "SpectreLib"; private const string VERSION = "1.0.0"; internal static ManualLogSource Logger { get; private set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Logger.LogInfo((object)"Finished Loading"); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace UhhSomething.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }