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 Dawn; using DigitalRuby.ThunderAndLightning; using DunGen; using DunGen.Tags; using Dusk; using GameNetcodeStuff; using Microsoft.CodeAnalysis; using Spectre.Enemy; using Spectre.Items; using Spectre.Misc; using Spectre.Scriptable; using UhhSomething.NetcodePatcher; using Unity.Mathematics; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations.Rigging; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Rendering.HighDefinition; using UnityEngine.VFX; [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] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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] [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 enum SuperMechFireMode { Regular, Burst, ConstantUponLOS } public enum SuperMissileTravelMode { Warble, Curve, Hoaming, Heavy } 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 JetWingsItem : GrabbableObject { public bool streamlineJetpack; public Transform backPart; public Vector3 backPartRotationOffset; public Vector3 backPartPositionOffset; private float jetpackPower; private bool jetpackActivated; private Vector3 forces; private bool jetpackActivatedPreviousFrame; public GameObject fireEffect; public AudioSource jetpackAudio; public AudioSource jetpackBeepsAudio; public AudioClip startJetpackSFX; public AudioClip jetpackSustainSFX; public AudioClip jetpackBrokenSFX; public AudioClip jetpackWarningBeepSFX; public AudioClip jetpackLowBatteriesSFX; public ParticleSystem smokeTrailParticle; private PlayerControllerB previousPlayerHeldBy; private bool jetpackBroken; private bool jetpackPlayingWarningBeep; private bool jetpackPlayingLowBatteryBeep; private float noiseInterval; private RaycastHit rayHit; public float jetpackAcceleration = 25f; public float jetpackDeaccelleration = 30f; public float jetpackForceChangeSpeed = 50f; public float verticalMultiplier = 0.35f; public AudioClip applause; public ChainIKConstraint cordRig; public CauseOfDeath causeOfdeath = (CauseOfDeath)2; public float jetpackMaxAccel = 500f; public float jetpackMaxDeaccel = 1000f; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { ActivateJetpack(); } else { DeactivateJetpack(); } } private void DeactivateJetpack() { if (previousPlayerHeldBy.jetpackControls) { previousPlayerHeldBy.disablingJetpackControls = true; } jetpackActivated = false; jetpackActivatedPreviousFrame = false; jetpackPlayingLowBatteryBeep = false; jetpackPlayingWarningBeep = false; jetpackBeepsAudio.Stop(); jetpackAudio.Stop(); smokeTrailParticle.Stop(true, (ParticleSystemStopBehavior)1); if (!jetpackBroken) { JetpackEffect(enable: false); } } private void ActivateJetpack() { //IL_0016: 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_00dd: 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_01fb: 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_0065: Unknown result type (might be due to invalid IL or missing references) if (streamlineJetpack) { if (Vector3.Distance(((Component)base.playerHeldBy).transform.position, StartOfRound.Instance.elevatorTransform.position) < 40f) { EntranceTeleport[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { if (array[i].entranceId == 0 && array[i].isEntranceToBuilding) { base.playerHeldBy.TeleportPlayer(array[i].entrancePoint.position, false, 0f, false, true); base.playerHeldBy.SetAllItemsInElevator(false, false); base.playerHeldBy.isInElevator = false; base.playerHeldBy.isInHangarShipRoom = false; AudioReverbPresets val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null) { val.audioPresets[2].ChangeAudioReverbForPlayer(base.playerHeldBy); } } } } else { base.playerHeldBy.TeleportPlayer(StartOfRound.Instance.outsideShipSpawnPosition.position, false, 0f, false, true); base.playerHeldBy.SetAllItemsInElevator(false, true); base.playerHeldBy.isInElevator = true; base.playerHeldBy.isInsideFactory = false; AudioReverbPresets val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null) { val2.audioPresets[3].ChangeAudioReverbForPlayer(base.playerHeldBy); } } if ((Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { SoundManager.Instance.misc2DAudio.volume = 1f; SoundManager.Instance.misc2DAudio.PlayOneShot(applause); } } if (jetpackBroken) { jetpackAudio.PlayOneShot(jetpackBrokenSFX); return; } if (!jetpackActivatedPreviousFrame) { base.playerHeldBy.jetpackTurnCompass.rotation = ((Component)base.playerHeldBy).transform.rotation; JetpackEffect(enable: true); jetpackActivatedPreviousFrame = true; } base.playerHeldBy.disablingJetpackControls = false; base.playerHeldBy.jetpackControls = true; jetpackActivated = true; base.playerHeldBy.syncFullRotation = ((Component)base.playerHeldBy).transform.eulerAngles; } private void JetpackEffect(bool enable) { //IL_00a0: 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) if (streamlineJetpack) { return; } fireEffect.SetActive(enable); if (enable) { if (!jetpackActivatedPreviousFrame) { jetpackAudio.PlayOneShot(startJetpackSFX); } smokeTrailParticle.Play(); jetpackAudio.clip = jetpackSustainSFX; jetpackAudio.Play(); Debug.Log((object)$"Is jetpack audio playing?: {jetpackAudio.isPlaying}"); } else { smokeTrailParticle.Stop(true, (ParticleSystemStopBehavior)1); jetpackAudio.Stop(); } if (Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) < 10f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } } public override void UseUpBatteries() { DeactivateJetpack(); } public override void DiscardItem() { //IL_0087: 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) Debug.Log((object)$"Owner of jetpack?: {((NetworkBehaviour)this).IsOwner}"); Debug.Log((object)$"Is dead?: {base.playerHeldBy.isPlayerDead}"); if (((NetworkBehaviour)this).IsOwner && base.playerHeldBy.isPlayerDead && !jetpackBroken && base.playerHeldBy.jetpackControls) { ExplodeJetpackServerRpc(); } JetpackEffect(enable: false); DeactivateJetpack(); jetpackPower = 0f; backPart.localPosition = Vector3.zero; backPart.localEulerAngles = Vector3.zero; ((RigConstraint>)(object)cordRig).weight = 0f; ((GrabbableObject)this).DiscardItem(); } [ServerRpc(RequireOwnership = false)] public void ExplodeJetpackServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3107096448u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3107096448u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ExplodeJetpackClientRpc(); } } } [ClientRpc] public void ExplodeJetpackClientRpc() { //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_00ec: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(97138363u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 97138363u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!jetpackBroken) { jetpackBroken = true; base.itemUsedUp = true; Debug.Log((object)"Spawning explosion"); Landmine.SpawnExplosion(((Component)this).transform.position, true, 5f, 6f, 50, 0f, (GameObject)null, false); } } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); previousPlayerHeldBy = base.playerHeldBy; ((RigConstraint>)(object)cordRig).weight = 1f; } public override void Update() { //IL_00db: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_014c: 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_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020a: 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_01c6: 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_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || streamlineJetpack) { return; } SetJetpackAudios(); if ((Object)(object)base.playerHeldBy == (Object)null || !((NetworkBehaviour)this).IsOwner || (Object)(object)base.playerHeldBy != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } if (jetpackActivated) { jetpackPower = Mathf.Clamp(jetpackPower + Time.deltaTime * jetpackAcceleration, 0f, 500f); } else { jetpackPower = Mathf.Clamp(jetpackPower - Time.deltaTime * jetpackDeaccelleration, 0f, 1000f); if (base.playerHeldBy.thisController.isGrounded) { jetpackPower = 0f; } } forces = Vector3.Lerp(forces, Vector3.ClampMagnitude(((Component)base.playerHeldBy).transform.up * jetpackPower, 400f), Time.deltaTime * 50f); if (!base.playerHeldBy.jetpackControls || (jetpackPower > 10f && base.playerHeldBy.thisController.isGrounded)) { forces = Vector3.zero; } if (!base.playerHeldBy.isPlayerDead && Physics.Raycast(((Component)base.playerHeldBy).transform.position, forces, ref rayHit, 25f, 1073744193, (QueryTriggerInteraction)1) && ((Vector3)(ref forces)).magnitude - ((RaycastHit)(ref rayHit)).distance > 50f && ((RaycastHit)(ref rayHit)).distance < 4f) { base.playerHeldBy.KillPlayer(forces, true, causeOfdeath, 0, default(Vector3), false); } if ((Object)(object)base.playerHeldBy != (Object)null && !base.playerHeldBy.isPlayerDead) { PlayerControllerB playerHeldBy = base.playerHeldBy; playerHeldBy.externalForces += forces; } } private void SetJetpackAudios() { //IL_002e: 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) if (jetpackActivated) { if (noiseInterval >= 0.5f) { noiseInterval = 0f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 25f, 0.85f, 0, base.playerHeldBy.isInHangarShipRoom && StartOfRound.Instance.hangarDoorsClosed, 41); } else { noiseInterval += Time.deltaTime; } if (base.insertedBattery.charge < 0.15f) { if (!jetpackPlayingLowBatteryBeep) { jetpackPlayingLowBatteryBeep = true; jetpackBeepsAudio.clip = jetpackLowBatteriesSFX; jetpackBeepsAudio.Play(); } } else if (Physics.CheckSphere(((Component)this).transform.position, 6f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { if (!jetpackPlayingWarningBeep && !jetpackPlayingLowBatteryBeep) { jetpackPlayingWarningBeep = true; jetpackBeepsAudio.clip = jetpackWarningBeepSFX; jetpackBeepsAudio.Play(); } } else { jetpackBeepsAudio.Stop(); } } else { jetpackPlayingWarningBeep = false; jetpackPlayingLowBatteryBeep = false; jetpackBeepsAudio.Stop(); } } public override void LateUpdate() { //IL_0033: 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_005f: 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) //IL_008a: 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_009b: 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_00a1: 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_00af: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).LateUpdate(); if ((Object)(object)base.playerHeldBy != (Object)null && base.isHeld) { backPart.position = base.playerHeldBy.lowerSpine.position; backPart.rotation = base.playerHeldBy.lowerSpine.rotation; ((Component)this).transform.Rotate(backPartRotationOffset); backPart.position = base.playerHeldBy.lowerSpine.position; Vector3 val = backPartPositionOffset; val = base.playerHeldBy.lowerSpine.rotation * val; Transform obj = backPart; obj.position += val; } } 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 ((NetworkBehaviour)this).__registerRpc(3107096448u, new RpcReceiveHandler(__rpc_handler_3107096448), "ExplodeJetpackServerRpc"); ((NetworkBehaviour)this).__registerRpc(97138363u, new RpcReceiveHandler(__rpc_handler_97138363), "ExplodeJetpackClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3107096448(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; ((JetWingsItem)(object)target).ExplodeJetpackServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_97138363(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; ((JetWingsItem)(object)target).ExplodeJetpackClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "JetWingsItem"; } } public class ExplosionCreator : NetworkBehaviour, IHittable, IIndoorMapHazard { private bool mineActivated = true; public bool hasExploded; public ParticleSystem explosionParticle; public Animator mineAnimator; public AudioSource mineAudio; public AudioSource mineFarAudio; public AudioClip mineDetonate; public AudioClip mineTrigger; public AudioClip mineDetonateFar; public AudioClip mineDeactivate; public AudioClip minePress; private bool sendingExplosionRPC; private RaycastHit hit; private RoundManager roundManager; private float pressMineDebounceTimer; private bool localPlayerOnMine; public IndoorMapHazardType mapHazardType; private static int landminesAmount; bool IIndoorMapHazard.IsActivated() { return !hasExploded; } IndoorMapHazardType IIndoorMapHazard.GetMapHazardType() { return mapHazardType; } bool IIndoorMapHazard.IsExtremelyHazardous() { //IL_0046: 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_005b: Unknown result type (might be due to invalid IL or missing references) if (landminesAmount > 14) { return true; } for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && StartOfRound.Instance.allPlayerScripts[i].isInsideFactory) { Vector3 val = ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position - ((Component)this).transform.position; if (((Vector3)(ref val)).sqrMagnitude < 20f) { return true; } } } return false; } public override void OnDestroy() { ((NetworkBehaviour)this).OnDestroy(); landminesAmount = 0; } private void Start() { ((MonoBehaviour)this).StartCoroutine(StartIdleAnimation()); landminesAmount++; } private void Update() { if (pressMineDebounceTimer > 0f) { pressMineDebounceTimer -= Time.deltaTime; } if (localPlayerOnMine && GameNetworkManager.Instance.localPlayerController.teleportedLastFrame) { localPlayerOnMine = false; TriggerMineOnLocalClientByExiting(); } } public void ToggleMine(bool enabled) { if (mineActivated != enabled) { mineActivated = enabled; if (!enabled) { mineAudio.PlayOneShot(mineDeactivate); WalkieTalkie.TransmitOneShotAudio(mineAudio, mineDeactivate, 1f); } ToggleMineServerRpc(enabled); } } [ServerRpc(RequireOwnership = false)] public void ToggleMineServerRpc(bool enable) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3925455125u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3925455125u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleMineClientRpc(enable); } } } [ClientRpc] public void ToggleMineClientRpc(bool enable) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(71250643u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 71250643u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleMineEnabledLocalClient(enable); } } } public void ToggleMineEnabledLocalClient(bool enabled) { if (mineActivated != enabled) { mineActivated = enabled; if (!enabled) { mineAudio.PlayOneShot(mineDeactivate); WalkieTalkie.TransmitOneShotAudio(mineAudio, mineDeactivate, 1f); } } } private IEnumerator StartIdleAnimation() { roundManager = Object.FindObjectOfType(); if (!((Object)(object)roundManager == (Object)null)) { if (roundManager.BreakerBoxRandom != null) { yield return (object)new WaitForSeconds((float)roundManager.BreakerBoxRandom.NextDouble() + 0.5f); } mineAnimator.SetTrigger("startIdle"); mineAudio.pitch = Random.Range(0.9f, 1.1f); } } private void OnTriggerEnter(Collider other) { if (hasExploded || pressMineDebounceTimer > 0f) { return; } if (((Component)other).CompareTag("Player")) { PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if (!((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController) && (Object)(object)component != (Object)null && !component.isPlayerDead) { localPlayerOnMine = true; pressMineDebounceTimer = 0.5f; PressMineServerRpc(); } } else { if (!((Component)other).CompareTag("PhysicsProp") && !((Component)other).tag.StartsWith("PlayerRagdoll")) { return; } if (Object.op_Implicit((Object)(object)((Component)other).GetComponent())) { if ((Object)(object)((Component)other).GetComponent().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } } else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent()) && !((NetworkBehaviour)((Component)other).GetComponent()).NetworkObject.IsOwner) { return; } pressMineDebounceTimer = 0.5f; PressMineServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void PressMineServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1051937912u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1051937912u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PressMineClientRpc(); } } } [ClientRpc] public void PressMineClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(453212270u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 453212270u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; pressMineDebounceTimer = 0.5f; mineAudio.PlayOneShot(minePress); WalkieTalkie.TransmitOneShotAudio(mineAudio, minePress, 1f); } } } private void OnTriggerExit(Collider other) { if (hasExploded || !mineActivated) { return; } if (((Component)other).CompareTag("Player")) { PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && !component.isPlayerDead && !((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { localPlayerOnMine = false; TriggerMineOnLocalClientByExiting(); } } else { if (!((Component)other).tag.StartsWith("PlayerRagdoll") && !((Component)other).CompareTag("PhysicsProp")) { return; } if (Object.op_Implicit((Object)(object)((Component)other).GetComponent())) { if ((Object)(object)((Component)other).GetComponent().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } } else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent()) && !((NetworkBehaviour)((Component)other).GetComponent()).NetworkObject.IsOwner) { return; } TriggerMineOnLocalClientByExiting(); } } private void TriggerMineOnLocalClientByExiting() { if (!hasExploded) { SetOffMineAnimation(); sendingExplosionRPC = true; ExplodeMineServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void ExplodeMineServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1591424050u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1591424050u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ExplodeMineClientRpc(); } } } [ClientRpc] public void ExplodeMineClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3177064841u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3177064841u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (sendingExplosionRPC) { sendingExplosionRPC = false; } else { SetOffMineAnimation(); } } } public void SetOffMineAnimation() { hasExploded = true; mineAnimator.SetTrigger("detonate"); mineAudio.PlayOneShot(mineTrigger, 1f); } private IEnumerator TriggerOtherMineDelayed(Landmine mine) { if (!mine.hasExploded) { mine.mineAudio.pitch = Random.Range(0.75f, 1.07f); mine.hasExploded = true; yield return (object)new WaitForSeconds(0.2f); mine.SetOffMineAnimation(); } } public void Detonate() { //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_0040: Unknown result type (might be due to invalid IL or missing references) mineAudio.pitch = Random.Range(0.93f, 1.07f); mineAudio.PlayOneShot(mineDetonate, 1f); SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f, 50, 0f, null, goThroughCar: false, 14f, 25f, (CauseOfDeath)3); } public static void SpawnExplosion(Vector3 explosionPosition, bool spawnExplosionEffect = false, float killRange = 1f, float damageRange = 1f, int nonLethalDamage = 50, float physicsForce = 0f, GameObject overridePrefab = null, bool goThroughCar = false, float bigCamShakeDistance = 14f, float smallCamShakeDistance = 25f, CauseOfDeath causeOfDeath = (CauseOfDeath)3) { //IL_0077: 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_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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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_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_00d5: 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_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_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: 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_01b6: 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_01bc: 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_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: 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_02dd: 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_01ec: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) if (spawnExplosionEffect) { GameObject val = ((!((Object)(object)overridePrefab != (Object)null)) ? Object.Instantiate(StartOfRound.Instance.explosionPrefab, explosionPosition, Quaternion.Euler(-90f, 0f, 0f), RoundManager.Instance.mapPropsContainer.transform) : Object.Instantiate(overridePrefab, explosionPosition, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform)); val.SetActive(true); } float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition); if (num < bigCamShakeDistance) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < smallCamShakeDistance) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } bool flag = false; Collider[] array = Physics.OverlapSphere(explosionPosition, damageRange, 2621448, (QueryTriggerInteraction)2); PlayerControllerB val2 = null; RaycastHit val3 = default(RaycastHit); Vector3 val5; for (int i = 0; i < array.Length; i++) { float num2 = Vector3.Distance(explosionPosition, ((Component)array[i]).transform.position); if (Physics.Linecast(explosionPosition, ((Component)array[i]).transform.position + Vector3.up * 0.3f, ref val3, 1073742080, (QueryTriggerInteraction)1) && ((!goThroughCar && ((Component)((RaycastHit)(ref val3)).collider).gameObject.layer == 30) || num2 > 4f)) { continue; } if (((Component)array[i]).gameObject.layer == 3 && !flag) { val2 = ((Component)array[i]).gameObject.GetComponent(); if ((Object)(object)val2 != (Object)null && ((NetworkBehaviour)val2).IsOwner) { flag = true; if (num2 < killRange) { Vector3 val4 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition); PlayerControllerB obj = val2; val5 = default(Vector3); obj.KillPlayer(val4, true, causeOfDeath, 0, val5, false); } else if (num2 < damageRange) { Vector3 val6 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition); val2.DamagePlayer(nonLethalDamage, true, true, causeOfDeath, 0, false, val6); } } } else if (((Component)array[i]).gameObject.layer == 21) { Landmine componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && !componentInChildren.hasExploded && num2 < 6f) { ((MonoBehaviour)componentInChildren).StartCoroutine(componentInChildren.TriggerOtherMineDelayed(componentInChildren)); } } else if (((Component)array[i]).gameObject.layer == 19) { EnemyAICollisionDetect componentInChildren2 = ((Component)array[i]).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null && ((NetworkBehaviour)componentInChildren2.mainScript).IsOwner && num2 < 4.5f) { EnemyAI mainScript = componentInChildren2.mainScript; val5 = default(Vector3); mainScript.HitEnemyOnLocalClient(6, val5, (PlayerControllerB)null, false, -1); componentInChildren2.mainScript.HitFromExplosion(num2); } } } val2 = GameNetworkManager.Instance.localPlayerController; if (physicsForce > 0f && Vector3.Distance(((Component)val2).transform.position, explosionPosition) < 35f && !Physics.Linecast(explosionPosition, ((Component)val2).transform.position + Vector3.up * 0.3f, ref val3, 256, (QueryTriggerInteraction)1)) { float num3 = Vector3.Distance(((Component)val2).transform.position, explosionPosition); Vector3 val7 = Vector3.Normalize(((Component)val2).transform.position + Vector3.up * num3 - explosionPosition) / (num3 * 0.35f) * physicsForce; if (((Vector3)(ref val7)).magnitude > 2f) { if (((Vector3)(ref val7)).magnitude > 10f) { val2.CancelSpecialTriggerAnimations(); } if (val2.inVehicleAnimation) { val5 = val2.externalForceAutoFade + val7; if (!(((Vector3)(ref val5)).magnitude > 50f)) { goto IL_0413; } } PlayerControllerB obj2 = val2; obj2.externalForceAutoFade += val7; } } goto IL_0413; IL_0413: VehicleController val8 = Object.FindObjectOfType(); if ((Object)(object)val8 != (Object)null && !val8.magnetedToShip && physicsForce > 0f && Vector3.Distance(((Component)val8).transform.position, explosionPosition) < 35f) { val8.mainRigidbody.AddExplosionForce(physicsForce * 50f, explosionPosition, 12f, 3f, (ForceMode)1); } int num4 = ~LayerMask.GetMask(new string[1] { "Room" }); num4 = ~LayerMask.GetMask(new string[1] { "Colliders" }); array = Physics.OverlapSphere(explosionPosition, 10f, num4); for (int j = 0; j < array.Length; j++) { Rigidbody component = ((Component)array[j]).GetComponent(); if ((Object)(object)component != (Object)null) { component.AddExplosionForce(70f, explosionPosition, 10f); } } } public bool MineHasLineOfSight(Vector3 pos) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return !Physics.Linecast(((Component)this).transform.position, pos, ref hit, 256); } bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { SetOffMineAnimation(); sendingExplosionRPC = true; ExplodeMineServerRpc(); return true; } protected override void __initializeVariables() { ((NetworkBehaviour)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(3925455125u, new RpcReceiveHandler(__rpc_handler_3925455125), "ToggleMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(71250643u, new RpcReceiveHandler(__rpc_handler_71250643), "ToggleMineClientRpc"); ((NetworkBehaviour)this).__registerRpc(1051937912u, new RpcReceiveHandler(__rpc_handler_1051937912), "PressMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(453212270u, new RpcReceiveHandler(__rpc_handler_453212270), "PressMineClientRpc"); ((NetworkBehaviour)this).__registerRpc(1591424050u, new RpcReceiveHandler(__rpc_handler_1591424050), "ExplodeMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(3177064841u, new RpcReceiveHandler(__rpc_handler_3177064841), "ExplodeMineClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3925455125(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 enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).ToggleMineServerRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_71250643(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 enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).ToggleMineClientRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1051937912(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; ((ExplosionCreator)(object)target).PressMineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_453212270(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; ((ExplosionCreator)(object)target).PressMineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1591424050(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; ((ExplosionCreator)(object)target).ExplodeMineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3177064841(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; ((ExplosionCreator)(object)target).ExplodeMineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ExplosionCreator"; } } public class RandomScrapSpawn : MonoBehaviour { public ItemGroup spawnableItems; public float itemSpawnRange; [Space(5f)] public bool spawnedItemsCopyPosition; public bool spawnUsed; [Space(5f)] public Transform spawnWithParent; } public class SuperMechAnimationEvent : MonoBehaviour { public SuperMechAI mainScript; public void FlickerFace() { mainScript.FlickerFace(); } public void EnableSpotlight() { mainScript.EnableSpotlight(); } public void DisableSpotlight() { mainScript.DisableSpotlight(); } public void StompLeftFoot() { mainScript.StompLeftFoot(); } public void StompRightFoot() { mainScript.StompRightFoot(); } public void StompBothFeet() { mainScript.StompBothFeet(); } public void HasEnteredSky() { mainScript.HasEnteredSky(); } public void DisableSmoke() { mainScript.DisableThrusterSmoke(); } public void EnableSmoke() { mainScript.EnableThrusterSmoke(); } public void EnableBlowtorch() { mainScript.EnableBlowtorch(); } public void DisableBlowtorch() { mainScript.DisableBlowtorch(); } public void FinishFlying() { mainScript.FinishFlyingAnimation(); } } public class VController : NetworkBehaviour { public int vehicleID; [Header("Vehicle Physics")] public WheelCollider FrontLeftWheel; public WheelCollider FrontRightWheel; public WheelCollider BackLeftWheel; public WheelCollider BackRightWheel; public WheelCollider[] otherWheels; public Rigidbody mainRigidbody; public Transform[] driverSideExitPoints; public Transform[] passengerSideExitPoints; public InteractTrigger driverSeatTrigger; public InteractTrigger passengerSeatTrigger; public float stability = 0.3f; public float speed = 2f; public float EngineTorque = 230f; public float MaxEngineRPM = 3000f; public float MinEngineRPM = 1000f; public float EngineRPM; [Header("Vehicle Control")] public bool ignitionStarted; public Vector2 moveInputVector; public float steeringInput; public float steeringWheelTurnSpeed = 5f; public float carAcceleration = 5f; public float carMaxSpeed = 7f; public float brakeSpeed = 5f; public float idleSpeed = 2f; [Space(5f)] [Header("Car Damage")] public float carFragility = 1f; public float minimalBumpForce = 10f; public float mediumBumpForce = 40f; public float maximumBumpForce = 80f; public int baseCarHP; public int carHP = 12; private float timeAtLastDamage; public bool carDestroyed; [Space(5f)] [Header("Effects")] public MeshRenderer leftWheelMesh; public MeshRenderer rightWheelMesh; public MeshRenderer backLeftWheelMesh; public MeshRenderer backRightWheelMesh; public Animator steeringWheelAnimator; public Animator gearStickAnimator; public AudioSource engineAudio1; public AudioSource engineAudio2; public AudioSource rollingAudio; public AudioSource turbulenceAudio; private float turbulenceAmount; public bool carEngine1AudioActive; public bool carEngine2AudioActive; public bool carRollingAudioActive; public AudioClip revEngineStart; public AudioClip engineStartSuccessful; public AudioClip engineRun; public AudioClip engineRev; public AudioClip engineRun2; public AudioClip insertKey; public AudioClip twistKey; public AudioClip removeKey; public AudioClip sitDown; public AudioSource tireAudio; public AudioSource vehicleEngineAudio; public AudioSource steeringWheelAudio; public AudioSource skiddingAudio; public AudioSource gearStickAudio; public AudioClip[] gearStickAudios; public AnimatedObjectTrigger driverSideDoor; public AnimatedObjectTrigger passengerSideDoor; public InteractTrigger driverSideDoorTrigger; public InteractTrigger passengerSideDoorTrigger; public PlayerInput input; public bool localPlayerInControl; public bool localPlayerInPassengerSeat; public bool drivePedalPressed; public bool brakePedalPressed; public CarGearShift gear; public float gearStickAnimValue; public float steeringAnimValue; private float steeringWheelAnimFloat; public float carStress; public float carStressChange; public PlayerControllerB currentDriver; public PlayerControllerB currentPassenger; public bool testingVehicleInEditor; public float engineIntensityPercentage = 350f; public Vector3 syncedPosition; public Quaternion syncedRotation; public float syncSpeedMultiplier = 2f; public float syncRotationSpeed = 1f; public float syncCarPositionInterval; private bool enabledCollisionForAllPlayers = true; public ContactPoint[] contacts; public PlayerPhysicsRegion physicsRegion; private int exitCarLayerMask = 2305; private Coroutine keyIgnitionCoroutine; public MeshRenderer keyObject; public Transform ignitionTurnedPosition; public Transform ignitionNotTurnedPosition; private bool keyIsInDriverHand; private bool keyIsInIgnition; public Vector3 positionOffset; public Vector3 rotationOffset; public GameObject startKeyIgnitionTrigger; public GameObject removeKeyIgnitionTrigger; private float chanceToStartIgnition = 1f; private float timeAtLastGearShift; private RaycastHit hit; public AudioSource hoodAudio; public AudioSource pushAudio; public AudioSource collisionAudio1; public AudioSource collisionAudio2; public AudioClip[] maxCollisions; public AudioClip[] medCollisions; public AudioClip[] minCollisions; public AudioClip[] obstacleCollisions; public AudioClip windshieldBreak; public AudioSource miscAudio; private float audio1Time; private float audio2Time; private int audio1Type; private int audio2Type; public MeshRenderer mainBodyMesh; public MeshRenderer lod1Mesh; public MeshRenderer lod2Mesh; public Material windshieldBrokenMat; public ParticleSystem glassParticle; private bool windshieldBroken; private Vector3 truckVelocityLastFrame; public bool useVel; [Header("Radio")] public AudioClip[] radioClips; public AudioSource radioAudio; public AudioSource radioInterference; private float radioSignalQuality = 3f; private float radioSignalDecreaseThreshold = 50f; public float radioSignalTurbulence = 4f; private float changeRadioSignalTime; private bool radioOn; private int currentRadioClip; private float currentSongTime; private bool radioTurnedOnBefore; public float carHitPlayerForceFraction = 30f; public float carReactToPlayerHitMultiplier; public ParticleSystem carExhaustParticle; public Vector3 averageVelocity; public int movingAverageLength = 20; public int averageCount; private DecalProjector[] decals; private int decalIndex; public ParticleSystem hoodFireParticle; public AudioSource hoodFireAudio; private bool isHoodOnFire; private bool carHoodOpen; public Animator carHoodAnimator; private AudioClip carHoodOpenSFX; private AudioClip carHoodCloseSFX; public GameObject backDoorContainer; public GameObject destroyedTruckMesh; public GameObject truckDestroyedExplosion; private bool hoodPoppedUp; public float pushForceMultiplier; public float pushVerticalOffsetAmount; public GameObject headlightsContainer; public Material headlightsOnMat; public Material headlightsOffMat; public AudioClip headlightsToggleSFX; public bool magnetedToShip; private Vector3 magnetTargetPosition; private Quaternion magnetTargetRotation; private Quaternion magnetStartRotation; private Vector3 magnetStartPosition; public float magnetTime; private bool finishedMagneting; private bool loadedVehicleFromSave; private float magnetRotationTime; public BoxCollider boundsCollider; private Vector3 averageVelocityAtMagnetStart; public AnimationCurve magnetPositionCurve; public AnimationCurve magnetRotationCurve; private bool destroyNextFrame; private string lastStressType; private string lastDamageType; private float stressPerSecond; public Rigidbody ragdollPhysicsBody; public Rigidbody windwiperPhysicsBody1; public Rigidbody windwiperPhysicsBody2; public Transform windwiper1; public Transform windwiper2; public BoxCollider windshieldPhysicsCollider; public Animator driverSeatSpringAnimator; public float timeSinceSpringingDriverSeat; public AudioSource springAudio; public float springForce = 70f; public GameObject backLightsContainer; public GameObject frontCabinLightContainer; public MeshRenderer backLightsMesh; public MeshRenderer frontCabinLightMesh; public Material backLightOnMat; public bool backLightsOn; public AudioSource hornAudio; public bool honkingHorn; private float timeAtLastHornPing; private float timeAtLastEngineAudioPing; public float torqueForce; public bool backDoorOpen; public bool hasBeenSpawned; public bool inDropshipAnimation; private ItemDropship itemShip; public ParticleSystem tireSparks; public AudioSource extremeStressAudio; private bool underExtremeStress; private bool syncedExtremeStress; public Transform healthMeter; public Transform turboMeter; public Transform clipboardPosition; private float limitTruckVelocityTimer; [Header("Boost ability")] private bool switchGearsBoostEnabled; private int turboBoosts; private bool pressedTurbo; public float turboBoostForce; public float turboBoostUpwardForce; public ParticleSystem turboBoostParticle; public AudioSource turboBoostAudio; public AudioClip turboBoostSFX; public AudioClip turboBoostSFX2; public Transform oilPipePoint; private bool jumpingInCar; public float jumpForce = 4000f; public AudioClip jumpInCarSFX; private string[] carTooltips = new string[3] { "Gas pedal: [W]", "Brake pedal: [S]", "Boost: [Space]" }; public AudioClip pourOil; public AudioClip pourTurbo; private bool setControlTips; public Collider ontopOfTruckCollider; public void SetBackDoorOpen(bool open) { backDoorOpen = open; } private void SetFrontCabinLightOn(bool setOn) { frontCabinLightContainer.SetActive(setOn); if (setOn) { ((Renderer)frontCabinLightMesh).material = headlightsOnMat; } else { ((Renderer)frontCabinLightMesh).material = headlightsOffMat; } } private void SetWheelFriction() { //IL_0002: 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_0045: 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_0058: 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_007c: 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_00b8: 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_00d0: Unknown result type (might be due to invalid IL or missing references) WheelFrictionCurve val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 0.2f; ((WheelFrictionCurve)(ref val)).extremumValue = 1f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 1f; ((WheelFrictionCurve)(ref val)).stiffness = 2f; WheelFrictionCurve val2 = val; FrontRightWheel.forwardFriction = val2; FrontLeftWheel.forwardFriction = val2; ((WheelFrictionCurve)(ref val2)).stiffness = 0.75f; BackRightWheel.forwardFriction = val2; BackLeftWheel.forwardFriction = val2; ((WheelFrictionCurve)(ref val2)).stiffness = 2f; ((WheelFrictionCurve)(ref val2)).asymptoteValue = 1f; ((WheelFrictionCurve)(ref val2)).extremumSlip = 0.7f; FrontRightWheel.sidewaysFriction = val2; FrontLeftWheel.sidewaysFriction = val2; BackRightWheel.sidewaysFriction = val2; BackLeftWheel.sidewaysFriction = val2; } private void Awake() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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) contacts = (ContactPoint[])(object)new ContactPoint[24]; ((Component)ragdollPhysicsBody).transform.SetParent(RoundManager.Instance.VehiclesContainer); ((Component)windwiperPhysicsBody1).transform.SetParent(RoundManager.Instance.VehiclesContainer); ((Component)windwiperPhysicsBody2).transform.SetParent(RoundManager.Instance.VehiclesContainer); mainRigidbody.maxLinearVelocity = 50f; mainRigidbody.maxAngularVelocity = 4f; syncedPosition = ((Component)this).transform.position; syncedRotation = ((Component)this).transform.rotation; } private void Start() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) carHP = baseCarHP; SetWheelFriction(); FrontLeftWheel.brakeTorque = 1000f; FrontRightWheel.brakeTorque = 1000f; BackLeftWheel.brakeTorque = 1000f; BackRightWheel.brakeTorque = 1000f; if (testingVehicleInEditor) { ActivateControl(); } Debug.Log((object)$"Max linear velocity: {mainRigidbody.maxLinearVelocity}; dep: {mainRigidbody.maxDepenetrationVelocity}"); mainRigidbody.automaticCenterOfMass = false; Rigidbody obj = mainRigidbody; obj.centerOfMass += new Vector3(0f, -1f, 0.25f); mainRigidbody.automaticInertiaTensor = false; mainRigidbody.maxDepenetrationVelocity = 1f; currentRadioClip = new Random(StartOfRound.Instance.randomMapSeed).Next(0, radioClips.Length); decals = (DecalProjector[])(object)new DecalProjector[24]; if (StartOfRound.Instance.inShipPhase) { hasBeenSpawned = true; magnetedToShip = true; loadedVehicleFromSave = true; ((Component)this).transform.position = StartOfRound.Instance.magnetPoint.position + StartOfRound.Instance.magnetPoint.forward * 7f; StartMagneting(); } } public void RemoveKeyFromIgnition() { if (localPlayerInControl) { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 6); RemoveKeyFromIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } [ServerRpc(RequireOwnership = false)] public void RemoveKeyFromIgnitionServerRpc(int driverId) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2379619604u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2379619604u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RemoveKeyFromIgnitionClientRpc(driverId); } } } [ClientRpc] public void RemoveKeyFromIgnitionClientRpc(int driverId) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3778510610u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3778510610u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); } } private IEnumerator RemoveKey() { yield return (object)new WaitForSeconds(0.26f); if ((Object)(object)currentDriver != (Object)null) { currentDriver.movementAudio.PlayOneShot(removeKey); } keyIsInDriverHand = true; SetIgnition(started: false); SetFrontCabinLightOn(setOn: false); yield return (object)new WaitForSeconds(0.73f); keyIsInDriverHand = false; keyIgnitionCoroutine = null; } public void CancelTryCarIgnition() { if (localPlayerInControl && !ignitionStarted) { if (keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } carEngine1AudioActive = false; CancelIgnitionAnimation(); CancelTryIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, keyIsInIgnition); } } public void StartTryCarIgnition() { if (localPlayerInControl && !ignitionStarted) { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: true)); TryIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, keyIsInIgnition); } } private IEnumerator TryIgnition(bool isLocalDriver) { Debug.Log((object)"Starting ignition!!!"); if (keyIsInIgnition) { if (isLocalDriver) { if (GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim") == 3) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 2); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 12); } } yield return (object)new WaitForSeconds(0.035f); keyIsInDriverHand = true; currentDriver.movementAudio.PlayOneShot(twistKey); if (!isLocalDriver) { keyIgnitionCoroutine = null; yield break; } yield return (object)new WaitForSeconds(0.1467f); } else { if (isLocalDriver) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 2); } keyIsInDriverHand = true; yield return (object)new WaitForSeconds(0.66f); currentDriver.movementAudio.PlayOneShot(insertKey); if (!isLocalDriver) { keyIgnitionCoroutine = null; yield break; } yield return (object)new WaitForSeconds(0.3f); } keyIsInIgnition = true; SetFrontCabinLightOn(keyIsInIgnition); RevCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); engineAudio1.clip = revEngineStart; engineAudio1.volume = 0.7f; engineAudio1.PlayOneShot(engineRev); carEngine1AudioActive = true; yield return (object)new WaitForSeconds(Random.Range(0.4f, 1.1f)); if ((float)Random.Range(0, 100) < chanceToStartIgnition) { SetIgnition(started: true); keyIsInDriverHand = false; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 1); StartIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } else { chanceToStartIgnition += 24f; } keyIgnitionCoroutine = null; } [ServerRpc(RequireOwnership = false)] public void RevCarServerRpc(int driverId) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1024272216u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1024272216u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RevCarClientRpc(driverId); } } } [ClientRpc] public void RevCarClientRpc(int driverId) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(532109531u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 532109531u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { engineAudio1.clip = revEngineStart; engineAudio1.volume = 0.7f; engineAudio1.PlayOneShot(engineRev); carEngine1AudioActive = true; } } } [ServerRpc(RequireOwnership = false)] public void StartIgnitionServerRpc(int driverId) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3141029793u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3141029793u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StartIgnitionClientRpc(driverId); } } } [ClientRpc] public void StartIgnitionClientRpc(int driverId) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1434007931u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1434007931u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { SetIgnition(started: true); CancelIgnitionAnimation(); } } } [ServerRpc(RequireOwnership = false)] public void TryIgnitionServerRpc(int driverId, bool keyIsIn) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1576302371u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref keyIsIn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1576302371u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TryIgnitionClientRpc(driverId, keyIsIn); } } } [ClientRpc] public void TryIgnitionClientRpc(int driverId, bool keyIsIn) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3683253228u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref keyIsIn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3683253228u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId && !ignitionStarted) { keyIsInIgnition = keyIsIn; if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: false)); if (!keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } } } [ServerRpc(RequireOwnership = false)] public void CancelTryIgnitionServerRpc(int driverId, bool setKeyInSlot) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3939365593u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3939365593u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CancelTryIgnitionClientRpc(driverId, setKeyInSlot); } } } [ClientRpc] public void CancelTryIgnitionClientRpc(int driverId, bool setKeyInSlot) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1886249329u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1886249329u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { if (ignitionStarted) { SetIgnition(started: false); } if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } carEngine1AudioActive = false; keyIsInIgnition = setKeyInSlot; SetFrontCabinLightOn(keyIsInIgnition); } } public void CancelIgnitionAnimation() { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); keyIgnitionCoroutine = null; } keyIsInDriverHand = false; } public void SetIgnition(bool started) { keyIsInIgnition = started; SetFrontCabinLightOn(keyIsInIgnition); if (started) { startKeyIgnitionTrigger.SetActive(false); removeKeyIgnitionTrigger.SetActive(true); } else { startKeyIgnitionTrigger.SetActive(true); removeKeyIgnitionTrigger.SetActive(false); } if (started != ignitionStarted) { ignitionStarted = started; carEngine1AudioActive = started; if (started) { carExhaustParticle.Play(); engineAudio1.PlayOneShot(engineStartSuccessful); engineAudio1.clip = engineRun; } else { carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } } } public void ExitDriverSideSeat() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)$"local player in control? : {localPlayerInControl}"); if (!localPlayerInControl) { return; } GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); int num = CanExitCar(passengerSide: true); if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(driverSideExitPoints[num].position, false, 0f, false, true); return; } if (!driverSideDoor.boolValue) { driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } GameNetworkManager.Instance.localPlayerController.TeleportPlayer(driverSideExitPoints[1].position, false, 0f, false, true); } public void OnPassengerExit() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) passengerSeatTrigger.interactable = true; localPlayerInPassengerSeat = false; currentPassenger = null; SetVehicleCollisionForPlayer(setEnabled: true, GameNetworkManager.Instance.localPlayerController); PassengerLeaveVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } public void ExitPassengerSideSeat() { //IL_004b: 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) if (localPlayerInPassengerSeat) { int num = CanExitCar(passengerSide: true); if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(passengerSideExitPoints[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(passengerSideExitPoints[1].position, false, 0f, false, true); } } } [ServerRpc(RequireOwnership = false)] public void PassengerLeaveVehicleServerRpc(int playerId, Vector3 exitPoint) { //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_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_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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(254853252u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 254853252u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PassengerLeaveVehicleClientRpc(playerId, exitPoint); } } } [ClientRpc] public void PassengerLeaveVehicleClientRpc(int playerId, Vector3 exitPoint) { //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_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_0100: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2638605193u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2638605193u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val3 == (Object)(object)GameNetworkManager.Instance.localPlayerController)) { val3.TeleportPlayer(exitPoint, false, 0f, false, true); currentPassenger = null; if (!((NetworkBehaviour)this).IsOwner) { SetVehicleCollisionForPlayer(setEnabled: true, GameNetworkManager.Instance.localPlayerController); } passengerSeatTrigger.interactable = true; } } public void SetPlayerInCar(PlayerControllerB player) { player.movementAudio.PlayOneShot(sitDown); } public void SetPassengerInCar(PlayerControllerB player) { if (passengerSideDoor.boolValue) { passengerSideDoor.SetBoolOnClientOnly(false); } if ((Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController) { localPlayerInPassengerSeat = true; } else { passengerSeatTrigger.interactable = false; } currentPassenger = player; } private int CanExitCar(bool passengerSide) { //IL_0066: 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_001b: 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) if (passengerSide) { for (int i = 0; i < driverSideExitPoints.Length; i++) { if (!Physics.Linecast(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, driverSideExitPoints[i].position, exitCarLayerMask, (QueryTriggerInteraction)1)) { return i; } } return -1; } for (int j = 0; j < passengerSideExitPoints.Length; j++) { if (!Physics.Linecast(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, passengerSideExitPoints[j].position, exitCarLayerMask, (QueryTriggerInteraction)1)) { return j; } } return -1; } public void TakeControlOfVehicle() { if ((Object)(object)currentDriver != (Object)null) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); return; } if (driverSideDoor.boolValue) { driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } ActivateControl(); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); if (ignitionStarted) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } driverSideDoorTrigger.hoverTip = "Exit : [LMB]"; SetVehicleCollisionForPlayer(setEnabled: false, GameNetworkManager.Instance.localPlayerController); if (!testingVehicleInEditor) { SetPlayerInControlOfVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } public void LoseControlOfVehicle() { //IL_00b6: 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) driverSideDoorTrigger.hoverTip = "Use door : [LMB]"; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); localPlayerInControl = false; DisableVehicleCollisionForAllPlayers(); if (((Vector3)(ref averageVelocity)).magnitude < 3f) { limitTruckVelocityTimer = 0.7f; } if (!((Object)(object)currentDriver != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { DisableControl(); steeringAnimValue = 0f; keyIsInDriverHand = false; CancelIgnitionAnimation(); chanceToStartIgnition = 20f; if (!testingVehicleInEditor) { RemovePlayerControlOfVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)this).transform.position, ((Component)this).transform.rotation, ignitionStarted); } if ((Object)(object)GameNetworkManager.Instance.localPlayerController.currentlyHeldObjectServer != (Object)null) { GameNetworkManager.Instance.localPlayerController.currentlyHeldObjectServer.SetControlTipsForItem(); } else { HUDManager.Instance.ClearControlTips(); } } } [ServerRpc(RequireOwnership = false)] public void SetPlayerInControlOfVehicleServerRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2807656216u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2807656216u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled) { return; } if ((Object)(object)currentDriver != (Object)null && !((NetworkBehaviour)val3).IsServer) { CancelPlayerInControlOfVehicleClientRpc(playerId); return; } currentDriver = StartOfRound.Instance.allPlayerScripts[playerId]; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(StartOfRound.Instance.allPlayerScripts[playerId].actualClientId); if (((Vector3)(ref averageVelocity)).magnitude < 3f) { limitTruckVelocityTimer = 0.7f; } SetPlayerInControlOfVehicleClientRpc(playerId); } [ClientRpc] public void CancelPlayerInControlOfVehicleClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3756594919u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3756594919u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (playerId == (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { ExitDriverSideSeat(); } } } [ServerRpc(RequireOwnership = false)] public void RemovePlayerControlOfVehicleServerRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setKeyInIgnition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_00a4: 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_00be: 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_011d: 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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1977808634u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setKeyInIgnition, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1977808634u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)StartOfRound.Instance.allPlayerScripts[playerId] == (Object)null)) { syncedPosition = carLocation; syncedRotation = carRotation; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(StartOfRound.Instance.allPlayerScripts[0].actualClientId); RemovePlayerControlOfVehicleClientRpc(playerId, setKeyInIgnition); } } } [ClientRpc] public void SetPlayerInControlOfVehicleClientRpc(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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3343654051u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3343654051u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerId) { if (((Vector3)(ref averageVelocity)).magnitude < 3f) { limitTruckVelocityTimer = 0.7f; } Debug.Log((object)$"Set player in control: {playerId} "); currentDriver = StartOfRound.Instance.allPlayerScripts[playerId]; StartOfRound.Instance.allPlayerScripts[playerId].playerBodyAnimator.SetFloat("animationSpeed", 0.5f); SetVehicleCollisionForPlayer(setEnabled: false, currentDriver); } } [ClientRpc] public void RemovePlayerControlOfVehicleClientRpc(int playerId, bool setIgnitionStarted) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(167133403u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setIgnitionStarted, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 167133403u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerId) { CancelIgnitionAnimation(); SetIgnition(setIgnitionStarted); currentDriver = null; steeringAnimValue = 0f; } } } public void DisableVehicleCollisionForAllPlayers() { //IL_005d: 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) for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (!localPlayerInControl && (Object)(object)StartOfRound.Instance.allPlayerScripts[i] == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((Collider)((Component)StartOfRound.Instance.allPlayerScripts[i]).GetComponent()).excludeLayers = LayerMask.op_Implicit(0); } else { ((Collider)((Component)StartOfRound.Instance.allPlayerScripts[i]).GetComponent()).excludeLayers = LayerMask.op_Implicit(1073741824); } } } public void EnableVehicleCollisionForAllPlayers() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if ((Object)(object)StartOfRound.Instance.allPlayerScripts[i] != (Object)(object)currentPassenger) { ((Collider)((Component)StartOfRound.Instance.allPlayerScripts[i]).GetComponent()).excludeLayers = LayerMask.op_Implicit(0); } } } public void SetVehicleCollisionForPlayer(bool setEnabled, PlayerControllerB player) { //IL_0020: 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 (!setEnabled) { ((Collider)((Component)player).GetComponent()).excludeLayers = LayerMask.op_Implicit(1073741824); } else { ((Collider)((Component)player).GetComponent()).excludeLayers = LayerMask.op_Implicit(0); } } private void ActivateControl() { InputActionAsset val = ((!testingVehicleInEditor) ? InputSystem.actions : input.actions); val.FindAction("Jump", false).performed += DoTurboBoost; localPlayerInControl = true; if (!testingVehicleInEditor) { currentDriver = GameNetworkManager.Instance.localPlayerController; } } private void DisableControl() { InputActionAsset val = ((!testingVehicleInEditor) ? InputSystem.actions : input.actions); val.FindAction("Jump", false).performed -= DoTurboBoost; localPlayerInControl = false; drivePedalPressed = false; brakePedalPressed = false; currentDriver = null; } public void ShiftGearForward() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 if ((int)gear != 3) { if ((int)gear == 2) { Debug.Log((object)"Switching gears forward; 3"); ShiftToGear(3); } else if ((int)gear == 1) { Debug.Log((object)"Switching gears forward; 2"); ShiftToGear(2); } } } private void ShiftGearForwardInput(CallbackContext context) { if (((CallbackContext)(ref context)).performed) { ShiftGearForward(); } } private void ShiftGearBack() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 if ((int)gear != 1) { if ((int)gear == 3) { Debug.Log((object)"Switching gears; 2"); ShiftToGear(2); } else if ((int)gear == 2) { Debug.Log((object)"Switching gears; 1"); ShiftToGear(1); } } } private void ShiftToGear(int setGear) { //IL_0002: 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_0023: Invalid comparison between Unknown and I4 gear = (CarGearShift)setGear; gearStickAudio.PlayOneShot(gearStickAudios[setGear - 1]); if ((int)gear != 3) { Debug.Log((object)"Enabling switch gears boost"); switchGearsBoostEnabled = true; } else { Debug.Log((object)"Disabling switch gears boost"); switchGearsBoostEnabled = false; } } public void ShiftToGearAndSync(int setGear) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Invalid comparison between Unknown and I4 //IL_0016: 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_0037: Invalid comparison between Unknown and I4 if ((int)gear != setGear) { timeAtLastGearShift = Time.realtimeSinceStartup; gear = (CarGearShift)setGear; gearStickAudio.PlayOneShot(gearStickAudios[setGear - 1]); if ((int)gear != 3) { Debug.Log((object)"Shift to gear and sync; gear is not park"); switchGearsBoostEnabled = true; } ShiftToGearServerRpc(setGear, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } [ServerRpc(RequireOwnership = false)] public void ShiftToGearServerRpc(int setGear, 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_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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1664078425u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, setGear); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1664078425u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ShiftToGearClientRpc(setGear, playerId); } } } [ClientRpc] public void ShiftToGearClientRpc(int setGear, 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_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_0100: 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_0121: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2439915998u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, setGear); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2439915998u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerId) { timeAtLastGearShift = Time.realtimeSinceStartup; gear = (CarGearShift)setGear; gearStickAudio.PlayOneShot(gearStickAudios[setGear - 1]); if ((int)gear != 3) { switchGearsBoostEnabled = true; } } } private void ShiftGearBackInput(CallbackContext context) { if (((CallbackContext)(ref context)).performed) { ShiftGearBack(); } } private void GetVehicleInput() { //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_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) if (localPlayerInControl) { if (testingVehicleInEditor) { moveInputVector = input.actions.FindAction("Move", false).ReadValue(); } else { moveInputVector = InputSystem.actions.FindAction("Move", false).ReadValue(); } float num = steeringWheelTurnSpeed; steeringInput = Mathf.Clamp(steeringInput + moveInputVector.x * num * Time.deltaTime, -3f, 3f); if (Mathf.Abs(moveInputVector.x) > 0.1f) { steeringWheelAudio.volume = Mathf.Lerp(steeringWheelAudio.volume, Mathf.Abs(moveInputVector.x), 5f * Time.deltaTime); } else { steeringWheelAudio.volume = Mathf.Lerp(steeringWheelAudio.volume, 0f, 5f * Time.deltaTime); } steeringAnimValue = moveInputVector.x; drivePedalPressed = moveInputVector.y > 0.1f; brakePedalPressed = moveInputVector.y < -0.1f; } } [ServerRpc] public void SyncCarPositionServerRpc(Vector3 carPosition, Vector3 carRotation, float steeringInput, float EngineRPM) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Invalid comparison between Unknown and I4 //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: 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_00f8: 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_0112: 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)base.__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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3005876468u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref carPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref steeringInput, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref EngineRPM, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3005876468u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SyncCarPositionClientRpc(carPosition, carRotation, steeringInput, EngineRPM); } } [ClientRpc] public void SyncCarPositionClientRpc(Vector3 carPosition, Vector3 carRotation, float steeringInput, float engineSpeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00b2: 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_00cc: 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_0130: 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_0137: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1907122222u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref carPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref steeringInput, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref engineSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1907122222u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { ((Component)this).gameObject.GetComponent().isKinematic = true; syncedPosition = carPosition; syncedRotation = Quaternion.Euler(carRotation); steeringAnimValue = steeringInput; EngineRPM = engineSpeed; } } } [ServerRpc] public void MagnetCarServerRpc(Vector3 targetPosition, Vector3 targetRotation, int playerWhoSent) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Invalid comparison between Unknown and I4 //IL_012e: 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_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_00d1: 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_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)base.__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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(152467739u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref targetPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref targetRotation); BytePacker.WriteValueBitPacked(val, playerWhoSent); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 152467739u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MagnetCarClientRpc(targetPosition, targetRotation, playerWhoSent); } } [ClientRpc] public void MagnetCarClientRpc(Vector3 targetPosition, Vector3 targetRotation, int playerWhoSent) { //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_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_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) //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_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014c: 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_0153: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(706048695u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref targetPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref targetRotation); BytePacker.WriteValueBitPacked(val, playerWhoSent); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 706048695u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerWhoSent) { magnetedToShip = true; magnetTime = 0f; magnetRotationTime = 0f; StartOfRound.Instance.isObjectAttachedToMagnet = true; magnetStartPosition = ((Component)this).transform.position; magnetStartRotation = ((Component)this).transform.rotation; magnetTargetPosition = targetPosition; magnetTargetRotation = Quaternion.Euler(targetRotation); CollectItemsInTruck(); } } } public void SetHonkingLocalClient(bool honk) { honkingHorn = honk; SetHonkServerRpc(honk, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [ServerRpc(RequireOwnership = false)] public void SetHonkServerRpc(bool honk, 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_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_008c: 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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1613321329u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref honk, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1613321329u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetHonkClientRpc(honk, playerId); } } } [ClientRpc] public void SetHonkClientRpc(bool honk, 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_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_008c: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3511018852u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref honk, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3511018852u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerId) { honkingHorn = honk; } } } public void CollectItemsInTruck() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Collect items in truck A"); Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, 25f, 64, (QueryTriggerInteraction)1); Debug.Log((object)$"Collect items in truck B; {array.Length}"); for (int i = 0; i < array.Length; i++) { GrabbableObject component = ((Component)array[i]).GetComponent(); Debug.Log((object)$"Collect items in truck C; {(Object)(object)component != (Object)null}"); if ((Object)(object)component != (Object)null) { Debug.Log((object)$"{!component.isHeld}; {!component.isHeldByEnemy}; {(Object)(object)((Component)array[i]).transform.parent == (Object)(object)((Component)this).transform}"); Debug.Log((object)$"Magneted? : {magnetedToShip}"); } if ((Object)(object)component != (Object)null && !component.isHeld && !component.isHeldByEnemy && (Object)(object)((Component)array[i]).transform.parent == (Object)(object)((Component)this).transform) { GameNetworkManager.Instance.localPlayerController.SetItemInElevator(magnetedToShip, magnetedToShip, component); } } } public void StartMagneting() { //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_0063: 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_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_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_00b5: 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) //IL_00d3: 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_00f1: 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_0105: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_0141: 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_0185: 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_019b: 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_01f5: 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_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: 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_0216: 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_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0244: 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_0264: 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_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_028f: 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_0297: 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_02e8: 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_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_02be: Unknown result type (might be due to invalid IL or missing references) //IL_0335: 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_0340: 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_0350: 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_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_03ce: 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_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: 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_0315: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner) { return; } magnetTime = 0f; magnetRotationTime = 0f; StartOfRound.Instance.isObjectAttachedToMagnet = true; magnetedToShip = true; averageVelocityAtMagnetStart = averageVelocity; ((Component)this).gameObject.GetComponent().isKinematic = true; RoundManager.Instance.tempTransform.eulerAngles = new Vector3(0f, ((Component)this).transform.eulerAngles.y, 0f); Debug.DrawRay(((Component)this).transform.position, RoundManager.Instance.tempTransform.forward * 5f, Color.green, 2f); Debug.DrawRay(((Component)this).transform.position, -StartOfRound.Instance.magnetPoint.forward * 5f, Color.red, 2f); float num = Vector3.Angle(RoundManager.Instance.tempTransform.forward, -StartOfRound.Instance.magnetPoint.forward); Debug.Log((object)$"Truck initial angle to magnet: {num}"); Vector3 eulerAngles = ((Component)this).transform.eulerAngles; if (num < 47f || num > 133f) { if (eulerAngles.y < 0f) { eulerAngles.y -= 46f - num; } else { eulerAngles.y += 46f - num; } } Debug.DrawRay(((Component)this).transform.position, eulerAngles * 4f, Color.white, 2f); eulerAngles.y = Mathf.Round(eulerAngles.y / 90f) * 90f; eulerAngles.z = Mathf.Round(eulerAngles.z / 90f) * 90f; eulerAngles.x += Random.Range(-5f, 5f); Debug.DrawRay(((Component)this).transform.position, eulerAngles * 4f, Color.cyan, 2f); magnetTargetRotation = Quaternion.Euler(eulerAngles); magnetStartRotation = ((Component)this).transform.rotation; Quaternion rotation = ((Component)this).transform.rotation; ((Component)this).transform.rotation = magnetTargetRotation; magnetTargetPosition = ((Collider)boundsCollider).ClosestPoint(StartOfRound.Instance.magnetPoint.position) - ((Component)this).transform.position; float y = magnetTargetPosition.y; Bounds bounds = ((Collider)boundsCollider).bounds; if (y >= ((Bounds)(ref bounds)).extents.y) { ref float y2 = ref magnetTargetPosition.y; float num2 = y2; bounds = ((Collider)boundsCollider).bounds; y2 = num2 - ((Bounds)(ref bounds)).extents.y / 2f; } else { float y3 = magnetTargetPosition.y; bounds = ((Collider)boundsCollider).bounds; if (y3 <= ((Bounds)(ref bounds)).extents.y * 0.4f) { ref float y4 = ref magnetTargetPosition.y; float num3 = y4; bounds = ((Collider)boundsCollider).bounds; y4 = num3 + ((Bounds)(ref bounds)).extents.y / 2f; } } magnetTargetPosition = StartOfRound.Instance.magnetPoint.position - magnetTargetPosition; Debug.DrawLine(((Component)this).transform.position, magnetTargetPosition); magnetTargetPosition.z = Mathf.Min(-20.4f, magnetTargetPosition.z); magnetTargetPosition.y = Mathf.Max(2.5f, magnetStartPosition.y); magnetTargetPosition = StartOfRound.Instance.elevatorTransform.InverseTransformPoint(magnetTargetPosition); ((Component)this).transform.rotation = rotation; magnetStartPosition = ((Component)this).transform.position; CollectItemsInTruck(); MagnetCarServerRpc(magnetTargetPosition, eulerAngles, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } public void AddTurboBoost() { int setTurboBoosts = Mathf.Min(turboBoosts + 1, 5); AddTurboBoostOnLocalClient(setTurboBoosts); AddTurboBoostServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, setTurboBoosts); } public void AddTurboBoostOnLocalClient(int setTurboBoosts) { hoodAudio.PlayOneShot(pourTurbo); turboBoosts = setTurboBoosts; } [ServerRpc(RequireOwnership = false)] public void AddTurboBoostServerRpc(int playerId, int setTurboBoosts) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2989386144u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, setTurboBoosts); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2989386144u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AddTurboBoostClientRpc(playerId, setTurboBoosts); } } } [ClientRpc] public void AddTurboBoostClientRpc(int playerId, int setTurboBoosts) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(580995605u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, setTurboBoosts); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 580995605u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerId) { AddTurboBoostOnLocalClient(setTurboBoosts); } } } public void AddEngineOil() { int num = Mathf.Min(carHP + 4, baseCarHP); AddEngineOilOnLocalClient(num); AddEngineOilServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, num); } public void AddEngineOilOnLocalClient(int setCarHP) { hoodAudio.PlayOneShot(pourOil); carHP = setCarHP; } [ServerRpc(RequireOwnership = false)] public void AddEngineOilServerRpc(int playerId, int setHP) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2220215192u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, setHP); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2220215192u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AddEngineOilClientRpc(playerId, setHP); } } } [ClientRpc] public void AddEngineOilClientRpc(int playerId, int setHP) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(507845690u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, setHP); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 507845690u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != playerId) { AddEngineOilOnLocalClient(setHP); } } } private void DoTurboBoost(CallbackContext context) { //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_0038: Unknown result type (might be due to invalid IL or missing references) if (((CallbackContext)(ref context)).performed && localPlayerInControl && !jumpingInCar && !keyIsInDriverHand) { Vector2 dir = InputSystem.actions.FindAction("Move", false).ReadValue(); UseTurboBoostLocalClient(dir); UseTurboBoostServerRpc(); } } public void UseTurboBoostLocalClient(Vector2 dir = default(Vector2)) { //IL_003d: 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_010e: 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_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_0067: 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_0071: 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_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_008f: 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) if (((NetworkBehaviour)this).IsOwner) { if (turboBoosts == 0 || !ignitionStarted) { jumpingInCar = true; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetTrigger("SA_JumpInCar"); ((MonoBehaviour)this).StartCoroutine(jerkCarUpward(Vector2.op_Implicit(dir))); } else { Vector3 val = ((Component)this).transform.TransformDirection(new Vector3(dir.x, 0f, dir.y)); mainRigidbody.AddForce(val * turboBoostForce + Vector3.up * turboBoostUpwardForce * 0.6f, (ForceMode)1); } } if (turboBoosts > 0 && ignitionStarted) { turboBoosts = Mathf.Max(0, turboBoosts - 1); turboBoostAudio.PlayOneShot(turboBoostSFX); engineAudio1.PlayOneShot(turboBoostSFX2); turboBoostParticle.Play(true); if (Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)turboBoostAudio).transform.position) < 10f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } } else { springAudio.PlayOneShot(jumpInCarSFX); } } private IEnumerator jerkCarUpward(Vector3 dir) { //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 (object)new WaitForSeconds(0.16f); if (!((NetworkBehaviour)this).IsOwner) { jumpingInCar = false; yield break; } Vector3 val = ((Component)this).transform.TransformDirection(new Vector3(dir.x, 0f, dir.y)); Debug.DrawRay(((Component)this).transform.position, val * 20f, Color.blue, 5f); mainRigidbody.AddForce(val * turboBoostForce * 0.22f + Vector3.up * turboBoostUpwardForce * 0.1f, (ForceMode)1); mainRigidbody.AddForceAtPosition(Vector3.up * jumpForce, ((Component)hoodFireAudio).transform.position - Vector3.up * 2f, (ForceMode)1); yield return (object)new WaitForSeconds(0.15f); jumpingInCar = false; } [ServerRpc(RequireOwnership = false)] public void UseTurboBoostServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4057635380u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4057635380u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; UseTurboBoostClientRpc(); } } } [ClientRpc] public void UseTurboBoostClientRpc() { //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_00d1: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3713475905u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3713475905u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { UseTurboBoostLocalClient(); } } } public void OnDisable() { //IL_008b: 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) DisableControl(); if (localPlayerInControl || localPlayerInPassengerSeat) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)physicsRegion.physicsTransform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[i]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[i]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[i].isHeld) { componentsInChildren[i].FallToGround(false, false, default(Vector3)); } } physicsRegion.disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains(physicsRegion)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove(physicsRegion); } } private void Update() { //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0445: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_057f: 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_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_0c2d: Unknown result type (might be due to invalid IL or missing references) //IL_0c33: Invalid comparison between Unknown and I4 //IL_09ac: Unknown result type (might be due to invalid IL or missing references) //IL_09b1: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09b6: Invalid comparison between Unknown and I4 //IL_09b8: Unknown result type (might be due to invalid IL or missing references) //IL_09bb: Invalid comparison between Unknown and I4 //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0d97: Unknown result type (might be due to invalid IL or missing references) //IL_0d9d: Invalid comparison between Unknown and I4 //IL_0b01: Unknown result type (might be due to invalid IL or missing references) //IL_0b06: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Unknown result type (might be due to invalid IL or missing references) //IL_0b1b: Unknown result type (might be due to invalid IL or missing references) //IL_0b20: Unknown result type (might be due to invalid IL or missing references) //IL_0b2b: Unknown result type (might be due to invalid IL or missing references) //IL_0b35: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Unknown result type (might be due to invalid IL or missing references) if (destroyNextFrame) { if (((NetworkBehaviour)this).IsOwner) { Debug.Log((object)$"Is networkobject spawned: {((NetworkBehaviour)this).NetworkObject.IsSpawned}"); Debug.Log((object)"Destroying car on local client"); Object.Destroy((Object)(object)((Component)windwiperPhysicsBody1).gameObject); Object.Destroy((Object)(object)((Component)windwiperPhysicsBody2).gameObject); Object.Destroy((Object)(object)((Component)ragdollPhysicsBody).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } return; } if ((Object)(object)((NetworkBehaviour)this).NetworkObject != (Object)null && !((NetworkBehaviour)this).NetworkObject.IsSpawned) { physicsRegion.disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains(physicsRegion)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove(physicsRegion); } if (localPlayerInControl || localPlayerInPassengerSeat) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)physicsRegion.physicsTransform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[i]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[i]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[i].isHeld) { componentsInChildren[i].FallToGround(false, false, default(Vector3)); } } Debug.Log((object)"Destroying car on local client, next frame"); destroyNextFrame = true; return; } ReactToDamage(); driverSideDoorTrigger.interactable = Time.realtimeSinceStartup - timeSinceSpringingDriverSeat > 1.6f; passengerSideDoorTrigger.interactable = Time.realtimeSinceStartup - timeSinceSpringingDriverSeat > 1.6f; if (magnetedToShip) { if (!StartOfRound.Instance.magnetOn) { magnetedToShip = false; StartOfRound.Instance.isObjectAttachedToMagnet = false; CollectItemsInTruck(); return; } pressedTurbo = false; limitTruckVelocityTimer = 1.3f; EngineRPM = Mathf.Lerp(EngineRPM, 0f, 3f * Time.deltaTime); physicsRegion.priority = 0; magnetTime = Mathf.Min(magnetTime + Time.deltaTime, 1f); magnetRotationTime = Mathf.Min(magnetTime + Time.deltaTime * 0.75f, 1f); if (StartOfRound.Instance.inShipPhase) { carHP = baseCarHP; } if (!finishedMagneting && magnetTime > 0.7f) { finishedMagneting = true; if (!loadedVehicleFromSave) { turbulenceAmount = 2f; turbulenceAudio.volume = 0.6f; turbulenceAudio.PlayOneShot(maxCollisions[Random.Range(0, maxCollisions.Length)]); } } } else { physicsRegion.priority = 1; finishedMagneting = false; if ((Object)(object)StartOfRound.Instance.attachedVehicle == (Object)(object)this) { StartOfRound.Instance.attachedVehicle = null; } if (((NetworkBehaviour)this).IsOwner && !StartOfRound.Instance.isObjectAttachedToMagnet && StartOfRound.Instance.magnetOn && Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position) < 10f && !Physics.Linecast(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position, 256, (QueryTriggerInteraction)1)) { StartMagneting(); return; } if (((NetworkBehaviour)this).IsOwner) { if (enabledCollisionForAllPlayers) { enabledCollisionForAllPlayers = false; DisableVehicleCollisionForAllPlayers(); } SyncCarPhysicsToOtherClients(); } else { if (!enabledCollisionForAllPlayers) { enabledCollisionForAllPlayers = true; EnableVehicleCollisionForAllPlayers(); } ((Component)this).gameObject.GetComponent().isKinematic = true; } } if (honkingHorn) { if (!hornAudio.isPlaying) { hornAudio.Play(); hornAudio.pitch = 1f; } else if (Time.realtimeSinceStartup - timeAtLastHornPing > 2f) { timeAtLastHornPing = Time.realtimeSinceStartup; RoundManager.Instance.PlayAudibleNoise(((Component)hornAudio).transform.position, 28f, 0.85f, 0, false, 106217); } } else { hornAudio.pitch = Mathf.Max(hornAudio.pitch - Time.deltaTime * 6f, 0.01f); if (hornAudio.pitch < 0.02f) { hornAudio.Stop(); } } FrontLeftWheel.steerAngle = 15f * steeringInput; FrontRightWheel.steerAngle = 15f * steeringInput; if (carDestroyed) { return; } if (keyIsInDriverHand && (Object)(object)currentDriver != (Object)null) { ((Renderer)keyObject).enabled = true; Transform val = ((!localPlayerInControl) ? currentDriver.serverItemHolder : currentDriver.localItemHolder); ((Component)keyObject).transform.rotation = val.rotation; ((Component)keyObject).transform.Rotate(rotationOffset); ((Component)keyObject).transform.position = val.position; Vector3 val2 = positionOffset; val2 = val.rotation * val2; Transform transform = ((Component)keyObject).transform; transform.position += val2; } else { if (Time.realtimeSinceStartup - timeAtLastGearShift < 1.7f && (Object)(object)currentDriver != (Object)null) { currentDriver.playerBodyAnimator.SetFloat("SA_CarMotionTime", gearStickAnimValue); } if (localPlayerInControl && ignitionStarted && keyIgnitionCoroutine == null) { if (GameNetworkManager.Instance.localPlayerController.ladderCameraHorizontal > 52f) { if (Time.realtimeSinceStartup - timeAtLastGearShift < 1.7f) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 5); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 4); } } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } } if (keyIsInIgnition) { ((Renderer)keyObject).enabled = true; if (ignitionStarted) { ((Component)keyObject).transform.position = ignitionTurnedPosition.position; ((Component)keyObject).transform.rotation = ignitionTurnedPosition.rotation; } else { ((Component)keyObject).transform.position = ignitionNotTurnedPosition.position; ((Component)keyObject).transform.rotation = ignitionNotTurnedPosition.rotation; } } else { ((Renderer)keyObject).enabled = false; } } if (!localPlayerInControl || !((NetworkBehaviour)this).IsOwner) { SetCarEffects(steeringAnimValue); return; } if (ignitionStarted) { GetVehicleInput(); } if (limitTruckVelocityTimer <= 0f) { mainRigidbody.maxAngularVelocity = 4f; mainRigidbody.maxLinearVelocity = 50f; mainRigidbody.maxDepenetrationVelocity = 7f; } else { limitTruckVelocityTimer -= Time.deltaTime * 0.5f; mainRigidbody.maxDepenetrationVelocity = Mathf.Lerp(0.3f, 7f, Mathf.Clamp(limitTruckVelocityTimer, 0f, 1f)); mainRigidbody.maxAngularVelocity = Mathf.Lerp(0.1f, 4f, Mathf.Clamp(limitTruckVelocityTimer, 0f, 1f)); mainRigidbody.maxLinearVelocity = Mathf.Lerp(0.1f, 60f, Mathf.Clamp(limitTruckVelocityTimer, 0f, 1f)); } SetCarEffects(steeringAnimValue); float num = 0f; EngineRPM = (FrontLeftWheel.rpm + FrontRightWheel.rpm) / 2f; vehicleEngineAudio.pitch = Mathf.Min(Mathf.Abs(EngineRPM / MaxEngineRPM) + 1f, 1.3f); if (brakePedalPressed) { if (drivePedalPressed) { num += 2f; lastStressType += "; Accelerating while braking"; } FrontLeftWheel.brakeTorque = 2000f; FrontRightWheel.brakeTorque = 2000f; BackLeftWheel.brakeTorque = 2000f; BackRightWheel.brakeTorque = 2000f; for (int j = 0; j < otherWheels.Length; j++) { otherWheels[j].brakeTorque = 2000f; } } else { FrontLeftWheel.brakeTorque = 0f; FrontRightWheel.brakeTorque = 0f; BackLeftWheel.brakeTorque = 0f; BackRightWheel.brakeTorque = 0f; for (int k = 0; k < otherWheels.Length; k++) { otherWheels[k].brakeTorque = 0f; } } if (drivePedalPressed && ignitionStarted) { CarGearShift val3 = gear; if ((int)val3 != 1) { if ((int)val3 == 2) { if (switchGearsBoostEnabled) { mainRigidbody.AddForce(((Component)this).transform.TransformDirection(new Vector3(0f, 0f, -1f)) * turboBoostForce * 0.3f + Vector3.up * turboBoostUpwardForce * 0.06f, (ForceMode)1); switchGearsBoostEnabled = false; } if (EngineRPM > 5000f) { num += Mathf.Min((EngineRPM - 5000f) / 10000f, 0f); lastStressType += "; Reversing while at high speed"; } FrontLeftWheel.motorTorque = 0f - EngineTorque; FrontRightWheel.motorTorque = 0f - EngineTorque; BackLeftWheel.motorTorque = 0f - EngineTorque; BackRightWheel.motorTorque = 0f - EngineTorque; for (int l = 0; l < otherWheels.Length; l++) { otherWheels[l].motorTorque = 0f - EngineTorque; } } } else { if (switchGearsBoostEnabled) { mainRigidbody.AddForce(0.35f * turboBoostForce * ((Component)this).transform.TransformDirection(new Vector3(0f, 0f, 1f)) + 0.06f * turboBoostUpwardForce * Vector3.up, (ForceMode)1); switchGearsBoostEnabled = false; } FrontLeftWheel.motorTorque = Mathf.Clamp(Mathf.MoveTowards(FrontLeftWheel.motorTorque, EngineTorque, carAcceleration * Time.deltaTime), 325f, 1000f); FrontRightWheel.motorTorque = FrontLeftWheel.motorTorque; BackLeftWheel.motorTorque = FrontLeftWheel.motorTorque; BackRightWheel.motorTorque = FrontLeftWheel.motorTorque; for (int m = 0; m < otherWheels.Length; m++) { otherWheels[m].motorTorque = FrontLeftWheel.motorTorque; } } } else if (pressedTurbo) { pressedTurbo = false; } if ((int)gear == 3 || !ignitionStarted) { if (Mathf.Abs(EngineRPM) > 3000f && ignitionStarted) { num += Mathf.Clamp((EngineRPM - 200f) / 350f, 0f, 1.3f); lastStressType += "; In park while at high speed"; } if (drivePedalPressed && ignitionStarted) { num += 1.2f; lastStressType += "; Accelerating while in park"; } FrontLeftWheel.motorTorque = 0f; FrontRightWheel.motorTorque = 0f; BackLeftWheel.motorTorque = 0f; BackRightWheel.motorTorque = 0f; FrontLeftWheel.brakeTorque = 2000f; FrontRightWheel.brakeTorque = 2000f; BackLeftWheel.brakeTorque = 2000f; BackRightWheel.brakeTorque = 2000f; for (int n = 0; n < otherWheels.Length; n++) { otherWheels[n].brakeTorque = 2000f; otherWheels[n].motorTorque = 0f; } } else if (!drivePedalPressed) { float num2 = 1f; if ((int)gear == 2) { num2 = -1f; } FrontLeftWheel.motorTorque = idleSpeed * num2; FrontRightWheel.motorTorque = idleSpeed * num2; BackLeftWheel.motorTorque = idleSpeed * num2; BackRightWheel.motorTorque = idleSpeed * num2; for (int num3 = 0; num3 < otherWheels.Length; num3++) { otherWheels[num3].motorTorque = idleSpeed * num2; } } SetInternalStress(num); stressPerSecond = num; } public void ChangeRadioStation() { if (!radioOn) { SetRadioOnLocalClient(on: true, setClip: false); } currentRadioClip = (currentRadioClip + 1) % radioClips.Length; radioAudio.clip = radioClips[currentRadioClip]; radioAudio.time = Mathf.Clamp(currentSongTime % radioAudio.clip.length, 0.01f, radioAudio.clip.length - 0.1f); radioAudio.Play(); int num = (int)Mathf.Round(radioSignalQuality); switch (num) { case 3: radioSignalQuality = 1f; radioSignalDecreaseThreshold = 10f; break; case 0: radioSignalQuality = 3f; radioSignalDecreaseThreshold = 90f; break; case 1: radioSignalQuality = 2f; radioSignalDecreaseThreshold = 70f; break; case 2: radioSignalQuality = 1f; radioSignalDecreaseThreshold = 30f; break; } SetRadioStationServerRpc(currentRadioClip, num); } [ServerRpc(RequireOwnership = false)] public void SetRadioStationServerRpc(int radioStation, int signalQuality) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(67187887u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, radioStation); BytePacker.WriteValueBitPacked(val, signalQuality); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 67187887u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetRadioStationClientRpc(radioStation, signalQuality); } } } [ClientRpc] public void SetRadioStationClientRpc(int radioStation, int signalQuality) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1229145751u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, radioStation); BytePacker.WriteValueBitPacked(val, signalQuality); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1229145751u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (currentRadioClip != radioStation) { if (!radioOn) { SetRadioOnLocalClient(on: true, setClip: false); } currentRadioClip = radioStation; radioSignalQuality = signalQuality; radioAudio.Play(); } } public void SwitchRadio() { radioOn = !radioOn; if (radioOn) { radioAudio.clip = radioClips[currentRadioClip]; radioAudio.Play(); radioInterference.Play(); } else { radioAudio.Stop(); radioInterference.Stop(); } SetRadioOnServerRpc(radioOn); } [ServerRpc(RequireOwnership = false)] public void SetRadioOnServerRpc(bool on) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(747204646u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref on, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 747204646u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetRadioOnClientRpc(on); } } } [ClientRpc] public void SetRadioOnClientRpc(bool on) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2634275797u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref on, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2634275797u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (radioOn != on) { SetRadioOnLocalClient(on); } } } private void SetRadioOnLocalClient(bool on, bool setClip = true) { radioOn = on; if (on) { if (setClip) { radioAudio.clip = radioClips[currentRadioClip]; } radioAudio.Play(); radioInterference.Play(); } else { radioAudio.Stop(); radioInterference.Stop(); } } public void SetRadioValues() { if (radioTurnedOnBefore) { currentSongTime += Time.deltaTime; } if (!radioOn) { return; } if (!radioAudio.isPlaying) { radioAudio.Play(); } radioTurnedOnBefore = true; if (((NetworkBehaviour)this).IsOwner) { float num = Random.Range(0, 100); float num2 = (3f - radioSignalQuality - 1.5f) * radioSignalTurbulence; radioSignalDecreaseThreshold = Mathf.Clamp(radioSignalDecreaseThreshold + Time.deltaTime * num2, 0f, 100f); if (num > radioSignalDecreaseThreshold) { radioSignalQuality = Mathf.Clamp(radioSignalQuality - Time.deltaTime, 0f, 3f); } else { radioSignalQuality = Mathf.Clamp(radioSignalQuality + Time.deltaTime, 0f, 3f); } if (Time.realtimeSinceStartup - changeRadioSignalTime > 0.3f) { changeRadioSignalTime = Time.realtimeSinceStartup; if (radioSignalQuality < 1.2f && Random.Range(0, 100) < 6) { radioSignalQuality = Mathf.Min(radioSignalQuality + 1.5f, 3f); radioSignalDecreaseThreshold = Mathf.Min(radioSignalDecreaseThreshold + 30f, 100f); } SetRadioSignalQualityServerRpc((int)Mathf.Round(radioSignalQuality)); } } switch ((int)Mathf.Round(radioSignalQuality)) { case 3: radioAudio.volume = Mathf.Lerp(radioAudio.volume, 1f, 2f * Time.deltaTime); radioInterference.volume = Mathf.Lerp(radioInterference.volume, 0f, 2f * Time.deltaTime); break; case 2: radioAudio.volume = Mathf.Lerp(radioAudio.volume, 0.85f, 2f * Time.deltaTime); radioInterference.volume = Mathf.Lerp(radioInterference.volume, 0.4f, 2f * Time.deltaTime); break; case 1: radioAudio.volume = Mathf.Lerp(radioAudio.volume, 0.6f, 2f * Time.deltaTime); radioInterference.volume = Mathf.Lerp(radioInterference.volume, 0.8f, 2f * Time.deltaTime); break; case 0: radioAudio.volume = Mathf.Lerp(radioAudio.volume, 0.4f, 2f * Time.deltaTime); radioInterference.volume = Mathf.Lerp(radioInterference.volume, 1f, 2f * Time.deltaTime); break; } } [ServerRpc] public void SetRadioSignalQualityServerRpc(int signalQuality) { //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)base.__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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3998038496u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, signalQuality); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3998038496u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetRadioSignalQualityClientRpc(signalQuality); } } [ClientRpc] public void SetRadioSignalQualityClientRpc(int signalQuality) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(650028427u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, signalQuality); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 650028427u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { radioSignalQuality = signalQuality; } } } private void MatchWheelMeshToCollider(MeshRenderer wheelMesh, WheelCollider wheelCollider) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_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_0075: 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_0087: 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_0048: 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_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_009c: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)wheelCollider).transform.position; if (Physics.Raycast(position, -((Component)wheelCollider).transform.up, ref hit, wheelCollider.suspensionDistance + wheelCollider.radius, 2304)) { ((Component)wheelMesh).transform.position = ((RaycastHit)(ref hit)).point + ((Component)wheelCollider).transform.up * wheelCollider.radius; } else { ((Component)wheelMesh).transform.position = position - ((Component)wheelCollider).transform.up * wheelCollider.suspensionDistance; } ((Component)wheelMesh).transform.Rotate(Vector3.right, EngineRPM * 0.5f, (Space)1); } [ServerRpc] public void SyncExtremeStressServerRpc(bool underStress) { //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)base.__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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3213163124u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref underStress, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3213163124u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SyncExtremeStressClientRpc(underStress); } } [ClientRpc] public void SyncExtremeStressClientRpc(bool underStress) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2858054944u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref underStress, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2858054944u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (carDestroyed) { underExtremeStress = false; } else { underExtremeStress = underStress; } } } private void SetCarEffects(float setSteering) { //IL_00ea: 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_0137: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Invalid comparison between Unknown and I4 //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Invalid comparison between Unknown and I4 //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0588: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_05f5: Unknown result type (might be due to invalid IL or missing references) steeringWheelAnimFloat = Mathf.Clamp(steeringWheelAnimFloat + setSteering * steeringWheelTurnSpeed * Time.deltaTime / 6f, -0.99f, 0.99f); float num = Mathf.Clamp((steeringWheelAnimFloat + 1f) / 2f, 0.01f, 0.99f) - steeringWheelAnimator.GetFloat("steeringWheelTurnSpeed"); steeringWheelAnimator.SetFloat("steeringWheelTurnSpeed", Mathf.Clamp((steeringWheelAnimFloat + 1f) / 2f, 0.01f, 0.99f)); if ((Object)(object)currentDriver != (Object)null) { currentDriver.playerBodyAnimator.SetFloat("animationSpeed", currentDriver.playerBodyAnimator.GetFloat("animationSpeed") + num * 2f); } ((Component)leftWheelMesh).transform.localEulerAngles = new Vector3(((Component)leftWheelMesh).transform.localEulerAngles.x, steeringWheelAnimFloat * 50f, 0f); MatchWheelMeshToCollider(leftWheelMesh, FrontLeftWheel); ((Component)rightWheelMesh).transform.localEulerAngles = new Vector3(((Component)rightWheelMesh).transform.localEulerAngles.x, steeringWheelAnimFloat * 50f, 0f); MatchWheelMeshToCollider(rightWheelMesh, FrontRightWheel); MatchWheelMeshToCollider(backLeftWheelMesh, BackLeftWheel); MatchWheelMeshToCollider(backRightWheelMesh, BackRightWheel); if ((int)gear == 2) { gearStickAnimValue = Mathf.MoveTowards(gearStickAnimValue, 0.5f, 15f * Time.deltaTime * (Time.realtimeSinceStartup - timeAtLastGearShift)); } else if ((int)gear == 3) { gearStickAnimValue = Mathf.MoveTowards(gearStickAnimValue, 1f, 15f * Time.deltaTime * (Time.realtimeSinceStartup - timeAtLastGearShift)); } else { gearStickAnimValue = Mathf.MoveTowards(gearStickAnimValue, 0f, 15f * Time.deltaTime * (Time.realtimeSinceStartup - timeAtLastGearShift)); } gearStickAnimator.SetFloat("gear", Mathf.Clamp(gearStickAnimValue, 0.01f, 0.99f)); if (EngineRPM < -5f) { if (!backLightsOn) { backLightsOn = true; ((Renderer)backLightsMesh).material = backLightOnMat; backLightsContainer.SetActive(true); } } else if (backLightsOn) { backLightsOn = false; ((Renderer)backLightsMesh).material = headlightsOffMat; backLightsContainer.SetActive(false); } SetVehicleAudioProperties(extremeStressAudio, underExtremeStress, 0.2f, 1f, 3f, useVolumeInsteadOfPitch: true); if (((NetworkBehaviour)this).IsOwner) { if (!syncedExtremeStress && underExtremeStress && extremeStressAudio.volume > 0.35f) { syncedExtremeStress = true; SyncExtremeStressServerRpc(underExtremeStress); } else if (syncedExtremeStress && !underExtremeStress && extremeStressAudio.volume < 0.5f) { syncedExtremeStress = false; SyncExtremeStressServerRpc(underExtremeStress); } } SetRadioValues(); float num2 = Vector3.Dot(Vector3.Normalize(mainRigidbody.velocity * 1000f), ((Component)this).transform.forward); bool audioActive = num2 > -0.6f && num2 < 0.4f && (((Vector3)(ref averageVelocity)).magnitude > 4f || EngineRPM > 400f); if ((!FrontLeftWheel.isGrounded && !FrontRightWheel.isGrounded) || (!BackLeftWheel.isGrounded && !BackRightWheel.isGrounded)) { audioActive = false; } if (FrontLeftWheel.motorTorque > 900f && FrontRightWheel.motorTorque > 900f) { audioActive = true; num2 = Mathf.Max(num2, 0.8f); if (((Vector3)(ref averageVelocity)).magnitude > 8f && !tireSparks.isPlaying) { tireSparks.Play(true); } } else { tireSparks.Stop(true, (ParticleSystemStopBehavior)1); } SetVehicleAudioProperties(skiddingAudio, audioActive, 0f, num2, 3f, useVolumeInsteadOfPitch: true); carEngine2AudioActive = ignitionStarted; float num3 = Mathf.Abs(EngineRPM); float highest = Mathf.Clamp(num3 / engineIntensityPercentage, 0.7f, 1.5f); SetVehicleAudioProperties(engineAudio2, carEngine2AudioActive, 0.7f, highest, 3f, useVolumeInsteadOfPitch: false, 0.5f); highest = Mathf.Clamp(num3 / engineIntensityPercentage, 0.65f, 1.15f); float highest2 = highest; if (!ignitionStarted) { highest2 = 1f; } SetVehicleAudioProperties(engineAudio1, carEngine1AudioActive, 0.7f, highest2, 2f, useVolumeInsteadOfPitch: false, 0.7f); if (engineAudio1.volume > 0.3f && engineAudio1.isPlaying && Time.realtimeSinceStartup - timeAtLastEngineAudioPing > 2f) { timeAtLastEngineAudioPing = Time.realtimeSinceStartup; if (EngineRPM > 130f) { RoundManager.Instance.PlayAudibleNoise(((Component)engineAudio1).transform.position, 32f, 0.75f, 0, false, 2692); } if (EngineRPM > 60f) { RoundManager.Instance.PlayAudibleNoise(((Component)engineAudio1).transform.position, 25f, 0.6f, 0, false, 2692); } else if (!ignitionStarted) { RoundManager.Instance.PlayAudibleNoise(((Component)engineAudio1).transform.position, 15f, 0.6f, 0, false, 2692); } else { RoundManager.Instance.PlayAudibleNoise(((Component)engineAudio1).transform.position, 11f, 0.5f, 0, false, 2692); } } carRollingAudioActive = num3 > 10f; highest = Mathf.Clamp(num3 / (engineIntensityPercentage * 0.35f), 0f, 1f); SetVehicleAudioProperties(rollingAudio, carRollingAudioActive, 0f, highest, 5f, useVolumeInsteadOfPitch: true); turbulenceAudio.volume = Mathf.Lerp(turbulenceAudio.volume, Mathf.Min(1f, turbulenceAmount), 10f * Time.deltaTime); turbulenceAmount = Mathf.Max(turbulenceAmount - Time.deltaTime, 0f); if (turbulenceAudio.volume > 0.02f) { if (!turbulenceAudio.isPlaying) { turbulenceAudio.Play(); } } else if (turbulenceAudio.isPlaying) { turbulenceAudio.Stop(); } } private void SetVehicleAudioProperties(AudioSource audio, bool audioActive, float lowest, float highest, float lerpSpeed, bool useVolumeInsteadOfPitch = false, float onVolume = 1f) { if (audioActive) { if (!audio.isPlaying) { audio.Play(); } if (useVolumeInsteadOfPitch) { audio.volume = Mathf.Max(Mathf.Lerp(audio.volume, highest, lerpSpeed * Time.deltaTime), lowest); return; } audio.volume = Mathf.Lerp(audio.volume, onVolume, 20f * Time.deltaTime); audio.pitch = Mathf.Lerp(audio.pitch, highest, lerpSpeed * Time.deltaTime); } else { if (useVolumeInsteadOfPitch) { audio.volume = Mathf.Lerp(audio.volume, 0f, lerpSpeed * Time.deltaTime); } else { audio.volume = Mathf.Lerp(audio.volume, 0f, 4f * Time.deltaTime); audio.pitch = Mathf.Lerp(audio.pitch, lowest, 4f * Time.deltaTime); } if (audio.isPlaying && audio.volume == 0f) { audio.Stop(); } } } private void FixedUpdate() { //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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_017a: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: 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_01b2: 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_01dd: 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_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_0215: 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_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023d: 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_0257: 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_0366: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0427: 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_03e6: 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_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: 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_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_044d: 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) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: 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_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031c: 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_0334: Unknown result type (might be due to invalid IL or missing references) //IL_033f: 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_0355: 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_007d: 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_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) //IL_00bd: 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_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_0102: 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) if (!StartOfRound.Instance.inShipPhase) { if ((Object)(object)itemShip == (Object)null) { itemShip = Object.FindObjectOfType(); } if ((Object)(object)itemShip != (Object)null && !hasBeenSpawned) { if (itemShip.untetheredVehicle) { mainRigidbody.MovePosition(itemShip.deliverVehiclePoint.position); mainRigidbody.MoveRotation(itemShip.deliverVehiclePoint.rotation); hasBeenSpawned = true; } else if (itemShip.deliveringVehicle) { mainRigidbody.isKinematic = true; mainRigidbody.MovePosition(itemShip.deliverVehiclePoint.position); mainRigidbody.MoveRotation(itemShip.deliverVehiclePoint.rotation); if (((NetworkBehaviour)this).IsOwner) { syncedPosition = ((Component)this).transform.position; syncedRotation = ((Component)this).transform.rotation; } } else { mainRigidbody.isKinematic = true; mainRigidbody.MovePosition(StartOfRound.Instance.notSpawnedPosition.position + Vector3.forward * 30f); } } } Vector3 angularVelocity = mainRigidbody.angularVelocity; Vector3 val = Vector3.Cross(Quaternion.AngleAxis(((Vector3)(ref angularVelocity)).magnitude * 57.29578f * stability / speed, mainRigidbody.angularVelocity) * ((Component)this).transform.up, Vector3.up); mainRigidbody.AddTorque(val * speed * speed); if (magnetedToShip) { mainRigidbody.MovePosition(Vector3.Lerp(magnetStartPosition, StartOfRound.Instance.elevatorTransform.position + magnetTargetPosition, magnetPositionCurve.Evaluate(magnetTime))); mainRigidbody.MoveRotation(Quaternion.Lerp(magnetStartRotation, magnetTargetRotation, magnetRotationCurve.Evaluate(magnetRotationTime))); averageVelocityAtMagnetStart = Vector3.Lerp(averageVelocityAtMagnetStart, Vector3.ClampMagnitude(averageVelocityAtMagnetStart, 4f), 4f * Time.deltaTime); if (!finishedMagneting) { magnetStartPosition += Vector3.ClampMagnitude(averageVelocityAtMagnetStart, 5f) * Time.fixedDeltaTime; } } if (!((NetworkBehaviour)this).IsOwner && !testingVehicleInEditor && !magnetedToShip) { ((Component)this).gameObject.GetComponent().isKinematic = true; Mathf.Clamp(syncSpeedMultiplier * Vector3.Distance(((Component)this).transform.position, syncedPosition), 1.3f, 300f); Vector3 val2 = Vector3.Lerp(((Component)this).transform.position, syncedPosition, Time.fixedDeltaTime * syncSpeedMultiplier); mainRigidbody.MovePosition(val2); mainRigidbody.MoveRotation(Quaternion.Lerp(((Component)this).transform.rotation, syncedRotation, syncRotationSpeed)); truckVelocityLastFrame = mainRigidbody.velocity; } ragdollPhysicsBody.Move(((Component)this).transform.position, ((Component)this).transform.rotation); windwiperPhysicsBody1.Move(windwiper1.position, windwiper1.rotation); windwiperPhysicsBody2.Move(windwiper2.position, windwiper2.rotation); averageCount++; if (averageCount > movingAverageLength) { averageVelocity += (mainRigidbody.velocity - averageVelocity) / (float)(movingAverageLength + 1); } else { averageVelocity += mainRigidbody.velocity; if (averageCount == movingAverageLength) { averageVelocity /= (float)averageCount; } } Debug.DrawRay(((Component)this).transform.position, averageVelocity); } private void SyncCarPhysicsToOtherClients() { //IL_0022: 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_009f: 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_00af: 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_0055: 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_0072: 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_00d2: 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_00e3: 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_00f4: 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) ((Component)this).gameObject.GetComponent().isKinematic = false; if (syncCarPositionInterval > 0.12f) { if (Vector3.Distance(syncedPosition, ((Component)this).transform.position) > 0.06f) { syncCarPositionInterval = 0f; syncedPosition = ((Component)this).transform.position; syncedRotation = ((Component)this).transform.rotation; SyncCarPositionServerRpc(((Component)this).transform.position, ((Component)this).transform.eulerAngles, moveInputVector.x, EngineRPM); } else if (Vector3.Angle(((Component)this).transform.forward, syncedRotation * Vector3.forward) > 2f) { syncCarPositionInterval = 0f; syncedPosition = ((Component)this).transform.position; syncedRotation = ((Component)this).transform.rotation; SyncCarPositionServerRpc(((Component)this).transform.position, ((Component)this).transform.eulerAngles, moveInputVector.x, EngineRPM); } } else { syncCarPositionInterval += Time.deltaTime; } } public bool CarReactToObstacle(Vector3 vel, Vector3 position, Vector3 impulse, CarObstacleType type, float obstacleSize = 1f, EnemyAI enemyScript = null, bool dealDamage = true) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected I4, but got Unknown //IL_0099: 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_0117: 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_00d0: 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_00ea: 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_00fe: 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_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_005e: 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_0028: 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_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_0076: 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_0155: 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_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: 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_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_030c: 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_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023c: 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_024b: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: 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_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: 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_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: 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_02c0: 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_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0341: 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_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_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_0383: 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) switch ((int)type) { case 2: if (carHP < 10) { mainRigidbody.AddForceAtPosition(Vector3.up * torqueForce + vel, position, (ForceMode)1); } else { mainRigidbody.AddForceAtPosition((Vector3.up * torqueForce + vel) * 0.5f, position, (ForceMode)1); } CarBumpServerRpc(averageVelocity * 0.7f); if (dealDamage) { DealPermanentDamage(1, position); } return true; case 0: PlayCollisionAudio(position, 5, Mathf.Clamp(((Vector3)(ref vel)).magnitude / 7f, 0.65f, 1f)); if (((Vector3)(ref vel)).magnitude < 4.25f) { mainRigidbody.velocity = Vector3.Normalize(-impulse * 100000000f) * 9f; DealPermanentDamage(1); return true; } mainRigidbody.AddForceAtPosition(Vector3.up * torqueForce, position, (ForceMode)2); return false; case 1: { if (obstacleSize <= 1f) { return false; } float num; if (obstacleSize <= 2f) { num = 9f; _ = carReactToPlayerHitMultiplier; } else { num = 15f; _ = carReactToPlayerHitMultiplier; } vel = Vector3.Scale(vel, new Vector3(1f, 0f, 1f)); mainRigidbody.AddForceAtPosition(Vector3.up * torqueForce, position, (ForceMode)2); bool result = false; if (((Vector3)(ref vel)).magnitude < num) { Debug.DrawRay(((Component)this).transform.position, Vector3.Normalize(-impulse * 100000000f) * carReactToPlayerHitMultiplier); if (obstacleSize <= 1f) { mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * 4f, (ForceMode)1); if (((Vector3)(ref vel)).magnitude > 1f) { enemyScript.KillEnemyOnOwnerClient(false); } } else { CarBumpServerRpc(averageVelocity); mainRigidbody.velocity = Vector3.Normalize(-impulse * 100000000f) * 9f; if ((Object)(object)currentDriver != (Object)null) { _ = currentDriver; } if (((Vector3)(ref vel)).magnitude > 2f && dealDamage) { enemyScript.HitEnemy(2, currentDriver, true, 331); } result = true; if (obstacleSize > 2f) { DealPermanentDamage(1, position); } } Debug.DrawRay(position, -impulse * Mathf.Max(carReactToPlayerHitMultiplier, 500f), Color.red, 5f); } else { mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * (carReactToPlayerHitMultiplier - 220f), (ForceMode)1); if (dealDamage) { DealPermanentDamage(1, position); } PlayerControllerB val = ((!((Object)(object)currentDriver != (Object)null)) ? currentPassenger : currentDriver); enemyScript.HitEnemy(12, val, false, -1); Debug.DrawRay(position, (Vector3.up + -impulse / 2f) * Mathf.Max(((Vector3)(ref vel)).magnitude * carReactToPlayerHitMultiplier, 500f), Color.magenta, 5f); } PlayCollisionAudio(position, 5, 1f); return result; } default: return false; } } private void LateUpdate() { if (localPlayerInControl && !setControlTips) { setControlTips = true; HUDManager.Instance.ChangeControlTipMultiple(carTooltips, false, (Item)null); } } private void OnCollisionEnter(Collision collision) { //IL_0049: 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) //IL_0066: 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_00b5: 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_00bb: 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_00c1: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_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_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_0172: 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_0205: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: 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_0372: Unknown result type (might be due to invalid IL or missing references) //IL_037c: 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_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_035d: 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) if (!((NetworkBehaviour)this).IsOwner || magnetedToShip || !hasBeenSpawned || ((Component)collision.collider).gameObject.layer != 8 || averageCount < 18) { return; } float num = 0f; int num2 = collision.GetContacts(contacts); Vector3 val = Vector3.zero; Vector3 damagePosition; for (int i = 0; i < num2; i++) { damagePosition = ((ContactPoint)(ref contacts[i])).impulse; if (((Vector3)(ref damagePosition)).magnitude > num) { damagePosition = ((ContactPoint)(ref contacts[i])).impulse; num = ((Vector3)(ref damagePosition)).magnitude; } val += ((ContactPoint)(ref contacts[i])).point; } val /= (float)num2; Debug.DrawRay(val, Vector3.up, Color.blue, 2f); num /= Time.fixedDeltaTime; if (num < minimalBumpForce || ((Vector3)(ref averageVelocity)).magnitude < 4f) { if (num2 > 3 && ((Vector3)(ref averageVelocity)).magnitude > 2.5f) { SetInternalStress(0.2f); lastStressType = "Scraping"; } return; } float setVolume = 0.5f; int num3 = -1; if (((Vector3)(ref averageVelocity)).magnitude > 31f) { if (carHP < 3) { DestroyCar(); DestroyCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); return; } int damageAmount = carHP - 2; damagePosition = default(Vector3); DealPermanentDamage(damageAmount, damagePosition); } else if (((Vector3)(ref averageVelocity)).magnitude > 28f) { damagePosition = default(Vector3); DealPermanentDamage(2, damagePosition); } if (num > maximumBumpForce && ((Vector3)(ref averageVelocity)).magnitude > 11f) { num3 = 2; setVolume = Mathf.Clamp((num - maximumBumpForce) / 20000f, 0.8f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.7f, 1f); damagePosition = default(Vector3); DealPermanentDamage(1, damagePosition); } else if (num > mediumBumpForce && ((Vector3)(ref averageVelocity)).magnitude > 3f) { num3 = 1; setVolume = Mathf.Clamp((num - mediumBumpForce) / (maximumBumpForce - mediumBumpForce), 0.67f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.5f, 1f); } else if (((Vector3)(ref averageVelocity)).magnitude > 1.5f) { num3 = 0; setVolume = Mathf.Clamp((num - mediumBumpForce) / (maximumBumpForce - mediumBumpForce), 0.25f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.25f, 1f); } if (num3 != -1) { PlayCollisionAudio(val, num3, setVolume); if (num > maximumBumpForce + 10000f && ((Vector3)(ref averageVelocity)).magnitude > 19f) { DamagePlayerInVehicle(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f), ((Vector3)(ref averageVelocity)).magnitude); BreakWindshield(); CarCollisionServerRpc(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f), ((Vector3)(ref averageVelocity)).magnitude); damagePosition = default(Vector3); DealPermanentDamage(2, damagePosition); } else { CarBumpServerRpc(Vector3.ClampMagnitude(-collision.relativeVelocity, 40f)); } } } [ServerRpc(RequireOwnership = false)] public void CarBumpServerRpc(Vector3 vel) { //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_00d4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4157739565u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vel); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4157739565u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CarBumpClientRpc(vel); } } } [ClientRpc] public void CarBumpClientRpc(Vector3 vel) { //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_011d: 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_0123: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2422003356u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vel); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2422003356u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)physicsRegion.physicsTransform == (Object)(object)GameNetworkManager.Instance.localPlayerController.physicsParent && ((!localPlayerInControl && !localPlayerInPassengerSeat) || !(((Vector3)(ref vel)).magnitude < 50f))) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.externalForceAutoFade += vel; } } } [ServerRpc(RequireOwnership = false)] public void CarCollisionServerRpc(Vector3 vel, float magn) { //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_00ef: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3768350198u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vel); ((FastBufferWriter)(ref val)).WriteValueSafe(ref magn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3768350198u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CarCollisionClientRpc(vel, magn); } } } [ClientRpc] public void CarCollisionClientRpc(Vector3 vel, float magn) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3570939371u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vel); ((FastBufferWriter)(ref val)).WriteValueSafe(ref magn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3570939371u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { DamagePlayerInVehicle(vel, magn); BreakWindshield(); } } } private void DamagePlayerInVehicle(Vector3 vel, float magnitude) { //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_0028: 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_005e: 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_00cd: 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_00a5: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) if (localPlayerInPassengerSeat || localPlayerInControl) { Debug.DrawRay(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, vel, Color.yellow, 10f); if (magnitude > 28f) { GameNetworkManager.Instance.localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); } else if (magnitude > 24f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)3); if (GameNetworkManager.Instance.localPlayerController.health < 20) { GameNetworkManager.Instance.localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); } else { GameNetworkManager.Instance.localPlayerController.DamagePlayer(40, true, true, (CauseOfDeath)16, 0, false, vel); } } else { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); GameNetworkManager.Instance.localPlayerController.DamagePlayer(30, true, true, (CauseOfDeath)16, 0, false, vel); } } else if ((Object)(object)physicsRegion.physicsTransform == (Object)(object)GameNetworkManager.Instance.localPlayerController.physicsParent && (Object)(object)GameNetworkManager.Instance.localPlayerController.overridePhysicsParent == (Object)null) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); GameNetworkManager.Instance.localPlayerController.DamagePlayer(10, true, true, (CauseOfDeath)16, 0, false, vel); PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.externalForceAutoFade += vel; } } private void BreakWindshield() { if (!windshieldBroken) { windshieldBroken = true; ((Collider)windshieldPhysicsCollider).enabled = false; Material[] materials = ((Renderer)mainBodyMesh).materials; materials[2] = windshieldBrokenMat; ((Renderer)mainBodyMesh).materials = materials; glassParticle.Play(); miscAudio.PlayOneShot(windshieldBreak); } } public void PlayCollisionAudio(Vector3 setPosition, int audioType, float setVolume) { //IL_010e: 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_008a: 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) Debug.Log((object)$"Play collision audio with type {audioType} A"); if (Time.realtimeSinceStartup - audio1Time > Time.realtimeSinceStartup - audio2Time) { bool flag = Time.realtimeSinceStartup - audio1Time >= collisionAudio1.clip.length * 0.8f; if (audio1Type <= audioType || flag) { audio1Time = Time.realtimeSinceStartup; audio1Type = audioType; ((Component)collisionAudio1).transform.position = setPosition; PlayRandomClipAndPropertiesFromAudio(collisionAudio1, setVolume, flag, audioType); CarCollisionSFXServerRpc(((Component)collisionAudio1).transform.localPosition, 0, audioType, setVolume); } } else { bool flag2 = Time.realtimeSinceStartup - audio2Time >= collisionAudio2.clip.length * 0.8f; if (audio1Type <= audioType || flag2) { audio2Time = Time.realtimeSinceStartup; audio2Type = audioType; ((Component)collisionAudio2).transform.position = setPosition; PlayRandomClipAndPropertiesFromAudio(collisionAudio2, setVolume, flag2, audioType); CarCollisionSFXServerRpc(((Component)collisionAudio2).transform.localPosition, 1, audioType, setVolume); } } } [ServerRpc] public void CarCollisionSFXServerRpc(Vector3 audioPosition, int audio, int audioType, float vol) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Invalid comparison between Unknown and I4 //IL_0149: 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_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_00c4: 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_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_0104: 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)base.__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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(547527586u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref audioPosition); BytePacker.WriteValueBitPacked(val, audio); BytePacker.WriteValueBitPacked(val, audioType); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vol, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 547527586u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CarCollisionSFXClientRpc(audioPosition, audio, audioType, vol); } } [ClientRpc] public void CarCollisionSFXClientRpc(Vector3 audioPosition, int audio, int audioType, float vol) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: 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_008b: 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_00aa: 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_0103: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1701190060u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref audioPosition); BytePacker.WriteValueBitPacked(val, audio); BytePacker.WriteValueBitPacked(val, audioType); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vol, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1701190060u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsOwner) { AudioSource val3 = ((audio != 0) ? collisionAudio2 : collisionAudio1); bool audioFinished = val3.clip.length - val3.time < 0.2f; ((Component)val3).transform.localPosition = audioPosition; PlayRandomClipAndPropertiesFromAudio(val3, vol, audioFinished, audioType); } } } private void PlayRandomClipAndPropertiesFromAudio(AudioSource audio, float setVolume, bool audioFinished, int audioType) { //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) if (!audioFinished) { audio.Stop(); } AudioClip[] array; switch (audioType) { case 0: array = minCollisions; turbulenceAmount = Mathf.Min(turbulenceAmount + 0.4f, 2f); break; case 1: array = medCollisions; turbulenceAmount = Mathf.Min(turbulenceAmount + 0.75f, 2f); break; case 2: array = maxCollisions; turbulenceAmount = Mathf.Min(turbulenceAmount + 1.4f, 2f); break; default: array = obstacleCollisions; turbulenceAmount = Mathf.Min(turbulenceAmount + 0.75f, 2f); break; } AudioClip val = array[Random.Range(0, array.Length)]; if ((Object)(object)val == (Object)(object)audio.clip && Random.Range(0, 10) <= 5) { val = array[Random.Range(0, array.Length)]; } if (audioFinished) { audio.pitch = Random.Range(0.8f, 1.2f); } audio.clip = val; audio.PlayOneShot(val, setVolume); if (audioType >= 2) { RoundManager.Instance.PlayAudibleNoise(((Component)engineAudio1).transform.position, 18f + setVolume / 1f * 7f, 0.6f, 0, false, 2692); } else if (audioType >= 1) { RoundManager.Instance.PlayAudibleNoise(((Component)engineAudio1).transform.position, 12f + setVolume / 1f * 7f, 0.6f, 0, false, 2692); } if (audioType == -1) { array = minCollisions; val = array[Random.Range(0, array.Length)]; audio.PlayOneShot(val); } } private void SetInternalStress(float carStressIncrease = 0f) { //IL_00be: 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) if (!((Object)(object)StartOfRound.Instance.testRoom == (Object)null) || !StartOfRound.Instance.inShipPhase) { if (carStressIncrease <= 0f) { carStressChange = Mathf.Clamp(carStressChange - Time.deltaTime, -0.25f, 0.5f); } else { carStressChange = Mathf.Clamp(carStressChange + Time.deltaTime * carStressIncrease, 0f, 10f); } underExtremeStress = carStressIncrease >= 1f; carStress = Mathf.Clamp(carStress + carStressChange, 0f, 100f); if (carStress > 7f) { carStress = 0f; DealPermanentDamage(2); lastDamageType = "Stress"; } } } private void DealPermanentDamage(int damageAmount, Vector3 damagePosition = default(Vector3)) { if ((!((Object)(object)StartOfRound.Instance.testRoom == (Object)null) || !StartOfRound.Instance.inShipPhase) && !magnetedToShip && !carDestroyed && ((NetworkBehaviour)this).IsOwner) { timeAtLastDamage = Time.realtimeSinceStartup; carHP -= damageAmount; if (carHP <= 0) { DestroyCar(); DestroyCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } else { DealDamageServerRpc(damageAmount, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } [ServerRpc] public void DealDamageServerRpc(int amount, int sentByClient) { //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_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_00c4: 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)base.__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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2530415664u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, amount); BytePacker.WriteValueBitPacked(val, sentByClient); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2530415664u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DealDamageClientRpc(amount, sentByClient); } } [ClientRpc] public void DealDamageClientRpc(int amount, int sentByClient) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4084514568u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, amount); BytePacker.WriteValueBitPacked(val, sentByClient); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4084514568u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != sentByClient) { carHP -= amount; timeAtLastDamage = Time.realtimeSinceStartup; } } } [ServerRpc(RequireOwnership = false)] public void DestroyCarServerRpc(int sentByClient) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2114861833u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, sentByClient); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2114861833u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DestroyCarClientRpc(sentByClient); } } } [ClientRpc] public void DestroyCarClientRpc(int sentByClient) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1225529431u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, sentByClient); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1225529431u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (!carDestroyed) { DestroyCar(); } } } private void DestroyCar() { //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0265: 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_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: 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_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02be: 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_02d0: 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_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: 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_0340: Unknown result type (might be due to invalid IL or missing references) if (!carDestroyed) { carDestroyed = true; magnetedToShip = false; StartOfRound.Instance.isObjectAttachedToMagnet = false; CollectItemsInTruck(); underExtremeStress = false; Debug.Log((object)"Destroy truck"); ((Renderer)keyObject).enabled = false; engineAudio1.Stop(); engineAudio2.Stop(); turbulenceAudio.Stop(); rollingAudio.Stop(); radioAudio.Stop(); extremeStressAudio.Stop(); honkingHorn = false; hornAudio.Stop(); tireSparks.Stop(); skiddingAudio.Stop(); turboBoostAudio.Stop(); turboBoostParticle.Stop(); RoundManager.Instance.PlayAudibleNoise(((Component)engineAudio1).transform.position, 20f, 0.8f, 0, false, 2692); FrontLeftWheel.motorTorque = 0f; FrontRightWheel.motorTorque = 0f; FrontRightWheel.brakeTorque = 0f; FrontLeftWheel.brakeTorque = 0f; for (int i = 0; i < otherWheels.Length; i++) { otherWheels[i].motorTorque = 0f; otherWheels[i].brakeTorque = 0f; } ((Renderer)leftWheelMesh).enabled = false; ((Renderer)rightWheelMesh).enabled = false; ((Renderer)backLeftWheelMesh).enabled = false; ((Renderer)backRightWheelMesh).enabled = false; ((Renderer)((Component)carHoodAnimator).gameObject.GetComponentInChildren()).enabled = false; backDoorContainer.SetActive(false); headlightsContainer.SetActive(false); BreakWindshield(); destroyedTruckMesh.SetActive(true); ((Component)mainBodyMesh).gameObject.SetActive(false); WheelCollider[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren(); for (int j = 0; j < componentsInChildren.Length; j++) { ((Collider)componentsInChildren[j]).enabled = false; } mainRigidbody.ResetCenterOfMass(); mainRigidbody.AddForceAtPosition(Vector3.up * 1560f, ((Component)hoodFireAudio).transform.position - Vector3.up, (ForceMode)1); if (localPlayerInControl || localPlayerInPassengerSeat) { Vector3 val = Vector3.up * 27f + 20f * Random.insideUnitSphere; Debug.Log((object)$"Killing player with force magnitude of : {((Vector3)(ref val)).magnitude}"); GameNetworkManager.Instance.localPlayerController.KillPlayer(Vector3.up * 27f + 20f * Random.insideUnitSphere, true, (CauseOfDeath)3, 6, Vector3.up * 1.5f, false); } InteractTrigger[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren(); for (int k = 0; k < componentsInChildren2.Length; k++) { componentsInChildren2[k].interactable = false; componentsInChildren2[k].CancelAnimationExternally(); } Landmine.SpawnExplosion(((Component)this).transform.position + ((Component)this).transform.forward + Vector3.up * 1.5f, true, 6f, 10f, 30, 200f, truckDestroyedExplosion, true); } } private void ReactToDamage() { //IL_0016: 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_006e: 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) healthMeter.localScale = new Vector3(1f, 1f, Mathf.Lerp(healthMeter.localScale.z, Mathf.Clamp((float)carHP / (float)baseCarHP, 0.01f, 1f), 6f * Time.deltaTime)); turboMeter.localScale = new Vector3(1f, 1f, Mathf.Lerp(turboMeter.localScale.z, Mathf.Clamp((float)turboBoosts / 5f, 0.01f, 1f), 6f * Time.deltaTime)); if (carHP < 16 && Time.realtimeSinceStartup - timeAtLastDamage > 8f) { timeAtLastDamage = Time.realtimeSinceStartup; carHP++; } if (carHP < 3) { if (!isHoodOnFire) { if (!hoodPoppedUp && ((NetworkBehaviour)this).IsOwner) { hoodPoppedUp = true; SetHoodOpenLocalClient(setOpen: true); } isHoodOnFire = true; hoodFireAudio.Play(); hoodFireParticle.Play(); } } else if (isHoodOnFire) { isHoodOnFire = false; hoodFireAudio.Stop(); hoodFireParticle.Stop(true, (ParticleSystemStopBehavior)1); } } public void PushTruckWithArms() { //IL_004e: 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_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_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_011a: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: 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_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_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_0106: 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) if (!((Object)(object)GameNetworkManager.Instance.localPlayerController.physicsParent == (Object)(object)((Component)physicsRegion).transform) && !localPlayerInControl && !localPlayerInPassengerSeat && Physics.Raycast(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward, ref hit, 10f, 1073742656, (QueryTriggerInteraction)1)) { Vector3 point = ((RaycastHit)(ref hit)).point; Vector3 forward = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward; if (((NetworkBehaviour)this).IsOwner) { mainRigidbody.AddForceAtPosition(Vector3.Normalize(forward * 1000f) * Random.Range(40f, 50f) * pushForceMultiplier, point - ((Component)mainRigidbody).transform.up * pushVerticalOffsetAmount, (ForceMode)1); PushTruckFromOwnerServerRpc(point); } else { PushTruckServerRpc(point, forward); } } } [ServerRpc(RequireOwnership = false)] public void PushTruckServerRpc(Vector3 pos, Vector3 dir) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(190383325u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref dir); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 190383325u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PushTruckClientRpc(pos, dir); } } } [ServerRpc(RequireOwnership = false)] public void PushTruckFromOwnerServerRpc(Vector3 pos) { //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_00d4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1491095712u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1491095712u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PushTruckFromOwnerClientRpc(pos); } } } [ClientRpc] public void PushTruckClientRpc(Vector3 pushPosition, Vector3 dir) { //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_00eb: 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_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_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_0155: 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) //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1152731167u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pushPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref dir); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1152731167u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)pushAudio).transform.position = pushPosition; pushAudio.Play(); turbulenceAmount = Mathf.Min(turbulenceAmount + 0.5f, 2f); if (((NetworkBehaviour)this).IsOwner) { mainRigidbody.AddForceAtPosition(Vector3.Normalize(dir * 1000f) * Random.Range(40f, 50f) * pushForceMultiplier, pushPosition - ((Component)mainRigidbody).transform.up * pushVerticalOffsetAmount, (ForceMode)1); } } } [ClientRpc] public void PushTruckFromOwnerClientRpc(Vector3 pos) { //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_00de: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(65800505u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 65800505u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ((Component)pushAudio).transform.position = pos; pushAudio.Play(); turbulenceAmount = Mathf.Min(turbulenceAmount + 0.5f, 2f); } } } public void ToggleHoodOpenLocalClient() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) carHoodOpen = !carHoodOpen; carHoodAnimator.SetBool("hoodOpen", carHoodOpen); ((Component)miscAudio).transform.position = ((Component)carHoodAnimator).transform.position; if (carHoodOpen) { miscAudio.PlayOneShot(carHoodOpenSFX); } else { miscAudio.PlayOneShot(carHoodCloseSFX); } SetHoodOpenServerRpc(carHoodOpen); } public void SetHoodOpenLocalClient(bool setOpen) { if (carHoodOpen != setOpen) { SetHoodOpenServerRpc(open: true); } } [ServerRpc(RequireOwnership = false)] public void SetHoodOpenServerRpc(bool open) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2977356452u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref open, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2977356452u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetHoodOpenClientRpc(open); } } } [ClientRpc] public void SetHoodOpenClientRpc(bool open) { //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) //IL_0118: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4071602288u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref open, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4071602288u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (carHoodOpen != open) { carHoodOpen = open; carHoodAnimator.SetBool("hoodOpen", open); ((Component)miscAudio).transform.position = ((Component)carHoodAnimator).transform.position; if (open) { miscAudio.PlayOneShot(carHoodOpenSFX); } else { miscAudio.PlayOneShot(carHoodCloseSFX); } } } public void ToggleHeadlightsLocalClient() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) headlightsContainer.SetActive(!headlightsContainer.activeSelf); ((Component)miscAudio).transform.position = headlightsContainer.transform.position; miscAudio.PlayOneShot(headlightsToggleSFX); SetHeadlightMaterial(headlightsContainer.activeSelf); ToggleHeadlightsServerRpc(headlightsContainer.activeSelf); } [ServerRpc(RequireOwnership = false)] public void ToggleHeadlightsServerRpc(bool setLightsOn) { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2654200482u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setLightsOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2654200482u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleHeadlightsClientRpc(setLightsOn); } } } [ClientRpc] public void ToggleHeadlightsClientRpc(bool setLightsOn) { //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) //IL_0111: 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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1522629556u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setLightsOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1522629556u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (headlightsContainer.activeSelf != setLightsOn) { headlightsContainer.SetActive(setLightsOn); ((Component)miscAudio).transform.position = headlightsContainer.transform.position; miscAudio.PlayOneShot(headlightsToggleSFX); SetHeadlightMaterial(setLightsOn); } } } private void SetHeadlightMaterial(bool on) { Material val = ((!on) ? headlightsOffMat : headlightsOnMat); Material[] sharedMaterials = ((Renderer)mainBodyMesh).sharedMaterials; sharedMaterials[1] = val; ((Renderer)mainBodyMesh).sharedMaterials = sharedMaterials; sharedMaterials = ((Renderer)lod1Mesh).sharedMaterials; sharedMaterials[1] = val; ((Renderer)mainBodyMesh).sharedMaterials = sharedMaterials; sharedMaterials = ((Renderer)mainBodyMesh).sharedMaterials; sharedMaterials[1] = val; ((Renderer)mainBodyMesh).sharedMaterials = sharedMaterials; } public void SpringDriverSeatLocalClient() { if (!(Time.realtimeSinceStartup - timeSinceSpringingDriverSeat < 3f)) { timeSinceSpringingDriverSeat = Time.realtimeSinceStartup; SpringDriverSeatServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void SpringDriverSeatServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(405222209u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 405222209u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SpringDriverSeatClientRpc(); } } } [ClientRpc] public void SpringDriverSeatClientRpc() { //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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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_0142: 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_010a: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3607162613u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3607162613u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; timeSinceSpringingDriverSeat = Time.realtimeSinceStartup; springAudio.Play(); driverSeatSpringAnimator.SetTrigger("spring"); if (localPlayerInControl || Vector3.Distance(((Component)this).transform.position, ((Component)springAudio).transform.position) < 1.25f) { PlayerControllerB obj = currentDriver; obj.externalForceAutoFade += ((Component)this).transform.up * springForce; } RoundManager.Instance.PlayAudibleNoise(((Component)springAudio).transform.position, 30f, 1f, 0, false, 2692); } } protected override void __initializeVariables() { ((NetworkBehaviour)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 //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Expected O, but got Unknown //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Expected O, but got Unknown //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Expected O, but got Unknown //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Expected O, but got Unknown //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Expected O, but got Unknown //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Expected O, but got Unknown //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Expected O, but got Unknown //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Expected O, but got Unknown //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Expected O, but got Unknown //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Expected O, but got Unknown //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Expected O, but got Unknown //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Expected O, but got Unknown //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Expected O, but got Unknown //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Expected O, but got Unknown //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Expected O, but got Unknown //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2379619604u, new RpcReceiveHandler(__rpc_handler_2379619604), "RemoveKeyFromIgnitionServerRpc"); ((NetworkBehaviour)this).__registerRpc(3778510610u, new RpcReceiveHandler(__rpc_handler_3778510610), "RemoveKeyFromIgnitionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1024272216u, new RpcReceiveHandler(__rpc_handler_1024272216), "RevCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(532109531u, new RpcReceiveHandler(__rpc_handler_532109531), "RevCarClientRpc"); ((NetworkBehaviour)this).__registerRpc(3141029793u, new RpcReceiveHandler(__rpc_handler_3141029793), "StartIgnitionServerRpc"); ((NetworkBehaviour)this).__registerRpc(1434007931u, new RpcReceiveHandler(__rpc_handler_1434007931), "StartIgnitionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1576302371u, new RpcReceiveHandler(__rpc_handler_1576302371), "TryIgnitionServerRpc"); ((NetworkBehaviour)this).__registerRpc(3683253228u, new RpcReceiveHandler(__rpc_handler_3683253228), "TryIgnitionClientRpc"); ((NetworkBehaviour)this).__registerRpc(3939365593u, new RpcReceiveHandler(__rpc_handler_3939365593), "CancelTryIgnitionServerRpc"); ((NetworkBehaviour)this).__registerRpc(1886249329u, new RpcReceiveHandler(__rpc_handler_1886249329), "CancelTryIgnitionClientRpc"); ((NetworkBehaviour)this).__registerRpc(254853252u, new RpcReceiveHandler(__rpc_handler_254853252), "PassengerLeaveVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(2638605193u, new RpcReceiveHandler(__rpc_handler_2638605193), "PassengerLeaveVehicleClientRpc"); ((NetworkBehaviour)this).__registerRpc(2807656216u, new RpcReceiveHandler(__rpc_handler_2807656216), "SetPlayerInControlOfVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(3756594919u, new RpcReceiveHandler(__rpc_handler_3756594919), "CancelPlayerInControlOfVehicleClientRpc"); ((NetworkBehaviour)this).__registerRpc(1977808634u, new RpcReceiveHandler(__rpc_handler_1977808634), "RemovePlayerControlOfVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(3343654051u, new RpcReceiveHandler(__rpc_handler_3343654051), "SetPlayerInControlOfVehicleClientRpc"); ((NetworkBehaviour)this).__registerRpc(167133403u, new RpcReceiveHandler(__rpc_handler_167133403), "RemovePlayerControlOfVehicleClientRpc"); ((NetworkBehaviour)this).__registerRpc(1664078425u, new RpcReceiveHandler(__rpc_handler_1664078425), "ShiftToGearServerRpc"); ((NetworkBehaviour)this).__registerRpc(2439915998u, new RpcReceiveHandler(__rpc_handler_2439915998), "ShiftToGearClientRpc"); ((NetworkBehaviour)this).__registerRpc(3005876468u, new RpcReceiveHandler(__rpc_handler_3005876468), "SyncCarPositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(1907122222u, new RpcReceiveHandler(__rpc_handler_1907122222), "SyncCarPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(152467739u, new RpcReceiveHandler(__rpc_handler_152467739), "MagnetCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(706048695u, new RpcReceiveHandler(__rpc_handler_706048695), "MagnetCarClientRpc"); ((NetworkBehaviour)this).__registerRpc(1613321329u, new RpcReceiveHandler(__rpc_handler_1613321329), "SetHonkServerRpc"); ((NetworkBehaviour)this).__registerRpc(3511018852u, new RpcReceiveHandler(__rpc_handler_3511018852), "SetHonkClientRpc"); ((NetworkBehaviour)this).__registerRpc(2989386144u, new RpcReceiveHandler(__rpc_handler_2989386144), "AddTurboBoostServerRpc"); ((NetworkBehaviour)this).__registerRpc(580995605u, new RpcReceiveHandler(__rpc_handler_580995605), "AddTurboBoostClientRpc"); ((NetworkBehaviour)this).__registerRpc(2220215192u, new RpcReceiveHandler(__rpc_handler_2220215192), "AddEngineOilServerRpc"); ((NetworkBehaviour)this).__registerRpc(507845690u, new RpcReceiveHandler(__rpc_handler_507845690), "AddEngineOilClientRpc"); ((NetworkBehaviour)this).__registerRpc(4057635380u, new RpcReceiveHandler(__rpc_handler_4057635380), "UseTurboBoostServerRpc"); ((NetworkBehaviour)this).__registerRpc(3713475905u, new RpcReceiveHandler(__rpc_handler_3713475905), "UseTurboBoostClientRpc"); ((NetworkBehaviour)this).__registerRpc(67187887u, new RpcReceiveHandler(__rpc_handler_67187887), "SetRadioStationServerRpc"); ((NetworkBehaviour)this).__registerRpc(1229145751u, new RpcReceiveHandler(__rpc_handler_1229145751), "SetRadioStationClientRpc"); ((NetworkBehaviour)this).__registerRpc(747204646u, new RpcReceiveHandler(__rpc_handler_747204646), "SetRadioOnServerRpc"); ((NetworkBehaviour)this).__registerRpc(2634275797u, new RpcReceiveHandler(__rpc_handler_2634275797), "SetRadioOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(3998038496u, new RpcReceiveHandler(__rpc_handler_3998038496), "SetRadioSignalQualityServerRpc"); ((NetworkBehaviour)this).__registerRpc(650028427u, new RpcReceiveHandler(__rpc_handler_650028427), "SetRadioSignalQualityClientRpc"); ((NetworkBehaviour)this).__registerRpc(3213163124u, new RpcReceiveHandler(__rpc_handler_3213163124), "SyncExtremeStressServerRpc"); ((NetworkBehaviour)this).__registerRpc(2858054944u, new RpcReceiveHandler(__rpc_handler_2858054944), "SyncExtremeStressClientRpc"); ((NetworkBehaviour)this).__registerRpc(4157739565u, new RpcReceiveHandler(__rpc_handler_4157739565), "CarBumpServerRpc"); ((NetworkBehaviour)this).__registerRpc(2422003356u, new RpcReceiveHandler(__rpc_handler_2422003356), "CarBumpClientRpc"); ((NetworkBehaviour)this).__registerRpc(3768350198u, new RpcReceiveHandler(__rpc_handler_3768350198), "CarCollisionServerRpc"); ((NetworkBehaviour)this).__registerRpc(3570939371u, new RpcReceiveHandler(__rpc_handler_3570939371), "CarCollisionClientRpc"); ((NetworkBehaviour)this).__registerRpc(547527586u, new RpcReceiveHandler(__rpc_handler_547527586), "CarCollisionSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(1701190060u, new RpcReceiveHandler(__rpc_handler_1701190060), "CarCollisionSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(2530415664u, new RpcReceiveHandler(__rpc_handler_2530415664), "DealDamageServerRpc"); ((NetworkBehaviour)this).__registerRpc(4084514568u, new RpcReceiveHandler(__rpc_handler_4084514568), "DealDamageClientRpc"); ((NetworkBehaviour)this).__registerRpc(2114861833u, new RpcReceiveHandler(__rpc_handler_2114861833), "DestroyCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(1225529431u, new RpcReceiveHandler(__rpc_handler_1225529431), "DestroyCarClientRpc"); ((NetworkBehaviour)this).__registerRpc(190383325u, new RpcReceiveHandler(__rpc_handler_190383325), "PushTruckServerRpc"); ((NetworkBehaviour)this).__registerRpc(1491095712u, new RpcReceiveHandler(__rpc_handler_1491095712), "PushTruckFromOwnerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1152731167u, new RpcReceiveHandler(__rpc_handler_1152731167), "PushTruckClientRpc"); ((NetworkBehaviour)this).__registerRpc(65800505u, new RpcReceiveHandler(__rpc_handler_65800505), "PushTruckFromOwnerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2977356452u, new RpcReceiveHandler(__rpc_handler_2977356452), "SetHoodOpenServerRpc"); ((NetworkBehaviour)this).__registerRpc(4071602288u, new RpcReceiveHandler(__rpc_handler_4071602288), "SetHoodOpenClientRpc"); ((NetworkBehaviour)this).__registerRpc(2654200482u, new RpcReceiveHandler(__rpc_handler_2654200482), "ToggleHeadlightsServerRpc"); ((NetworkBehaviour)this).__registerRpc(1522629556u, new RpcReceiveHandler(__rpc_handler_1522629556), "ToggleHeadlightsClientRpc"); ((NetworkBehaviour)this).__registerRpc(405222209u, new RpcReceiveHandler(__rpc_handler_405222209), "SpringDriverSeatServerRpc"); ((NetworkBehaviour)this).__registerRpc(3607162613u, new RpcReceiveHandler(__rpc_handler_3607162613), "SpringDriverSeatClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2379619604(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).RemoveKeyFromIgnitionServerRpc(driverId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3778510610(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).RemoveKeyFromIgnitionClientRpc(driverId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1024272216(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).RevCarServerRpc(driverId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_532109531(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).RevCarClientRpc(driverId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3141029793(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).StartIgnitionServerRpc(driverId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1434007931(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).StartIgnitionClientRpc(driverId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1576302371(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); bool keyIsIn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref keyIsIn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).TryIgnitionServerRpc(driverId, keyIsIn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3683253228(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); bool keyIsIn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref keyIsIn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).TryIgnitionClientRpc(driverId, keyIsIn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3939365593(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CancelTryIgnitionServerRpc(driverId, setKeyInSlot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1886249329(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 driverId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverId); bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CancelTryIgnitionClientRpc(driverId, setKeyInSlot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_254853252(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_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) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 exitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).PassengerLeaveVehicleServerRpc(playerId, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2638605193(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_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) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 exitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).PassengerLeaveVehicleClientRpc(playerId, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2807656216(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 playerInControlOfVehicleServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerInControlOfVehicleServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetPlayerInControlOfVehicleServerRpc(playerInControlOfVehicleServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3756594919(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; ((VController)(object)target).CancelPlayerInControlOfVehicleClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1977808634(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_005c: 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_007a: 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_0091: 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 carLocation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carLocation); Quaternion carRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carRotation); bool setKeyInIgnition = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInIgnition, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).RemovePlayerControlOfVehicleServerRpc(playerId, carLocation, carRotation, setKeyInIgnition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3343654051(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 playerInControlOfVehicleClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerInControlOfVehicleClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetPlayerInControlOfVehicleClientRpc(playerInControlOfVehicleClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_167133403(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 setIgnitionStarted = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setIgnitionStarted, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).RemovePlayerControlOfVehicleClientRpc(playerId, setIgnitionStarted); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1664078425(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 setGear = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setGear); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).ShiftToGearServerRpc(setGear, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2439915998(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 setGear = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setGear); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).ShiftToGearClientRpc(setGear, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3005876468(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_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_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_00d5: 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_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 carPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carPosition); Vector3 carRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carRotation); float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); float engineRPM = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref engineRPM, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SyncCarPositionServerRpc(carPosition, carRotation, num, engineRPM); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_1907122222(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_0064: 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_0079: 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_0088: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 carPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carPosition); Vector3 carRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carRotation); float num = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref num, default(ForPrimitives)); float engineSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref engineSpeed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SyncCarPositionClientRpc(carPosition, carRotation, num, engineSpeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_152467739(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_008a: 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_00a8: 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_00bf: 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 targetPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetPosition); Vector3 targetRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetRotation); int playerWhoSent = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoSent); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).MagnetCarServerRpc(targetPosition, targetRotation, playerWhoSent); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_706048695(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //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_005b: 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) { Vector3 targetPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetPosition); Vector3 targetRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetRotation); int playerWhoSent = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoSent); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).MagnetCarClientRpc(targetPosition, targetRotation, playerWhoSent); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1613321329(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_003e: 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) { bool honk = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref honk, default(ForPrimitives)); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetHonkServerRpc(honk, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3511018852(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_003e: 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) { bool honk = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref honk, default(ForPrimitives)); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetHonkClientRpc(honk, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2989386144(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setTurboBoosts = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setTurboBoosts); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).AddTurboBoostServerRpc(playerId, setTurboBoosts); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_580995605(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setTurboBoosts = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setTurboBoosts); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).AddTurboBoostClientRpc(playerId, setTurboBoosts); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2220215192(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setHP = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setHP); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).AddEngineOilServerRpc(playerId, setHP); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_507845690(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setHP = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setHP); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).AddEngineOilClientRpc(playerId, setHP); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4057635380(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; ((VController)(object)target).UseTurboBoostServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3713475905(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; ((VController)(object)target).UseTurboBoostClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_67187887(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 radioStation = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioStation); int signalQuality = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref signalQuality); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetRadioStationServerRpc(radioStation, signalQuality); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1229145751(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 radioStation = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioStation); int signalQuality = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref signalQuality); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetRadioStationClientRpc(radioStation, signalQuality); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_747204646(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 radioOnServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref radioOnServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetRadioOnServerRpc(radioOnServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2634275797(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 radioOnClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref radioOnClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetRadioOnClientRpc(radioOnClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3998038496(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 radioSignalQualityServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioSignalQualityServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetRadioSignalQualityServerRpc(radioSignalQualityServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_650028427(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 radioSignalQualityClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioSignalQualityClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetRadioSignalQualityClientRpc(radioSignalQualityClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3213163124(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 underStress = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref underStress, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SyncExtremeStressServerRpc(underStress); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2858054944(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 underStress = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref underStress, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SyncExtremeStressClientRpc(underStress); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4157739565(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 vel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vel); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CarBumpServerRpc(vel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2422003356(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 vel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vel); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CarBumpClientRpc(vel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3768350198(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 vel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vel); float magn = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref magn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CarCollisionServerRpc(vel, magn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3570939371(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 vel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vel); float magn = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref magn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CarCollisionClientRpc(vel, magn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_547527586(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_007d: 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_00a3: 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_00b8: 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_00de: 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 audioPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref audioPosition); int audio = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref audio); int audioType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref audioType); float vol = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vol, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CarCollisionSFXServerRpc(audioPosition, audio, audioType, vol); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_1701190060(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //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_0056: 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_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) //IL_0091: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 audioPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref audioPosition); int audio = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref audio); int audioType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref audioType); float vol = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vol, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).CarCollisionSFXClientRpc(audioPosition, audio, audioType, vol); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2530415664(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_007d: 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_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 { int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); int sentByClient = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref sentByClient); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).DealDamageServerRpc(amount, sentByClient); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4084514568(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 amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); int sentByClient = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref sentByClient); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).DealDamageClientRpc(amount, sentByClient); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2114861833(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 sentByClient = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref sentByClient); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).DestroyCarServerRpc(sentByClient); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1225529431(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 sentByClient = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref sentByClient); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).DestroyCarClientRpc(sentByClient); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_190383325(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Vector3 dir = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dir); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).PushTruckServerRpc(pos, dir); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1491095712(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).PushTruckFromOwnerServerRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1152731167(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 pushPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pushPosition); Vector3 dir = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dir); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).PushTruckClientRpc(pushPosition, dir); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_65800505(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).PushTruckFromOwnerClientRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2977356452(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 hoodOpenServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hoodOpenServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetHoodOpenServerRpc(hoodOpenServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4071602288(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 hoodOpenClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hoodOpenClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).SetHoodOpenClientRpc(hoodOpenClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2654200482(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 setLightsOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setLightsOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).ToggleHeadlightsServerRpc(setLightsOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1522629556(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 setLightsOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setLightsOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((VController)(object)target).ToggleHeadlightsClientRpc(setLightsOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_405222209(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; ((VController)(object)target).SpringDriverSeatServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3607162613(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; ((VController)(object)target).SpringDriverSeatClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "VController"; } } 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)" ███ ███ ███ ███ █████ ███ ███ █ █ ███ "); Logger.LogInfo((object)"█ █ █ █ █ █ █ █ █ █ █ █"); Logger.LogInfo((object)"█ █ █ █ █ █ █ █ █ █ █ █ █"); Logger.LogInfo((object)" ███ ███ ███ █ █ ███ ███ █ █ ███ "); Logger.LogInfo((object)" █ █ █ █ █ █ █ █ █ █ █ █"); Logger.LogInfo((object)" █ █ █ █ █ █ █ █ █ █ █ █"); Logger.LogInfo((object)" ███ █ ███ ███ █ █ █ ███ ███ █ ███ "); Logger.LogInfo((object)" "); Logger.LogInfo((object)"Finished Loading"); ((Registry)(object)LethalContent.Enemies).OnFreeze += FixDawnEnemyReferences; } private static void FixDawnEnemyReferences() { CadaverGrowthAI component = ((Registry)(object)LethalContent.Enemies)[EnemyKeys.CadaverGrowths].EnemyType.enemyPrefab.GetComponent(); GameObject faceSporesPrefab = component.faceSporesPrefab; GameObject cadaverSporesParticle = component.CadaverSporesParticle; GravelingMasterAI gravelingMasterAI = default(GravelingMasterAI); foreach (DawnEnemyInfo value in ((Registry)(object)LethalContent.Enemies).Values) { if (!((DawnBaseInfo)(object)value).ShouldSkipIgnoreOverride() && value.EnemyType.enemyPrefab.TryGetComponent(ref gravelingMasterAI)) { gravelingMasterAI.faceSporesPrefab = faceSporesPrefab; gravelingMasterAI.gravelingSporesParticle = cadaverSporesParticle; } } } } } namespace Spectre.Vehicle { public class SuperVehicleController : VehicleController { public float breakTorque = 2000f; public float minWheelTorque = 325f; public float maxWheelTorque = 1000f; public float minEngineRPMParked; public float maxEngineRPMParked = 1.3f; public float parkBreakTorque = 2000f; public float idleWheelTorqueSpeed = 1f; [Space(10f)] public float tinyEnemyCrushVelocity; public float mediumEnemyCrushVelocity = 9f; public float giantEnemyCrushVelocity = 15f; public bool areGiantEnemiesCrushable; public void Update() { //IL_0346: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0445: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0566: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_057a: Unknown result type (might be due to invalid IL or missing references) //IL_057f: 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_0594: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_06af: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_0c34: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Invalid comparison between Unknown and I4 //IL_09b1: Unknown result type (might be due to invalid IL or missing references) //IL_09b6: Unknown result type (might be due to invalid IL or missing references) //IL_09b8: Unknown result type (might be due to invalid IL or missing references) //IL_09bb: Invalid comparison between Unknown and I4 //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c0: Invalid comparison between Unknown and I4 //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Unknown result type (might be due to invalid IL or missing references) //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a19: Unknown result type (might be due to invalid IL or missing references) //IL_0a1e: Unknown result type (might be due to invalid IL or missing references) //IL_0da6: Unknown result type (might be due to invalid IL or missing references) //IL_0dac: Invalid comparison between Unknown and I4 //IL_0b08: Unknown result type (might be due to invalid IL or missing references) //IL_0b0d: Unknown result type (might be due to invalid IL or missing references) //IL_0b18: Unknown result type (might be due to invalid IL or missing references) //IL_0b22: Unknown result type (might be due to invalid IL or missing references) //IL_0b27: Unknown result type (might be due to invalid IL or missing references) //IL_0b32: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Unknown result type (might be due to invalid IL or missing references) //IL_0b41: Unknown result type (might be due to invalid IL or missing references) if (base.destroyNextFrame) { if (((NetworkBehaviour)this).IsOwner) { Debug.Log((object)$"Is networkobject spawned: {((NetworkBehaviour)this).NetworkObject.IsSpawned}"); Debug.Log((object)"Destroying car on local client"); Object.Destroy((Object)(object)((Component)base.windwiperPhysicsBody1).gameObject); Object.Destroy((Object)(object)((Component)base.windwiperPhysicsBody2).gameObject); Object.Destroy((Object)(object)((Component)base.ragdollPhysicsBody).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } return; } if ((Object)(object)((NetworkBehaviour)this).NetworkObject != (Object)null && !((NetworkBehaviour)this).NetworkObject.IsSpawned) { base.physicsRegion.disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains(base.physicsRegion)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove(base.physicsRegion); } if (base.localPlayerInControl || base.localPlayerInPassengerSeat) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)base.physicsRegion.physicsTransform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[i]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[i]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[i].isHeld) { componentsInChildren[i].FallToGround(false, false, default(Vector3)); } } Debug.Log((object)"Destroying car on local client, next frame"); base.destroyNextFrame = true; return; } ((VehicleController)this).ReactToDamage(); base.driverSideDoorTrigger.interactable = Time.realtimeSinceStartup - base.timeSinceSpringingDriverSeat > 1.6f; base.passengerSideDoorTrigger.interactable = Time.realtimeSinceStartup - base.timeSinceSpringingDriverSeat > 1.6f; if (base.magnetedToShip) { if (!StartOfRound.Instance.magnetOn) { base.magnetedToShip = false; StartOfRound.Instance.isObjectAttachedToMagnet = false; ((VehicleController)this).CollectItemsInTruck(); return; } base.pressedTurbo = false; base.limitTruckVelocityTimer = 1.3f; base.EngineRPM = Mathf.Lerp(base.EngineRPM, 0f, 3f * Time.deltaTime); base.physicsRegion.priority = 0; base.magnetTime = Mathf.Min(base.magnetTime + Time.deltaTime, 1f); base.magnetRotationTime = Mathf.Min(base.magnetTime + Time.deltaTime * 0.75f, 1f); if (StartOfRound.Instance.inShipPhase) { base.carHP = base.baseCarHP; } if (!base.finishedMagneting && base.magnetTime > 0.7f) { base.finishedMagneting = true; if (!base.loadedVehicleFromSave) { base.turbulenceAmount = 2f; base.turbulenceAudio.volume = 0.6f; base.turbulenceAudio.PlayOneShot(base.maxCollisions[Random.Range(0, base.maxCollisions.Length)]); } } } else { base.physicsRegion.priority = 1; base.finishedMagneting = false; if ((Object)(object)StartOfRound.Instance.attachedVehicle == (Object)(object)this) { StartOfRound.Instance.attachedVehicle = null; } if (((NetworkBehaviour)this).IsOwner && !StartOfRound.Instance.isObjectAttachedToMagnet && StartOfRound.Instance.magnetOn && Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position) < 10f && !Physics.Linecast(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position, 256, (QueryTriggerInteraction)1)) { ((VehicleController)this).StartMagneting(); return; } if (((NetworkBehaviour)this).IsOwner) { if (base.enabledCollisionForAllPlayers) { base.enabledCollisionForAllPlayers = false; ((VehicleController)this).DisableVehicleCollisionForAllPlayers(); } ((VehicleController)this).SyncCarPhysicsToOtherClients(); } else { if (!base.enabledCollisionForAllPlayers) { base.enabledCollisionForAllPlayers = true; ((VehicleController)this).EnableVehicleCollisionForAllPlayers(); } ((Component)this).gameObject.GetComponent().isKinematic = true; } } if (base.honkingHorn) { if (!base.hornAudio.isPlaying) { base.hornAudio.Play(); base.hornAudio.pitch = 1f; } else if (Time.realtimeSinceStartup - base.timeAtLastHornPing > 2f) { base.timeAtLastHornPing = Time.realtimeSinceStartup; RoundManager.Instance.PlayAudibleNoise(((Component)base.hornAudio).transform.position, 28f, 0.85f, 0, false, 106217); } } else { base.hornAudio.pitch = Mathf.Max(base.hornAudio.pitch - Time.deltaTime * 6f, 0.01f); if (base.hornAudio.pitch < 0.02f) { base.hornAudio.Stop(); } } base.FrontLeftWheel.steerAngle = 15f * base.steeringInput; base.FrontRightWheel.steerAngle = 15f * base.steeringInput; if (base.carDestroyed) { return; } if (base.keyIsInDriverHand && (Object)(object)base.currentDriver != (Object)null) { ((Renderer)base.keyObject).enabled = true; Transform val = ((!base.localPlayerInControl) ? base.currentDriver.serverItemHolder : base.currentDriver.localItemHolder); ((Component)base.keyObject).transform.rotation = val.rotation; ((Component)base.keyObject).transform.Rotate(base.rotationOffset); ((Component)base.keyObject).transform.position = val.position; Vector3 positionOffset = base.positionOffset; positionOffset = val.rotation * positionOffset; Transform transform = ((Component)base.keyObject).transform; transform.position += positionOffset; } else { if (Time.realtimeSinceStartup - base.timeAtLastGearShift < 1.7f && (Object)(object)base.currentDriver != (Object)null) { base.currentDriver.playerBodyAnimator.SetFloat("SA_CarMotionTime", base.gearStickAnimValue); } if (base.localPlayerInControl && base.ignitionStarted && base.keyIgnitionCoroutine == null) { if (GameNetworkManager.Instance.localPlayerController.ladderCameraHorizontal > 52f) { if (Time.realtimeSinceStartup - base.timeAtLastGearShift < 1.7f) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 5); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 4); } } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } } if (base.keyIsInIgnition) { ((Renderer)base.keyObject).enabled = true; if (base.ignitionStarted) { ((Component)base.keyObject).transform.position = base.ignitionTurnedPosition.position; ((Component)base.keyObject).transform.rotation = base.ignitionTurnedPosition.rotation; } else { ((Component)base.keyObject).transform.position = base.ignitionNotTurnedPosition.position; ((Component)base.keyObject).transform.rotation = base.ignitionNotTurnedPosition.rotation; } } else { ((Renderer)base.keyObject).enabled = false; } } if (!base.localPlayerInControl || !((NetworkBehaviour)this).IsOwner) { ((VehicleController)this).SetCarEffects(base.steeringAnimValue); return; } if (base.ignitionStarted) { ((VehicleController)this).GetVehicleInput(); } if (base.limitTruckVelocityTimer <= 0f) { base.mainRigidbody.maxAngularVelocity = 4f; base.mainRigidbody.maxLinearVelocity = 50f; base.mainRigidbody.maxDepenetrationVelocity = 7f; } else { base.limitTruckVelocityTimer -= Time.deltaTime * 0.5f; base.mainRigidbody.maxDepenetrationVelocity = Mathf.Lerp(0.3f, 7f, Mathf.Clamp(base.limitTruckVelocityTimer, 0f, 1f)); base.mainRigidbody.maxAngularVelocity = Mathf.Lerp(0.1f, 4f, Mathf.Clamp(base.limitTruckVelocityTimer, 0f, 1f)); base.mainRigidbody.maxLinearVelocity = Mathf.Lerp(0.1f, 60f, Mathf.Clamp(base.limitTruckVelocityTimer, 0f, 1f)); } ((VehicleController)this).SetCarEffects(base.steeringAnimValue); float num = 0f; base.EngineRPM = (base.FrontLeftWheel.rpm + base.FrontRightWheel.rpm) / 2f; base.vehicleEngineAudio.pitch = Mathf.Min(Mathf.Abs(base.EngineRPM / base.MaxEngineRPM) + 1f, 1.3f); if (base.brakePedalPressed) { if (base.drivePedalPressed) { num += 2f; base.lastStressType += "; Accelerating while braking"; } base.FrontLeftWheel.brakeTorque = breakTorque; base.FrontRightWheel.brakeTorque = breakTorque; base.BackLeftWheel.brakeTorque = breakTorque; base.BackRightWheel.brakeTorque = breakTorque; for (int j = 0; j < base.otherWheels.Length; j++) { base.otherWheels[j].brakeTorque = breakTorque; } } else { base.FrontLeftWheel.brakeTorque = 0f; base.FrontRightWheel.brakeTorque = 0f; base.BackLeftWheel.brakeTorque = 0f; base.BackRightWheel.brakeTorque = 0f; for (int k = 0; k < base.otherWheels.Length; k++) { base.otherWheels[k].brakeTorque = 0f; } } if (base.drivePedalPressed && base.ignitionStarted) { CarGearShift gear = base.gear; if ((int)gear != 1) { if ((int)gear == 2) { if (base.switchGearsBoostEnabled) { base.mainRigidbody.AddForce(((Component)this).transform.TransformDirection(new Vector3(0f, 0f, -1f)) * base.turboBoostForce * 0.3f + Vector3.up * base.turboBoostUpwardForce * 0.06f, (ForceMode)1); base.switchGearsBoostEnabled = false; } if (base.EngineRPM > 5000f) { num += Mathf.Min((base.EngineRPM - 5000f) / 10000f, 0f); base.lastStressType += "; Reversing while at high speed"; } base.FrontLeftWheel.motorTorque = 0f - base.EngineTorque; base.FrontRightWheel.motorTorque = 0f - base.EngineTorque; base.BackLeftWheel.motorTorque = 0f - base.EngineTorque; base.BackRightWheel.motorTorque = 0f - base.EngineTorque; for (int l = 0; l < base.otherWheels.Length; l++) { base.otherWheels[l].motorTorque = 0f - base.EngineTorque; } } } else { if (base.switchGearsBoostEnabled) { base.mainRigidbody.AddForce(0.35f * base.turboBoostForce * ((Component)this).transform.TransformDirection(new Vector3(0f, 0f, 1f)) + 0.06f * base.turboBoostUpwardForce * Vector3.up, (ForceMode)1); base.switchGearsBoostEnabled = false; } base.FrontLeftWheel.motorTorque = Mathf.Clamp(Mathf.MoveTowards(base.FrontLeftWheel.motorTorque, base.EngineTorque, base.carAcceleration * Time.deltaTime), minWheelTorque, maxWheelTorque); base.FrontRightWheel.motorTorque = base.FrontLeftWheel.motorTorque; base.BackLeftWheel.motorTorque = base.FrontLeftWheel.motorTorque; base.BackRightWheel.motorTorque = base.FrontLeftWheel.motorTorque; for (int m = 0; m < base.otherWheels.Length; m++) { base.otherWheels[m].motorTorque = base.FrontLeftWheel.motorTorque; } } } else if (base.pressedTurbo) { base.pressedTurbo = false; } if ((int)base.gear == 3 || !base.ignitionStarted) { if (Mathf.Abs(base.EngineRPM) > 3000f && base.ignitionStarted) { num += Mathf.Clamp((base.EngineRPM - 200f) / 350f, base.MinEngineRPM, base.MaxEngineRPM); base.lastStressType += "; In park while at high speed"; } if (base.drivePedalPressed && base.ignitionStarted) { num += 1.2f; base.lastStressType += "; Accelerating while in park"; } base.FrontLeftWheel.motorTorque = 0f; base.FrontRightWheel.motorTorque = 0f; base.BackLeftWheel.motorTorque = 0f; base.BackRightWheel.motorTorque = 0f; base.FrontLeftWheel.brakeTorque = parkBreakTorque; base.FrontRightWheel.brakeTorque = parkBreakTorque; base.BackLeftWheel.brakeTorque = parkBreakTorque; base.BackRightWheel.brakeTorque = parkBreakTorque; for (int n = 0; n < base.otherWheels.Length; n++) { base.otherWheels[n].brakeTorque = parkBreakTorque; base.otherWheels[n].motorTorque = 0f; } } else if (!base.drivePedalPressed) { float num2 = idleWheelTorqueSpeed; if ((int)base.gear == 2) { num2 = 0f - idleWheelTorqueSpeed; } base.FrontLeftWheel.motorTorque = base.idleSpeed * num2; base.FrontRightWheel.motorTorque = base.idleSpeed * num2; base.BackLeftWheel.motorTorque = base.idleSpeed * num2; base.BackRightWheel.motorTorque = base.idleSpeed * num2; for (int num3 = 0; num3 < base.otherWheels.Length; num3++) { base.otherWheels[num3].motorTorque = base.idleSpeed * num2; } } ((VehicleController)this).SetInternalStress(num); base.stressPerSecond = num; } public bool CarReactToObstacle(Vector3 vel, Vector3 position, Vector3 impulse, CarObstacleType type, float obstacleSize = 1f, EnemyAI enemyScript = null, bool dealDamage = true) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected I4, but got Unknown //IL_0099: 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_0117: 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_00d0: 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_00ea: 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_00fe: 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_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_005e: 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_0028: 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_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_0165: 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_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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_0080: 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_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: 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_050d: 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_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: 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_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0316: 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_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: 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_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0443: 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_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: 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_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_03fe: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0257: 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_0266: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: 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_04cd: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: 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_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Unknown result type (might be due to invalid IL or missing references) //IL_054f: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_0555: Unknown result type (might be due to invalid IL or missing references) //IL_0556: Unknown result type (might be due to invalid IL or missing references) //IL_0560: 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_0582: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_0597: 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_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) switch ((int)type) { case 2: if (base.carHP < 10) { base.mainRigidbody.AddForceAtPosition(Vector3.up * base.torqueForce + vel, position, (ForceMode)1); } else { base.mainRigidbody.AddForceAtPosition((Vector3.up * base.torqueForce + vel) * 0.5f, position, (ForceMode)1); } ((VehicleController)this).CarBumpServerRpc(base.averageVelocity * 0.7f); if (dealDamage) { ((VehicleController)this).DealPermanentDamage(1, position); } return true; case 0: ((VehicleController)this).PlayCollisionAudio(position, 5, Mathf.Clamp(((Vector3)(ref vel)).magnitude / 7f, 0.65f, 1f)); if (((Vector3)(ref vel)).magnitude < 4.25f) { base.mainRigidbody.velocity = Vector3.Normalize(-impulse * 100000000f) * 9f; ((VehicleController)this).DealPermanentDamage(1, default(Vector3)); return true; } base.mainRigidbody.AddForceAtPosition(Vector3.up * base.torqueForce, position, (ForceMode)2); return false; case 1: { float num; if (obstacleSize <= 1f) { num = tinyEnemyCrushVelocity; _ = base.carReactToPlayerHitMultiplier; } else if (obstacleSize <= 2f) { num = mediumEnemyCrushVelocity; _ = base.carReactToPlayerHitMultiplier; } else { num = giantEnemyCrushVelocity; _ = base.carReactToPlayerHitMultiplier; } vel = Vector3.Scale(vel, new Vector3(1f, 0f, 1f)); base.mainRigidbody.AddForceAtPosition(Vector3.up * base.torqueForce, position, (ForceMode)2); bool result = false; if (!areGiantEnemiesCrushable) { if (((Vector3)(ref vel)).magnitude < num) { Debug.DrawRay(((Component)this).transform.position, Vector3.Normalize(-impulse * 100000000f) * base.carReactToPlayerHitMultiplier); if (obstacleSize <= 1f) { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * 4f, (ForceMode)1); if (((Vector3)(ref vel)).magnitude > 1f) { enemyScript.KillEnemyOnOwnerClient(false); } } else { ((VehicleController)this).CarBumpServerRpc(base.averageVelocity); base.mainRigidbody.velocity = Vector3.Normalize(-impulse * 100000000f) * 9f; if ((Object)(object)base.currentDriver != (Object)null) { _ = base.currentDriver; } if (((Vector3)(ref vel)).magnitude > 2f && dealDamage) { enemyScript.HitEnemy(2, base.currentDriver, true, 331); } result = true; if (obstacleSize > 2f) { ((VehicleController)this).DealPermanentDamage(1, position); } } Debug.DrawRay(position, -impulse * Mathf.Max(base.carReactToPlayerHitMultiplier, 500f), Color.red, 5f); } else { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * (base.carReactToPlayerHitMultiplier - 220f), (ForceMode)1); if (dealDamage) { ((VehicleController)this).DealPermanentDamage(1, position); } PlayerControllerB val = ((!((Object)(object)base.currentDriver != (Object)null)) ? base.currentPassenger : base.currentDriver); enemyScript.HitEnemy(12, val, false, -1); Debug.DrawRay(position, (Vector3.up + -impulse / 2f) * Mathf.Max(((Vector3)(ref vel)).magnitude * base.carReactToPlayerHitMultiplier, 500f), Color.magenta, 5f); } } else if (((Vector3)(ref vel)).magnitude < num) { Debug.DrawRay(((Component)this).transform.position, Vector3.Normalize(-impulse * 100000000f) * base.carReactToPlayerHitMultiplier); if (obstacleSize <= 1f) { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * 4f, (ForceMode)1); if (((Vector3)(ref vel)).magnitude > 1f) { enemyScript.KillEnemyOnOwnerClient(false); } } else { ((VehicleController)this).CarBumpServerRpc(base.averageVelocity); base.mainRigidbody.velocity = Vector3.Normalize(-impulse * 100000000f) * 9f; if ((Object)(object)base.currentDriver != (Object)null) { _ = base.currentDriver; } if (((Vector3)(ref vel)).magnitude > 2f && dealDamage) { enemyScript.HitEnemy(2, base.currentDriver, true, 331); } result = true; if (obstacleSize > 2f) { ((VehicleController)this).DealPermanentDamage(1, position); } } Debug.DrawRay(position, -impulse * Mathf.Max(base.carReactToPlayerHitMultiplier, 500f), Color.red, 5f); } else { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * (base.carReactToPlayerHitMultiplier - 220f), (ForceMode)1); if (dealDamage) { ((VehicleController)this).DealPermanentDamage(1, position); } PlayerControllerB val2 = ((!((Object)(object)base.currentDriver != (Object)null)) ? base.currentPassenger : base.currentDriver); enemyScript.HitEnemy(12, val2, false, -1); Debug.DrawRay(position, (Vector3.up + -impulse / 2f) * Mathf.Max(((Vector3)(ref vel)).magnitude * base.carReactToPlayerHitMultiplier, 500f), Color.magenta, 5f); } ((VehicleController)this).PlayCollisionAudio(position, 5, 1f); return result; } default: return false; } } protected override void __initializeVariables() { ((VehicleController)this).__initializeVariables(); } protected override void __initializeRpcs() { ((VehicleController)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SuperVehicleController"; } } } namespace Spectre.Scriptable { [CreateAssetMenu(fileName = "AdditionnalEnemyDetails", menuName = "SpectreLib/AddEnemData")] public class AdditionnalEnemyDetails : ScriptableObject { [Header("Enemy name so you can remember it (this field does nothing)")] [SerializeField] public string EnemyName; [Space(5f)] [SerializeField] public bool usesDawnlibAchievementUponDeath; [SerializeReference] public DuskAchievementReference achievementUponDeath; [SerializeField] public bool usesDawnlibAchievementUponKill; [SerializeReference] public DuskAchievementReference achievementUponKillPlayer; [Space(5f)] [Header("Monster Variables (Leave at 0 if you wish to not override values already in the enemy Prefab")] [SerializeField] public int baseDamageDealtToPlayer; [SerializeField] public int maxHealth; [Space(5f)] [SerializeField] public GameObject itemDropOnDeath; [SerializeField] public int maxValueOfSaidItem = 50; [SerializeField] public int minValueOfSaidItem = 1; [SerializeField] public Vector3 itemDropPos; [SerializeField] public ScanNodeProperties dropItemScanNode; [SerializeField] public Quaternion itemRotationOffset; } } namespace Spectre.Patch { internal class VehicleControllerPatch { } } namespace Spectre.Misc { public class BogPlantAI : MonoBehaviour { 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 Quaternion rotationRng; 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_0053: 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_0080: 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_00f9: Unknown result type (might be due to invalid IL or missing references) plantAppearParticle.Play(); plantMesh.transform.localScale = new Vector3(scaleX, scaleY, scaleZ); rotationRng.y = Random.Range(0f, 360f); ((Component)this).transform.localRotation = rotationRng; 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() { } private IEnumerator GrowStupid() { if (!growthDone) { float num = Random.Range(0.02f, 0.05f); float num2 = Random.Range(0.02f, 0.05f); float num3 = Random.Range(0.02f, 0.05f); scaleX = Mathf.Clamp(scaleX + num * Time.deltaTime, 0f, 4f); scaleY = Mathf.Clamp(scaleY + num2 * Time.deltaTime, 0f, 4f); scaleZ = Mathf.Clamp(scaleZ + num3 * Time.deltaTime, 0f, 4f); plantMesh.transform.localScale = new Vector3(scaleX, scaleY, scaleZ); } yield return null; } public void DestroyPlant() { if (isLeafbush) { leafbushParticle.Stop(); } else if (!isMudfern) { _ = isSludgereed; } } private IEnumerator Grow() { float elapsed = 0f; finalScale = Random.Range(finalScale - randomMinMaxSize, finalScale + randomMinMaxSize); while (elapsed < growTime) { elapsed += Time.deltaTime; float num = elapsed / growTime; float num2 = Mathf.Lerp(0f, finalScale, num); plantMesh.transform.localScale = baseScale * num2; yield return null; } plantMesh.transform.localScale = baseScale * finalScale; } } public class Intertia : MonoBehaviour { public int damageMultiplier = 1; public Rigidbody rb; public int inertiaOutput; private void Awake() { if ((Object)(object)rb != (Object)null) { inertiaOutput = ConvertVelocityIntoStat(rb, damageMultiplier); } } public int ConvertVelocityIntoStat(Rigidbody den, int damageMultiplier = 1) { //IL_0001: 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_0023: Unknown result type (might be due to invalid IL or missing references) int num = Mathf.RoundToInt(den.velocity.x); int num2 = Mathf.RoundToInt(den.velocity.y); int num3 = Mathf.RoundToInt(den.velocity.z); if (num < 0) { num = 1 - num; } if (num2 < 0) { num2 = 1 - num2; } if (num3 < 0) { num3 = 1 - num3; } int num4 = (num + num2 + num3) / 3; if (damageMultiplier != 1) { this.damageMultiplier = damageMultiplier; } return num4 * this.damageMultiplier; } } public class ItemDataStoring { [Header("Item Stuff")] public GameObject item; public bool itemHasRandomValue = true; public int setValue = 25; public int minValue; public int maxValue = 50; public float spawnRangeX = 0.8f; public float spawnRangeZ = 0.8f; } public class RandomScanNodeName : MonoBehaviour { public ScanNodeProperties scanNode; public string[] nameList; public string[] descList; public float waitTimeBeforeChange; public bool debug; internal static ManualLogSource Logger { get; private set; } public void Start() { if (debug) { Logger.LogInfo((object)"RandomScanNode script started"); if (!Object.op_Implicit((Object)(object)scanNode)) { Logger.LogInfo((object)"Scan Node reference is missing!"); } } if (Object.op_Implicit((Object)(object)scanNode)) { ((MonoBehaviour)this).StartCoroutine("PickRandomNameAndDescription"); } } public void Update() { } public IEnumerator PickRandomNameAndDescription() { yield return (object)new WaitForSeconds(waitTimeBeforeChange); if (nameList != null) { int num = Random.Range(0, nameList.Length); scanNode.headerText = nameList[num]; } else { Logger.LogInfo((object)"RandomScanNode's Name list is empty."); } if (descList != null) { int num = Random.Range(0, descList.Length); scanNode.subText = descList[num]; } else { Logger.LogInfo((object)"RandomScanNode's Description list is empty."); } yield return null; } } public class ScrapGenerator : NetworkBehaviour { [Header("Scrap Variable")] public Transform spawnPos; public GameObject itemToSpawnC; public int minValue = 1; public int maxValue = 50; private GameObject objectInPresent; public ParticleSystem PoofParticle; public AudioSource presentAudio; public AudioClip openGiftAudio; private PlayerControllerB previousPlayerHeldBy; private bool hasUsedGift; private int objectInPresentValue; private Item objectInPresentItem; private void Awake() { objectInPresent = itemToSpawnC; } [ServerRpc] public void GenItemServerRpc(NetworkBehaviourReference itemToSpawn, int minimalValue, int maximalValue, Vector3 itemSpawnPos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Invalid comparison between Unknown and I4 //IL_0149: 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_0157: 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_00d2: 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_0104: 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 //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: 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_0196: 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_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: 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_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: 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)base.__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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4194894217u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref itemToSpawn, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, minimalValue); BytePacker.WriteValueBitPacked(val, maximalValue); ((FastBufferWriter)(ref val)).WriteValueSafe(ref itemSpawnPos); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4194894217u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = null; int num = 0; Vector3 zero = Vector3.zero; if ((Object)(object)objectInPresent == (Object)null) { Debug.LogError((object)"Error: There is no object in gift box!"); } else { Transform parentOfGiftObject = GetParentOfGiftObject(); zero = ((Component)this).transform.position + Vector3.up * 0.25f; GrabbableObject val4 = default(GrabbableObject); if (!((NetworkBehaviourReference)(ref itemToSpawn)).TryGet(ref val4, (NetworkManager)null) || (Object)(object)val4.itemProperties == (Object)null) { return; } val3 = Object.Instantiate(val4.itemProperties.spawnPrefab, itemSpawnPos, Quaternion.identity, parentOfGiftObject); GrabbableObject component = val3.GetComponent(); component.startFallingPosition = zero; ((MonoBehaviour)this).StartCoroutine(SetObjectToHitGroundSFX(component)); component.targetFloorPosition = component.GetItemFloorPosition(((Component)this).transform.position); if ((Object)(object)previousPlayerHeldBy != (Object)null && previousPlayerHeldBy.isInHangarShipRoom) { previousPlayerHeldBy.SetItemInElevator(true, true, component); } num = objectInPresentValue; int scrapValue = Random.Range(minimalValue, maximalValue); component.SetScrapValue(scrapValue); ((NetworkBehaviour)component).NetworkObject.Spawn(false); } _ = (Object)(object)val3 != (Object)null; PoofSpawnClientRpc(); } private IEnumerator SetObjectToHitGroundSFX(GrabbableObject gObject) { yield return (object)new WaitForEndOfFrame(); Debug.Log((object)("Setting " + gObject.itemProperties.itemName + " hit ground to false")); gObject.reachedFloorTarget = false; gObject.hasHitGround = false; gObject.fallTime = 0f; } [ClientRpc] public void PoofSpawnClientRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(389766643u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 389766643u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PoofParticle.Play(); presentAudio.PlayOneShot(openGiftAudio); WalkieTalkie.TransmitOneShotAudio(presentAudio, openGiftAudio, 1f); } } } [ClientRpc] public void SetValueForClientRpc(NetworkObjectReference netObjectRef, int presentValue, Vector3 startFallingPos) { //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_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_008c: 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_0137: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1092176613u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref netObjectRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, presentValue); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startFallingPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1092176613u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PoofParticle.Play(); presentAudio.PlayOneShot(openGiftAudio); WalkieTalkie.TransmitOneShotAudio(presentAudio, openGiftAudio, 1f); if (!((NetworkBehaviour)this).IsServer) { ((MonoBehaviour)this).StartCoroutine(waitForGiftPresentToSpawnOnClient(netObjectRef, presentValue, startFallingPos)); } } } private IEnumerator waitForGiftPresentToSpawnOnClient(NetworkObjectReference netObjectRef, int presentValue, Vector3 startFallingPos) { //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) //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) NetworkObject netObject = null; float startTime = Time.realtimeSinceStartup; while (Time.realtimeSinceStartup - startTime < 8f && !((NetworkObjectReference)(ref netObjectRef)).TryGet(ref netObject, (NetworkManager)null)) { yield return (object)new WaitForSeconds(0.03f); } if ((Object)(object)netObject == (Object)null) { Debug.Log((object)"Scrap Generator Script: No network object found"); yield break; } yield return (object)new WaitForEndOfFrame(); GrabbableObject component = ((Component)netObject).GetComponent(); RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)component.scrapValue; component.SetScrapValue(presentValue); Transform parentOfGiftObject = GetParentOfGiftObject(); ((Component)component).transform.SetParent(parentOfGiftObject, true); component.targetFloorPosition = ((Component)component).transform.parent.InverseTransformPoint(component.GetItemFloorPosition(startFallingPos)); if ((Object)(object)((Component)component).transform.parent != (Object)null) { startFallingPos = ((Component)component).transform.parent.InverseTransformPoint(startFallingPos); } component.startFallingPosition = startFallingPos; component.fallTime = 0f; component.hasHitGround = false; component.reachedFloorTarget = false; if ((Object)(object)previousPlayerHeldBy != (Object)null && previousPlayerHeldBy.isInHangarShipRoom) { previousPlayerHeldBy.SetItemInElevator(true, true, component); } } private Transform GetParentOfGiftObject() { if (((Object)(object)previousPlayerHeldBy != (Object)null && previousPlayerHeldBy.isInElevator) || StartOfRound.Instance.inShipPhase) { return StartOfRound.Instance.elevatorTransform; } return null; } protected override void __initializeVariables() { ((NetworkBehaviour)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 ((NetworkBehaviour)this).__registerRpc(4194894217u, new RpcReceiveHandler(__rpc_handler_4194894217), "GenItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(389766643u, new RpcReceiveHandler(__rpc_handler_389766643), "PoofSpawnClientRpc"); ((NetworkBehaviour)this).__registerRpc(1092176613u, new RpcReceiveHandler(__rpc_handler_1092176613), "SetValueForClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4194894217(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_008b: 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_00b8: 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_00cf: 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_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; } NetworkBehaviourReference itemToSpawn = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref itemToSpawn, default(ForNetworkSerializable)); int minimalValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref minimalValue); int maximalValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref maximalValue); Vector3 itemSpawnPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref itemSpawnPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((ScrapGenerator)(object)target).GenItemServerRpc(itemToSpawn, minimalValue, maximalValue, itemSpawnPos); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_389766643(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; ((ScrapGenerator)(object)target).PoofSpawnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1092176613(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_003e: 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_0071: 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) { NetworkObjectReference netObjectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObjectRef, default(ForNetworkSerializable)); int presentValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref presentValue); Vector3 startFallingPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startFallingPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((ScrapGenerator)(object)target).SetValueForClientRpc(netObjectRef, presentValue, startFallingPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ScrapGenerator"; } } public class WeakPlant : MonoBehaviour { public float plantDestroyThreshold = 0.1f; public float plantDestroyingEffectiveness = 1f; public BogPlantAI thisPlantIsABogPlant; private bool allowDestroy; public Vector3 destroyPlantThreshold; public ParticleSystem particleOnDestroy; public GameObject weakPlant; public GameObject deactivateOnDestroy; private float killAllowTimer; private bool isPlantDestroyed; private float shrinkAmount; public void Awake() { if (destroyPlantThreshold.y == 0f) { destroyPlantThreshold.y = 0.1f; } if ((Object)(object)thisPlantIsABogPlant == (Object)null) { allowDestroy = true; } else { allowDestroy = false; } } public void LateUpdate() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) if (!isPlantDestroyed) { if (allowDestroy = false) { killAllowTimer += 0.1f * Time.deltaTime; } else if (weakPlant.transform.localScale.y < plantDestroyThreshold) { isPlantDestroyed = true; ((MonoBehaviour)this).StartCoroutine(DestroyPlant()); } } } public IEnumerator DestroyPlant() { if (Object.op_Implicit((Object)(object)particleOnDestroy)) { particleOnDestroy.Play(); yield return (object)new WaitForSeconds(1f); DestroyOnServerRpc(); } } public void HitBySpray(float strength) { ((MonoBehaviour)this).StartCoroutine(Shrink(strength * plantDestroyingEffectiveness, weakPlant)); } private IEnumerator Shrink(float shrinkAmount, GameObject obj) { this.shrinkAmount += shrinkAmount; yield break; } public void Update() { UpdateSizeOnServerRpc(); } [ServerRpc] private void UpdateSizeOnServerRpc() { //IL_0031: 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) if (shrinkAmount > 0f) { shrinkAmount -= 0.1f * Time.deltaTime; Transform transform = weakPlant.transform; transform.localScale *= 0.975f * Time.deltaTime; Transform transform2 = weakPlant.transform; UpdateSizeOnClientRpc(transform2); } } [ClientRpc] private void UpdateSizeOnClientRpc(Transform transform) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) weakPlant.transform.localScale = transform.localScale; } [ServerRpc] public void DestroyOnServerRpc() { DestroyOnClientRpc(); } [ClientRpc] public void DestroyOnClientRpc() { deactivateOnDestroy.SetActive(false); } } } namespace Spectre.Items { public class CustomManeaterBaby : GrabbableObject { public CustomManeaterAdult caveDwellerScript; public PlayerControllerB previousPlayerHeldBy; private float timeSinceRockingBaby; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!((NetworkBehaviour)this).IsOwner) { return; } if (buttonDown) { if (Time.realtimeSinceStartup - timeSinceRockingBaby < 0.25f) { SetRockingBabyServerRpc(rockHard: true); caveDwellerScript.rockingBaby = 2; base.playerHeldBy.playerBodyAnimator.SetInteger("RockBaby", 2); } else { SetRockingBabyServerRpc(rockHard: false); caveDwellerScript.rockingBaby = 1; base.playerHeldBy.playerBodyAnimator.SetInteger("RockBaby", 1); } timeSinceRockingBaby = Time.realtimeSinceStartup; } else { base.playerHeldBy.playerBodyAnimator.SetInteger("RockBaby", 0); caveDwellerScript.rockingBaby = 0; StopRockingBabyServerRpc(); } } [ServerRpc] public void SetRockingBabyServerRpc(bool rockHard) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1418944893u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref rockHard, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1418944893u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetRockingBabyClientRpc(rockHard); } } [ClientRpc] public void SetRockingBabyClientRpc(bool rockHard) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2694452815u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref rockHard, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2694452815u, val2, (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 (rockHard) { caveDwellerScript.rockingBaby = 2; } else { caveDwellerScript.rockingBaby = 1; } } } [ServerRpc] public void StopRockingBabyServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(828871354u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 828871354u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopRockingBabyClientRpc(); } } [ClientRpc] public void StopRockingBabyClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(665824557u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 665824557u, val2, (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) { caveDwellerScript.rockingBaby = 0; } } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); Debug.Log((object)"Equip item function"); caveDwellerScript.PickUpBabyLocalClient(); previousPlayerHeldBy = base.playerHeldBy; Debug.Log((object)$"Baby prop script reached floor target Equipped : {base.reachedFloorTarget} "); } [ServerRpc(RequireOwnership = false)] public void DropBabyServerRpc(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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3474275208u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3474275208u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropBabyClientRpc(playerId); } } } [ClientRpc] public void DropBabyClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(421635439u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 421635439u, val2, (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) { caveDwellerScript.DropBabyLocalClient(); } } } public override void FallWithCurve() { if (((EnemyAI)caveDwellerScript).inSpecialAnimation) { ((GrabbableObject)this).FallWithCurve(); } } public override void Start() { //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_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_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_004a: 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_00cc: 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_00bc: Unknown result type (might be due to invalid IL or missing references) base.propColliders = ((Component)this).gameObject.GetComponentsInChildren(); for (int i = 0; i < base.propColliders.Length; i++) { if (!((Component)base.propColliders[i]).CompareTag("DoNotSet") && !((Component)base.propColliders[i]).CompareTag("Enemy")) { base.propColliders[i].excludeLayers = LayerMask.op_Implicit(-2621449); } } base.originalScale = ((Component)this).transform.localScale; if (base.itemProperties.itemSpawnsOnGround) { base.startFallingPosition = ((Component)this).transform.position; if ((Object)(object)((Component)this).transform.parent != (Object)null) { base.startFallingPosition = ((Component)this).transform.parent.InverseTransformPoint(base.startFallingPosition); } ((GrabbableObject)this).FallToGround(false, false, default(Vector3)); } else { base.fallTime = 1f; base.hasHitGround = true; base.reachedFloorTarget = true; base.targetFloorPosition = ((Component)this).transform.localPosition; } if (base.itemProperties.isScrap) { base.fallTime = 1f; base.hasHitGround = true; } if (base.itemProperties.isScrap && (Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { base.radarIcon = Object.Instantiate(StartOfRound.Instance.itemRadarIconPrefab, RoundManager.Instance.mapPropsContainer.transform).transform; } if (!base.itemProperties.isScrap) { HoarderBugAI.grabbableObjectsInMap.Add(((Component)this).gameObject); } MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren(); for (int j = 0; j < componentsInChildren.Length; j++) { ((Renderer)componentsInChildren[j]).renderingLayerMask = 1u; } SkinnedMeshRenderer[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren(); for (int k = 0; k < componentsInChildren2.Length; k++) { ((Renderer)componentsInChildren2[k]).renderingLayerMask = 1u; } } public override void Update() { //IL_01eb: 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_02cd: 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_0282: Unknown result type (might be due to invalid IL or missing references) if (base.isHeld && (Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController && caveDwellerScript.rockingBaby > 0) { if (caveDwellerScript.rockingBaby < 2 && StartOfRound.Instance.fearLevel > 0.75f) { caveDwellerScript.rockingBaby = 2; base.playerHeldBy.playerBodyAnimator.SetInteger("RockBaby", 2); SetRockingBabyServerRpc(rockHard: true); } else if (StartOfRound.Instance.fearLevel < 0.6f && caveDwellerScript.rockingBaby > 2) { caveDwellerScript.rockingBaby = 1; base.playerHeldBy.playerBodyAnimator.SetInteger("RockBaby", 1); SetRockingBabyServerRpc(rockHard: false); } } if (base.currentUseCooldown >= 0f) { base.currentUseCooldown -= Time.deltaTime; } if (((NetworkBehaviour)this).IsOwner) { if (base.isBeingUsed && base.itemProperties.requiresBattery) { if (base.insertedBattery.charge > 0f) { if (!base.itemProperties.itemIsTrigger) { Battery insertedBattery = base.insertedBattery; insertedBattery.charge -= Time.deltaTime / base.itemProperties.batteryUsage; } } else if (!base.insertedBattery.empty) { base.insertedBattery.empty = true; if (base.isBeingUsed) { Debug.Log((object)"Use up batteries local"); base.isBeingUsed = false; ((GrabbableObject)this).UseUpBatteries(); ((GrabbableObject)this).UseUpItemBatteriesServerRpc(); } } } if (!base.wasOwnerLastFrame) { base.wasOwnerLastFrame = true; } } else if (base.wasOwnerLastFrame) { base.wasOwnerLastFrame = false; } if (!base.isHeld && (Object)(object)base.parentObject == (Object)null) { if (base.fallTime < 1f) { base.reachedFloorTarget = false; ((GrabbableObject)this).FallWithCurve(); if (((Component)this).transform.localPosition.y - base.targetFloorPosition.y < 0.05f && !base.hasHitGround) { ((GrabbableObject)this).PlayDropSFX(); ((GrabbableObject)this).OnHitGround(); } return; } if (!base.reachedFloorTarget) { if (!base.hasHitGround) { ((GrabbableObject)this).PlayDropSFX(); ((GrabbableObject)this).OnHitGround(); } base.reachedFloorTarget = true; if (base.floorYRot == -1) { ((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, base.itemProperties.restingRotation.z); } else { ((Component)this).transform.rotation = Quaternion.Euler(base.itemProperties.restingRotation.x, (float)(base.floorYRot + base.itemProperties.floorYOffset) + 90f, base.itemProperties.restingRotation.z); } } if (((EnemyAI)caveDwellerScript).inSpecialAnimation) { ((Component)this).transform.localPosition = base.targetFloorPosition; } } else if (base.isHeld || base.isHeldByEnemy) { base.reachedFloorTarget = false; } } public override void LateUpdate() { //IL_00af: 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_0040: 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_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_0072: 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_007d: 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_008a: 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) if (((EnemyAI)caveDwellerScript).inSpecialAnimation && (Object)(object)base.parentObject != (Object)null) { ((Component)this).transform.rotation = base.parentObject.rotation; ((Component)this).transform.Rotate(base.itemProperties.rotationOffset); ((Component)this).transform.position = base.parentObject.position; Vector3 positionOffset = base.itemProperties.positionOffset; positionOffset = base.parentObject.rotation * positionOffset; Transform transform = ((Component)this).transform; transform.position += positionOffset; } if ((Object)(object)base.radarIcon != (Object)null) { base.radarIcon.position = ((Component)this).transform.position; } } public override void EnableItemMeshes(bool enable) { MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (!((Component)componentsInChildren[i]).gameObject.CompareTag("DoNotSet") && !((Component)componentsInChildren[i]).gameObject.CompareTag("InteractTrigger") && !((Component)componentsInChildren[i]).gameObject.CompareTag("Enemy")) { ((Renderer)componentsInChildren[i]).enabled = enable; } } SkinnedMeshRenderer[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren(); for (int j = 0; j < componentsInChildren2.Length; j++) { ((Renderer)componentsInChildren2[j]).enabled = enable; Debug.Log((object)("DISABLING/ENABLING SKINNEDMESH: " + ((Object)((Component)componentsInChildren2[j]).gameObject).name)); } } public override void DiscardItem() { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("RockBaby", 0); Debug.Log((object)"Maneater: Discard function called"); caveDwellerScript.DropBabyLocalClient(); DropBabyServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); previousPlayerHeldBy = base.playerHeldBy; ((GrabbableObject)this).DiscardItem(); } 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 ((NetworkBehaviour)this).__registerRpc(1418944893u, new RpcReceiveHandler(__rpc_handler_1418944893), "SetRockingBabyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2694452815u, new RpcReceiveHandler(__rpc_handler_2694452815), "SetRockingBabyClientRpc"); ((NetworkBehaviour)this).__registerRpc(828871354u, new RpcReceiveHandler(__rpc_handler_828871354), "StopRockingBabyServerRpc"); ((NetworkBehaviour)this).__registerRpc(665824557u, new RpcReceiveHandler(__rpc_handler_665824557), "StopRockingBabyClientRpc"); ((NetworkBehaviour)this).__registerRpc(3474275208u, new RpcReceiveHandler(__rpc_handler_3474275208), "DropBabyServerRpc"); ((NetworkBehaviour)this).__registerRpc(421635439u, new RpcReceiveHandler(__rpc_handler_421635439), "DropBabyClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_1418944893(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 rockingBabyServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rockingBabyServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterBaby)(object)target).SetRockingBabyServerRpc(rockingBabyServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2694452815(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 rockingBabyClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rockingBabyClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterBaby)(object)target).SetRockingBabyClientRpc(rockingBabyClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_828871354(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; ((CustomManeaterBaby)(object)target).StopRockingBabyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_665824557(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; ((CustomManeaterBaby)(object)target).StopRockingBabyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3474275208(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; ((CustomManeaterBaby)(object)target).DropBabyServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_421635439(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; ((CustomManeaterBaby)(object)target).DropBabyClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "CustomManeaterBaby"; } } public class FlashbangItem : GrabbableObject { [Header("Stun grenade settings")] public float TimeToExplode = 2.25f; public bool DestroyGrenade; public string playerAnimation = "PullGrenadePin"; [Space(5f)] public bool explodeOnCollision; public bool dontRequirePullingPin; [SerializeField] [Range(0f, 100f)] public float chanceToExplode = 100f; public bool spawnDamagingShockwave; private bool explodeOnThrow; private bool gotExplodeOnThrowRPC; private bool hasCollided; [Space(3f)] public bool pinPulled; public bool inPullingPinAnimation; public string throwString = "Throw grenade: [RMB]"; private Coroutine pullPinCoroutine; public Animator itemAnimator; public AudioSource itemAudio; public AudioClip pullPinSFX; public AudioClip explodeSFX; public AnimationCurve grenadeFallCurve; public AnimationCurve grenadeVerticalFallCurve; public AnimationCurve grenadeVerticalFallCurveNoBounce; public RaycastHit grenadeHit; public Ray grenadeThrowRay; private int stunGrenadeMask = 268437761; public float explodeTimer; public bool hasExploded; public GameObject stunGrenadeExplosion; private PlayerControllerB playerThrownBy; public float explosionRange; public int flashbangInHandDamage = 20; public CauseOfDeath causeOfDeathA; public float enemyStunTime = 7.5f; public int eggDamage = 40; public float eggDamageRange = 3f; public float eggKillRange = 0.5f; public float eggPhysicsPush = 45f; public CauseOfDeath causeOfDeathB; public override void ItemActivate(bool used, bool buttonDown = true) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (inPullingPinAnimation) { return; } if (!pinPulled) { if (pullPinCoroutine == null) { base.playerHeldBy.activatingItem = true; pullPinCoroutine = ((MonoBehaviour)this).StartCoroutine(pullPinAnimation()); } } else if (((NetworkBehaviour)this).IsOwner) { base.playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetGrenadeThrowDestination(), true); } } public override void DiscardItem() { if ((Object)(object)base.playerHeldBy != (Object)null && !explodeOnCollision) { base.playerHeldBy.activatingItem = false; } ((GrabbableObject)this).DiscardItem(); } public override void EquipItem() { if (explodeOnCollision) { playerThrownBy = base.playerHeldBy; } gotExplodeOnThrowRPC = false; hasCollided = false; SetControlTipForGrenade(); ((GrabbableObject)this).EnableItemMeshes(true); base.isPocketed = false; if (chanceToExplode < 100f) { SetExplodeOnThrowServerRpc(); } if (!base.hasBeenHeld) { base.hasBeenHeld = true; if (!base.isInShipRoom && !StartOfRound.Instance.inShipPhase && StartOfRound.Instance.currentLevel.spawnEnemiesAndScrap) { RoundManager instance = RoundManager.Instance; instance.valueOfFoundScrapItems += base.scrapValue; } } } [ServerRpc(RequireOwnership = false)] public void SetExplodeOnThrowServerRpc() { //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_00d9: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(308604408u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 308604408u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; bool explodeOnThrowClientRpc = (float)new Random(StartOfRound.Instance.randomMapSeed + 10 + (int)((Component)this).transform.position.x + (int)((Component)this).transform.position.z).Next(0, 100) <= chanceToExplode; SetExplodeOnThrowClientRpc(explodeOnThrowClientRpc); } } } [ClientRpc] public void SetExplodeOnThrowClientRpc(bool explode) { //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.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1452829878u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref explode, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1452829878u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; gotExplodeOnThrowRPC = true; explodeOnThrow = explode; } } } private void SetControlTipForGrenade() { string[] array = (pinPulled ? new string[1] { throwString } : new string[1] { "Pull pin: [RMB]" }); if (((NetworkBehaviour)this).IsOwner) { HUDManager.Instance.ChangeControlTipMultiple(array, true, base.itemProperties); } } public override void FallWithCurve() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //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_0011: 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_0041: 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_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_0084: 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_0141: 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_0166: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: 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_00bb: 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_00e0: 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_0106: 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_0126: Unknown result type (might be due to invalid IL or missing references) Vector3 val = base.startFallingPosition - base.targetFloorPosition; float magnitude = ((Vector3)(ref val)).magnitude; ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(base.itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, base.itemProperties.restingRotation.z), 14f * Time.deltaTime / magnitude); ((Component)this).transform.localPosition = Vector3.Lerp(base.startFallingPosition, base.targetFloorPosition, grenadeFallCurve.Evaluate(base.fallTime)); if (magnitude > 5f) { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, base.startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, base.targetFloorPosition.y, ((Component)this).transform.localPosition.z), grenadeVerticalFallCurveNoBounce.Evaluate(base.fallTime)); } else { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, base.startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, base.targetFloorPosition.y, ((Component)this).transform.localPosition.z), grenadeVerticalFallCurve.Evaluate(base.fallTime)); } base.fallTime += Mathf.Abs(Time.deltaTime * 12f / magnitude); } private IEnumerator pullPinAnimation() { inPullingPinAnimation = true; base.playerHeldBy.activatingItem = true; base.playerHeldBy.doingUpperBodyEmote = 1.16f; base.playerHeldBy.playerBodyAnimator.SetTrigger(playerAnimation); itemAnimator.SetTrigger("pullPin"); itemAudio.PlayOneShot(pullPinSFX); WalkieTalkie.TransmitOneShotAudio(itemAudio, pullPinSFX, 0.8f); yield return (object)new WaitForSeconds(1f); if ((Object)(object)base.playerHeldBy != (Object)null) { if (!DestroyGrenade) { base.playerHeldBy.activatingItem = false; } playerThrownBy = base.playerHeldBy; } inPullingPinAnimation = false; pinPulled = true; base.itemUsedUp = true; if (((NetworkBehaviour)this).IsOwner && (Object)(object)base.playerHeldBy != (Object)null) { SetControlTipForGrenade(); } } public override void Update() { ((GrabbableObject)this).Update(); if (hasCollided) { if (gotExplodeOnThrowRPC) { gotExplodeOnThrowRPC = false; ExplodeStunGrenade(DestroyGrenade); } } else if (!dontRequirePullingPin && pinPulled && !hasExploded) { explodeTimer += Time.deltaTime; if (explodeTimer > TimeToExplode) { ExplodeStunGrenade(DestroyGrenade); } } } public override void Start() { ((GrabbableObject)this).Start(); if (dontRequirePullingPin) { pinPulled = true; } } public override void OnHitGround() { ((GrabbableObject)this).OnHitGround(); if (!((Object)(object)playerThrownBy == (Object)null) && explodeOnCollision && pinPulled) { hasCollided = true; } } private void ExplodeStunGrenade(bool destroy = false) { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_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) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) if (hasExploded) { return; } if ((chanceToExplode < 100f && !explodeOnThrow) || (explodeOnCollision && !StartOfRound.Instance.currentLevel.spawnEnemiesAndScrap && (Object)(object)base.parentObject == (Object)(object)Object.FindObjectOfType().deskObjectsContainer)) { if ((Object)(object)playerThrownBy != (Object)null) { playerThrownBy.activatingItem = false; } return; } hasExploded = true; Transform val = ((!base.isInElevator) ? RoundManager.Instance.mapPropsContainer.transform : StartOfRound.Instance.elevatorTransform); if (spawnDamagingShockwave) { Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up * 0.2f, false, (float)eggDamage, eggDamageRange, eggDamage, eggPhysicsPush, (GameObject)null, false); } else { StunExplosion(((Component)this).transform.position, affectAudio: true, 1f, enemyStunTime, 1f, base.isHeld, base.playerHeldBy, playerThrownBy); } Object.Instantiate(stunGrenadeExplosion, ((Component)this).transform.position, Quaternion.identity, val); itemAudio.PlayOneShot(explodeSFX); WalkieTalkie.TransmitOneShotAudio(itemAudio, explodeSFX, 1f); if (DestroyGrenade) { ((GrabbableObject)this).DestroyObjectInHand(playerThrownBy); } } public static void StunExplosion(Vector3 explosionPosition, bool affectAudio, float flashSeverityMultiplier, float enemyStunTime, float flashSeverityDistanceRolloff = 1f, bool isHeldItem = false, PlayerControllerB playerHeldBy = null, PlayerControllerB playerThrownBy = null, float addToFlashSeverity = 0f) { //IL_0049: 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_0060: 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_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_0080: 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_010e: 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_015d: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: 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_01c2: 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_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: 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_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_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = GameNetworkManager.Instance.localPlayerController; if (GameNetworkManager.Instance.localPlayerController.isPlayerDead && (Object)(object)GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript != (Object)null) { val = GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript; } float num = Vector3.Distance(((Component)val).transform.position, explosionPosition); float num2 = 7f / (num * flashSeverityDistanceRolloff); if (Physics.Linecast(explosionPosition + Vector3.up * 0.5f, ((Component)val.gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { num2 /= 13f; } else if (num < 2f) { num2 = 1f; } else if (!val.HasLineOfSightToPosition(explosionPosition, 60f, 15, 2f, -1)) { num2 = Mathf.Clamp(num2 / 3f, 0f, 1f); } if (isHeldItem && (Object)(object)playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { num2 = 1f; GameNetworkManager.Instance.localPlayerController.DamagePlayer(20, false, true, (CauseOfDeath)3, 0, false, default(Vector3)); } num2 = Mathf.Clamp(num2 * flashSeverityMultiplier, 0f, 1f); if (num2 > 0.6f) { num2 += addToFlashSeverity; } HUDManager.Instance.flashFilter = num2; if (affectAudio) { SoundManager.Instance.earsRingingTimer = num2; } if (enemyStunTime <= 0f) { return; } Collider[] array = Physics.OverlapSphere(explosionPosition, 12f, 524288); if (array.Length == 0) { return; } for (int i = 0; i < array.Length; i++) { EnemyAICollisionDetect component = ((Component)array[i]).GetComponent(); if ((Object)(object)component == (Object)null) { continue; } Vector3 val2 = ((Component)component.mainScript).transform.position + Vector3.up * 0.5f; if (component.mainScript.CheckLineOfSightForPosition(explosionPosition + Vector3.up * 0.5f, 120f, 23, 7f, (Transform)null) || (!Physics.Linecast(explosionPosition + Vector3.up * 0.5f, ((Component)component.mainScript).transform.position + Vector3.up * 0.5f, 256) && Vector3.Distance(explosionPosition, val2) < 11f)) { if ((Object)(object)playerThrownBy != (Object)null) { component.mainScript.SetEnemyStunned(true, enemyStunTime, playerThrownBy); } else { component.mainScript.SetEnemyStunned(true, enemyStunTime, (PlayerControllerB)null); } } } } public Vector3 GetGrenadeThrowDestination() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_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_0056: 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_0075: 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_00c2: 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_00c7: 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_00c9: 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_00de: 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_00e9: 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_0138: 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_0118: 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_0127: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; Debug.DrawRay(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward, Color.yellow, 15f); grenadeThrowRay = new Ray(((Component)base.playerHeldBy.gameplayCamera).transform.position, ((Component)base.playerHeldBy.gameplayCamera).transform.forward); position = ((!Physics.Raycast(grenadeThrowRay, ref grenadeHit, 12f, stunGrenadeMask, (QueryTriggerInteraction)1)) ? ((Ray)(ref grenadeThrowRay)).GetPoint(10f) : ((Ray)(ref grenadeThrowRay)).GetPoint(((RaycastHit)(ref grenadeHit)).distance - 0.05f)); Debug.DrawRay(position, Vector3.down, Color.blue, 15f); grenadeThrowRay = new Ray(position, Vector3.down); if (Physics.Raycast(grenadeThrowRay, ref grenadeHit, 30f, stunGrenadeMask, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref grenadeHit)).point + Vector3.up * 0.05f; } return ((Ray)(ref grenadeThrowRay)).GetPoint(30f); } 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 ((NetworkBehaviour)this).__registerRpc(308604408u, new RpcReceiveHandler(__rpc_handler_308604408), "SetExplodeOnThrowServerRpc"); ((NetworkBehaviour)this).__registerRpc(1452829878u, new RpcReceiveHandler(__rpc_handler_1452829878), "SetExplodeOnThrowClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_308604408(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; ((FlashbangItem)(object)target).SetExplodeOnThrowServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1452829878(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 explodeOnThrowClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref explodeOnThrowClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((FlashbangItem)(object)target).SetExplodeOnThrowClientRpc(explodeOnThrowClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "FlashbangItem"; } } public class ItemParticulateRandomized : PhysicsProp { [Space(5f)] public ParticleSystem particleA; public ParticleSystem particleB; public float particleTimerA = 7f; private float particleTimerInternalA; public float particleAddedRandomizedTime = 0.2f; public float randomTimeWait = 0.01f; public override void Start() { ((GrabbableObject)this).Start(); particleTimerInternalA = particleTimerA; particleTimerA = Random.Range(0f - particleAddedRandomizedTime, particleAddedRandomizedTime); } public override void Update() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if (particleTimerA <= 0f) { particleTimerA = particleTimerInternalA; particleTimerA = Random.Range(0f - particleAddedRandomizedTime, particleAddedRandomizedTime); particleA.Play(); } else if (particleTimerInternalA > particleTimerA) { new WaitForSeconds(randomTimeWait); particleTimerA -= randomTimeWait; } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ItemParticulateRandomized"; } } public class LongWeapon : GrabbableObject { public int shovelHitForce = 1; public bool reelingUp; public bool isHoldingButton; private RaycastHit rayHit; private Coroutine reelingUpCoroutine; private RaycastHit[] objectsHitByShovel; private List objectsHitByShovelList = new List(); public AudioClip reelUp; public AudioClip swing; public AudioClip[] hitSFX; public AudioSource shovelAudio; private PlayerControllerB previousPlayerHeldBy; private int shovelMask = 1084754248; [Header("Hit cast")] public float shovelHitDistance = 1.5f; public float shovelHitRadius = 0.8f; [Header("Wait timers")] public float reelUpTime = 0.35f; public float hitDelay = 0.13f; public float hitCooldown = 0.3f; [Header("Stun")] public bool doesStunOnHit; public Vector3 stunPoint; public bool stunAffectsAudio; public float flashSeverity; public float stunTimer = 2.5f; public float stunRollOff; public override void ItemActivate(bool used, bool buttonDown = true) { if ((Object)(object)base.playerHeldBy == (Object)null) { return; } isHoldingButton = buttonDown; if (!reelingUp && buttonDown) { reelingUp = true; previousPlayerHeldBy = base.playerHeldBy; if (reelingUpCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(reelingUpCoroutine); } reelingUpCoroutine = ((MonoBehaviour)this).StartCoroutine(reelUpShovel()); } } private IEnumerator reelUpShovel() { base.playerHeldBy.activatingItem = true; base.playerHeldBy.twoHanded = true; base.playerHeldBy.playerBodyAnimator.ResetTrigger("shovelHit"); base.playerHeldBy.playerBodyAnimator.SetBool("reelingUp", true); shovelAudio.PlayOneShot(reelUp); ReelUpSFXServerRpc(); yield return (object)new WaitForSeconds(reelUpTime); yield return (object)new WaitUntil((Func)(() => !isHoldingButton || !base.isHeld)); SwingShovel(!base.isHeld); yield return (object)new WaitForSeconds(hitDelay); yield return (object)new WaitForEndOfFrame(); HitShovel(!base.isHeld); yield return (object)new WaitForSeconds(hitCooldown); reelingUp = false; reelingUpCoroutine = null; } [ServerRpc] public void ReelUpSFXServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3571100603u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3571100603u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReelUpSFXClientRpc(); } } [ClientRpc] public void ReelUpSFXClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3986998649u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3986998649u, val2, (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) { shovelAudio.PlayOneShot(reelUp); } } } public override void DiscardItem() { if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.activatingItem = false; } ((GrabbableObject)this).DiscardItem(); } public void SwingShovel(bool cancel = false) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) previousPlayerHeldBy.playerBodyAnimator.SetBool("reelingUp", false); if (!cancel) { shovelAudio.PlayOneShot(swing); previousPlayerHeldBy.UpdateSpecialAnimationValue(true, (short)((Component)previousPlayerHeldBy).transform.localEulerAngles.y, 0.4f, false); } } public void HitShovel(bool cancel = false) { //IL_0050: 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_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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0405: 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_0141: 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) //IL_011a: 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_047e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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_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_01ea: 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_0215: 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_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: 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_02b0: 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_023f: Unknown result type (might be due to invalid IL or missing references) //IL_024c: 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_0255: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: 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_0341: 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) if ((Object)(object)previousPlayerHeldBy == (Object)null) { Debug.LogError((object)"Previousplayerheldby is null on this client when HitShovel is called."); return; } previousPlayerHeldBy.activatingItem = false; bool flag = false; bool flag2 = false; bool flag3 = false; int num = -1; if (!cancel) { previousPlayerHeldBy.twoHanded = false; objectsHitByShovel = Physics.SphereCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, shovelHitRadius, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, shovelHitDistance, shovelMask, (QueryTriggerInteraction)2); objectsHitByShovelList = objectsHitByShovel.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToList(); List list = new List(); IHittable val2 = default(IHittable); for (int num2 = 0; num2 < objectsHitByShovelList.Count; num2++) { RaycastHit val = objectsHitByShovelList[num2]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 8) { val = objectsHitByShovelList[num2]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 11) { val = objectsHitByShovelList[num2]; if (!((Component)((RaycastHit)(ref val)).transform).TryGetComponent(ref val2)) { continue; } val = objectsHitByShovelList[num2]; if ((Object)(object)((RaycastHit)(ref val)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform) { continue; } val = objectsHitByShovelList[num2]; if (!(((RaycastHit)(ref val)).point == Vector3.zero)) { Vector3 position = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position; RaycastHit val3 = objectsHitByShovelList[num2]; if (Physics.Linecast(position, ((RaycastHit)(ref val3)).point, ref val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { continue; } } flag = true; Vector3 forward = ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward; Vector3 position2 = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position; val = objectsHitByShovelList[num2]; Debug.DrawLine(position2, ((RaycastHit)(ref val)).point, Color.green, 5f); try { val = objectsHitByShovelList[num2]; EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).transform).GetComponent(); if ((Object)(object)component != (Object)null) { if (!((Object)(object)component.mainScript == (Object)null) && !list.Contains(component.mainScript) && (!StartOfRound.Instance.hangarDoorsClosed || component.mainScript.isInsidePlayerShip == previousPlayerHeldBy.isInHangarShipRoom)) { goto IL_035c; } continue; } val = objectsHitByShovelList[num2]; if (!((Object)(object)((Component)((RaycastHit)(ref val)).transform).GetComponent() != (Object)null)) { goto IL_035c; } if (!flag3) { flag3 = true; goto IL_035c; } goto end_IL_02c4; IL_035c: bool flag4 = val2.Hit(shovelHitForce, forward, previousPlayerHeldBy, true, 1); if (flag4 && (Object)(object)component != (Object)null) { list.Add(component.mainScript); } if (!flag2) { flag2 = flag4; } end_IL_02c4:; } catch (Exception arg) { Debug.Log((object)$"Exception caught when hitting object with shovel from player #{previousPlayerHeldBy.playerClientId}: {arg}"); } continue; } } val = objectsHitByShovelList[num2]; if (((RaycastHit)(ref val)).collider.isTrigger) { continue; } flag = true; val = objectsHitByShovelList[num2]; string tag = ((Component)((RaycastHit)(ref val)).collider).gameObject.tag; for (int num3 = 0; num3 < StartOfRound.Instance.footstepSurfaces.Length; num3++) { if (StartOfRound.Instance.footstepSurfaces[num3].surfaceTag == tag) { num = num3; break; } } } } if (flag) { RoundManager.PlayRandomClip(shovelAudio, hitSFX, true, 1f, 0, 1000); Object.FindObjectOfType().PlayAudibleNoise(((Component)this).transform.position, 17f, 0.8f, 0, false, 0); if (!flag2 && num != -1) { shovelAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX); WalkieTalkie.TransmitOneShotAudio(shovelAudio, StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX, 1f); } base.playerHeldBy.playerBodyAnimator.SetTrigger("shovelHit"); if (doesStunOnHit) { StunGrenadeItem.StunExplosion(stunPoint, stunAffectsAudio, flashSeverity, stunTimer, stunRollOff, false, (PlayerControllerB)null, (PlayerControllerB)null, 0f); } HitShovelServerRpc(num); } } [ServerRpc] public void HitShovelServerRpc(int hitSurfaceID) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(387045272u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, hitSurfaceID); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 387045272u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitShovelClientRpc(hitSurfaceID); } } [ClientRpc] public void HitShovelClientRpc(int hitSurfaceID) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2349448777u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, hitSurfaceID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2349448777u, val2, (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) { RoundManager.PlayRandomClip(shovelAudio, hitSFX, true, 1f, 0, 1000); if (hitSurfaceID != -1) { HitSurfaceWithShovel(hitSurfaceID); } } } private void HitSurfaceWithShovel(int hitSurfaceID) { shovelAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX); WalkieTalkie.TransmitOneShotAudio(shovelAudio, StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX, 1f); } 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(3571100603u, new RpcReceiveHandler(__rpc_handler_3571100603), "ReelUpSFXServerRpc"); ((NetworkBehaviour)this).__registerRpc(3986998649u, new RpcReceiveHandler(__rpc_handler_3986998649), "ReelUpSFXClientRpc"); ((NetworkBehaviour)this).__registerRpc(387045272u, new RpcReceiveHandler(__rpc_handler_387045272), "HitShovelServerRpc"); ((NetworkBehaviour)this).__registerRpc(2349448777u, new RpcReceiveHandler(__rpc_handler_2349448777), "HitShovelClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3571100603(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; ((LongWeapon)(object)target).ReelUpSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3986998649(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; ((LongWeapon)(object)target).ReelUpSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_387045272(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 hitSurfaceID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)1; ((LongWeapon)(object)target).HitShovelServerRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2349448777(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 hitSurfaceID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)1; ((LongWeapon)(object)target).HitShovelClientRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LongWeapon"; } } public class PumpGunItem : GrabbableObject { 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(253780482u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 253780482u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2342680431u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2342680431u, val2, (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); } } } } private IEnumerator delayedEarsRinging(float effectSeverity) { yield return (object)new WaitForSeconds(0.6f); SoundManager.Instance.earsRingingTimer = 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1439777939u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1439777939u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4181255540u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4181255540u, val2, (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; } } } private IEnumerator reloadGunAnimation() { isReloading = true; if (shellsLoaded <= 0) { base.playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", true); ((Renderer)shotgunShellLeft).enabled = false; ((Renderer)shotgunShellRight).enabled = false; } else { base.playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", true); ((Renderer)shotgunShellRight).enabled = false; } yield return (object)new WaitForSeconds(0.3f); gunAudio.PlayOneShot(gunReloadSFX); gunAnimator.SetBool("Reloading", true); ReloadGunEffectsServerRpc(); yield return (object)new WaitForSeconds(0.95f); ((Renderer)shotgunShellInHand).enabled = true; shotgunShellInHandTransform.SetParent(base.playerHeldBy.leftHandItemTarget); shotgunShellInHandTransform.localPosition = new Vector3(-0.0555f, 0.1469f, -0.0655f); shotgunShellInHandTransform.localEulerAngles = new Vector3(-1.956f, 143.856f, -16.427f); yield return (object)new WaitForSeconds(0.95f); base.playerHeldBy.DestroyItemInSlotAndSync(ammoSlotToUse); ammoSlotToUse = -1; shellsLoaded = Mathf.Clamp(shellsLoaded + roundsLoadedPerAmmoUsed, 0, maxAmmo); ((Renderer)shotgunShellLeft).enabled = true; if (shellsLoaded == maxAmmo) { ((Renderer)shotgunShellRight).enabled = true; } ((Renderer)shotgunShellInHand).enabled = false; shotgunShellInHandTransform.SetParent(((Component)this).transform); yield return (object)new WaitForSeconds(0.45f); gunAudio.PlayOneShot(gunReloadFinishSFX); gunAnimator.SetBool("Reloading", false); base.playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", false); base.playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", false); isReloading = false; ReloadGunEffectsServerRpc(start: false); } 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(253780482u, new RpcReceiveHandler(__rpc_handler_253780482), "ShootGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(2342680431u, new RpcReceiveHandler(__rpc_handler_2342680431), "ShootGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(1439777939u, new RpcReceiveHandler(__rpc_handler_1439777939), "ReloadGunEffectsServerRpc"); ((NetworkBehaviour)this).__registerRpc(4181255540u, new RpcReceiveHandler(__rpc_handler_4181255540), "ReloadGunEffectsClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_253780482(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_2342680431(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_1439777939(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_4181255540(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 RigidbodyItem : GrabbableObject { public int bodyID = -1; public DeadBodyInfo ragdoll; private bool foundRagdollObject; private bool bodySetToHold; public bool testBody; private bool setBodyInElevator; private PlayerControllerB previousPlayerHeldBy; private bool hasBeenPlaced; public bool heldByEnemy; private bool heldByEnemyThisFrame; private bool clientRequestedBodyId; public override void Start() { ((GrabbableObject)this).Start(); if (HoarderBugAI.grabbableObjectsInMap != null && !HoarderBugAI.grabbableObjectsInMap.Contains(((Component)this).gameObject)) { HoarderBugAI.grabbableObjectsInMap.Add(((Component)this).gameObject); } if ((Object)(object)base.radarIcon != (Object)null) { Object.Destroy((Object)(object)((Component)base.radarIcon).gameObject); } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); previousPlayerHeldBy = base.playerHeldBy; hasBeenPlaced = false; } public override void OnPlaceObject() { ((GrabbableObject)this).OnPlaceObject(); hasBeenPlaced = true; } public override void OnDestroy() { ((GrabbableObject)this).OnDestroy(); if (foundRagdollObject && (Object)(object)ragdoll != (Object)null) { Object.Destroy((Object)(object)((Component)ragdoll).gameObject); } } [Rpc(/*Could not decode attribute arguments.*/)] public void GetBodyIdRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_005f: 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_0081: 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_00b3: 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 = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(281672428u, val3, val, (SendTo)2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 281672428u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SendClientsBodyIdRpc(bodyID); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SendClientsBodyIdRpc(int setBodyId) { //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_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_005f: 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_0076: 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_0092: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1537671576u, val3, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, setBodyId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1537671576u, val3, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; bodyID = setBodyId; } } } public override void Update() { ((GrabbableObject)this).Update(); if (NetworkManager.Singleton.ShutdownInProgress) { return; } if (bodyID == -1) { if (!clientRequestedBodyId) { clientRequestedBodyId = true; GetBodyIdRpc(); } base.grabbable = false; return; } if (!foundRagdollObject) { if (testBody) { DeadBodyInfo[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { if (array[i].playerObjectId == 0) { ragdoll = array[i]; break; } } ragdoll.grabBodyObject = (GrabbableObject)(object)this; base.parentObject = ((Component)ragdoll.bodyParts[5]).transform; ((Component)this).transform.SetParent(((Component)ragdoll.bodyParts[5]).transform); foundRagdollObject = true; base.grabbable = true; } else { if (!((Object)(object)StartOfRound.Instance.allPlayerScripts[bodyID].deadBody != (Object)null)) { base.grabbable = false; return; } ragdoll = StartOfRound.Instance.allPlayerScripts[bodyID].deadBody; ragdoll.grabBodyObject = (GrabbableObject)(object)this; base.parentObject = ((Component)ragdoll.bodyParts[5]).transform; ((Component)this).transform.SetParent(((Component)ragdoll.bodyParts[5]).transform); foundRagdollObject = true; base.grabbable = true; } } if ((Object)(object)ragdoll == (Object)null) { return; } base.grabbable = true; bool flag = hasBeenPlaced && StartOfRound.Instance.currentLevel.levelID == 3 && (Object)(object)Object.FindObjectOfType() != (Object)null && (Object)(object)((Component)this).transform.parent == (Object)(object)((Component)Object.FindObjectOfType().deskObjectsContainer).transform; if (base.isHeld || heldByEnemy || flag) { if (flag) { ragdoll.matchPositionExactly = false; ragdoll.attachedLimb.isKinematic = false; ragdoll.speedMultiplier = 45f; ragdoll.maxVelocity = 0.75f; } if (!bodySetToHold) { if (heldByEnemy) { heldByEnemyThisFrame = true; } else { ragdoll.bodyBleedingHeavily = false; } base.grabbableToEnemies = false; bodySetToHold = true; ((Component)ragdoll).gameObject.SetActive(true); ragdoll.SetBodyPartsKinematic(false); ragdoll.attachedTo = ((Component)this).transform; ragdoll.attachedLimb = ragdoll.bodyParts[5]; ragdoll.matchPositionExactly = true; ragdoll.lerpBeforeMatchingPosition = true; SetRagdollParentToMatchHoldingPlayer(); } } else if (bodySetToHold) { bodySetToHold = false; base.grabbableToEnemies = true; ragdoll.attachedTo = null; base.parentObject = ((Component)ragdoll.bodyParts[5]).transform; ((Component)this).transform.SetParent(((Component)ragdoll.bodyParts[5]).transform); ragdoll.attachedLimb = null; ragdoll.matchPositionExactly = false; ragdoll.lerpBeforeMatchingPosition = false; ragdoll.StopFloatingBody(); SetRagdollParentToMatchHoldingPlayer(); heldByEnemyThisFrame = false; } } public override void GrabItemFromEnemy(EnemyAI enemy) { ((GrabbableObject)this).GrabItemFromEnemy(enemy); heldByEnemy = true; } public override void DiscardItemFromEnemy() { ((GrabbableObject)this).DiscardItemFromEnemy(); heldByEnemy = false; } private void SetRagdollParentToMatchHoldingPlayer() { if (!heldByEnemyThisFrame && (Object)(object)previousPlayerHeldBy != (Object)null) { if (previousPlayerHeldBy.isInElevator && !setBodyInElevator) { setBodyInElevator = true; ((Component)ragdoll).transform.SetParent(StartOfRound.Instance.elevatorTransform); } else if (!previousPlayerHeldBy.isInElevator && setBodyInElevator) { setBodyInElevator = false; ((Component)ragdoll).transform.SetParent((Transform)null); } } } 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 ((NetworkBehaviour)this).__registerRpc(281672428u, new RpcReceiveHandler(__rpc_handler_281672428), "GetBodyIdRpc"); ((NetworkBehaviour)this).__registerRpc(1537671576u, new RpcReceiveHandler(__rpc_handler_1537671576), "SendClientsBodyIdRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_281672428(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; ((RigidbodyItem)(object)target).GetBodyIdRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1537671576(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 setBodyId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setBodyId); target.__rpc_exec_stage = (__RpcExecStage)1; ((RigidbodyItem)(object)target).SendClientsBodyIdRpc(setBodyId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "RigidbodyItem"; } } public class SmallWeapon : GrabbableObject { public AudioSource knifeAudio; private List objectsHitByKnifeList = new List(); public PlayerControllerB previousPlayerHeldBy; private RaycastHit[] objectsHitByKnife; public int knifeHitForce; public AudioClip[] hitSFX; public AudioClip[] swingSFX; private int knifeMask = 1084754248; private float timeAtLastDamageDealt; public ParticleSystem bloodParticle; [Header("Hit cast")] public float hitDistance = 0.75f; public float hitRadius = 0.3f; public float knifeHitCooldown = 0.43f; public bool popButlers = true; public override void ItemActivate(bool used, bool buttonDown = true) { RoundManager.PlayRandomClip(knifeAudio, swingSFX, true, 1f, 0, 1000); if ((Object)(object)base.playerHeldBy != (Object)null) { previousPlayerHeldBy = base.playerHeldBy; if (((NetworkBehaviour)base.playerHeldBy).IsOwner) { base.playerHeldBy.playerBodyAnimator.SetTrigger("UseHeldItem1"); } } if (((NetworkBehaviour)this).IsOwner) { HitKnife(); } } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); } public void HitKnife(bool cancel = false) { //IL_0409: 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_007c: 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_00a6: 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_0113: 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_015d: 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_0136: 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_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0235: 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_029a: 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_0256: 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_026c: 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_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_0324: Unknown result type (might be due to invalid IL or missing references) //IL_0329: 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) if ((Object)(object)previousPlayerHeldBy == (Object)null) { Debug.LogError((object)"Previousplayerheldby is null on this client when HitKnife is called."); return; } previousPlayerHeldBy.activatingItem = false; bool flag = false; bool flag2 = false; int num = -1; bool flag3 = false; if (!cancel && Time.realtimeSinceStartup - timeAtLastDamageDealt > knifeHitCooldown) { previousPlayerHeldBy.twoHanded = false; objectsHitByKnife = Physics.SphereCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * 0.1f, hitRadius, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, hitDistance, knifeMask, (QueryTriggerInteraction)2); objectsHitByKnifeList = objectsHitByKnife.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToList(); List list = new List(); IHittable val2 = default(IHittable); for (int num2 = 0; num2 < objectsHitByKnifeList.Count; num2++) { RaycastHit val = objectsHitByKnifeList[num2]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 8) { val = objectsHitByKnifeList[num2]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 11) { val = objectsHitByKnifeList[num2]; if (!((Component)((RaycastHit)(ref val)).transform).TryGetComponent(ref val2)) { continue; } val = objectsHitByKnifeList[num2]; if ((Object)(object)((RaycastHit)(ref val)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform) { continue; } val = objectsHitByKnifeList[num2]; if (!(((RaycastHit)(ref val)).point == Vector3.zero)) { Vector3 position = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position; RaycastHit val3 = objectsHitByKnifeList[num2]; if (Physics.Linecast(position, ((RaycastHit)(ref val3)).point, ref val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { continue; } } flag = true; Vector3 forward = ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward; if (!popButlers) { continue; } try { val = objectsHitByKnifeList[num2]; EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).transform).GetComponent(); if ((Object)(object)component != (Object)null) { if (!((Object)(object)component.mainScript == (Object)null) && !list.Contains(component.mainScript) && (!StartOfRound.Instance.hangarDoorsClosed || component.mainScript.isInsidePlayerShip == previousPlayerHeldBy.isInHangarShipRoom)) { goto IL_0344; } continue; } val = objectsHitByKnifeList[num2]; if (!((Object)(object)((Component)((RaycastHit)(ref val)).transform).GetComponent() != (Object)null)) { goto IL_0344; } if (!flag3) { flag3 = true; goto IL_0344; } goto end_IL_02ac; IL_0344: bool flag4 = val2.Hit(knifeHitForce, forward, previousPlayerHeldBy, true, 5); if (flag4 && (Object)(object)component != (Object)null) { list.Add(component.mainScript); } if (!flag2 && flag4) { flag2 = true; timeAtLastDamageDealt = Time.realtimeSinceStartup; bloodParticle.Play(true); } end_IL_02ac:; } catch (Exception arg) { Debug.Log((object)$"Exception caught when hitting object with knife from player #{previousPlayerHeldBy.playerClientId}: {arg}"); } continue; } } val = objectsHitByKnifeList[num2]; if (((RaycastHit)(ref val)).collider.isTrigger) { continue; } flag = true; val = objectsHitByKnifeList[num2]; string tag = ((Component)((RaycastHit)(ref val)).collider).gameObject.tag; for (int num3 = 0; num3 < StartOfRound.Instance.footstepSurfaces.Length; num3++) { if (StartOfRound.Instance.footstepSurfaces[num3].surfaceTag == tag) { num = num3; break; } } } } if (flag) { RoundManager.PlayRandomClip(knifeAudio, hitSFX, true, 1f, 0, 1000); Object.FindObjectOfType().PlayAudibleNoise(((Component)this).transform.position, 17f, 0.8f, 0, false, 0); if (!flag2 && num != -1) { knifeAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX); WalkieTalkie.TransmitOneShotAudio(knifeAudio, StartOfRound.Instance.footstepSurfaces[num].hitSurfaceSFX, 1f); } HitShovelServerRpc(num); } } [ServerRpc] public void HitShovelServerRpc(int hitSurfaceID) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4065801623u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, hitSurfaceID); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4065801623u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitShovelClientRpc(hitSurfaceID); } } [ClientRpc] public void HitShovelClientRpc(int hitSurfaceID) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(748468729u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, hitSurfaceID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 748468729u, val2, (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) { RoundManager.PlayRandomClip(knifeAudio, hitSFX, true, 1f, 0, 1000); if (hitSurfaceID != -1) { HitSurfaceWithKnife(hitSurfaceID); } } } private void HitSurfaceWithKnife(int hitSurfaceID) { knifeAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX); WalkieTalkie.TransmitOneShotAudio(knifeAudio, StartOfRound.Instance.footstepSurfaces[hitSurfaceID].hitSurfaceSFX, 1f); } 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 ((NetworkBehaviour)this).__registerRpc(4065801623u, new RpcReceiveHandler(__rpc_handler_4065801623), "HitShovelServerRpc"); ((NetworkBehaviour)this).__registerRpc(748468729u, new RpcReceiveHandler(__rpc_handler_748468729), "HitShovelClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_4065801623(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 hitSurfaceID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)1; ((SmallWeapon)(object)target).HitShovelServerRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_748468729(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 hitSurfaceID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)1; ((SmallWeapon)(object)target).HitShovelClientRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SmallWeapon"; } } 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; [Header("Custom")] public float moldKillingRate = 1.7f; public float cadaverKillingRate = 2.2f; public float gravelingKillingRate = 1.9f; public float killingRange = 1.8f; private GravelingMasterAI gravelingAI; private (int batchNum, int positionIndex, int plantType) killingGravelingPlant; 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 = (batchNum: -1, positionIndex: -1); killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -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_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_043f: 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_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_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: 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_02c6: 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_02c8: 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_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_0492: Unknown result type (might be due to invalid IL or missing references) //IL_0495: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: 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) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0326: 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_0369: 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_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_0393: 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 = (batchNum: -1, positionIndex: -1, plantType: -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 = (batchNum: -1, positionIndex: -1, plantType: -1); } else { cadaverGrowthAI.plantBatchers[killingCadaverPlant.plantType].Batches[killingCadaverPlant.batchNum][killingCadaverPlant.positionIndex] = ResizeMatrix(val, cadaverKillingRate); } } else if (killingGravelingPlant.batchNum != -1) { if ((Object)(object)gravelingAI == (Object)null) { gravelingAI = Object.FindObjectOfType(); } if ((Object)(object)gravelingAI == (Object)null) { killingGravelingPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } Debug.Log((object)$"planttype:{killingGravelingPlant.plantType}, batchnum:{killingGravelingPlant.batchNum}, index:{killingGravelingPlant.positionIndex}"); Matrix4x4 val3 = gravelingAI.plantBatchers[killingGravelingPlant.plantType].Batches[killingGravelingPlant.batchNum][killingGravelingPlant.positionIndex]; if (ExtractScaleFromMatrix(val3).x < 3f && ((NetworkBehaviour)this).IsOwner) { val2 = gravelingAI.plantBatchers[killingGravelingPlant.plantType].Batches[killingGravelingPlant.batchNum][killingGravelingPlant.positionIndex]; Vector3 position2 = ((Matrix4x4)(ref val2)).GetPosition(); val2 = gravelingAI.plantBatchers[killingGravelingPlant.plantType].Batches[killingGravelingPlant.batchNum][killingGravelingPlant.positionIndex]; Debug.Log((object)$"DPosition: {((Matrix4x4)(ref val2)).GetPosition()}"); KillCadaverPlantRpc(position2); gravelingAI.DestroyPlantAtPosition(position2, playEffect: true); killingGravelingPlant = (batchNum: -1, positionIndex: -1, plantType: -1); } else { gravelingAI.plantBatchers[killingGravelingPlant.plantType].Batches[killingGravelingPlant.batchNum][killingGravelingPlant.positionIndex] = ResizeMatrix(val3, gravelingKillingRate); } } else if (killingWeed.batchNum != -1) { Matrix4x4 val4 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; if (ExtractScaleFromMatrix(val4).x < 0.5f && ((NetworkBehaviour)this).IsOwner) { val2 = moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex]; Vector3 position3 = ((Matrix4x4)(ref val2)).GetPosition(); KillWeedRpc(position3); moldManager.DestroyMoldAtPosition(position3, true); killingWeed = (batchNum: -1, positionIndex: -1); } else { moldManager.grassInstancer.Batches[killingWeed.batchNum][killingWeed.positionIndex] = ResizeMatrix(val4, 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(); CheckForGravelingPlantsInSprayPath(); } 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_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_0042: 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_0108: 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_00f1: 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) Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * killingRange; 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 CheckForGravelingPlantsInSprayPath() { //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_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_0042: 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_0108: 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_00f1: 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) Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * killingRange; if ((Object)(object)gravelingAI == (Object)null) { gravelingAI = Object.FindObjectOfType(); } if ((Object)(object)gravelingAI == (Object)null || ((EnemyAI)gravelingAI).isEnemyDead) { return false; } if (gravelingAI.GetAllPlantPositionsInRadius(val, 2f, fillArray: true)) { float num = 2000f; int num2 = 0; int num3 = -1; for (int i = 0; i < gravelingAI.plantBatchers.Length; i++) { int length = gravelingAI.moldPositions.GetLength(0); for (int j = 0; j < length && gravelingAI.moldPositions[j, i] != -1; j++) { if (!gravelingAI.growingRecentPlant || !(gravelingAI.plantBatchers[i].batchedPositions[gravelingAI.moldPositions[j, i]] == gravelingAI.recentPlantPosition)) { float num4 = Vector3.Distance(val, gravelingAI.plantBatchers[i].batchedPositions[gravelingAI.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 = gravelingAI.plantBatchers[num3].GetWeedPositionInMatrixListForCadaverPlants(gravelingAI.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_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_0072: 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_00b2: 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 * killingRange; 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 = (batchNum: -1, positionIndex: -1); StopKillingWeedServerRpc(); } } private void StopKillingCadaverPlantLocalClient() { (int, int, int) tuple = killingCadaverPlant; if (tuple.Item1 != -1 || tuple.Item2 != -1 || tuple.Item3 != -1) { killingCadaverPlant = (batchNum: -1, positionIndex: -1, plantType: -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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(422106698u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 422106698u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: batchNum, positionIndex: 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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2769790030u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, batchNum); BytePacker.WriteValueBitPacked(val2, positionIndex); BytePacker.WriteValueBitPacked(val2, plantType); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2769790030u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingCadaverPlant = (batchNum: batchNum, positionIndex: positionIndex, plantType: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3193282638u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3193282638u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3436953266u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3436953266u, val2, (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 = (batchNum: -1, positionIndex: -1, plantType: -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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3112236757u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3112236757u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(477027358u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 477027358u, val2, (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 = (batchNum: -1, positionIndex: -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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2687698543u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2687698543u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; killingWeed = (batchNum: -1, positionIndex: -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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1495060261u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref destroyAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1495060261u, val3, 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 = (batchNum: -1, positionIndex: -1, plantType: -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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(744948624u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayPos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayRot); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 744948624u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(91048046u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayPos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sprayRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 91048046u, val2, (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(422106698u, new RpcReceiveHandler(__rpc_handler_422106698), "SyncKillingWeedRpc"); ((NetworkBehaviour)this).__registerRpc(2769790030u, new RpcReceiveHandler(__rpc_handler_2769790030), "SyncKillingCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(3193282638u, new RpcReceiveHandler(__rpc_handler_3193282638), "StopKillingCadaverPlantServerRpc"); ((NetworkBehaviour)this).__registerRpc(3436953266u, new RpcReceiveHandler(__rpc_handler_3436953266), "StopKillingCadaverPlantClientRpc"); ((NetworkBehaviour)this).__registerRpc(3112236757u, new RpcReceiveHandler(__rpc_handler_3112236757), "StopKillingWeedServerRpc"); ((NetworkBehaviour)this).__registerRpc(477027358u, new RpcReceiveHandler(__rpc_handler_477027358), "StopKillingWeedClientRpc"); ((NetworkBehaviour)this).__registerRpc(2687698543u, new RpcReceiveHandler(__rpc_handler_2687698543), "KillWeedRpc"); ((NetworkBehaviour)this).__registerRpc(1495060261u, new RpcReceiveHandler(__rpc_handler_1495060261), "KillCadaverPlantRpc"); ((NetworkBehaviour)this).__registerRpc(744948624u, new RpcReceiveHandler(__rpc_handler_744948624), "SprayPaintServerRpc"); ((NetworkBehaviour)this).__registerRpc(91048046u, new RpcReceiveHandler(__rpc_handler_91048046), "SprayPaintClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_422106698(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_2769790030(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_3193282638(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_3436953266(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_3112236757(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_477027358(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_2687698543(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_1495060261(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_744948624(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_91048046(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 TalkieWalkieItem : GrabbableObject { public PlayerControllerB playerListeningTo; public AudioSource thisAudio; private PlayerControllerB previousPlayerHeldBy; public bool isHoldingButton; public bool speakingIntoWalkieTalkie; public bool clientIsHoldingAndSpeakingIntoThis; public bool otherClientIsTransmittingAudios; private Coroutine speakIntoWalkieTalkieCoroutine; public AudioClip[] stopTransmissionSFX; public AudioClip[] startTransmissionSFX; public AudioClip switchWalkieTalkiePowerOff; public AudioClip switchWalkieTalkiePowerOn; public AudioClip talkingOnWalkieTalkieNotHeldSFX; public AudioClip playerDieOnWalkieTalkieSFX; public static List allWalkieTalkies = new List(); public bool playingGarbledVoice; public Material onMaterial; public Material offMaterial; public Light walkieTalkieLight; public AudioSource target; [SerializeField] private float recordingRange = 6f; [SerializeField] private float maxVolume = 0.6f; private List audioSourcesToReplay = new List(); private Dictionary audioSourcesReceiving = new Dictionary(); public Collider listenCollider; private int audioSourcesToReplayLastFrameCount; public Collider[] collidersInRange = (Collider[])(object)new Collider[30]; public List talkiesSendingToThis = new List(); private float cleanUpInterval; private float updateInterval; public AudioSource wallAudio; public AudioClip[] wallAudios; private float wallAudioCheckInterval; private void OnDisable() { ((NetworkBehaviour)this).OnDestroy(); if (allWalkieTalkies.Contains(this)) { allWalkieTalkies.Remove(this); if (allWalkieTalkies.Count <= 0) { allWalkieTalkies.TrimExcess(); } } } private void OnEnable() { if (!allWalkieTalkies.Contains(this)) { allWalkieTalkies.Add(this); } } public void SetLocalClientSpeaking(bool speaking) { if (previousPlayerHeldBy.speakingToWalkieTalkie != speaking) { previousPlayerHeldBy.speakingToWalkieTalkie = speaking; Debug.Log((object)$"Set local client speaking on walkie talkie: {speaking}"); if (speaking) { SetPlayerSpeakingOnWalkieTalkieServerRpc((int)previousPlayerHeldBy.playerClientId); } else { UnsetPlayerSpeakingOnWalkieTalkieServerRpc((int)previousPlayerHeldBy.playerClientId); } } } [ServerRpc] public void SetPlayerSpeakingOnWalkieTalkieServerRpc(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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(670461871u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 670461871u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetPlayerSpeakingOnWalkieTalkieClientRpc(playerId); } } [ClientRpc] public void SetPlayerSpeakingOnWalkieTalkieClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3145817340u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3145817340u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StartOfRound.Instance.allPlayerScripts[playerId].speakingToWalkieTalkie = true; clientIsHoldingAndSpeakingIntoThis = true; SendWalkieTalkieStartTransmissionSFX(playerId); StartOfRound.Instance.UpdatePlayerVoiceEffects(); } } } [ServerRpc] public void UnsetPlayerSpeakingOnWalkieTalkieServerRpc(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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(691761913u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 691761913u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UnsetPlayerSpeakingOnWalkieTalkieClientRpc(playerId); } } [ClientRpc] public void UnsetPlayerSpeakingOnWalkieTalkieClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(379205346u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 379205346u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StartOfRound.Instance.allPlayerScripts[playerId].speakingToWalkieTalkie = false; clientIsHoldingAndSpeakingIntoThis = false; SendWalkieTalkieEndTransmissionSFX(playerId); updateInterval = 0.2f; StartOfRound.Instance.UpdatePlayerVoiceEffects(); } } } private void SendWalkieTalkieEndTransmissionSFX(int playerId) { for (int i = 0; i < allWalkieTalkies.Count; i++) { if (!((Object)(object)StartOfRound.Instance.allPlayerScripts[playerId] == (Object)(object)((GrabbableObject)allWalkieTalkies[i]).playerHeldBy) && !PlayerIsHoldingAnotherWalkieTalkie(allWalkieTalkies[i]) && ((GrabbableObject)allWalkieTalkies[i]).isBeingUsed) { RoundManager.PlayRandomClip(allWalkieTalkies[i].thisAudio, allWalkieTalkies[i].stopTransmissionSFX, true, 1f, 0, 1000); } } } private void SendWalkieTalkieStartTransmissionSFX(int playerId) { Debug.Log((object)"Walkie talkie A"); Random.Range(0f, talkingOnWalkieTalkieNotHeldSFX.length - 0.1f); for (int i = 0; i < allWalkieTalkies.Count; i++) { Debug.Log((object)$"Walkie talkie #{i} {((Object)((Component)allWalkieTalkies[i]).gameObject).name} B"); Debug.Log((object)$"is walkie being used: {((GrabbableObject)allWalkieTalkies[i]).isBeingUsed}"); if (!PlayerIsHoldingAnotherWalkieTalkie(allWalkieTalkies[i]) && ((GrabbableObject)allWalkieTalkies[i]).isBeingUsed) { RoundManager.PlayRandomClip(allWalkieTalkies[i].thisAudio, allWalkieTalkies[i].startTransmissionSFX, true, 1f, 0, 1000); Debug.Log((object)$"Walkie talkie #{i} {((Object)((Component)allWalkieTalkies[i]).gameObject).name} C"); } } } private void BroadcastSFXFromWalkieTalkie(AudioClip sfx, int fromPlayerId) { for (int i = 0; i < allWalkieTalkies.Count; i++) { if (!((Object)(object)StartOfRound.Instance.allPlayerScripts[fromPlayerId] == (Object)(object)((GrabbableObject)allWalkieTalkies[i]).playerHeldBy)) { if (PlayerIsHoldingAnotherWalkieTalkie(allWalkieTalkies[i])) { break; } allWalkieTalkies[i].thisAudio.PlayOneShot(sfx); } } } private bool PlayerIsHoldingAnotherWalkieTalkie(TalkieWalkieItem walkieTalkie) { if ((Object)(object)((GrabbableObject)walkieTalkie).playerHeldBy == (Object)null) { Debug.Log((object)"False A"); return false; } if ((Object)(object)((GrabbableObject)walkieTalkie).playerHeldBy.currentlyHeldObjectServer == (Object)null) { Debug.Log((object)"False B"); return false; } if ((Object)(object)((Component)((GrabbableObject)walkieTalkie).playerHeldBy.currentlyHeldObjectServer).GetComponent() == (Object)null) { Debug.Log((object)"False C"); return false; } Debug.Log((object)$"{((GrabbableObject)walkieTalkie).isPocketed}"); if ((Object)(object)((GrabbableObject)walkieTalkie).playerHeldBy != (Object)null && (Object)(object)((GrabbableObject)walkieTalkie).playerHeldBy.currentlyHeldObjectServer != (Object)null && (Object)(object)((Component)((GrabbableObject)walkieTalkie).playerHeldBy.currentlyHeldObjectServer).GetComponent() != (Object)null) { return ((GrabbableObject)walkieTalkie).isPocketed; } return false; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); isHoldingButton = buttonDown; if (base.isBeingUsed && !speakingIntoWalkieTalkie && buttonDown) { previousPlayerHeldBy = base.playerHeldBy; if (speakIntoWalkieTalkieCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(speakIntoWalkieTalkieCoroutine); } speakIntoWalkieTalkieCoroutine = ((MonoBehaviour)this).StartCoroutine(speakingIntoWalkieTalkieMode()); } } private IEnumerator speakingIntoWalkieTalkieMode() { PlayerHoldingWalkieTalkieButton(speaking: true); SetLocalClientSpeaking(speaking: true); yield return (object)new WaitForSeconds(0.2f); yield return (object)new WaitUntil((Func)(() => !isHoldingButton || !base.isHeld || !base.isBeingUsed)); SetLocalClientSpeaking(speaking: false); PlayerHoldingWalkieTalkieButton(speaking: false); } private void PlayerHoldingWalkieTalkieButton(bool speaking) { speakingIntoWalkieTalkie = speaking; previousPlayerHeldBy.activatingItem = speaking; previousPlayerHeldBy.playerBodyAnimator.SetBool("walkieTalkie", speaking); } public void EnableWalkieTalkieListening(bool enable) { if ((Object)(object)base.playerHeldBy != (Object)null) { base.playerHeldBy.holdingWalkieTalkie = enable; } if (IsPlayerSpectatedOrLocal()) { thisAudio.Stop(); StartOfRound.Instance.UpdatePlayerVoiceEffects(); } } public override void UseUpBatteries() { ((GrabbableObject)this).UseUpBatteries(); SwitchWalkieTalkieOn(on: false); } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); base.playerHeldBy.equippedUsableItemQE = false; ((Behaviour)walkieTalkieLight).enabled = false; } public override void ItemInteractLeftRight(bool right) { ((GrabbableObject)this).ItemInteractLeftRight(right); if (!right) { SwitchWalkieTalkieOn(!base.isBeingUsed); } } public void SwitchWalkieTalkieOn(bool on) { base.isBeingUsed = on; EnableWalkieTalkieListening(on); if (on) { ((Renderer)base.mainObjectRenderer).sharedMaterial = onMaterial; ((Behaviour)walkieTalkieLight).enabled = true; thisAudio.PlayOneShot(switchWalkieTalkiePowerOn); } else { ((Renderer)base.mainObjectRenderer).sharedMaterial = offMaterial; ((Behaviour)walkieTalkieLight).enabled = false; thisAudio.PlayOneShot(switchWalkieTalkiePowerOff); wallAudio.Stop(); } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); if (base.isBeingUsed) { ((Behaviour)walkieTalkieLight).enabled = true; } base.playerHeldBy.equippedUsableItemQE = true; if (base.isBeingUsed) { EnableWalkieTalkieListening(enable: true); } } public override void DiscardItem() { if (base.playerHeldBy.isPlayerDead && clientIsHoldingAndSpeakingIntoThis) { BroadcastSFXFromWalkieTalkie(playerDieOnWalkieTalkieSFX, (int)base.playerHeldBy.playerClientId); } EnableWalkieTalkieListening(enable: false); base.playerHeldBy.equippedUsableItemQE = false; ((GrabbableObject)this).DiscardItem(); } private bool IsPlayerSpectatedOrLocal() { if (!((NetworkBehaviour)this).IsOwner) { if (GameNetworkManager.Instance.localPlayerController.isPlayerDead) { return (Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript; } return false; } return true; } public override void Start() { ((GrabbableObject)this).Start(); GetAllAudioSourcesToReplay(); SetupAudiosourceClip(); } public override void Update() { ((GrabbableObject)this).Update(); SetWallAudioVolume(); if (cleanUpInterval >= 0f) { cleanUpInterval -= Time.deltaTime; } else { cleanUpInterval = 15f; if (audioSourcesReceiving.Count > 10) { foreach (KeyValuePair item in audioSourcesReceiving) { if ((Object)(object)item.Key == (Object)null) { audioSourcesReceiving.Remove(item.Key); } } } } if (updateInterval >= 0f) { updateInterval -= Time.deltaTime; return; } updateInterval = 0.3f; GetAllAudioSourcesToReplay(); TimeAllAudioSources(); } private void SetWallAudioVolume() { //IL_0058: 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) if (StartOfRound.Instance.currentLevel.levelID == 3 && base.isBeingUsed) { if (!wallAudio.isPlaying) { wallAudio.Play(); wallAudio.pitch = Random.Range(0.92f, 1.08f); } float num = Vector3.Distance(((Component)this).transform.position, new Vector3(-38.51f, -7.72f, -10.56f)); wallAudio.volume = math.remap(22f, 0f, 0f, 1f, Mathf.Min(num, 22f)); if (!(Time.realtimeSinceStartup - wallAudioCheckInterval > 20f)) { return; } if ((Object)(object)wallAudio.clip == (Object)(object)wallAudios[1]) { wallAudio.clip = wallAudios[0]; return; } wallAudioCheckInterval = Time.realtimeSinceStartup; if (num < 5f && Random.Range(0, 120) < 3) { wallAudio.clip = wallAudios[1]; PlayWallAudioRpc(); } } else { if (wallAudio.isPlaying) { wallAudio.Stop(); } wallAudio.volume = 0f; } } [Rpc(/*Could not decode attribute arguments.*/)] public void PlayWallAudioRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_005f: 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_0081: 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_00b3: 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 = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3126580753u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3126580753u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; wallAudio.clip = wallAudios[1]; } } } private void TimeAllAudioSources() { //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < allWalkieTalkies.Count; i++) { if ((Object)(object)allWalkieTalkies[i] == (Object)(object)this) { continue; } AudioSource value; if ((Object)(object)((GrabbableObject)allWalkieTalkies[i]).playerHeldBy != (Object)null && allWalkieTalkies[i].clientIsHoldingAndSpeakingIntoThis && ((GrabbableObject)allWalkieTalkies[i]).isBeingUsed && base.isBeingUsed) { if (!talkiesSendingToThis.Contains(allWalkieTalkies[i])) { talkiesSendingToThis.Add(allWalkieTalkies[i]); } for (int num = allWalkieTalkies[i].audioSourcesToReplay.Count - 1; num >= 0; num--) { AudioSource val = allWalkieTalkies[i].audioSourcesToReplay[num]; if (!((Object)(object)val == (Object)null)) { if (audioSourcesReceiving.TryAdd(val, null)) { audioSourcesReceiving[val] = ((Component)target).gameObject.AddComponent(); audioSourcesReceiving[val].clip = val.clip; try { if (val.time >= val.clip.length) { if (val.time - 0.05f < val.clip.length) { audioSourcesReceiving[val].time = Mathf.Clamp(val.time - 0.05f, 0f, 1000f); } else { audioSourcesReceiving[val].time = val.time / 5f; } } else { audioSourcesReceiving[val].time = val.time; } audioSourcesReceiving[val].spatialBlend = 1f; audioSourcesReceiving[val].Play(); } catch (Exception ex) { Debug.LogError((object)$"Error while playing audio clip in walkie talkie. Clip name: {((Object)val.clip).name} object: {((Object)((Component)val).gameObject).name}; time: {val.time}; {ex}"); } } else { float num2 = Vector3.Distance(((Component)val).transform.position, ((Component)allWalkieTalkies[i]).transform.position); if (num2 > recordingRange + 7f) { audioSourcesReceiving.Remove(val, out value); Object.Destroy((Object)(object)value); allWalkieTalkies[i].audioSourcesToReplay.RemoveAt(num); } else { audioSourcesReceiving[val].volume = Mathf.Lerp(maxVolume, 0f, num2 / (recordingRange + 3f)); if ((val.isPlaying && !audioSourcesReceiving[val].isPlaying) || (Object)(object)val.clip != (Object)(object)audioSourcesReceiving[val].clip) { audioSourcesReceiving[val].clip = val.clip; audioSourcesReceiving[val].Play(); } else if (!val.isPlaying || !((Component)val).gameObject.activeInHierarchy) { audioSourcesReceiving[val].Stop(); } audioSourcesReceiving[val].time = val.time; } } } } } else { if (!talkiesSendingToThis.Contains(allWalkieTalkies[i])) { continue; } talkiesSendingToThis.Remove(allWalkieTalkies[i]); foreach (AudioSource item in allWalkieTalkies[i].audioSourcesToReplay) { for (int j = 0; j < allWalkieTalkies.Count; j++) { if (allWalkieTalkies[j].audioSourcesReceiving.ContainsKey(item)) { allWalkieTalkies[j].audioSourcesReceiving.Remove(item, out value); Object.Destroy((Object)(object)value); } } } allWalkieTalkies[i].audioSourcesToReplay.Clear(); } } } public static void TransmitOneShotAudio(AudioSource audioSource, AudioClip clip, float vol = 1f) { //IL_006f: 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) if ((Object)(object)clip == (Object)null || (Object)(object)audioSource == (Object)null) { return; } for (int i = 0; i < allWalkieTalkies.Count; i++) { if ((Object)(object)((GrabbableObject)allWalkieTalkies[i]).playerHeldBy == (Object)null || !allWalkieTalkies[i].clientIsHoldingAndSpeakingIntoThis || !((GrabbableObject)allWalkieTalkies[i]).isBeingUsed) { continue; } float num = Vector3.Distance(((Component)allWalkieTalkies[i]).transform.position, ((Component)audioSource).transform.position); if (!(num < allWalkieTalkies[i].recordingRange)) { continue; } for (int j = 0; j < allWalkieTalkies.Count; j++) { if (j != i && ((GrabbableObject)allWalkieTalkies[j]).isBeingUsed) { float num2 = Mathf.Lerp(allWalkieTalkies[i].maxVolume, 0f, num / (allWalkieTalkies[i].recordingRange + 3f)); allWalkieTalkies[j].target.PlayOneShot(clip, num2 * vol); } } } } private void SetupAudiosourceClip() { target.Stop(); } private void GetAllAudioSourcesToReplay() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.playerHeldBy == (Object)null || !base.playerHeldBy.speakingToWalkieTalkie || !base.isBeingUsed) { return; } int num = Physics.OverlapSphereNonAlloc(((Component)this).transform.position, recordingRange, collidersInRange, 11010632, (QueryTriggerInteraction)2); for (int i = 0; i < num; i++) { if (!Object.op_Implicit((Object)(object)((Component)collidersInRange[i]).gameObject.GetComponent())) { AudioSource component = ((Component)collidersInRange[i]).GetComponent(); if ((Object)(object)component != (Object)null && component.isPlaying && (Object)(object)component.clip != (Object)null && component.time > 0f && !audioSourcesToReplay.Contains(component) && ((Component)component).gameObject.activeInHierarchy) { audioSourcesToReplay.Add(component); } } } } 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 ((NetworkBehaviour)this).__registerRpc(670461871u, new RpcReceiveHandler(__rpc_handler_670461871), "SetPlayerSpeakingOnWalkieTalkieServerRpc"); ((NetworkBehaviour)this).__registerRpc(3145817340u, new RpcReceiveHandler(__rpc_handler_3145817340), "SetPlayerSpeakingOnWalkieTalkieClientRpc"); ((NetworkBehaviour)this).__registerRpc(691761913u, new RpcReceiveHandler(__rpc_handler_691761913), "UnsetPlayerSpeakingOnWalkieTalkieServerRpc"); ((NetworkBehaviour)this).__registerRpc(379205346u, new RpcReceiveHandler(__rpc_handler_379205346), "UnsetPlayerSpeakingOnWalkieTalkieClientRpc"); ((NetworkBehaviour)this).__registerRpc(3126580753u, new RpcReceiveHandler(__rpc_handler_3126580753), "PlayWallAudioRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_670461871(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 playerSpeakingOnWalkieTalkieServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerSpeakingOnWalkieTalkieServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((TalkieWalkieItem)(object)target).SetPlayerSpeakingOnWalkieTalkieServerRpc(playerSpeakingOnWalkieTalkieServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3145817340(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 playerSpeakingOnWalkieTalkieClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerSpeakingOnWalkieTalkieClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((TalkieWalkieItem)(object)target).SetPlayerSpeakingOnWalkieTalkieClientRpc(playerSpeakingOnWalkieTalkieClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_691761913(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; ((TalkieWalkieItem)(object)target).UnsetPlayerSpeakingOnWalkieTalkieServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_379205346(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; ((TalkieWalkieItem)(object)target).UnsetPlayerSpeakingOnWalkieTalkieClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3126580753(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; ((TalkieWalkieItem)(object)target).PlayWallAudioRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "TalkieWalkieItem"; } } public class WeedKillerAlternative : GrabbableObject { [Header("WKA")] public float maxTank = 1f; public float productStrength = 1f; public float liquidUsage = 0.0075f; public GameObject sprayStartPoint; public float sprayCollisionRadius = 0.7f; public float sprayCollisionDistance = 1.4f; public LayerMask layerMask; public Transform transform; private PlayerControllerB previousPlayerHeldBy; private RaycastHit[] floraHitBySpray; private List floraHitList = new List(); public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); } public void CastSprayAway() { //IL_0019: 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_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_0048: 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_006f: Unknown result type (might be due to invalid IL or missing references) bool flag = false; bool flag2 = false; bool flag3 = false; int num = -1; floraHitBySpray = Physics.CapsuleCastAll(((Component)previousPlayerHeldBy.gameplayCamera).transform.position + ((Component)previousPlayerHeldBy.gameplayCamera).transform.right * -0.35f, transform.position, sprayCollisionRadius, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, sprayCollisionDistance, LayerMask.op_Implicit(layerMask), (QueryTriggerInteraction)2); floraHitBySpray = floraHitBySpray.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToArray(); List list = new List(); WeakPlant item = default(WeakPlant); for (int num2 = 0; num2 < floraHitBySpray.Length; num2++) { if (((Component)((RaycastHit)(ref floraHitBySpray[num2])).collider).TryGetComponent(ref item)) { floraHitList.Add(item); } foreach (WeakPlant floraHit in floraHitList) { floraHit.HitBySpray(productStrength); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "WeedKillerAlternative"; } } } namespace Spectre.Enemy { public class AmbushWolfAI : EnemyAI, IVisibleThreat { [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 num3 = 0; num3 < 360; num3 += 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2044925771u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hiddenPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref aggressivePosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2044925771u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(671830965u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hiddenPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref agg); ((FastBufferWriter)(ref val)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 671830965u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1684498118u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1684498118u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(551117386u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 551117386u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1868399718u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref newHidingSpot); ((FastBufferWriter)(ref val)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1868399718u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4293629861u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref newHidingSpot); ((FastBufferWriter)(ref val)).WriteValueSafe(ref nest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4293629861u, val2, (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 num = 0; num < base.nodesTempArray.Length; num++) { if (!(Vector3.Distance(base.nodesTempArray[num].transform.position, currentHidingSpot) > nestRange) && !((EnemyAI)this).PathIsIntersectedByLineOfSight(base.nodesTempArray[num].transform.position, false, true, false)) { base.mostOptimalDistance = Vector3.Distance(pos, base.nodesTempArray[num].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[num].transform.position, 1024, (QueryTriggerInteraction)1)) { val = base.nodesTempArray[num].transform; break; } if (!base.targetPlayer.HasLineOfSightToPosition(base.nodesTempArray[num].transform.position + Vector3.up * 1.5f, 110f, 40, -1f, -1)) { val = base.nodesTempArray[num].transform; break; } if (spottedMeter > 0.9f && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < 12f) { val = base.nodesTempArray[num].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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4105174877u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref animSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4105174877u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2447614900u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref animSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2447614900u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4261376629u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4261376629u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1697440355u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1697440355u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3661430257u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3661430257u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2514972492u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2514972492u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(913675342u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerWhoHit); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 913675342u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2049926527u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerWhoHit); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2049926527u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2186288273u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2186288273u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2236989329u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2236989329u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1702681029u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1702681029u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2887637977u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2887637977u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2139276343u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2139276343u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2785060006u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2785060006u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2864291935u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2864291935u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(168743202u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 168743202u, val2, (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; } } private IEnumerator KillAnimationOnPlayer(PlayerControllerB player) { float time = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => Time.realtimeSinceStartup - time > 1f || (Object)(object)player.deadBody != (Object)null)); if ((Object)(object)player.deadBody != (Object)null) { body = player.deadBody; body.matchPositionExactly = true; body.attachedTo = playerBodyHeadPoint; body.attachedLimb = player.deadBody.bodyParts[0]; } yield return (object)new WaitForSeconds(0.25f); DropBody(); } 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(2044925771u, new RpcReceiveHandler(__rpc_handler_2044925771), "SyncWeedPositionsServerRpc"); ((NetworkBehaviour)this).__registerRpc(671830965u, new RpcReceiveHandler(__rpc_handler_671830965), "SyncWeedPositionsClientRpc"); ((NetworkBehaviour)this).__registerRpc(1684498118u, new RpcReceiveHandler(__rpc_handler_1684498118), "SyncTargetPlayerAndAttackServerRpc"); ((NetworkBehaviour)this).__registerRpc(551117386u, new RpcReceiveHandler(__rpc_handler_551117386), "SyncTargetPlayerAndAttackClientRpc"); ((NetworkBehaviour)this).__registerRpc(1868399718u, new RpcReceiveHandler(__rpc_handler_1868399718), "SyncNewHidingSpotServerRpc"); ((NetworkBehaviour)this).__registerRpc(4293629861u, new RpcReceiveHandler(__rpc_handler_4293629861), "SyncNewHidingSpotClientRpc"); ((NetworkBehaviour)this).__registerRpc(4105174877u, new RpcReceiveHandler(__rpc_handler_4105174877), "SetAnimationSpeedServerRpc"); ((NetworkBehaviour)this).__registerRpc(2447614900u, new RpcReceiveHandler(__rpc_handler_2447614900), "SetAnimationSpeedClientRpc"); ((NetworkBehaviour)this).__registerRpc(4261376629u, new RpcReceiveHandler(__rpc_handler_4261376629), "DoGrowlServerRpc"); ((NetworkBehaviour)this).__registerRpc(1697440355u, new RpcReceiveHandler(__rpc_handler_1697440355), "DoGrowlClientRpc"); ((NetworkBehaviour)this).__registerRpc(3661430257u, new RpcReceiveHandler(__rpc_handler_3661430257), "SeeBushWolfServerRpc"); ((NetworkBehaviour)this).__registerRpc(2514972492u, new RpcReceiveHandler(__rpc_handler_2514972492), "SeeBushWolfClientRpc"); ((NetworkBehaviour)this).__registerRpc(913675342u, new RpcReceiveHandler(__rpc_handler_913675342), "HitTongueServerRpc"); ((NetworkBehaviour)this).__registerRpc(2049926527u, new RpcReceiveHandler(__rpc_handler_2049926527), "HitTongueClientRpc"); ((NetworkBehaviour)this).__registerRpc(2186288273u, new RpcReceiveHandler(__rpc_handler_2186288273), "MatingCallServerRpc"); ((NetworkBehaviour)this).__registerRpc(2236989329u, new RpcReceiveHandler(__rpc_handler_2236989329), "MatingCallClientRpc"); ((NetworkBehaviour)this).__registerRpc(1702681029u, new RpcReceiveHandler(__rpc_handler_1702681029), "HitByEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2887637977u, new RpcReceiveHandler(__rpc_handler_2887637977), "HitByEnemyClientRpc"); ((NetworkBehaviour)this).__registerRpc(2139276343u, new RpcReceiveHandler(__rpc_handler_2139276343), "DodgedEnemyHitServerRpc"); ((NetworkBehaviour)this).__registerRpc(2785060006u, new RpcReceiveHandler(__rpc_handler_2785060006), "DodgedEnemyHitClientRpc"); ((NetworkBehaviour)this).__registerRpc(2864291935u, new RpcReceiveHandler(__rpc_handler_2864291935), "DoKillPlayerAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(168743202u, new RpcReceiveHandler(__rpc_handler_168743202), "DoKillPlayerAnimationClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2044925771(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_671830965(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_1684498118(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_551117386(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_1868399718(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_4293629861(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_4105174877(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_2447614900(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_4261376629(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_1697440355(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_3661430257(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_2514972492(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_913675342(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_2049926527(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_2186288273(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_2236989329(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_1702681029(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_2887637977(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_2139276343(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_2785060006(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_2864291935(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_168743202(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 BeeAI : EnemyAI { public int defenseDistance; [Space(5f)] public GameObject hivePrefab; public GrabbableObject hive; public Vector3 lastKnownHivePosition; private int previousState = -1; public VisualEffect beeVFX; public Transform beeParticlesTarget; public AudioSource beesIdle; public AudioSource beesDefensive; public AudioSource beesAngry; public AISearchRoutine searchForHive; private int chasePriority; private Vector3 lastSeenPlayerPos; private float lostLOSTimer; private bool wasInChase; private bool hasFoundHiveAfterChasing; private bool hasSpawnedHive; private float beesZapCurrentTimer; private float beesZapTimer; public LightningBoltPathScript lightningComponent; [Header("Toggle this if you hate lightning V ")] public bool useLightningBoltScript = true; public Transform[] lightningPoints; private int beesZappingMode; private int timesChangingZapModes; private Random beeZapRandom; public AudioSource beeZapAudio; private float timeSinceHittingPlayer; private float attackZapModeTimer; private bool overrideBeeParticleTarget; private int beeParticleState = -1; private PlayerControllerB killingPlayer; private Coroutine killingPlayerCoroutine; private bool syncedLastKnownHivePosition; private PlayerControllerB[] shuffledPlayersArray; private float timeAtSpawn; [Space(5f)] [Header("Custom Stuff")] public int playerDamage = 10; public CauseOfDeath causeOfDeath; public bool useVFX = true; public bool useElectricSound = true; public bool pitchControlInsteadOfDifferentAudios; public AudioSource pitchControlledAudiosource; public float idlePitch = 0.8f; public float defendPitch = 1f; public float aggroPitch = 1.2f; [Tooltip("This is for me")] public bool useParticleZap; public ParticleSystem particleOnDamage; public float timeBetweenHits = 0.4f; private bool hasEnemyLeft; public int hiveMinValue = 50; public int hiveMaxValue = 150; public float hiveCloseDistanceFromShip = 40f; public int closeMinHiveValue = 40; public int closeMaxHiveValue = 100; public string itemScanNodeName = "Bee hive"; [Header("Speed Attributes")] public float idleSpeed = 4f; public float idleAccel = 13f; public float defendSpeed = 6f; public float defendAccel = 13f; public float aggroSpeed = 10.3f; public float aggroAccel = 13f; public float aggroAccelNoPlayerInSight = 16f; public override void Start() { ((EnemyAI)this).Start(); hasEnemyLeft = false; shuffledPlayersArray = StartOfRound.Instance.allPlayerScripts.ToArray(); ShufflePlayersArray(shuffledPlayersArray); if (((NetworkBehaviour)this).IsServer) { SpawnHiveNearEnemy(); syncedLastKnownHivePosition = true; } timeAtSpawn = Time.realtimeSinceStartup; } private void ShufflePlayersArray(PlayerControllerB[] playersArray) { Random random = new Random(StartOfRound.Instance.randomMapSeed + 2); for (int num = playersArray.Length - 1; num > 0; num--) { int num2 = random.Next(0, num + 1); PlayerControllerB val = playersArray[num]; playersArray[num] = playersArray[num2]; playersArray[num2] = val; } } private void SpawnHiveNearEnemy() { //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_005d: 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_0069: 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_0074: 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_0083: 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_00bc: 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_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_010e: 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) if (((NetworkBehaviour)this).IsServer) { Random random = new Random(StartOfRound.Instance.randomMapSeed + 1314 + base.enemyType.numberSpawned); int num = base.agentMask & -17; Vector3 randomNavMeshPositionInBoxPredictable = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(((Component)this).transform.position, 10f, RoundManager.Instance.navHit, random, num, 1f); GameObject val = Object.Instantiate(hivePrefab, randomNavMeshPositionInBoxPredictable + Vector3.up * 0.2f, Quaternion.Euler(Vector3.zero), RoundManager.Instance.spawnedScrapContainer); val.SetActive(true); val.GetComponent().Spawn(false); SpawnHiveClientRpc(hiveScrapValue: (!(Vector3.Distance(randomNavMeshPositionInBoxPredictable, ((Component)StartOfRound.Instance.shipLandingPosition).transform.position) < hiveCloseDistanceFromShip)) ? random.Next(hiveMinValue, hiveMaxValue) : random.Next(closeMinHiveValue, closeMaxHiveValue), hiveObject: NetworkObjectReference.op_Implicit(val.GetComponent()), hivePosition: randomNavMeshPositionInBoxPredictable + Vector3.up * 0.2f); } } [ClientRpc] public void SpawnHiveClientRpc(NetworkObjectReference hiveObject, int hiveScrapValue, Vector3 hivePosition) { //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_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_008c: 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_016b: 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_0196: 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) //IL_01a3: 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_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: 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_020d: 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_01f5: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1698398423u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hiveObject, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, hiveScrapValue); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hivePosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1698398423u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref hiveObject)).TryGet(ref val3, (NetworkManager)null)) { hive = ((Component)val3).gameObject.GetComponent(); hive.scrapValue = hiveScrapValue; ScanNodeProperties componentInChildren = ((Component)hive).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.scrapValue = hiveScrapValue; componentInChildren.headerText = itemScanNodeName; componentInChildren.subText = $"Value: ${hiveScrapValue}"; } hive.targetFloorPosition = hivePosition; Debug.Log((object)$"Set targetfloorposition of hive: {hivePosition}"); RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(RoundManager.Instance.GetNavMeshPosition(((Component)hive).transform.position, default(NavMeshHit), 5f, -1), ((Component)hive).transform.position + Vector3.up - base.eye.position, ref val4, 20f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { lastKnownHivePosition = ((RaycastHit)(ref val4)).point; } else { lastKnownHivePosition = ((Component)hive).transform.position; } RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)hive.scrapValue; hasSpawnedHive = true; } else { Debug.LogError((object)"Bees: Error! Hive could not be accessed from network object reference"); } } public PlayerControllerB CheckLineOfSightForPlayerBees(float width = 45f, int range = 60, int proximityAwareness = -1) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Invalid comparison between Unknown and I4 //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_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_0076: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_00cf: Unknown result type (might be due to invalid IL or missing references) if (base.isOutside && !base.enemyType.canSeeThroughFog && (int)TimeOfDay.Instance.currentLevelWeather == 3) { range = Mathf.Clamp(range, 0, 30); } float num = 1000f; for (int i = 0; i < shuffledPlayersArray.Length; i++) { if (!shuffledPlayersArray[i].isUnderwater) { Vector3 position = ((Component)shuffledPlayersArray[i].gameplayCamera).transform.position; num = Vector3.Distance(position, base.eye.position); Vector3 val = position - base.eye.position; if (num < (float)range && (Vector3.Angle(base.eye.forward, val) < width || (proximityAwareness != -1 && num < (float)proximityAwareness)) && !Physics.Linecast(base.eye.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && !Physics.Linecast(position, base.eye.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { return shuffledPlayersArray[i]; } } } return null; } public override void DoAIInterval() { //IL_0066: 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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: 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_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: 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_014a: 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_00d6: 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_0273: Unknown result type (might be due to invalid IL or missing references) //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead || !hasSpawnedHive || base.daytimeEnemyLeaving) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (wasInChase) { wasInChase = false; } bool flag2 = Time.realtimeSinceStartup - timeAtSpawn < 5f; if (Vector3.Distance(((Component)this).transform.position, lastKnownHivePosition) > 2f || flag2) { ((EnemyAI)this).SetDestinationToPosition(lastKnownHivePosition, false); if (flag2) { break; } } if (IsHiveMissing()) { ((EnemyAI)this).SwitchToBehaviourState(2); break; } PlayerControllerB val3 = ((EnemyAI)this).CheckLineOfSightForPlayer(360f, 16, 1); if ((Object)(object)val3 != (Object)null && Vector3.Distance(((Component)val3).transform.position, ((Component)hive).transform.position) < (float)defenseDistance) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(val3); ((EnemyAI)this).SwitchToBehaviourState(1); SwitchOwnershipOfBeesToClient(val3); } break; } case 1: if ((Object)(object)base.targetPlayer == (Object)null || !((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true) || base.targetPlayer.isUnderwater || Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)hive).transform.position) > (float)defenseDistance + 5f) { base.targetPlayer = null; wasInChase = false; if (IsHiveMissing()) { ((EnemyAI)this).SwitchToBehaviourState(2); } else { ((EnemyAI)this).SwitchToBehaviourState(0); } } else if ((Object)(object)base.targetPlayer.currentlyHeldObjectServer == (Object)(object)hive) { ((EnemyAI)this).SwitchToBehaviourState(2); } break; case 2: { if (IsHivePlacedAndInLOS()) { if (wasInChase) { wasInChase = false; } lastKnownHivePosition = ((Component)hive).transform.position + Vector3.up * 0.5f; Collider[] array = Physics.OverlapSphere(((Component)hive).transform.position, (float)defenseDistance, StartOfRound.Instance.playersMask, (QueryTriggerInteraction)2); PlayerControllerB val = null; if (array != null && array.Length != 0) { for (int i = 0; i < array.Length; i++) { val = ((Component)array[0]).gameObject.GetComponent(); if ((Object)(object)val != (Object)null) { break; } } } if ((Object)(object)val != (Object)null && Vector3.Distance(((Component)val).transform.position, ((Component)hive).transform.position) < (float)defenseDistance && !val.isUnderwater) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(val); ((EnemyAI)this).SwitchToBehaviourState(1); SwitchOwnershipOfBeesToClient(val); } else { ((EnemyAI)this).SwitchToBehaviourState(0); } break; } bool flag = false; PlayerControllerB val2 = ChaseWithPriorities(); if ((Object)(object)val2 != (Object)null && (Object)(object)base.targetPlayer != (Object)(object)val2) { flag = true; wasInChase = false; ((EnemyAI)this).SetMovingTowardsTargetPlayer(val2); ((EnemyAI)this).StopSearch(searchForHive, true); if (SwitchOwnershipOfBeesToClient(val2)) { Debug.Log((object)("Bee10 switching owner to " + val2.playerUsername)); break; } } if ((Object)(object)base.targetPlayer != (Object)null) { base.agent.acceleration = aggroAccelNoPlayerInSight; if ((!flag && !Object.op_Implicit((Object)(object)((EnemyAI)this).CheckLineOfSightForPlayer(360f, 16, 2))) || !((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, true)) { lostLOSTimer += base.AIIntervalTime; if (lostLOSTimer >= 4.5f) { base.targetPlayer = null; lostLOSTimer = 0f; } } else { wasInChase = true; lastSeenPlayerPos = ((Component)base.targetPlayer).transform.position; lostLOSTimer = 0f; } break; } base.agent.acceleration = aggroAccel; if (!searchForHive.inProgress) { if (wasInChase) { ((EnemyAI)this).StartSearch(lastSeenPlayerPos, searchForHive); } else { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForHive); } } break; } } } private bool SwitchOwnershipOfBeesToClient(PlayerControllerB player) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player != (Object)(object)GameNetworkManager.Instance.localPlayerController) { syncedLastKnownHivePosition = false; lostLOSTimer = 0f; SyncLastKnownHivePositionServerRpc(lastKnownHivePosition); ((EnemyAI)this).ChangeOwnershipOfEnemy(player.actualClientId); return true; } return false; } [ServerRpc(RequireOwnership = false)] public void SyncLastKnownHivePositionServerRpc(Vector3 hivePosition) { //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_00d4: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(880319106u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hivePosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 880319106u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncLastKnownHivePositionClientRpc(hivePosition); } } } [ClientRpc] public void SyncLastKnownHivePositionClientRpc(Vector3 hivePosition) { //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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4142649582u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hivePosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4142649582u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; lastKnownHivePosition = hivePosition; syncedLastKnownHivePosition = true; } } } private PlayerControllerB ChaseWithPriorities() { //IL_00e5: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) int allPlayersInLineOfSightNonAlloc = ((EnemyAI)this).GetAllPlayersInLineOfSightNonAlloc(360f, 16, (Transform)null, -1f, -1); PlayerControllerB val = null; if (allPlayersInLineOfSightNonAlloc > 0) { float num = 3000f; int num2 = 0; int num3 = -1; for (int i = 0; i < allPlayersInLineOfSightNonAlloc; i++) { PlayerControllerB val2 = RoundManager.Instance.tempPlayersArray[i]; if (val2.isUnderwater) { continue; } if ((Object)(object)val2.currentlyHeldObjectServer != (Object)null) { if (num3 == -1 && val2.currentlyHeldObjectServer.itemProperties.itemId == 1531) { num3 = i; continue; } if ((Object)(object)val2.currentlyHeldObjectServer == (Object)(object)hive) { return val2; } } if ((Object)(object)base.targetPlayer == (Object)null) { float num4 = Vector3.Distance(((Component)this).transform.position, ((Component)val2).transform.position); if (num4 < num) { num = num4; num2 = i; } } } if (num3 != -1 && Vector3.Distance(((Component)this).transform.position, ((Component)RoundManager.Instance.tempPlayersArray[num3]).transform.position) - num > 7f) { val = RoundManager.Instance.tempPlayersArray[num2]; } else if ((Object)(object)val == (Object)null) { return RoundManager.Instance.tempPlayersArray[num2]; } } return val; } private bool IsHiveMissing() { //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_0062: 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_003a: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(base.eye.position, lastKnownHivePosition); if (!syncedLastKnownHivePosition) { return false; } if (num < 4f || (num < 8f && !Physics.Linecast(base.eye.position, lastKnownHivePosition, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))) { if ((Vector3.Distance(((Component)hive).transform.position, lastKnownHivePosition) > 6f && !IsHivePlacedAndInLOS()) || hive.isHeld) { return true; } lastKnownHivePosition = ((Component)hive).transform.position + Vector3.up * 0.5f; return false; } return false; } private bool IsHivePlacedAndInLOS() { //IL_0015: 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_003c: 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) if (hive.isHeld) { return false; } if (Vector3.Distance(base.eye.position, ((Component)hive).transform.position) > 9f || Physics.Linecast(base.eye.position, ((Component)hive).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { return false; } return true; } public override void Update() { //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_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_0525: 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_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0539: 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_01b4: 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_01c3: 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_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_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) //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) ((EnemyAI)this).Update(); if (StartOfRound.Instance.allPlayersDead || base.daytimeEnemyLeaving) { return; } timeSinceHittingPlayer += Time.deltaTime; attackZapModeTimer += Time.deltaTime; float num = Time.deltaTime * 0.7f; switch (base.currentBehaviourStateIndex) { case 0: if (previousState != base.currentBehaviourStateIndex) { previousState = base.currentBehaviourStateIndex; SetBeeParticleMode(0); ResetBeeZapTimer(); } if (attackZapModeTimer > 1f) { beesZappingMode = 0; ResetBeeZapTimer(); } base.agent.speed = idleSpeed; base.agent.acceleration = idleAccel; if (!overrideBeeParticleTarget) { if ((Object)(object)hive != (Object)null) { float num2 = Vector3.Distance(((Component)this).transform.position, ((Component)hive).transform.position); if (num2 < 2f || (num2 < 5f && !Physics.Linecast(base.eye.position, ((Component)hive).transform.position + Vector3.up * 0.5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1))) { beeParticlesTarget.position = ((Component)hive).transform.position; } else { beeParticlesTarget.position = ((Component)this).transform.position + Vector3.up * 1.5f; } } else { beeParticlesTarget.position = ((Component)this).transform.position + Vector3.up * 1.5f; } } beesIdle.volume = Mathf.Min(beesIdle.volume + num, 1f); if (!hasEnemyLeft) { if (!pitchControlInsteadOfDifferentAudios && useElectricSound && !beesIdle.isPlaying) { beesIdle.Play(); } beesDefensive.volume = Mathf.Max(beesDefensive.volume - num, 0f); if (!pitchControlInsteadOfDifferentAudios && useElectricSound && beesDefensive.isPlaying && beesDefensive.volume <= 0f) { beesDefensive.Stop(); } beesAngry.volume = Mathf.Max(beesAngry.volume - num, 0f); if (!pitchControlInsteadOfDifferentAudios && useElectricSound && beesAngry.isPlaying && beesAngry.volume <= 0f) { beesAngry.Stop(); } if (!pitchControlInsteadOfDifferentAudios && useElectricSound) { pitchControlledAudiosource.Play(); pitchControlledAudiosource.pitch = idlePitch; } } break; case 1: if (previousState != base.currentBehaviourStateIndex) { previousState = base.currentBehaviourStateIndex; ResetBeeZapTimer(); SetBeeParticleMode(1); if (!overrideBeeParticleTarget) { beeParticlesTarget.position = ((Component)this).transform.position + Vector3.up * 1.5f; } } if (attackZapModeTimer > 3f) { beesZappingMode = 1; ResetBeeZapTimer(); } base.agent.speed = defendSpeed; base.agent.acceleration = defendAccel; beesIdle.volume = Mathf.Max(beesIdle.volume - num, 0f); if (!hasEnemyLeft) { if (!pitchControlInsteadOfDifferentAudios && useElectricSound && beesIdle.isPlaying && beesIdle.volume <= 0f) { beesIdle.Stop(); } beesDefensive.volume = Mathf.Min(beesDefensive.volume + num, 1f); if (!pitchControlInsteadOfDifferentAudios && useElectricSound && !beesDefensive.isPlaying) { beesDefensive.Play(); } beesAngry.volume = Mathf.Max(beesAngry.volume - num, 0f); if (!pitchControlInsteadOfDifferentAudios && useElectricSound && beesAngry.isPlaying && beesAngry.volume <= 0f) { beesAngry.Stop(); } if (!pitchControlInsteadOfDifferentAudios && useElectricSound) { pitchControlledAudiosource.Play(); pitchControlledAudiosource.pitch = defendPitch; } } break; case 2: if (previousState != base.currentBehaviourStateIndex) { previousState = base.currentBehaviourStateIndex; SetBeeParticleMode(2); ResetBeeZapTimer(); if (!overrideBeeParticleTarget) { beeParticlesTarget.position = ((Component)this).transform.position + Vector3.up * 1.5f; } } beesZappingMode = 2; base.agent.speed = aggroSpeed; beesIdle.volume = Mathf.Max(beesIdle.volume - num, 0f); if (!hasEnemyLeft) { if (!pitchControlInsteadOfDifferentAudios && useElectricSound && beesIdle.isPlaying && beesIdle.volume <= 0f) { beesIdle.Stop(); } beesDefensive.volume = Mathf.Max(beesDefensive.volume - num, 0f); if (!pitchControlInsteadOfDifferentAudios && useElectricSound && beesDefensive.isPlaying && beesDefensive.volume <= 0f) { beesDefensive.Stop(); } beesAngry.volume = Mathf.Min(beesAngry.volume + num, 1f); if (!pitchControlInsteadOfDifferentAudios && useElectricSound && !beesAngry.isPlaying) { beesAngry.Play(); } if (!pitchControlInsteadOfDifferentAudios && useElectricSound) { pitchControlledAudiosource.Play(); pitchControlledAudiosource.pitch = aggroPitch; } } break; } BeesZapOnTimer(); if (base.stunNormalizedTimer > 0f || overrideBeeParticleTarget) { SetBeeParticleMode(2); base.agent.speed = 0f; } } private void ResetBeeZapTimer() { timesChangingZapModes++; beeZapRandom = new Random(StartOfRound.Instance.randomMapSeed + timesChangingZapModes); beesZapCurrentTimer = 0f; attackZapModeTimer = 0f; beeZapAudio.Stop(); } private void BeesZapOnTimer() { if (beesZappingMode == 0) { return; } if (beesZapCurrentTimer > beesZapTimer) { beesZapCurrentTimer = 0f; switch (beesZappingMode) { case 1: beesZapTimer = (float)beeZapRandom.Next(1, 8) * 0.1f; break; case 2: beesZapTimer = (float)beeZapRandom.Next(1, 7) * 0.06f; break; case 3: beesZapTimer = (float)beeZapRandom.Next(1, 5) * 0.04f; if (!beeZapAudio.isPlaying) { beeZapAudio.Play(); } beeZapAudio.pitch = 1f; if (attackZapModeTimer > 3f) { attackZapModeTimer = 0f; ((EnemyAI)this).GetClosestPlayer(false, false, false); if (base.mostOptimalDistance > 3f) { beesZappingMode = base.currentBehaviourStateIndex; Debug.Log((object)$"Setting bee zap mode to {base.currentBehaviourState} at end of zapping mode 3"); beeZapAudio.Stop(); } } break; } BeesZap(); } else { beesZapCurrentTimer += Time.deltaTime; } } private void SetBeeParticleMode(int newState) { if (beeParticleState == newState) { return; } beeParticleState = newState; switch (newState) { case 0: if (useVFX && !hasEnemyLeft) { beeVFX.SetFloat("NoiseIntensity", 3f); beeVFX.SetFloat("NoiseFrequency", 35f); beeVFX.SetFloat("MoveToTargetSpeed", 155f); beeVFX.SetFloat("MoveToTargetForce", 155f); beeVFX.SetFloat("TargetRadius", 0.3f); beeVFX.SetFloat("TargetStickDistance", 1f); beeVFX.SetFloat("TargetStickiness", 7f); } break; case 1: if (useVFX && !hasEnemyLeft) { beeVFX.SetFloat("NoiseIntensity", 16f); beeVFX.SetFloat("NoiseFrequency", 20f); beeVFX.SetFloat("MoveToTargetSpeed", 13f); beeVFX.SetFloat("MoveToTargetForce", 13f); beeVFX.SetFloat("TargetRadius", 1f); beeVFX.SetFloat("TargetStickDistance", 0f); beeVFX.SetFloat("TargetStickiness", 0f); } break; case 2: if (useVFX && !hasEnemyLeft) { beeVFX.SetFloat("NoiseIntensity", 35f); beeVFX.SetFloat("NoiseFrequency", 35f); beeVFX.SetFloat("MoveToTargetSpeed", 35f); beeVFX.SetFloat("MoveToTargetForce", 35f); beeVFX.SetFloat("TargetRadius", 1f); beeVFX.SetFloat("TargetStickDistance", 1f); beeVFX.SetFloat("TargetStickiness", 0f); } break; } } [ServerRpc(RequireOwnership = false)] public void EnterAttackZapModeServerRpc(int clientWhoSent) { //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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1103626738u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clientWhoSent); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1103626738u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (beesZappingMode != 3) { EnterAttackZapModeClientRpc(clientWhoSent); } } } [ClientRpc] public void EnterAttackZapModeClientRpc(int clientWhoSent) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(709186474u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clientWhoSent); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 709186474u, val2, (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 != clientWhoSent) { beesZappingMode = 3; Debug.Log((object)"Entered zap mode 3"); } } } [ServerRpc(RequireOwnership = false)] public void BeeKillPlayerServerRpc(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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2374511677u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2374511677u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BeeKillPlayerClientRpc(playerId); } } } [ClientRpc] public void BeeKillPlayerClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2373760188u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2373760188u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BeeKillPlayerOnLocalClient(playerId); } } } private void BeeKillPlayerOnLocalClient(int playerId) { //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_001d: 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) PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId]; val.KillPlayer(Vector3.zero, true, causeOfDeath, 3, default(Vector3), false); if (killingPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killingPlayerCoroutine); } killingPlayerCoroutine = ((MonoBehaviour)this).StartCoroutine(BeesKillPlayer(val)); } private IEnumerator BeesKillPlayer(PlayerControllerB killedPlayer) { float timeAtStart = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => (Object)(object)killedPlayer.deadBody != (Object)null || Time.realtimeSinceStartup - timeAtStart > 3f)); if (!((Object)(object)killedPlayer.deadBody == (Object)null)) { killingPlayer = killedPlayer; overrideBeeParticleTarget = true; base.inSpecialAnimation = true; Debug.Log((object)"Bees on body"); beeParticlesTarget.position = ((Component)killedPlayer.deadBody.bodyParts[0]).transform.position; yield return (object)new WaitForSeconds(4f); overrideBeeParticleTarget = false; beeParticlesTarget.position = ((Component)this).transform.position + Vector3.up * 1.5f; base.inSpecialAnimation = false; killingPlayer = null; } } private void OnPlayerTeleported(PlayerControllerB playerTeleported) { if ((Object)(object)playerTeleported == (Object)(object)base.targetPlayer) { base.targetPlayer = null; } if ((Object)(object)playerTeleported == (Object)(object)killingPlayer && killingPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killingPlayerCoroutine); } } public override void OnCollideWithPlayer(Collider other) { //IL_0092: 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_00a1: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (timeSinceHittingPlayer < timeBetweenHits) { return; } PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { timeSinceHittingPlayer = 0f; if (val.health <= playerDamage || val.criticallyInjured) { BeeKillPlayerOnLocalClient((int)GameNetworkManager.Instance.localPlayerController.playerClientId); BeeKillPlayerServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); PlayKillZapParticle(); } else { val.DamagePlayer(playerDamage, true, true, causeOfDeath, 3, false, default(Vector3)); particleOnDamage.Play(); } if (beesZappingMode != 3) { beesZappingMode = 3; EnterAttackZapModeServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } public void PlayKillZapParticle(int times = 10, float delay = 0.1f) { ((MonoBehaviour)this).StartCoroutine(PlayKillZapParticleRoutine(times, delay)); } private IEnumerator PlayKillZapParticleRoutine(int times, float delay) { for (int i = 0; i < times; i++) { particleOnDamage.Play(); yield return (object)new WaitForSeconds(delay); } } public void BeesZap() { //IL_0029: 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) if (beeVFX.GetBool("Alive")) { for (int i = 0; i < lightningPoints.Length; i++) { lightningPoints[i].position = RoundManager.Instance.GetRandomPositionInBoxPredictable(beeParticlesTarget.position, 4f, beeZapRandom); } if (useLightningBoltScript) { ((LightningBoltPrefabScriptBase)lightningComponent).Trigger(0.1f); } } if (beesZappingMode != 3) { beeZapAudio.pitch = Random.Range(0.8f, 1.1f); beeZapAudio.PlayOneShot(base.enemyType.audioClips[Random.Range(0, base.enemyType.audioClips.Length)], Random.Range(0.6f, 1f)); } } public void OnEnable() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Expected O, but got Unknown if (useLightningBoltScript) { ((LightningBoltScript)lightningComponent).Camera = StartOfRound.Instance.activeCamera; } ((UnityEvent)(object)StartOfRound.Instance.playerTeleportedEvent).AddListener((UnityAction)OnPlayerTeleported); ((UnityEvent)StartOfRound.Instance.CameraSwitchEvent).AddListener(new UnityAction(OnCameraSwitch)); } public void OnDisable() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown ((UnityEvent)(object)StartOfRound.Instance.playerTeleportedEvent).RemoveListener((UnityAction)OnPlayerTeleported); ((UnityEvent)StartOfRound.Instance.CameraSwitchEvent).RemoveListener(new UnityAction(OnCameraSwitch)); } private void OnCameraSwitch() { if (useLightningBoltScript) { ((LightningBoltScript)lightningComponent).Camera = StartOfRound.Instance.activeCamera; } } public override void EnableEnemyMesh(bool enable, bool overrideDoNotSet = false, bool tamperWithMeshes = false) { ((EnemyAI)this).EnableEnemyMesh(enable, overrideDoNotSet, tamperWithMeshes); beeVFX.SetBool("Alive", enable); } public override void DaytimeEnemyLeave() { hasEnemyLeft = true; ((EnemyAI)this).DaytimeEnemyLeave(); beeVFX.SetFloat("MoveToTargetForce", -15f); base.creatureSFX.PlayOneShot(base.enemyType.audioClips[0], 0.5f); base.agent.speed = 0f; ((MonoBehaviour)this).StartCoroutine(bugsLeave()); } private IEnumerator bugsLeave() { yield return (object)new WaitForSeconds(6f); ((EnemyAI)this).KillEnemyOnOwnerClient(true); } 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 ((NetworkBehaviour)this).__registerRpc(1698398423u, new RpcReceiveHandler(__rpc_handler_1698398423), "SpawnHiveClientRpc"); ((NetworkBehaviour)this).__registerRpc(880319106u, new RpcReceiveHandler(__rpc_handler_880319106), "SyncLastKnownHivePositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(4142649582u, new RpcReceiveHandler(__rpc_handler_4142649582), "SyncLastKnownHivePositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1103626738u, new RpcReceiveHandler(__rpc_handler_1103626738), "EnterAttackZapModeServerRpc"); ((NetworkBehaviour)this).__registerRpc(709186474u, new RpcReceiveHandler(__rpc_handler_709186474), "EnterAttackZapModeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2374511677u, new RpcReceiveHandler(__rpc_handler_2374511677), "BeeKillPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2373760188u, new RpcReceiveHandler(__rpc_handler_2373760188), "BeeKillPlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1698398423(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_003e: 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_0071: 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) { NetworkObjectReference hiveObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hiveObject, default(ForNetworkSerializable)); int hiveScrapValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref hiveScrapValue); Vector3 hivePosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hivePosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((BeeAI)(object)target).SpawnHiveClientRpc(hiveObject, hiveScrapValue, hivePosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_880319106(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 hivePosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hivePosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((BeeAI)(object)target).SyncLastKnownHivePositionServerRpc(hivePosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4142649582(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 hivePosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hivePosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((BeeAI)(object)target).SyncLastKnownHivePositionClientRpc(hivePosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1103626738(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 clientWhoSent = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clientWhoSent); target.__rpc_exec_stage = (__RpcExecStage)1; ((BeeAI)(object)target).EnterAttackZapModeServerRpc(clientWhoSent); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_709186474(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 clientWhoSent = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clientWhoSent); target.__rpc_exec_stage = (__RpcExecStage)1; ((BeeAI)(object)target).EnterAttackZapModeClientRpc(clientWhoSent); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2374511677(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; ((BeeAI)(object)target).BeeKillPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2373760188(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; ((BeeAI)(object)target).BeeKillPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "BeeAI"; } } public class CustomManeaterAdult : EnemyAI { public AudioSource walkingAudio; public AudioClip growlSFX; public AudioClip[] fakeCrySFX; public AudioSource clickingAudio1; public AudioSource clickingAudio2; public AudioSource screamAudio; public AudioSource screamAudioNonDiagetic; private bool isFakingBabyVoice = true; [Header("Maneater Variables")] public float sneakSpeed; public float attackDistance; public float leapSpeed; public float leapTime; public float screamTime; public float cooldownTime; public float chaseSpeed; public float baseSearchWidth; private float currentSearchWidth; [Space(3f)] public static float CaveDwellerDeafenAmount; private float caveDwellerDeafenAmountSmoothed; public float deafeningMaxDistance; public float deafeningMinDistance; public float maxDeafenAmount; public AISearchRoutine searchRoutine; private bool inKillAnimation; public List ignoredNodes = new List(); private Vector3 caveHidingSpot; private bool screaming; private bool leaping; private float screamTimer; private float leapTimer; private bool chasingAfterLeap; private int previousBehaviourState = -1; private bool startingKillAnimationLocalClient; private Coroutine killAnimationCoroutine; private DeadBodyInfo bodyBeingCarried; public Transform bodyRagdollPoint; public ParticleSystem killPlayerParticle1; public ParticleSystem killPlayerParticle2; private bool startedLeapingThisFrame; private Vector3 agentLocalVelocity; private Vector3 previousPosition; public Transform animationContainer; private bool movedSinceLastCheck; public DampedTransform headRig; public Transform[] bodyPoints; private float noPlayersTimer; private bool wasOutsideLastFrame; private bool beganCooldown; public AudioClip cooldownSFX; [Header("Baby AI")] public AudioSource babyCryingAudio; public AudioSource babyVoice; public AudioClip squirmingSFX; public AudioClip transformationSFX; public AudioClip[] scaredBabyVoiceSFX; public AudioClip biteSFX; public ParticleSystem babyTearsParticle; public ParticleSystem babyFoamAtMouthParticle; public BabyState babyState; private int previousBabyState = -1; [Space(5f)] public float lonelinessMeter = 0.5f; public float stressMeter; public float growthMeter; public float growthSpeedMultiplier = 1f; public float moodinessMultiplier = 1f; [Space(3f)] public float decreaseLonelinessMultiplier = 0.07f; public float increaseLonelinessMultiplier = 0.03f; [Space(5f)] public List playerMemory = new List(); private int playersSeen; private float currentActivityTimer; private float activityTimerOffset; public GameObject observingObject; public bool sittingDown; public bool babyRunning; public bool babyCrying; private bool stopCryingWhenReleased; public int rockingBaby; public bool holdingBaby; public float rockBabyTimer; public PlayerControllerB playerHolding; private Coroutine dropBabyCoroutine; public CustomManeaterBaby propScript; public bool hasPlayerFoundBaby; private bool pathingTowardsNearestPlayer; public AISearchRoutine babySearchRoutine; public MultiAimConstraint babyLookRig; public Transform babyLookTarget; private float pingAttentionTimer; private int focusLevel; public Vector3 pingAttentionPosition; private float timeAtLastPingAttention; private float fallOverWhileSittingChanceInterval; private float cantFindObservedObjectTimer; private float timeSpentObservingTimer; private Vector3 runningFromPosition; public bool eatingScrap; public GrabbableObject observingScrap; private float timeSinceEatingScrap; private float eatScrapRandomCheckInterval; private PlayerControllerB observingPlayer; private bool gettingFarthestNodeFromSpotAsync; private Transform farthestNodeFromRunningSpot; public Transform BabyEye; public Animator babyCreatureAnimator; public float lookVerticalOffset = 1f; private float timeAtLastHeardNoise; private float babyCryLonelyThreshold = 0.9f; private float babyFollowPlayersThreshold = 0.6f; private float babyRoamFromPlayersThreshold = 0.34f; private float babyCrySquirmingThreshold = 0.07f; private float timeSinceCheckingForScrap; private int scrapEaten; public Transform spine2; public float rollOverTimer; public bool rolledOver; public bool babySquirming; private int[] ignoreItemIds = new int[1] { 819501 }; private List seenScrap = new List(); public GameObject babyContainer; public GameObject adultContainer; private bool inTransformingAnimation; private float timeSinceCryingFromScarySight; private RaycastHit hit; private float fakeCryTimer; private bool clickingMandibles; private float timeSinceBiting; private bool wasBodyVisible; private Vector3 positionAtLeavingLOS; private float shakeCameraInterval; private float checkMovingInterval; private bool pursuingPlayerInSneakMode; private float changeOwnershipInterval; private float scareBabyWhileHoldingCooldown; public AudioClip pukeSFX; private bool nearTransforming; private bool babyPuked; private float checkIfTrappedInterval; public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { //IL_003e: 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) ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (base.currentBehaviourStateIndex == 0) { if (((NetworkBehaviour)this).IsServer) { if ((Object)(object)playerWhoHit != (Object)null) { ScareBaby(((Component)playerWhoHit).transform.position); } else { ScareBaby(((Component)this).transform.position); } growthMeter += 0.6f; } } else if (!base.inSpecialAnimation) { base.enemyHP--; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } public override void KillEnemy(bool destroy = false) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (base.currentBehaviourStateIndex == 0) { if (((NetworkBehaviour)this).IsServer) { ScareBaby(((Component)this).transform.position); growthMeter += 0.6f; } } else if (!base.inSpecialAnimation && adultContainer.activeSelf) { if (inKillAnimation) { FinishKillAnimation(completed: false); } walkingAudio.Stop(); base.creatureVoice.Stop(); base.creatureSFX.Stop(); screamAudio.Stop(); ((EnemyAI)this).KillEnemy(false); } } private bool IsBodyVisibleToTarget() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.targetPlayer == (Object)null) { return false; } for (int i = 0; i < bodyPoints.Length; i++) { if (base.targetPlayer.HasLineOfSightToPosition(((Component)bodyPoints[i]).transform.position, 45f, 15, -1f, -1)) { return true; } } return false; } private void InitializeBabyValues() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { playerMemory.Add(new BabyPlayerMemory((ulong)i)); } HoarderBugAI.RefreshGrabbableObjectsInMapList(); } private BabyPlayerMemory GetBabyMemoryOfPlayer(PlayerControllerB player) { for (int i = 0; i < playerMemory.Count; i++) { if (playerMemory[i].playerId == player.playerClientId) { return playerMemory[i]; } } return null; } private void IncreaseBabyGrowthMeter() { float num = 1.3f; if (rockingBaby == 2 && stopCryingWhenReleased) { num = 4f; } else if (babyRunning) { num = 1.8f; } if (babyCrying) { if (!hasPlayerFoundBaby) { growthMeter += 0.1f * growthSpeedMultiplier * Time.deltaTime; } else { growthMeter = Mathf.Clamp(growthMeter + growthSpeedMultiplier * num * Time.deltaTime, 0f, 25f); } } if (!nearTransforming && growthMeter > 0.8f) { nearTransforming = true; SetBabyNearTransformingServerRpc(); } if (growthMeter > 1f) { TransformIntoAdult(); } } [ServerRpc(RequireOwnership = false)] public void SetBabyNearTransformingServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1151246812u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1151246812u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabyNearTransformingClientRpc(); } } } [ClientRpc] public void SetBabyNearTransformingClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(202758699u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 202758699u, val2, (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) { nearTransforming = true; } } } public void PickUpBabyLocalClient() { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Invalid comparison between Unknown and I4 //IL_0058: Unknown result type (might be due to invalid IL or missing references) base.currentOwnershipOnThisClient = (int)((GrabbableObject)propScript).playerHeldBy.playerClientId; base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; holdingBaby = true; if (dropBabyCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dropBabyCoroutine); } if (((NetworkBehaviour)this).IsServer && (int)babyState == 2) { babyState = (BabyState)0; } SetRolledOverLocalClient(setRolled: false, scared: false); playerHolding = ((GrabbableObject)propScript).playerHeldBy; } public void DropBabyLocalClient() { //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_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_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_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_008a: 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_009a: 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_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_00b5: 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_00c9: 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_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_0147: 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_0162: 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_016f: 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_0175: 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_0180: 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_013b: 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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: 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_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) holdingBaby = false; rockingBaby = 0; playerHolding = null; if (base.currentBehaviourStateIndex != 0) { return; } if (((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } base.serverPosition = ((Component)this).transform.position; bool flag = true; Vector3 itemFloorPosition = ((GrabbableObject)propScript).GetItemFloorPosition(((Component)propScript.previousPlayerHeldBy).transform.position + Vector3.up * 0.5f); Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(itemFloorPosition, default(NavMeshHit), 10f, -1); Debug.DrawRay(((GrabbableObject)propScript).startFallingPosition, Vector3.up * 1f, Color.white, 10f); Debug.DrawRay(navMeshPosition, Vector3.up * 0.75f, Color.red, 10f); if (!RoundManager.Instance.GotNavMeshPositionResult || base.DebugEnemy) { flag = false; itemFloorPosition = ((GrabbableObject)propScript).startFallingPosition; if ((Object)(object)((Component)propScript).transform.parent != (Object)null) { itemFloorPosition = ((Component)propScript).transform.parent.TransformPoint(((GrabbableObject)propScript).startFallingPosition); } Transform val = ChooseClosestNodeToPositionNoPathCheck(itemFloorPosition); navMeshPosition = RoundManager.Instance.GetNavMeshPosition(((Component)val).transform.position, default(NavMeshHit), 5f, -1); Debug.DrawRay(navMeshPosition, Vector3.up * 1.2f, Color.magenta, 10f); } if ((Object)(object)((Component)propScript).transform.parent == (Object)null) { ((GrabbableObject)propScript).targetFloorPosition = navMeshPosition; } else { ((GrabbableObject)propScript).targetFloorPosition = ((Component)propScript).transform.parent.InverseTransformPoint(navMeshPosition); } Debug.DrawRay(((GrabbableObject)propScript).targetFloorPosition, Vector3.up * 2f, Color.yellow, 5f); if (flag) { if (dropBabyCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dropBabyCoroutine); } dropBabyCoroutine = ((MonoBehaviour)this).StartCoroutine(DropBabyAnimation(navMeshPosition)); } else { ((Component)this).transform.position = navMeshPosition; base.inSpecialAnimation = false; } } public Transform ChooseClosestNodeToPositionNoPathCheck(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) Array.Sort(base.allAINodes, delegate(GameObject a, GameObject b) { //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_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_0022: 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_0037: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos - a.transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; val = pos - b.transform.position; return sqrMagnitude.CompareTo(((Vector3)(ref val)).sqrMagnitude); }); return base.allAINodes[0].transform; } private IEnumerator DropBabyAnimation(Vector3 dropOnPosition) { //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) float time = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => ((GrabbableObject)propScript).reachedFloorTarget || Time.realtimeSinceStartup - time > 2f)); if (base.currentBehaviourStateIndex == 0) { ((Component)this).transform.position = dropOnPosition; base.inSpecialAnimation = false; if (((NetworkBehaviour)this).IsServer && (Object)(object)propScript.previousPlayerHeldBy != (Object)null && propScript.previousPlayerHeldBy.isPlayerDead) { ScareBaby(((Component)this).transform.position); } } dropBabyCoroutine = null; } public void PingAttention(int newFocusLevel, float timeToLook, Vector3 attentionPosition, bool sync = true) { //IL_0025: 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_003c: Unknown result type (might be due to invalid IL or missing references) if (!(pingAttentionTimer >= 0f) || newFocusLevel >= focusLevel) { focusLevel = newFocusLevel; pingAttentionTimer = timeToLook; pingAttentionPosition = attentionPosition; timeAtLastPingAttention = Time.realtimeSinceStartup; if (sync) { PingAttentionServerRpc(timeToLook, attentionPosition); } } } [ServerRpc(RequireOwnership = false)] public void PingAttentionServerRpc(float timeToLook, Vector3 attentionPosition) { //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_00f0: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1268841518u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref timeToLook, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref attentionPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1268841518u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PingAttentionClientRpc(timeToLook, attentionPosition); } } } [ClientRpc] public void PingAttentionClientRpc(float timeToLook, Vector3 attentionPosition) { //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_00fe: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2964508602u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref timeToLook, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref attentionPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2964508602u, val2, (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) { pingAttentionTimer = timeToLook; pingAttentionPosition = attentionPosition; } } } public PlayerControllerB[] GetAllPlayerBodiesInLineOfSight(float width = 45f, int range = 60, Transform eyeObject = null, float proximityCheck = -1f, int layerMask = -1) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Invalid comparison between Unknown and I4 //IL_00ac: 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_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_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_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_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_0102: 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) if (layerMask == -1) { layerMask = StartOfRound.Instance.collidersAndRoomMaskAndDefault; } if ((Object)(object)eyeObject == (Object)null) { eyeObject = base.eye; } if (base.isOutside && !base.enemyType.canSeeThroughFog && (int)TimeOfDay.Instance.currentLevelWeather == 3) { range = Mathf.Clamp(range, 0, 30); } List list = new List(4); for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerDead || (Object)(object)StartOfRound.Instance.allPlayerScripts[i].deadBody == (Object)null) { continue; } Vector3 position = ((Component)StartOfRound.Instance.allPlayerScripts[i].deadBody.bodyParts[5]).transform.position; if (Vector3.Distance(base.eye.position, position) < (float)range && !Physics.Linecast(eyeObject.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { Vector3 val = position - eyeObject.position; if (Vector3.Angle(eyeObject.forward, val) < width || Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position) < proximityCheck) { list.Add(StartOfRound.Instance.allPlayerScripts[i]); } } } if (list.Count == 4) { return StartOfRound.Instance.allPlayerScripts; } if (list.Count > 0) { return list.ToArray(); } return null; } private bool BabyObserveScrap() { //IL_0127: 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 (Time.realtimeSinceStartup - timeSinceCheckingForScrap < 1f || lonelinessMeter > 0.85f) { return false; } GameObject val = ((EnemyAI)this).CheckLineOfSight(HoarderBugAI.grabbableObjectsInMap, 130f, 12, 3f, BabyEye, ignoreItemIds); if ((Object)(object)val != (Object)null && ((Object)(object)observingPlayer == (Object)null || (lonelinessMeter < babyFollowPlayersThreshold && !observingPlayer.isPlayerDead))) { if (!hasPlayerFoundBaby && HoarderBugAI.HoarderBugItems != null && HoarderBugAI.HoarderBugItems.Count > 0) { for (int i = 0; i < HoarderBugAI.HoarderBugItems.Count; i++) { if ((Object)(object)HoarderBugAI.HoarderBugItems[i].itemGrabbableObject == (Object)(object)val) { return false; } } } GrabbableObject component = val.GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component != (Object)(object)propScript && ((NetworkBehaviour)component).NetworkObject.IsSpawned && (!seenScrap.Contains(val) || Random.Range(0, 100) < 4)) { observingObject = val; observingScrap = component; focusLevel = 2; babyState = (BabyState)1; observingPlayer = null; SetBabyObservingObjectServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component).NetworkObject)); return true; } } return false; } private void DoBabyAIInterval() { //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Expected I4, but got Unknown //IL_054d: 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_0561: Unknown result type (might be due to invalid IL or missing references) //IL_0571: Unknown result type (might be due to invalid IL or missing references) //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a78: Unknown result type (might be due to invalid IL or missing references) //IL_0a88: 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_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_0abe: Unknown result type (might be due to invalid IL or missing references) //IL_0ac4: Unknown result type (might be due to invalid IL or missing references) //IL_0aab: 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_01c3: 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_067e: Unknown result type (might be due to invalid IL or missing references) //IL_05e7: Unknown result type (might be due to invalid IL or missing references) //IL_05ee: 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_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Unknown result type (might be due to invalid IL or missing references) //IL_0aee: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_073f: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_078b: Unknown result type (might be due to invalid IL or missing references) //IL_07a5: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) if (holdingBaby || rolledOver) { return; } bool flag = !babyRunning; bool flag2 = false; if (flag) { if (!babyCrying) { PlayerControllerB[] allPlayerBodiesInLineOfSight = GetAllPlayerBodiesInLineOfSight(50f, 20, BabyEye, 2f); if (allPlayerBodiesInLineOfSight != null) { for (int i = 0; i < allPlayerBodiesInLineOfSight.Length; i++) { BabyPlayerMemory babyMemoryOfPlayer = GetBabyMemoryOfPlayer(allPlayerBodiesInLineOfSight[i]); if (babyMemoryOfPlayer != null && babyMemoryOfPlayer.orderSeen != -1) { if (babyMemoryOfPlayer.likeMeter > 0.4f && (Object)(object)allPlayerBodiesInLineOfSight[i].deadBody.grabBodyObject != (Object)null && (Object)(object)((NetworkBehaviour)allPlayerBodiesInLineOfSight[i].deadBody.grabBodyObject).NetworkObject != (Object)null && ((NetworkBehaviour)allPlayerBodiesInLineOfSight[i].deadBody.grabBodyObject).NetworkObject.IsSpawned) { babyState = (BabyState)1; observingScrap = null; observingObject = ((Component)((Component)allPlayerBodiesInLineOfSight[i].deadBody.bodyParts[6]).transform).gameObject; observingPlayer = allPlayerBodiesInLineOfSight[i]; flag2 = true; SetBabyObservingObjectServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)allPlayerBodiesInLineOfSight[i].deadBody.grabBodyObject).NetworkObject)); } babyMemoryOfPlayer.isPlayerDead = true; } } } } int num = -1; bool flag3 = false; if ((Object)(object)observingPlayer != (Object)null) { num = (int)observingPlayer.playerClientId; } int num2 = -1; int allPlayersInLineOfSightNonAlloc = ((EnemyAI)this).GetAllPlayersInLineOfSightNonAlloc(120f, 30, BabyEye, 3f, -1); if (allPlayersInLineOfSightNonAlloc > 0) { for (int j = 0; j < allPlayersInLineOfSightNonAlloc; j++) { Debug.DrawLine(((Component)BabyEye).transform.position, ((Component)RoundManager.Instance.tempPlayersArray[j].gameplayCamera).transform.position, Color.green, 1f); BabyPlayerMemory babyMemoryOfPlayer2 = GetBabyMemoryOfPlayer(RoundManager.Instance.tempPlayersArray[j]); if (babyMemoryOfPlayer2 == null) { continue; } if (Time.realtimeSinceStartup - babyMemoryOfPlayer2.timeAtLastSighting > 4f) { babyMemoryOfPlayer2.timeAtLastNoticing = Time.realtimeSinceStartup; } babyMemoryOfPlayer2.timeAtLastSighting = Time.realtimeSinceStartup; if (babyMemoryOfPlayer2.orderSeen == -1) { if (playersSeen == 0) { babyMemoryOfPlayer2.likeMeter = Random.Range(0.4f, 0.8f); if (num2 < 3 || pingAttentionTimer <= 0f) { flag3 = true; } } else { babyMemoryOfPlayer2.likeMeter = Random.Range(-0.2f, 0.5f); if (focusLevel <= 2 || pingAttentionTimer <= 0f || ((Object)(object)observingScrap != (Object)null && timeSpentObservingTimer > 4f)) { flag3 = true; } } playersSeen++; babyMemoryOfPlayer2.orderSeen = playersSeen; } else if (Time.realtimeSinceStartup - babyMemoryOfPlayer2.timeAtLastSighting > 26f && babyMemoryOfPlayer2.likeMeter > 0.25f && lonelinessMeter > babyRoamFromPlayersThreshold) { if (focusLevel < 2 || pingAttentionTimer <= 0f || ((Object)(object)observingScrap != (Object)null && timeSpentObservingTimer > 4f)) { flag3 = true; } } else if (lonelinessMeter > 0.75f && !Object.op_Implicit((Object)(object)observingPlayer)) { flag3 = true; } if (flag3) { if (num != -1) { BabyPlayerMemory babyMemoryOfPlayer3 = GetBabyMemoryOfPlayer(StartOfRound.Instance.allPlayerScripts[num]); if (babyMemoryOfPlayer2.likeMeter > babyMemoryOfPlayer3.likeMeter) { num = (int)RoundManager.Instance.tempPlayersArray[j].playerClientId; num2 = 3; } } else { num = (int)RoundManager.Instance.tempPlayersArray[j].playerClientId; num2 = 3; } } flag3 = false; } if (num != -1 && !flag2) { babyState = (BabyState)1; focusLevel = num2; observingScrap = null; observingObject = ((Component)StartOfRound.Instance.allPlayerScripts[num].gameplayCamera).gameObject; observingPlayer = StartOfRound.Instance.allPlayerScripts[num]; flag2 = true; SetBabyObservingPlayerServerRpc(num, 1); } } if (!babyCrying && !flag2 && BabyObserveScrap()) { flag2 = true; } } BabyState val = babyState; switch ((int)val) { case 0: if (pathingTowardsNearestPlayer) { if (babySearchRoutine.inProgress) { ((EnemyAI)this).StopSearch(babySearchRoutine, true); } if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } break; } if (sittingDown) { base.agent.speed = 0f; break; } if (!base.isInsidePlayerShip && !babySearchRoutine.inProgress) { Vector3 position = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, Random.Range(5, base.allAINodes.Length / 2)).position; ((EnemyAI)this).StartSearch(position, babySearchRoutine); } if (babyCrying) { base.agent.speed = 2.5f; } else { base.agent.speed = 4f; } break; case 1: { if ((Object)(object)observingObject == (Object)null) { break; } if (babySearchRoutine.inProgress) { ((EnemyAI)this).StopSearch(babySearchRoutine, true); } Vector3 position2 = observingObject.transform.position; position2.y = ((Component)BabyEye).transform.position.y; if (!((EnemyAI)this).CheckLineOfSightForPosition(position2, 120f, 10, 3f, BabyEye)) { cantFindObservedObjectTimer = Mathf.Max(cantFindObservedObjectTimer + base.AIIntervalTime, 0f); if (cantFindObservedObjectTimer > 2.3f) { babyState = (BabyState)0; break; } if (sittingDown) { sittingDown = false; SetBabySittingServerRpc(sit: false); } Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(observingObject.transform.position, default(NavMeshHit), 6f, -1); if (RoundManager.Instance.GotNavMeshPositionResult) { ((EnemyAI)this).SetDestinationToPosition(navMeshPosition, false); base.agent.speed = 4.2f; } break; } if (Object.op_Implicit((Object)(object)observingPlayer) && (observingPlayer.isPlayerDead || (observingPlayer.criticallyInjured && Time.realtimeSinceStartup - timeSinceCryingFromScarySight > 12f))) { timeSinceCryingFromScarySight = Time.realtimeSinceStartup; ScareBaby(((Component)observingPlayer).transform.position); break; } if (!babyCrying && Time.realtimeSinceStartup - timeSinceCryingFromScarySight > 5f && Object.op_Implicit((Object)(object)observingScrap) && observingScrap.itemProperties.itemId == 123984) { GrabbableObject obj = observingScrap; CaveDwellerPhysicsProp val2 = (CaveDwellerPhysicsProp)(object)((obj is CaveDwellerPhysicsProp) ? obj : null); if ((Object)(object)val2 != (Object)null && val2.caveDwellerScript.babyCrying) { timeSinceCryingFromScarySight = Time.realtimeSinceStartup; SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); break; } } if (eatingScrap) { if ((Object)(object)observingScrap != (Object)null && !observingScrap.isHeld && ((EnemyAI)this).SetDestinationToPosition(observingObject.transform.position, false)) { if (sittingDown) { sittingDown = false; SetBabySittingServerRpc(sit: false); } base.agent.speed = 3.6f; if (Vector3.Distance(((Component)this).transform.position, observingObject.transform.position) < 0.9f) { eatingScrap = false; babyState = (BabyState)0; ((NetworkBehaviour)observingScrap).NetworkObject.Despawn(true); StopObserving(eatScrap: true); break; } if (Time.realtimeSinceStartup - timeSinceEatingScrap > 7f) { eatingScrap = false; } } else { if ((Object)(object)observingScrap != (Object)null && !observingScrap.isHeld && (Object)(object)observingScrap.playerHeldBy != (Object)null) { BabyPlayerMemory babyMemoryOfPlayer4 = GetBabyMemoryOfPlayer(observingScrap.playerHeldBy); babyMemoryOfPlayer4.likeMeter = Mathf.Max(babyMemoryOfPlayer4.likeMeter - 0.2f, -0.5f); } eatingScrap = false; } } else if ((Object)(object)observingPlayer == (Object)null && (Object)(object)observingScrap != (Object)null && !observingScrap.isHeld && observingScrap.itemProperties.itemId != 123984 && Time.realtimeSinceStartup - eatScrapRandomCheckInterval > 3f) { if (!seenScrap.Contains(observingObject)) { seenScrap.Add(observingObject); if (seenScrap.Count > 5) { seenScrap.RemoveAt(0); } } eatScrapRandomCheckInterval = Time.realtimeSinceStartup; if ((Random.Range(0, 100) < 20 || (base.isInsidePlayerShip && Random.Range(0, 100) < 70)) && (Time.realtimeSinceStartup - timeSinceEatingScrap > 25f || (Time.realtimeSinceStartup - timeSinceEatingScrap > 1f && Random.Range(0, 100) < 40))) { eatingScrap = true; timeSinceEatingScrap = Time.realtimeSinceStartup; } } cantFindObservedObjectTimer = Mathf.Min(cantFindObservedObjectTimer - base.AIIntervalTime, 0f); BabyPlayerMemory val3 = null; if ((Object)(object)observingPlayer != (Object)null) { val3 = GetBabyMemoryOfPlayer(observingPlayer); } if ((Object)(object)observingPlayer != (Object)null && observingPlayer.isPlayerDead && (Object)(object)observingPlayer.deadBody != (Object)null && val3 != null && val3.orderSeen != -1 && val3.likeMeter > 0.4f) { ScareBaby(((Component)observingPlayer.deadBody.bodyParts[5]).transform.position); } break; } case 3: { if (babySearchRoutine.inProgress) { ((EnemyAI)this).StopSearch(babySearchRoutine, true); } if ((Object)(object)farthestNodeFromRunningSpot == (Object)null) { gettingFarthestNodeFromSpotAsync = true; break; } ((EnemyAI)this).SetDestinationToPosition(((Component)farthestNodeFromRunningSpot).transform.position, false); base.agent.speed = 6.25f; if (Vector3.Distance(((Component)this).transform.position, ((Component)farthestNodeFromRunningSpot).transform.position) < 4f) { if (babyCrying) { farthestNodeFromRunningSpot = null; break; } babyState = (BabyState)0; } if (babyCrying) { break; } float num3 = Vector3.Distance(((Component)this).transform.position, runningFromPosition); if (num3 > 16f) { if (Time.realtimeSinceStartup - currentActivityTimer > 10f) { babyState = (BabyState)0; } } else if (num3 > 26f) { babyState = (BabyState)0; } break; } case 2: if (babySearchRoutine.inProgress) { ((EnemyAI)this).StopSearch(babySearchRoutine, true); } base.agent.speed = 0f; break; } } private void ScareBaby(Vector3 runFromPosition) { //IL_002b: 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_004c: 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) if (!((NetworkBehaviour)this).IsServer) { return; } if (sittingDown && !holdingBaby) { SetRolledOverLocalClient(setRolled: true, scared: true); SetBabyRolledOverServerRpc(rolledOver: true, scared: true); return; } runningFromPosition = runFromPosition; currentActivityTimer = Time.realtimeSinceStartup; farthestNodeFromRunningSpot = null; SetCryingLocalClient(setCrying: true); babyState = (BabyState)3; if ((Object)(object)((GrabbableObject)propScript).playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((GrabbableObject)propScript).playerHeldBy.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true); } ScareBabyServerRpc(); } [ServerRpc(RequireOwnership = false)] public void ScareBabyServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3763635916u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3763635916u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ScareBabyClientRpc(); } } } [ClientRpc] public void ScareBabyClientRpc() { //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_0107: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4208672795u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4208672795u, val2, (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) { SetCryingLocalClient(setCrying: true); babyRunning = true; if ((Object)(object)((GrabbableObject)propScript).playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((GrabbableObject)propScript).playerHeldBy.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true); } } } [ServerRpc(RequireOwnership = false)] public void SetBabySittingServerRpc(bool sit) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(219605984u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sit, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 219605984u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabySittingClientRpc(sit); } } } [ClientRpc] public void SetBabySittingClientRpc(bool sit) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3096356676u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref sit, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3096356676u, val2, (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) { sittingDown = sit; } } } [ServerRpc(RequireOwnership = false)] public void SetBabyRolledOverServerRpc(bool rolledOver, bool scared) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_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_00b2: 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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1793251763u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref rolledOver, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref scared, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1793251763u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabyRolledOverClientRpc(rolledOver, scared); } } } [ClientRpc] public void SetBabyRolledOverClientRpc(bool setRolled, bool scared) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_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_00b2: 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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2660405973u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setRolled, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref scared, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2660405973u, val2, (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) { SetRolledOverLocalClient(setRolled, scared); } } } private void PlayBabyScaredAudio() { RoundManager.PlayRandomClip(babyVoice, scaredBabyVoiceSFX, true, 1f, 0, 1000); } private void SetRolledOverLocalClient(bool setRolled, bool scared) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (scared && setRolled) { PlayBabyScaredAudio(); rollOverTimer = 0.7f; } else if (setRolled && !rolledOver) { babyState = (BabyState)2; rollOverTimer = 0f; } rolledOver = setRolled; babyCreatureAnimator.SetBool("FallOver", setRolled); } [ServerRpc(RequireOwnership = false)] public void SetBabyCryingServerRpc(bool setCry) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1662911003u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setCry, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1662911003u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabyCryingClientRpc(setCry); } } } [ClientRpc] public void SetBabyCryingClientRpc(bool setCry) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1358960688u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setCry, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1358960688u, val2, (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) { SetCryingLocalClient(setCry); } } } [ServerRpc(RequireOwnership = false)] public void SetBabyBServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(928168988u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 928168988u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabyBClientRpc(); } } } [ClientRpc] public void SetBabyBClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3820054238u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3820054238u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; } } } [ServerRpc(RequireOwnership = false)] public void SetBabyRunningServerRpc(bool setRunning) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(717734443u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setRunning, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 717734443u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabyRunningClientRpc(setRunning); } } } [ClientRpc] public void SetBabyRunningClientRpc(bool setRunning) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2820995031u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setRunning, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2820995031u, val2, (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) { babyRunning = setRunning; } } } [ServerRpc(RequireOwnership = false)] public void SetBabySquirmingServerRpc(bool setSquirm) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1459662037u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setSquirm, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1459662037u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabySquirmingClientRpc(setSquirm); } } } [ClientRpc] public void SetBabySquirmingClientRpc(bool setSquirm) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4060669687u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setSquirm, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4060669687u, val2, (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) { babySquirming = setSquirm; } } } [ServerRpc(RequireOwnership = false)] public void ClearBabyObservingServerRpc(bool eatScrap) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3524158905u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref eatScrap, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3524158905u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ClearBabyObservingClientRpc(eatScrap); } } } [ClientRpc] public void ClearBabyObservingClientRpc(bool eatScrap) { //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) //IL_0185: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(167773896u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref eatScrap, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 167773896u, val2, (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) { observingPlayer = null; observingObject = null; observingScrap = null; if (eatScrap) { scrapEaten++; babyCreatureAnimator.SetTrigger("Bite"); babyVoice.PlayOneShot(biteSFX); timeSinceBiting = Time.realtimeSinceStartup; ((RigConstraint>)(object)babyLookRig).weight = 0f; float num = Mathf.Lerp(1f, 1.6f, Mathf.Min((float)scrapEaten, 5f) / 5f); spine2.localScale = new Vector3(num, 1f, num); } } } [ServerRpc(RequireOwnership = false)] public void SetBabyObservingPlayerServerRpc(int playerId, int setFocusLevel) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(687891504u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, setFocusLevel); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 687891504u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabyObservingPlayerClientRpc(playerId, setFocusLevel); } } } [ClientRpc] public void SetBabyObservingPlayerClientRpc(int playerId, int setFocusLevel) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4131295501u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); BytePacker.WriteValueBitPacked(val, setFocusLevel); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4131295501u, val2, (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) { observingScrap = null; observingPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; focusLevel = setFocusLevel; observingObject = ((Component)((Component)StartOfRound.Instance.allPlayerScripts[playerId].gameplayCamera).transform).gameObject; } } } [ServerRpc(RequireOwnership = false)] public void SetBabyObservingObjectServerRpc(NetworkObjectReference netObject) { //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) //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(240324482u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref netObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 240324482u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetBabyObservingObjectClientRpc(netObject); } } } [ClientRpc] public void SetBabyObservingObjectClientRpc(NetworkObjectReference netObject) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2624838523u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref netObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2624838523u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref netObject)).TryGet(ref val3, (NetworkManager)null)) { observingObject = ((Component)val3).gameObject; GrabbableObject component = observingObject.GetComponent(); if ((Object)(object)component != (Object)null) { observingScrap = component; } } } 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_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_0052: 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_0061: 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_007a: 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_0090: 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) //IL_019e: 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_0175: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DetectNoise(noisePosition, noiseLoudness, timesPlayedInOneSpot, noiseID); if (noiseID == 6 || noiseID == 7 || (!((NetworkBehaviour)this).IsServer && noiseID != 75) || base.isEnemyDead || noiseLoudness <= 0.1f || Time.realtimeSinceStartup - timeAtLastHeardNoise < 3f || Vector3.Distance(noisePosition, ((Component)this).transform.position + Vector3.up * 0.4f) < 0.8f) { return; } float num = Vector3.Distance(noisePosition, ((Component)this).transform.position); if (Physics.Linecast(((Component)this).transform.position, noisePosition, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { noiseLoudness *= 0.6f; num += 3f; } if (pingAttentionTimer > 0f) { if (focusLevel >= 3) { if (num > 7f || noiseLoudness <= 0.7f) { return; } } else if (focusLevel == 2) { if (num > 14f || noiseLoudness <= 0.4f) { return; } } else if (focusLevel <= 1 && (num > 20f || noiseLoudness <= 0.25f)) { return; } } timeAtLastHeardNoise = Time.realtimeSinceStartup; int newFocusLevel = 1; if (!((NetworkBehaviour)this).IsServer || noiseID == 75 || ((!(num < 2f) || !(noiseLoudness >= 0.5f)) && (!(num < 8f) || !(noiseLoudness >= 0.85f)))) { newFocusLevel = ((!(noiseLoudness > 0.6f)) ? 2 : 3); } else if (Time.realtimeSinceStartup - scareBabyWhileHoldingCooldown > 0.4f) { if (babyCrying) { ScareBaby(noisePosition); return; } scareBabyWhileHoldingCooldown = Time.realtimeSinceStartup; SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); return; } PingAttention(newFocusLevel, 0.5f, noisePosition + Vector3.up * 0.6f); } private void BabyObserveAnimation() { //IL_0048: 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_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_0100: 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_010a: 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_010c: 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_011b: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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_01b2: 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_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0204: 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_0228: 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_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: 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_0286: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0296: 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_02a6: 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_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0338: 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_02c9: 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_02fa: Unknown result type (might be due to invalid IL or missing references) bool flag = babyRunning || babyCrying || rolledOver || Time.realtimeSinceStartup - timeSinceBiting < 0.75f; bool flag2 = (Object)(object)observingObject != (Object)null && Physics.Linecast(((Component)BabyEye).transform.position, observingObject.transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1); if (flag || flag2) { ((RigConstraint>)(object)babyLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)babyLookRig).weight, 0f, Time.deltaTime * 3f); base.agent.angularSpeed = 320f; return; } Vector3 val; if (pingAttentionTimer > 0f && ((Object)(object)observingObject == (Object)null || Vector3.Distance(observingObject.transform.position, pingAttentionPosition) > 1.6f)) { val = pingAttentionPosition - Vector3.up * lookVerticalOffset; Debug.DrawRay(val, Vector3.up * 0.25f, Color.cyan); } else { if (!((Object)(object)observingObject != (Object)null) || holdingBaby) { ((RigConstraint>)(object)babyLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)babyLookRig).weight, 0f, Time.deltaTime * 3f); base.agent.angularSpeed = 320f; return; } val = observingObject.transform.position - Vector3.up * lookVerticalOffset; Debug.DrawRay(val, Vector3.up * 0.25f, Color.cyan); } ((RigConstraint>)(object)babyLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)babyLookRig).weight, 1f, Time.deltaTime * 8f); babyLookTarget.position = Vector3.Lerp(babyLookTarget.position, val, Time.deltaTime * 8f); float num = Vector3.Angle(((Component)this).transform.forward, Vector3.Scale(new Vector3(1f, 0f, 1f), val - ((Component)this).transform.position)); if (num > 10f) { if (!movedSinceLastCheck && !sittingDown) { base.agent.angularSpeed = 0f; if (Vector3.Dot(new Vector3(val.x, ((Component)this).transform.position.y, val.z) - ((Component)this).transform.position, ((Component)this).transform.right) > 0f) { Transform transform = ((Component)this).transform; transform.rotation *= Quaternion.Euler(0f, 605f * Mathf.Max(num / 180f, 0.2f) * Time.deltaTime, 0f); } else { Transform transform2 = ((Component)this).transform; transform2.rotation *= Quaternion.Euler(0f, -605f * Mathf.Max(num / 180f, 0.2f) * Time.deltaTime, 0f); } } else { base.agent.angularSpeed = 220f; } } else { base.agent.angularSpeed = 25f; } } private void SitCycle() { if (sittingDown) { if (Time.realtimeSinceStartup - currentActivityTimer > 12f + activityTimerOffset && !base.isInsidePlayerShip) { currentActivityTimer = Time.realtimeSinceStartup; activityTimerOffset = 7f; sittingDown = false; SetBabySittingServerRpc(sit: false); } else if (Time.realtimeSinceStartup - fallOverWhileSittingChanceInterval > 3f) { fallOverWhileSittingChanceInterval = Time.realtimeSinceStartup; if (Random.Range(0, 100) < 10) { SetRolledOverLocalClient(setRolled: true, scared: false); SetBabyRolledOverServerRpc(rolledOver: true, scared: false); } } } else if (base.isInsidePlayerShip || Time.realtimeSinceStartup - currentActivityTimer > 14f + activityTimerOffset) { currentActivityTimer = Time.realtimeSinceStartup; activityTimerOffset = 8f; sittingDown = true; fallOverWhileSittingChanceInterval = Time.realtimeSinceStartup; SetBabySittingServerRpc(sit: true); } } private void StopObserving(bool eatScrap) { //IL_0099: Unknown result type (might be due to invalid IL or missing references) observingObject = null; observingScrap = null; observingPlayer = null; if (eatScrap) { scrapEaten++; babyCreatureAnimator.SetTrigger("Bite"); babyVoice.PlayOneShot(biteSFX); timeSinceBiting = Time.realtimeSinceStartup; ((RigConstraint>)(object)babyLookRig).weight = 0f; float num = Mathf.Lerp(1f, 1.6f, Mathf.Min((float)scrapEaten, 3f) / 3f); spine2.localScale = new Vector3(num, 1f, num); } ClearBabyObservingServerRpc(eatScrap); } private void SetCryingLocalClient(bool setCrying) { if (!babyCrying && setCrying) { babyCrying = true; babyCryingAudio.Play(); babyTearsParticle.Play(true); } else if (!setCrying && babyCrying) { babyCrying = false; babyTearsParticle.Stop(true, (ParticleSystemStopBehavior)1); } } private void BabyUpdate() { //IL_00b6: 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_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0423: Unknown result type (might be due to invalid IL or missing references) //IL_0428: 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_0351: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Invalid comparison between Unknown and I4 //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0579: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Expected I4, but got Unknown //IL_0615: 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_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Invalid comparison between I4 and Unknown //IL_08a4: Unknown result type (might be due to invalid IL or missing references) //IL_08a9: Invalid comparison between I4 and Unknown //IL_0cfd: Unknown result type (might be due to invalid IL or missing references) //IL_0d02: Invalid comparison between I4 and Unknown //IL_0c48: Unknown result type (might be due to invalid IL or missing references) //IL_0c4d: Invalid comparison between I4 and Unknown //IL_08f6: Unknown result type (might be due to invalid IL or missing references) //IL_0900: Expected I4, but got Unknown //IL_0d3e: Unknown result type (might be due to invalid IL or missing references) //IL_0d48: Expected I4, but got Unknown //IL_0ccb: Unknown result type (might be due to invalid IL or missing references) //IL_0ca6: Unknown result type (might be due to invalid IL or missing references) //IL_0cb0: Expected I4, but got Unknown //IL_0772: Unknown result type (might be due to invalid IL or missing references) //IL_077c: Expected I4, but got Unknown //IL_0980: Unknown result type (might be due to invalid IL or missing references) //IL_0990: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09be: Unknown result type (might be due to invalid IL or missing references) //IL_09c3: Unknown result type (might be due to invalid IL or missing references) //IL_09cd: Unknown result type (might be due to invalid IL or missing references) //IL_09d2: Unknown result type (might be due to invalid IL or missing references) //IL_09e2: Unknown result type (might be due to invalid IL or missing references) //IL_09e7: Unknown result type (might be due to invalid IL or missing references) //IL_09ec: Unknown result type (might be due to invalid IL or missing references) //IL_09f6: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0a09: Unknown result type (might be due to invalid IL or missing references) //IL_0a1a: Unknown result type (might be due to invalid IL or missing references) //IL_0a24: Unknown result type (might be due to invalid IL or missing references) //IL_0a34: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Unknown result type (might be due to invalid IL or missing references) //IL_0a40: Unknown result type (might be due to invalid IL or missing references) //IL_0a4a: Unknown result type (might be due to invalid IL or missing references) //IL_0a7d: Unknown result type (might be due to invalid IL or missing references) //IL_0a6f: Unknown result type (might be due to invalid IL or missing references) //IL_0b9d: Unknown result type (might be due to invalid IL or missing references) //IL_0a82: Unknown result type (might be due to invalid IL or missing references) //IL_0c3b: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Unknown result type (might be due to invalid IL or missing references) //IL_0b34: Unknown result type (might be due to invalid IL or missing references) //IL_0b3a: Unknown result type (might be due to invalid IL or missing references) //IL_0b42: Unknown result type (might be due to invalid IL or missing references) //IL_0b47: Unknown result type (might be due to invalid IL or missing references) //IL_0b5a: Unknown result type (might be due to invalid IL or missing references) //IL_0c04: 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) babyCreatureAnimator.SetBool("Sitting", sittingDown); babyCreatureAnimator.SetBool("BabyRunning", babyRunning); babyCreatureAnimator.SetBool("HoldingBaby", holdingBaby); babyCreatureAnimator.SetBool("BabyCrying", babyCrying); babyCreatureAnimator.SetBool("Squirming", babySquirming); pingAttentionTimer -= Time.deltaTime; BabyObserveAnimation(); if (StartOfRound.Instance.shipIsLeaving) { ((GrabbableObject)propScript).grabbable = false; if ((Object)(object)playerHolding != (Object)null) { playerHolding.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true); } } else if (!base.inSpecialAnimation) { ((GrabbableObject)propScript).grabbable = true; } if (babySquirming) { if (!babyVoice.isPlaying || (Object)(object)babyVoice.clip != (Object)(object)squirmingSFX) { babyVoice.clip = squirmingSFX; babyVoice.Play(); } } else if ((Object)(object)babyVoice.clip == (Object)(object)squirmingSFX && babyVoice.isPlaying) { babyVoice.Stop(); } if (babyCrying) { babyCryingAudio.pitch = Mathf.Lerp(babyCryingAudio.pitch, 1f, 2f * Time.deltaTime); babyCryingAudio.volume = Mathf.Lerp(babyCryingAudio.volume, 1f, 2f * Time.deltaTime); } else { babyCryingAudio.pitch = Mathf.Lerp(babyCryingAudio.pitch, 0.85f, 3f * Time.deltaTime); babyCryingAudio.volume = Mathf.Lerp(babyCryingAudio.volume, 0f, 3.6f * Time.deltaTime); if (babyCryingAudio.volume <= 0.07f && babyCryingAudio.isPlaying) { babyCryingAudio.Stop(); if (!babyPuked && nearTransforming) { babyPuked = true; babyVoice.PlayOneShot(pukeSFX); WalkieTalkie.TransmitOneShotAudio(babyVoice, pukeSFX, 1f); babyFoamAtMouthParticle.Play(true); } } } if (!((NetworkBehaviour)this).IsServer) { return; } if (holdingBaby && (Object)(object)playerHolding != (Object)null) { hasPlayerFoundBaby = true; if (Time.realtimeSinceStartup - scareBabyWhileHoldingCooldown > 0.4f && Time.realtimeSinceStartup - playerHolding.timeSinceTakingDamage < 0.38f) { scareBabyWhileHoldingCooldown = Time.realtimeSinceStartup; if (babyCrying) { ScareBaby(((Component)this).transform.position); } else { SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); } } } if (babyCrying) { if (babySquirming) { babySquirming = false; SetBabySquirmingServerRpc(setSquirm: false); } if (!stopCryingWhenReleased && !base.isOutside) { lonelinessMeter = 0.7f; if (rockingBaby != 0 && (int)babyState == 3) { babyState = (BabyState)0; } if (rockingBaby == 1) { rockBabyTimer += Time.deltaTime * 0.7f; } else if (rockingBaby == 2) { rockBabyTimer += Time.deltaTime * 0.4f; } if (rockBabyTimer > 1f) { SetCryingLocalClient(setCrying: false); SetBabyCryingServerRpc(setCry: false); } } } else { rockBabyTimer = 0f; if (rockingBaby == 2) { stressMeter += Time.deltaTime * 0.8f; if (stressMeter >= 1f) { stressMeter = 0f; stopCryingWhenReleased = true; babyState = (BabyState)3; runningFromPosition = ((Component)this).transform.position; farthestNodeFromRunningSpot = null; SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); } } else if (rockingBaby == 1 && (Object)(object)((GrabbableObject)propScript).playerHeldBy != (Object)null && lonelinessMeter > 0.6f) { BabyPlayerMemory babyMemoryOfPlayer = GetBabyMemoryOfPlayer(((GrabbableObject)propScript).playerHeldBy); babyMemoryOfPlayer.likeMeter = Mathf.Min(new float[1] { babyMemoryOfPlayer.likeMeter + Time.deltaTime * 0.035f }); } } if (base.isOutside && !base.isInsidePlayerShip && !babyCrying) { SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); } IncreaseBabyGrowthMeter(); if (base.currentBehaviourStateIndex != 0) { return; } if (rolledOver) { rollOverTimer += Time.deltaTime; if (!babyCrying && rollOverTimer > 1.3f) { SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); } } if (!holdingBaby) { if (babySquirming) { babySquirming = false; SetBabySquirmingServerRpc(setSquirm: false); } if (stopCryingWhenReleased) { stopCryingWhenReleased = false; SetCryingLocalClient(setCrying: false); SetBabyCryingServerRpc(setCry: false); } if ((Object)(object)observingPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)observingPlayer).transform.position) < 12f) { BabyPlayerMemory babyMemoryOfPlayer2 = GetBabyMemoryOfPlayer(observingPlayer); lonelinessMeter = Mathf.Max(0f, lonelinessMeter - Time.deltaTime * (decreaseLonelinessMultiplier / Mathf.Max(babyMemoryOfPlayer2.likeMeter * 3f, 0.45f)) * moodinessMultiplier); } else { if (!hasPlayerFoundBaby) { for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, 140f, 50, 5f, -1)) { hasPlayerFoundBaby = true; break; } } } if (playersSeen > 0 || hasPlayerFoundBaby) { lonelinessMeter = Mathf.Min(1f, lonelinessMeter + Time.deltaTime * increaseLonelinessMultiplier * moodinessMultiplier); } else { lonelinessMeter = Mathf.Min(1f, lonelinessMeter + Time.deltaTime * 0.01f * moodinessMultiplier); } } if (holdingBaby) { return; } BabyState val = babyState; switch ((int)val) { case 0: if (previousBabyState != (int)babyState) { currentActivityTimer = Time.realtimeSinceStartup; activityTimerOffset = Random.Range(-10f, 10f); leapTimer = 0f; if (Object.op_Implicit((Object)(object)observingObject)) { StopObserving(eatScrap: false); } eatingScrap = false; if (sittingDown) { sittingDown = false; SetBabySittingServerRpc(sit: false); } if (babyRunning) { babyRunning = false; SetBabyRunningServerRpc(setRunning: false); } previousBabyState = (int)babyState; } if (playersSeen == 0) { if (pathingTowardsNearestPlayer) { if (Time.realtimeSinceStartup - currentActivityTimer > 20f + activityTimerOffset) { currentActivityTimer = Time.realtimeSinceStartup; pathingTowardsNearestPlayer = false; } } else if (Time.realtimeSinceStartup - currentActivityTimer > 26f) { currentActivityTimer = Time.realtimeSinceStartup; activityTimerOffset = Random.Range(-6f, 6f); pathingTowardsNearestPlayer = true; } } else { pathingTowardsNearestPlayer = false; if (lonelinessMeter >= 0.99f && !babyCrying) { SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); } if (babyCrying) { if (sittingDown) { sittingDown = false; SetBabySittingServerRpc(sit: false); } } else { SitCycle(); } } if ((Object)(object)observingObject != (Object)null && !eatingScrap) { timeSpentObservingTimer += Time.deltaTime; if (timeSpentObservingTimer > 3f) { timeSpentObservingTimer = 0f; StopObserving(eatScrap: false); } } break; case 1: { if (previousBabyState != (int)babyState) { timeSpentObservingTimer = 0f; cantFindObservedObjectTimer = 0f; currentActivityTimer = Time.realtimeSinceStartup; eatingScrap = false; leapTimer = 0f; if (babyRunning) { babyRunning = false; SetBabyRunningServerRpc(setRunning: false); } previousBabyState = (int)babyState; } if (eatingScrap) { break; } BabyPlayerMemory val3 = null; if ((Object)(object)observingPlayer != (Object)null) { val3 = GetBabyMemoryOfPlayer(observingPlayer); } float num = 4.7f; if (Object.op_Implicit((Object)(object)observingScrap)) { num = 2f; } else if (Object.op_Implicit((Object)(object)observingPlayer) && val3 != null && val3.likeMeter < 0.25f && lonelinessMeter < 0.75f) { num = 6.7f; } float num2 = Vector3.Distance(((Component)this).transform.position, observingObject.transform.position); if (num - num2 > 1.5f) { Ray val4 = default(Ray); ((Ray)(ref val4))..ctor(((Component)this).transform.position, ((Component)this).transform.position + Vector3.up * 0.2f - observingObject.transform.position + Vector3.up * 0.2f); ((Ray)(ref val4)).direction = new Vector3(((Ray)(ref val4)).direction.x, 0f, ((Ray)(ref val4)).direction.z); Debug.DrawRay(((Component)this).transform.position, ((Ray)(ref val4)).direction, Color.cyan); Vector3 val5 = ((!Physics.Raycast(val4, ref hit, 10f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) ? ((Ray)(ref val4)).GetPoint(10f) : ((RaycastHit)(ref hit)).point); if (val3 != null && val3.likeMeter < 0.25f) { val3.likeMeter = Mathf.Max(val3.likeMeter - base.AIIntervalTime * 0.2f, -0.5f); stressMeter = Mathf.Min(stressMeter + base.AIIntervalTime, 1f); if (stressMeter > 1f) { stressMeter = 0f; val3.likeMeter = -0.2f; ScareBaby(observingObject.transform.position); } } if (sittingDown) { sittingDown = false; SetBabySittingServerRpc(sit: false); } val5 = RoundManager.Instance.GetNavMeshPosition(val5, default(NavMeshHit), 6f, -1); base.agent.speed = 4.6f; ((EnemyAI)this).SetDestinationToPosition(val5, false); } else if (num2 > num) { if (sittingDown) { sittingDown = false; SetBabySittingServerRpc(sit: false); } base.agent.speed = 4.2f; ((EnemyAI)this).SetDestinationToPosition(observingObject.transform.position, false); } else { SitCycle(); base.agent.speed = 0f; } if ((Object)(object)observingPlayer != (Object)null) { timeSpentObservingTimer += Time.deltaTime; if (lonelinessMeter < babyRoamFromPlayersThreshold && timeSpentObservingTimer > 6f) { babyState = (BabyState)0; } } else { timeSpentObservingTimer += Time.deltaTime; if (timeSpentObservingTimer > 12f || lonelinessMeter > 0.88f) { babyState = (BabyState)0; } } break; } case 3: if (previousBabyState != (int)babyState) { currentActivityTimer = Time.realtimeSinceStartup; farthestNodeFromRunningSpot = null; stressMeter = 0f; if (Object.op_Implicit((Object)(object)observingObject)) { StopObserving(eatScrap: false); } eatingScrap = false; if (sittingDown) { sittingDown = false; SetBabySittingServerRpc(sit: false); } babyRunning = true; previousBabyState = (int)babyState; } if (gettingFarthestNodeFromSpotAsync && (Object)(object)farthestNodeFromRunningSpot == (Object)null) { Transform val2 = ((EnemyAI)this).ChooseFarthestNodeFromPosition(runningFromPosition, false, 0, true, 50, 60); if (base.gotFarthestNodeAsync) { farthestNodeFromRunningSpot = val2; gettingFarthestNodeFromSpotAsync = false; } } break; case 2: if (previousBabyState != (int)babyState) { currentActivityTimer = Time.realtimeSinceStartup; farthestNodeFromRunningSpot = null; stressMeter = 0f; if (Object.op_Implicit((Object)(object)observingObject)) { StopObserving(eatScrap: false); } eatingScrap = false; previousBabyState = (int)babyState; } break; } return; } BabyPlayerMemory babyMemoryOfPlayer3 = GetBabyMemoryOfPlayer(playerHolding); if (babySearchRoutine.inProgress) { ((EnemyAI)this).StopSearch(babySearchRoutine, true); } if (!babyCrying) { if (babyMemoryOfPlayer3.likeMeter < 0.1f) { lonelinessMeter = Mathf.Max(0f, lonelinessMeter - Time.deltaTime * 0.025f); } else { lonelinessMeter = 0.75f; } if (lonelinessMeter < babyCrySquirmingThreshold) { stopCryingWhenReleased = true; SetCryingLocalClient(setCrying: true); SetBabyCryingServerRpc(setCry: true); } else if (!babySquirming && lonelinessMeter < babyRoamFromPlayersThreshold) { babySquirming = true; SetBabySquirmingServerRpc(setSquirm: true); } } } private Vector3 GetCavePosition(Random randomSeed) { //IL_0015: 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_0107: 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_0085: 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_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) GameObject[] allCaveNodes = RoundManager.Instance.allCaveNodes; if (allCaveNodes == null || allCaveNodes.Length == 0) { return ((EnemyAI)this).ChooseFarthestNodeFromPosition(RoundManager.FindMainEntrancePosition(false, false), false, randomSeed.Next(0, Mathf.Min(base.allAINodes.Length, 40)), false, 50, -1).position; } List list = allCaveNodes.ToList(); Transform transform = list[0].transform; for (int i = 0; i < 15; i++) { if (list.Count == 0) { break; } int index = randomSeed.Next(0, list.Count); transform = list[index].transform; if (!((EnemyAI)this).PathIsIntersectedByLineOfSight(transform.position, false, false, false)) { return transform.position; } list.Remove(list[index]); for (int num = list.Count - 1; num >= 0; num--) { if (Vector3.Distance(list[num].transform.position, transform.position) < 30f) { list.Remove(list[num]); } } } return ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 0).position; } [ServerRpc(RequireOwnership = false)] public void SyncCaveHidingSpotServerRpc(Vector3 setHidingSpot) { //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_00d4: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3078820336u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setHidingSpot); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3078820336u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncCaveHidingSpotClientRpc(setHidingSpot); } } } [ClientRpc] public void SyncCaveHidingSpotClientRpc(Vector3 setHidingSpot) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2025883453u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setHidingSpot); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2025883453u, val2, (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) { caveHidingSpot = setHidingSpot; } } } public override void Start() { //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_0050: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); currentSearchWidth = baseSearchWidth; base.nodesTempArray = base.allAINodes.ToArray(); if (((NetworkBehaviour)this).IsServer) { Random randomSeed = new Random(StartOfRound.Instance.randomMapSeed + 249); caveHidingSpot = GetCavePosition(randomSeed); SyncCaveHidingSpotServerRpc(caveHidingSpot); } InitializeBabyValues(); } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); if (!(leapTimer < 0.02f) && base.currentBehaviourStateIndex == 3 && !base.isEnemyDead) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, inKillAnimation || startingKillAnimationLocalClient, false); if ((Object)(object)val != (Object)null) { KillPlayerAnimationServerRpc((int)val.playerClientId); startingKillAnimationLocalClient = true; } } } [ServerRpc(RequireOwnership = false)] public void KillPlayerAnimationServerRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1027934819u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1027934819u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!inKillAnimation) { inKillAnimation = true; KillPlayerAnimationClientRpc(playerObjectId); } else { CancelKillAnimationClientRpc(playerObjectId); } } } [ClientRpc] public void CancelKillAnimationClientRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1194338074u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1194338074u, val2, (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 == playerObjectId) { startingKillAnimationLocalClient = false; } } } [ClientRpc] public void KillPlayerAnimationClientRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1620567830u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1620567830u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerObjectId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isInsideFactory) { FinishKillAnimation(completed: false); } if (base.currentBehaviourStateIndex == 3) { chasingAfterLeap = true; ((RigConstraint>)(object)headRig).weight = 0f; leaping = false; screaming = false; screamTimer = screamTime; base.creatureAnimator.SetBool("Leaping", false); base.creatureAnimator.SetBool("Screaming", false); startedLeapingThisFrame = false; } if ((Object)(object)val3 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { val3.KillPlayer(Vector3.zero, true, (CauseOfDeath)6, 0, default(Vector3), false); startingKillAnimationLocalClient = false; } if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 0f; } inKillAnimation = true; base.creatureAnimator.SetBool("killing", true); if (killAnimationCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killAnimationCoroutine); } killAnimationCoroutine = ((MonoBehaviour)this).StartCoroutine(killAnimation(val3)); } } private IEnumerator killAnimation(PlayerControllerB killingPlayer) { float timeAtStart = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => Time.realtimeSinceStartup - timeAtStart > 2f || (Object)(object)killingPlayer.deadBody != (Object)null)); if ((Object)(object)killingPlayer.deadBody != (Object)null) { GrabBody(killingPlayer.deadBody); yield return (object)new WaitForSeconds(0.5f); killPlayerParticle1.Play(); if (Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position) < 10f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } yield return (object)new WaitForSeconds(1.5f); killPlayerParticle2.Play(); if (Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position) < 10f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } yield return (object)new WaitForSeconds(0.25f); FinishKillAnimation(completed: true); } else { FinishKillAnimation(completed: false); } } private void GrabBody(DeadBodyInfo body) { bodyBeingCarried = body; bodyBeingCarried.attachedTo = bodyRagdollPoint; bodyBeingCarried.attachedLimb = bodyBeingCarried.bodyParts[5]; bodyBeingCarried.matchPositionExactly = false; } private void DropBody() { if ((Object)(object)bodyBeingCarried != (Object)null) { bodyBeingCarried.attachedTo = null; bodyBeingCarried.attachedLimb = null; bodyBeingCarried.matchPositionExactly = false; bodyBeingCarried = null; } } public void FinishKillAnimation(bool completed) { inKillAnimation = false; base.inSpecialAnimation = false; base.creatureAnimator.SetBool("killing", false); ((RigConstraint>)(object)headRig).weight = 1f; DropBody(); } private void CalculateAnimationDirection(float maxSpeed = 1f) { //IL_0021: 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_0114: 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) if (checkMovingInterval <= 0f) { checkMovingInterval = 0.1f; bool flag = Vector3.Distance(((Component)this).transform.position, previousPosition) > 0.06f; if (base.currentBehaviourStateIndex == 0) { babyCreatureAnimator.SetBool("moving", flag); } else { base.creatureAnimator.SetBool("moving", flag); if (flag && !leaping) { walkingAudio.volume = Mathf.Lerp(walkingAudio.volume, 1f, 5f * Time.deltaTime); if (!walkingAudio.isPlaying) { walkingAudio.Play(); } } else { if (walkingAudio.isPlaying && walkingAudio.volume <= 0.05f) { walkingAudio.Pause(); } walkingAudio.volume = Mathf.Lerp(walkingAudio.volume, 0f, 5f * Time.deltaTime); } } previousPosition = ((Component)this).transform.position; } else { checkMovingInterval -= Time.deltaTime; } } public override void Update() { //IL_008c: 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_0065: 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_0192: 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_0224: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (inKillAnimation || base.isEnemyDead || StartOfRound.Instance.livingPlayers == 0) { return; } CalculateAnimationDirection(1.6f); SetClickingAudioVolume(); if (!((NetworkBehaviour)this).IsOwner && ((!holdingBaby && dropBabyCoroutine == null) || base.currentBehaviourStateIndex != 0)) { ((Component)this).transform.localEulerAngles = new Vector3(0f, ((Component)this).transform.localEulerAngles.y, 0f); } if (wasOutsideLastFrame && ((Component)this).transform.position.y < -80f) { wasOutsideLastFrame = false; ((EnemyAI)this).SetEnemyOutside(false); } else if (!wasOutsideLastFrame && ((Component)this).transform.position.y > -80f) { wasOutsideLastFrame = true; ((EnemyAI)this).SetEnemyOutside(true); } if (base.currentBehaviourStateIndex == 0) { if (((NetworkBehaviour)this).IsServer && (holdingBaby || rolledOver)) { if (babySearchRoutine.inProgress) { ((EnemyAI)this).StopSearch(babySearchRoutine, true); } base.agent.speed = 0f; } BabyUpdate(); return; } if (((NetworkBehaviour)this).IsServer) { if (changeOwnershipInterval <= 0f) { changeOwnershipInterval = 0.3f; PlayerControllerB targetPlayer = base.targetPlayer; base.targetPlayer = null; float num = 4f; base.mostOptimalDistance = 2000f; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true)) { base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position); if (base.tempDist < base.mostOptimalDistance) { base.mostOptimalDistance = base.tempDist; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i]; } } } if ((Object)(object)base.targetPlayer != (Object)null && num > 0f && (Object)(object)targetPlayer != (Object)null && Mathf.Abs(base.mostOptimalDistance - Vector3.Distance(((Component)this).transform.position, ((Component)targetPlayer).transform.position)) < num) { base.targetPlayer = targetPlayer; } if ((Object)(object)base.targetPlayer != (Object)null && !inKillAnimation && base.targetPlayer.actualClientId != ((NetworkBehaviour)this).NetworkObject.OwnerClientId && (chasingAfterLeap || base.currentBehaviourStateIndex != 3)) { ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); return; } } else { changeOwnershipInterval -= Time.deltaTime; } } DoNonBabyUpdateLogic(); } public override void DoAIInterval() { ((EnemyAI)this).DoAIInterval(); if (inKillAnimation || base.isEnemyDead || base.inSpecialAnimation) { return; } if (StartOfRound.Instance.livingPlayers == 0) { ((EnemyAI)this).DoAIInterval(); } else if (base.currentBehaviourStateIndex == 0) { if (((NetworkBehaviour)this).IsServer) { DoBabyAIInterval(); } } else { DoAIIntervalChaseLogic(); } } private void TransformIntoAdult() { if (((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); TurnIntoAdultServerRpc(); StartTransformationAnim(); } } [ServerRpc(RequireOwnership = false)] public void TurnIntoAdultServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(432071377u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 432071377u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TurnIntoAdultClientRpc(); } } } [ClientRpc] public void TurnIntoAdultClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(806683873u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 806683873u, val2, (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) { ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); StartTransformationAnim(); } } } private void StartTransformationAnim() { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_0186: 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_01af: 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_01bc: 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_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: 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_0202: 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_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0205: 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_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_0232: 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_025b: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: 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_02ab: Unknown result type (might be due to invalid IL or missing references) base.agent.acceleration = 425f; base.agent.angularSpeed = 700f; base.syncMovementSpeed = 0.15f; base.addPlayerVelocityToDestination = 1f; base.updatePositionThreshold = 0.8f; ((GrabbableObject)propScript).EnablePhysics(false); ((GrabbableObject)propScript).grabbable = false; ((GrabbableObject)propScript).grabbableToEnemies = false; ((Behaviour)propScript).enabled = false; if ((Object)(object)((GrabbableObject)propScript).playerHeldBy != (Object)null && (Object)(object)((GrabbableObject)propScript).playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((GrabbableObject)propScript).playerHeldBy.DropAllHeldItemsAndSync(((Component)((GrabbableObject)propScript).playerHeldBy).transform.position, ((GrabbableObject)propScript).playerHeldBy.localItemHolder.position, ((GrabbableObject)propScript).playerHeldBy.localItemHolder.eulerAngles, ((Component)((GrabbableObject)propScript).playerHeldBy.playerEye).transform.position, ((Component)((GrabbableObject)propScript).playerHeldBy.playerEye).transform.eulerAngles); } if (dropBabyCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dropBabyCoroutine); } if (babySearchRoutine.inProgress) { ((EnemyAI)this).StopSearch(babySearchRoutine, true); } Vector3 position = ((Component)this).transform.position; inTransformingAnimation = true; base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; bool inMovingElevator = false; if (!((EnemyAI)this).IsInsideMineshaftElevator(((Component)this).transform.position) || RoundManager.Instance.currentMineshaftElevator.elevatorFinishedMoving) { Vector3 val = (base.serverPosition = RoundManager.Instance.GetNavMeshPosition(position, default(NavMeshHit), 10f, -1)); ((Component)this).transform.position = val; ((Component)this).transform.localEulerAngles = new Vector3(0f, ((Component)this).transform.localEulerAngles.y, 0f); position = val; Debug.DrawRay(val, Vector3.up * 2f, Color.magenta, 7f); } else { inMovingElevator = true; Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(((Component)this).transform.position.x, RoundManager.Instance.currentMineshaftElevator.elevatorInsidePoint.position.y, ((Component)this).transform.position.z); ((Component)this).transform.localEulerAngles = new Vector3(0f, ((Component)this).transform.localEulerAngles.y, 0f); base.serverPosition = val2; ((Component)this).transform.position = val2; position = val2; } ((MonoBehaviour)this).StartCoroutine(becomeAdultAnimation(position, inMovingElevator)); } private IEnumerator becomeAdultAnimation(Vector3 setToPos, bool inMovingElevator = false) { //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) base.creatureSFX.volume = 1f; base.creatureSFX.PlayOneShot(transformationSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, transformationSFX, 1f); babyCreatureAnimator.SetBool("Transform", true); yield return (object)new WaitForSeconds(0.5f); babyContainer.SetActive(false); adultContainer.SetActive(true); yield return (object)new WaitForSeconds(1.7f); base.inSpecialAnimation = false; inTransformingAnimation = false; if (base.isOutside) { leapSpeed += 8f; } if (((NetworkBehaviour)this).IsOwner) { if (inMovingElevator) { setToPos.y = RoundManager.Instance.currentMineshaftElevator.elevatorInsidePoint.position.y; } ((Component)this).transform.position = setToPos; ((Behaviour)base.agent).enabled = true; } Debug.DrawRay(setToPos, Vector3.up * 2f, Color.magenta, 7f); } [ServerRpc(RequireOwnership = false)] public void SetFakingBabyVoiceServerRpc(bool fakingBabyVoice) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3808249388u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref fakingBabyVoice, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3808249388u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetFakingBabyVoiceClientRpc(fakingBabyVoice); } } } [ClientRpc] public void SetFakingBabyVoiceClientRpc(bool faking) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3379771028u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref faking, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3379771028u, val2, (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) { isFakingBabyVoice = faking; } } } private void DoNonBabyUpdateLogic() { //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_008d: 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_0542: 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_00e8: 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_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_014d: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_034e: 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_0333: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06de: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: 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_03f1: 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_076c: Unknown result type (might be due to invalid IL or missing references) //IL_06f5: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) if (!base.isEnemyDead && GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.5f, 100f, 30, 3f, -1)) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.7f, true); } if (((NetworkBehaviour)this).IsOwner && Time.realtimeSinceStartup - checkIfTrappedInterval > 15f) { checkIfTrappedInterval = Time.realtimeSinceStartup; if ((Object)(object)((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 0) == (Object)(object)base.nodesTempArray[0].transform && ((EnemyAI)this).PathIsIntersectedByLineOfSight(base.nodesTempArray[0].transform.position, false, false, false)) { 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 * 1.3f, 100f, 70, 12f, -1)) { flag = true; break; } } if (!flag) { ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = RoundManager.Instance.GetNavMeshPosition(ChooseClosestNodeToPositionNoPathCheck(((Component)this).transform.position).position, default(NavMeshHit), 5f, -1); return; } } } switch (base.currentBehaviourStateIndex) { case 1: if (base.currentBehaviourStateIndex != previousBehaviourState) { screamTimer = screamTime; base.creatureAnimator.SetBool("Screaming", false); base.creatureAnimator.SetBool("Leaping", false); base.creatureAnimator.SetBool("FinishedLeaping", false); base.useSecondaryAudiosOnAnimatedObjects = false; base.openDoorSpeedMultiplier = 1f; beganCooldown = true; screaming = false; leaping = false; chasingAfterLeap = false; ((RigConstraint>)(object)headRig).weight = 0f; previousBehaviourState = base.currentBehaviourStateIndex; } base.agent.speed = 6f; break; case 2: { if (base.currentBehaviourStateIndex != previousBehaviourState) { screamTimer = screamTime; ignoredNodes.Clear(); base.creatureAnimator.SetBool("Screaming", false); base.creatureAnimator.SetBool("Leaping", false); base.creatureAnimator.SetBool("FinishedLeaping", false); base.useSecondaryAudiosOnAnimatedObjects = false; base.openDoorSpeedMultiplier = 1f; beganCooldown = true; screaming = false; leaping = false; chasingAfterLeap = false; ((RigConstraint>)(object)headRig).weight = 0f; previousBehaviourState = base.currentBehaviourStateIndex; } if (!((NetworkBehaviour)this).IsOwner || (Object)(object)base.targetNode == (Object)null) { break; } bool flag2 = IsBodyVisibleToTarget(); if (!flag2 && (Object)(object)base.targetNode != (Object)null) { if (wasBodyVisible) { wasBodyVisible = false; positionAtLeavingLOS = ((Component)this).transform.position; } if (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetNode).transform.position) < 1f) { base.agent.speed = 0f; } else { base.agent.speed = sneakSpeed; } } else if (flag2) { if (!wasBodyVisible) { wasBodyVisible = true; } base.agent.speed = sneakSpeed + 4f; } else { base.agent.speed = sneakSpeed; } if (!wasBodyVisible && Vector3.Distance(((Component)this).transform.position, positionAtLeavingLOS) > 7f) { Debug.DrawRay(positionAtLeavingLOS, Vector3.up, Color.yellow, 0.7f); ignoredNodes.Clear(); } if (Vector3.Distance(((Component)this).transform.position, ((Component)base.targetNode).transform.position) < 0.5f && flag2 && !ignoredNodes.Contains(base.targetNode)) { if (ignoredNodes.Count < 16) { ignoredNodes.Add(base.targetNode); break; } ignoredNodes.RemoveAt(0); ignoredNodes.Add(base.targetNode); } break; } case 3: if (base.currentBehaviourStateIndex != previousBehaviourState) { if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } base.useSecondaryAudiosOnAnimatedObjects = true; base.openDoorSpeedMultiplier = 1.5f; currentSearchWidth = Mathf.Max(currentSearchWidth - 35f, baseSearchWidth); startedLeapingThisFrame = false; ((RigConstraint>)(object)headRig).weight = 0f; previousBehaviourState = base.currentBehaviourStateIndex; } if (leaping && leapTimer > 0.1f) { if (shakeCameraInterval <= 0f && Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) < 12f) { shakeCameraInterval = 0.05f; HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else { shakeCameraInterval -= Time.deltaTime; } } if (!((NetworkBehaviour)this).IsOwner) { screaming = false; startedLeapingThisFrame = false; leapTimer = Mathf.Max(leapTimer - Time.deltaTime, 0f); if (leapTimer <= 0f && !beganCooldown) { beganCooldown = true; base.creatureVoice.PlayOneShot(cooldownSFX); base.creatureAnimator.SetBool("FinishedLeaping", true); } if (base.stunNormalizedTimer > 0f) { leapTimer = 0f; } if (leaping && leapTimer <= 0f) { leaping = false; base.creatureAnimator.SetBool("Leaping", false); base.creatureAnimator.SetBool("Screaming", false); } screamTimer -= Time.deltaTime; } else { if ((Object)(object)base.targetPlayer == (Object)null) { break; } float num = 15f; if (base.isOutside) { num = 35f; } if (chasingAfterLeap) { if (Physics.Linecast(((Component)base.targetPlayer.gameplayCamera).transform.position, ((Component)this).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && (Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) > num || (!base.isOutside && Vector3.Distance(caveHidingSpot, ((Component)this).transform.position) > base.currentSearch.searchWidth + 30f))) { ((EnemyAI)this).SwitchToBehaviourState(2); break; } base.agent.speed = chaseSpeed; float num2 = attackDistance - 3f; if (base.isOutside) { num2 += 18f; } if (Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position) < num2) { chasingAfterLeap = false; } break; } if (!screaming) { ((RigConstraint>)(object)headRig).weight = 0f; beganCooldown = false; base.creatureAnimator.SetBool("Screaming", true); base.creatureAnimator.SetBool("FinishedLeaping", false); screaming = true; base.agent.speed = 0f; isFakingBabyVoice = false; base.creatureVoice.PlayOneShot(growlSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, growlSFX, 1f); DoScreamServerRpc(); } if (leaping) { leapTimer -= Time.deltaTime; if (!startedLeapingThisFrame) { startedLeapingThisFrame = true; base.creatureAnimator.SetBool("Leaping", true); float pitch = Random.Range(0.95f, 1.05f); screamAudio.pitch = pitch; screamAudio.Play(); screamAudioNonDiagetic.pitch = pitch; screamAudioNonDiagetic.Play(); leapTimer = leapTime; DoLeapServerRpc(); } if (base.stunNormalizedTimer > 0f) { leapTimer = 0f; } else { base.agent.speed = leapSpeed; } if (leapTimer <= 0f) { base.agent.speed = 0f; screamTimer += Time.deltaTime; if (screamTimer > cooldownTime) { chasingAfterLeap = true; ((RigConstraint>)(object)headRig).weight = 1f; leaping = false; screaming = false; screamTimer = screamTime; base.creatureAnimator.SetBool("Leaping", false); base.creatureAnimator.SetBool("Screaming", false); base.creatureAnimator.SetBool("FinishedLeaping", false); startedLeapingThisFrame = false; FinishLeapServerRpc(); } else if (!beganCooldown) { beganCooldown = true; base.creatureVoice.PlayOneShot(cooldownSFX); base.creatureAnimator.SetBool("FinishedLeaping", true); } } else { base.agent.speed = leapSpeed; } } else { screamTimer -= Time.deltaTime; if (screamTimer <= 0f) { leaping = true; break; } base.agent.speed = 0f; LookAtTargetPlayer(); } } break; } } private void LookAtTargetPlayer() { //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_002a: 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_005d: 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_007e: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)base.targetPlayer == (Object)null)) { Vector3 position = ((Component)base.targetPlayer).transform.position; position.y = ((Component)this).transform.position.y; RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, RoundManager.Instance.tempTransform.rotation, 14f * Time.deltaTime); } } private void DoAIIntervalChaseLogic() { //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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_01f8: 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_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_023c: 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_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_02db: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: 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_02ef: Unknown result type (might be due to invalid IL or missing references) if (base.inSpecialAnimation || inKillAnimation) { return; } bool flag = ((EnemyAI)this).TargetClosestPlayer(4f, false, 70f, false, false, true); if (base.currentBehaviourStateIndex == 3) { if (searchRoutine.inProgress) { ((EnemyAI)this).StopSearch(searchRoutine, true); } if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { noPlayersTimer = 0f; ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } else if (noPlayersTimer > 2.5f) { ((EnemyAI)this).SwitchToBehaviourState(1); } else { noPlayersTimer += base.AIIntervalTime; } return; } fakeCryTimer -= base.AIIntervalTime; if (isFakingBabyVoice) { if (fakeCryTimer <= 0f) { fakeCryTimer = Mathf.Max(Random.Range(-2f, 7f), 4.2f); clickingMandibles = false; int num = Random.Range(0, fakeCrySFX.Length); DoFakeCryLocalClient(num); MakeFakeCryServerRpc(num); } } else if (fakeCryTimer <= 0f) { if (Random.Range(0, 100) < 65) { fakeCryTimer = 9f; clickingMandibles = true; SetClickingMandiblesServerRpc(); } else { isFakingBabyVoice = true; SetFakingBabyVoiceServerRpc(fakingBabyVoice: true); } } if (!flag) { if (noPlayersTimer > 2.5f) { RoamAroundCaveSpot(gotTarget: false); } else { noPlayersTimer += base.AIIntervalTime; } return; } noPlayersTimer = 0f; float num2 = ((!base.isOutside) ? Vector3.Distance(((Component)base.targetPlayer).transform.position, caveHidingSpot) : Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position)); float num3 = attackDistance; if (base.isOutside) { num3 += 16f; } float num4 = Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position); if ((num4 < num3 && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.25f, ((Component)base.targetPlayer).transform.position + Vector3.up * 0.25f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) || num4 < 4.5f) { ((EnemyAI)this).SwitchToBehaviourState(3); } else if (pursuingPlayerInSneakMode) { if (num2 > searchRoutine.searchWidth + 30f) { pursuingPlayerInSneakMode = false; } if (searchRoutine.inProgress) { ((EnemyAI)this).StopSearch(searchRoutine, true); } if (base.currentBehaviourStateIndex == 1) { ((EnemyAI)this).SwitchToBehaviourState(2); } if (isFakingBabyVoice && base.targetPlayer.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.75f, 90f, 20, 2f, -1)) { isFakingBabyVoice = false; fakeCryTimer = 18f; SetFakingBabyVoiceServerRpc(fakingBabyVoice: false); if (Random.Range(0, 100) < 30) { clickingMandibles = true; SetClickingMandiblesServerRpc(); } } ChooseClosestNodeToPlayer(); } else { if (num2 < searchRoutine.searchWidth + 15f) { pursuingPlayerInSneakMode = true; } RoamAroundCaveSpot(gotTarget: true); } } private void DoFakeCryLocalClient(int fakeCryIndex) { clickingMandibles = false; base.creatureVoice.PlayOneShot(fakeCrySFX[fakeCryIndex], 1f); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, fakeCrySFX[fakeCryIndex], 1f); } [ServerRpc(RequireOwnership = false)] public void MakeFakeCryServerRpc(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) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(229020816u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clipIndex); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 229020816u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; MakeFakeCryClientRpc(clipIndex); } } } [ClientRpc] public void MakeFakeCryClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3080001311u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clipIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3080001311u, val2, (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) { DoFakeCryLocalClient(clipIndex); } } } [ServerRpc(RequireOwnership = false)] public void SetClickingMandiblesServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2041676338u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2041676338u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetClickingMandiblesClientRpc(); } } } [ClientRpc] public void SetClickingMandiblesClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1044169379u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1044169379u, val2, (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) { clickingMandibles = true; fakeCryTimer = 9f; } } } private void RoamAroundCaveSpot(bool gotTarget, float distToTarget = -1f) { //IL_00f1: 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_00a4: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) if (base.currentBehaviourStateIndex == 2) { ((EnemyAI)this).SwitchToBehaviourState(1); } if (!gotTarget) { if (base.isOutside) { if (!searchRoutine.inProgress) { Transform val = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, Random.Range(0, base.allAINodes.Length / 2)); searchRoutine.searchPrecision = 16f; if ((Object)(object)val != (Object)null) { ((EnemyAI)this).StartSearch(val.position, searchRoutine); } currentSearchWidth = 200f; } } else { if (searchRoutine.inProgress) { ((EnemyAI)this).StopSearch(searchRoutine, true); } ((EnemyAI)this).SetDestinationToPosition(caveHidingSpot, false); currentSearchWidth = Mathf.Max(currentSearchWidth - base.AIIntervalTime * 1.5f, baseSearchWidth); } return; } if (base.isOutside) { currentSearchWidth = 100f; } else if (currentSearchWidth - Vector3.Distance(caveHidingSpot, ((Component)base.targetPlayer).transform.position) < 16f) { currentSearchWidth = Mathf.Min(currentSearchWidth + base.AIIntervalTime * 1.7f, baseSearchWidth + 80f); } searchRoutine.searchWidth = currentSearchWidth; if (searchRoutine.inProgress) { return; } if (base.isOutside) { Transform val2 = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, Random.Range(0, base.allAINodes.Length / 2)); if ((Object)(object)val2 != (Object)null) { ((EnemyAI)this).StartSearch(val2.position, searchRoutine); } } else { ((EnemyAI)this).StartSearch(caveHidingSpot, searchRoutine); } } public void ChooseClosestNodeToPlayer() { //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_0037: 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) if ((Object)(object)base.targetNode == (Object)null) { base.targetNode = base.allAINodes[0].transform; } Transform val = ChooseClosestNodeToPositionNoLOS(((Component)base.targetPlayer).transform.position + Vector3.up, avoidLineOfSight: true); if ((Object)(object)val != (Object)null) { base.targetNode = val; } ((EnemyAI)this).SetDestinationToPosition(base.targetNode.position, false); } public Transform ChooseClosestNodeToPositionNoLOS(Vector3 pos, bool avoidLineOfSight = false, int offset = 0) { //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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_008f: 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_00c2: 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_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) //IL_00f4: 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_023b: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01c5: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) Array.Sort(base.nodesTempArray, delegate(GameObject a, GameObject b) { //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_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_0022: 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_0037: Unknown result type (might be due to invalid IL or missing references) Vector3 val = pos - a.transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; val = pos - b.transform.position; return sqrMagnitude.CompareTo(((Vector3)(ref val)).sqrMagnitude); }); Transform transform = base.nodesTempArray[0].transform; float num = Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position); bool flag = false; for (int num2 = 0; num2 < base.nodesTempArray.Length; num2++) { if (ignoredNodes.Contains(base.nodesTempArray[num2].transform) || Vector3.Distance(caveHidingSpot, base.nodesTempArray[num2].transform.position) > searchRoutine.searchWidth || Vector3.Distance(((Component)this).transform.position, base.nodesTempArray[num2].transform.position) > 40f || !Physics.Linecast(base.nodesTempArray[num2].transform.position + Vector3.up, pos, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { continue; } bool flag2 = !wasBodyVisible; if (((EnemyAI)this).PathIsIntersectedByLineOfSight(base.nodesTempArray[num2].transform.position, true, flag2, flag2) || (base.pathDistance > num + 16f && !wasBodyVisible)) { continue; } if (wasBodyVisible) { bool flag3 = false; for (int num3 = 1; num3 < base.path1.corners.Length; num3++) { if (Vector3.Distance(Vector3.Lerp(base.path1.corners[num3 - 1], base.path1.corners[num3], 0.5f), ((Component)base.targetPlayer).transform.position) < 8f || Vector3.Distance(base.path1.corners[num3], ((Component)base.targetPlayer).transform.position) < 8f || num - Vector3.Distance(base.path1.corners[num3], ((Component)base.targetPlayer).transform.position) > 4f) { flag3 = true; break; } } if (flag3) { continue; } } base.mostOptimalDistance = Vector3.Distance(pos, base.nodesTempArray[num2].transform.position); transform = base.nodesTempArray[num2].transform; if (offset == 0 || num2 >= base.nodesTempArray.Length - 1) { flag = true; break; } offset--; } if (!flag) { ignoredNodes.Clear(); return base.nodesTempArray[Mathf.Min(Random.Range(6, 15), base.nodesTempArray.Length)].transform; } return transform; } [ServerRpc(RequireOwnership = false)] public void FinishLeapServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2332938087u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2332938087u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; FinishLeapClientRpc(); } } } [ClientRpc] public void FinishLeapClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4268451845u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4268451845u, val2, (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.syncMovementSpeed = 0.2f; chasingAfterLeap = true; screaming = false; leaping = false; ((RigConstraint>)(object)headRig).weight = 1f; base.creatureAnimator.SetBool("Screaming", false); base.creatureAnimator.SetBool("Leaping", false); base.creatureAnimator.SetBool("FinishedLeaping", false); } } } [ServerRpc(RequireOwnership = false)] public void DoLeapServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2893697343u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2893697343u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoLeapClientRpc(); } } } [ClientRpc] public void DoLeapClientRpc() { //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_00f5: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1362115897u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1362115897u, val2, (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) { leaping = true; leapTimer = leapTime; base.syncMovementSpeed = 0.09f; if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 10f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(1f, true); } beganCooldown = false; base.creatureAnimator.SetBool("Leaping", true); base.creatureAnimator.SetBool("FinishedLeaping", false); float pitch = Random.Range(0.95f, 1.05f); screamAudio.pitch = pitch; base.creatureVoice.Stop(); screamAudio.Play(); screamAudioNonDiagetic.pitch = pitch; screamAudioNonDiagetic.Play(); WalkieTalkie.TransmitOneShotAudio(screamAudio, screamAudio.clip, 1f); } } [ServerRpc(RequireOwnership = false)] public void DoScreamServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(995778053u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 995778053u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DoScreamClientRpc(); } } } [ClientRpc] public void DoScreamClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4285515491u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4285515491u, val2, (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.syncMovementSpeed = 0.09f; beganCooldown = false; chasingAfterLeap = false; isFakingBabyVoice = false; fakeCryTimer = 18f; ((RigConstraint>)(object)headRig).weight = 0f; base.creatureVoice.Stop(); base.creatureVoice.PlayOneShot(growlSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, growlSFX, 1f); base.creatureAnimator.SetBool("Screaming", true); base.creatureAnimator.SetBool("FinishedLeaping", false); screaming = true; } } } public override void OnDestroy() { ((EnemyAI)this).OnDestroy(); } private void LateUpdate() { if (inTransformingAnimation) { ((EnemyAI)this).MoveWithMineshaftElevator(); } } private void SetClickingAudioVolume() { //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)StartOfRound.Instance.audioListener == (Object)null) { return; } bool flag = true; float diageticMasterVolume = 0f; if (base.currentBehaviourStateIndex == 0 || isFakingBabyVoice || (screaming && !leaping)) { clickingAudio1.volume = Mathf.Lerp(clickingAudio1.volume, 0f, Time.deltaTime * 5f); clickingAudio2.volume = Mathf.Lerp(clickingAudio2.volume, 0f, Time.deltaTime * 5f); diageticMasterVolume = 0f; flag = false; } else if (base.currentBehaviourStateIndex != 3 && clickingMandibles) { clickingAudio1.volume = Mathf.Lerp(clickingAudio1.volume, 1f, Time.deltaTime * 5f); clickingAudio2.volume = Mathf.Lerp(clickingAudio1.volume, 0f, Time.deltaTime * 5f); diageticMasterVolume = 0f; flag = false; } else if (chasingAfterLeap) { clickingAudio1.volume = Mathf.Lerp(clickingAudio1.volume, 1f, Time.deltaTime * 1.5f); clickingAudio2.volume = Mathf.Lerp(clickingAudio2.volume, 1f, Time.deltaTime * 1.5f); } else { clickingAudio1.volume = Mathf.Lerp(clickingAudio1.volume, 0f, Time.deltaTime * 1.5f); clickingAudio2.volume = Mathf.Lerp(clickingAudio2.volume, 0f, Time.deltaTime * 1.5f); } if (clickingAudio1.volume < 0.02f) { clickingAudio1.Stop(); } else if (!clickingAudio1.isPlaying) { clickingAudio1.Play(); } if (clickingAudio2.volume < 0.02f) { clickingAudio2.Stop(); } else if (!clickingAudio2.isPlaying) { clickingAudio2.Play(); } if (flag) { if (GameNetworkManager.Instance.localPlayerController.isPlayerDead) { CaveDwellerDeafenAmount = 0f; } else { float num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position); if (!leaping || leapTimer <= 0f) { maxDeafenAmount = -9f; } else if (leapTimer > 0.5f) { maxDeafenAmount = -20f; } else { maxDeafenAmount = -13f; } diageticMasterVolume = Mathf.Clamp((num - deafeningMinDistance) / (deafeningMaxDistance - deafeningMinDistance), 0f, 1f); diageticMasterVolume = Mathf.Abs(diageticMasterVolume - 1f) * maxDeafenAmount; diageticMasterVolume = Mathf.Clamp(diageticMasterVolume, maxDeafenAmount, 0f); } } SoundManager.Instance.SetDiageticMasterVolume(diageticMasterVolume); } 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 //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Expected O, but got Unknown //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1151246812u, new RpcReceiveHandler(__rpc_handler_1151246812), "SetBabyNearTransformingServerRpc"); ((NetworkBehaviour)this).__registerRpc(202758699u, new RpcReceiveHandler(__rpc_handler_202758699), "SetBabyNearTransformingClientRpc"); ((NetworkBehaviour)this).__registerRpc(1268841518u, new RpcReceiveHandler(__rpc_handler_1268841518), "PingAttentionServerRpc"); ((NetworkBehaviour)this).__registerRpc(2964508602u, new RpcReceiveHandler(__rpc_handler_2964508602), "PingAttentionClientRpc"); ((NetworkBehaviour)this).__registerRpc(3763635916u, new RpcReceiveHandler(__rpc_handler_3763635916), "ScareBabyServerRpc"); ((NetworkBehaviour)this).__registerRpc(4208672795u, new RpcReceiveHandler(__rpc_handler_4208672795), "ScareBabyClientRpc"); ((NetworkBehaviour)this).__registerRpc(219605984u, new RpcReceiveHandler(__rpc_handler_219605984), "SetBabySittingServerRpc"); ((NetworkBehaviour)this).__registerRpc(3096356676u, new RpcReceiveHandler(__rpc_handler_3096356676), "SetBabySittingClientRpc"); ((NetworkBehaviour)this).__registerRpc(1793251763u, new RpcReceiveHandler(__rpc_handler_1793251763), "SetBabyRolledOverServerRpc"); ((NetworkBehaviour)this).__registerRpc(2660405973u, new RpcReceiveHandler(__rpc_handler_2660405973), "SetBabyRolledOverClientRpc"); ((NetworkBehaviour)this).__registerRpc(1662911003u, new RpcReceiveHandler(__rpc_handler_1662911003), "SetBabyCryingServerRpc"); ((NetworkBehaviour)this).__registerRpc(1358960688u, new RpcReceiveHandler(__rpc_handler_1358960688), "SetBabyCryingClientRpc"); ((NetworkBehaviour)this).__registerRpc(928168988u, new RpcReceiveHandler(__rpc_handler_928168988), "SetBabyBServerRpc"); ((NetworkBehaviour)this).__registerRpc(3820054238u, new RpcReceiveHandler(__rpc_handler_3820054238), "SetBabyBClientRpc"); ((NetworkBehaviour)this).__registerRpc(717734443u, new RpcReceiveHandler(__rpc_handler_717734443), "SetBabyRunningServerRpc"); ((NetworkBehaviour)this).__registerRpc(2820995031u, new RpcReceiveHandler(__rpc_handler_2820995031), "SetBabyRunningClientRpc"); ((NetworkBehaviour)this).__registerRpc(1459662037u, new RpcReceiveHandler(__rpc_handler_1459662037), "SetBabySquirmingServerRpc"); ((NetworkBehaviour)this).__registerRpc(4060669687u, new RpcReceiveHandler(__rpc_handler_4060669687), "SetBabySquirmingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3524158905u, new RpcReceiveHandler(__rpc_handler_3524158905), "ClearBabyObservingServerRpc"); ((NetworkBehaviour)this).__registerRpc(167773896u, new RpcReceiveHandler(__rpc_handler_167773896), "ClearBabyObservingClientRpc"); ((NetworkBehaviour)this).__registerRpc(687891504u, new RpcReceiveHandler(__rpc_handler_687891504), "SetBabyObservingPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(4131295501u, new RpcReceiveHandler(__rpc_handler_4131295501), "SetBabyObservingPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(240324482u, new RpcReceiveHandler(__rpc_handler_240324482), "SetBabyObservingObjectServerRpc"); ((NetworkBehaviour)this).__registerRpc(2624838523u, new RpcReceiveHandler(__rpc_handler_2624838523), "SetBabyObservingObjectClientRpc"); ((NetworkBehaviour)this).__registerRpc(3078820336u, new RpcReceiveHandler(__rpc_handler_3078820336), "SyncCaveHidingSpotServerRpc"); ((NetworkBehaviour)this).__registerRpc(2025883453u, new RpcReceiveHandler(__rpc_handler_2025883453), "SyncCaveHidingSpotClientRpc"); ((NetworkBehaviour)this).__registerRpc(1027934819u, new RpcReceiveHandler(__rpc_handler_1027934819), "KillPlayerAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(1194338074u, new RpcReceiveHandler(__rpc_handler_1194338074), "CancelKillAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1620567830u, new RpcReceiveHandler(__rpc_handler_1620567830), "KillPlayerAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(432071377u, new RpcReceiveHandler(__rpc_handler_432071377), "TurnIntoAdultServerRpc"); ((NetworkBehaviour)this).__registerRpc(806683873u, new RpcReceiveHandler(__rpc_handler_806683873), "TurnIntoAdultClientRpc"); ((NetworkBehaviour)this).__registerRpc(3808249388u, new RpcReceiveHandler(__rpc_handler_3808249388), "SetFakingBabyVoiceServerRpc"); ((NetworkBehaviour)this).__registerRpc(3379771028u, new RpcReceiveHandler(__rpc_handler_3379771028), "SetFakingBabyVoiceClientRpc"); ((NetworkBehaviour)this).__registerRpc(229020816u, new RpcReceiveHandler(__rpc_handler_229020816), "MakeFakeCryServerRpc"); ((NetworkBehaviour)this).__registerRpc(3080001311u, new RpcReceiveHandler(__rpc_handler_3080001311), "MakeFakeCryClientRpc"); ((NetworkBehaviour)this).__registerRpc(2041676338u, new RpcReceiveHandler(__rpc_handler_2041676338), "SetClickingMandiblesServerRpc"); ((NetworkBehaviour)this).__registerRpc(1044169379u, new RpcReceiveHandler(__rpc_handler_1044169379), "SetClickingMandiblesClientRpc"); ((NetworkBehaviour)this).__registerRpc(2332938087u, new RpcReceiveHandler(__rpc_handler_2332938087), "FinishLeapServerRpc"); ((NetworkBehaviour)this).__registerRpc(4268451845u, new RpcReceiveHandler(__rpc_handler_4268451845), "FinishLeapClientRpc"); ((NetworkBehaviour)this).__registerRpc(2893697343u, new RpcReceiveHandler(__rpc_handler_2893697343), "DoLeapServerRpc"); ((NetworkBehaviour)this).__registerRpc(1362115897u, new RpcReceiveHandler(__rpc_handler_1362115897), "DoLeapClientRpc"); ((NetworkBehaviour)this).__registerRpc(995778053u, new RpcReceiveHandler(__rpc_handler_995778053), "DoScreamServerRpc"); ((NetworkBehaviour)this).__registerRpc(4285515491u, new RpcReceiveHandler(__rpc_handler_4285515491), "DoScreamClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1151246812(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; ((CustomManeaterAdult)(object)target).SetBabyNearTransformingServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_202758699(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; ((CustomManeaterAdult)(object)target).SetBabyNearTransformingClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1268841518(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_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) { float timeToLook = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref timeToLook, default(ForPrimitives)); Vector3 attentionPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref attentionPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).PingAttentionServerRpc(timeToLook, attentionPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2964508602(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_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) { float timeToLook = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref timeToLook, default(ForPrimitives)); Vector3 attentionPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref attentionPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).PingAttentionClientRpc(timeToLook, attentionPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3763635916(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; ((CustomManeaterAdult)(object)target).ScareBabyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4208672795(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; ((CustomManeaterAdult)(object)target).ScareBabyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_219605984(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 babySittingServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babySittingServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabySittingServerRpc(babySittingServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3096356676(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 babySittingClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babySittingClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabySittingClientRpc(babySittingClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1793251763(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_004a: 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_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); bool scared = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref scared, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyRolledOverServerRpc(flag, scared); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2660405973(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_004a: 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_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool setRolled = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setRolled, default(ForPrimitives)); bool scared = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref scared, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyRolledOverClientRpc(setRolled, scared); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1662911003(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 babyCryingServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babyCryingServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyCryingServerRpc(babyCryingServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1358960688(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 babyCryingClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babyCryingClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyCryingClientRpc(babyCryingClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_928168988(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; ((CustomManeaterAdult)(object)target).SetBabyBServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3820054238(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; ((CustomManeaterAdult)(object)target).SetBabyBClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_717734443(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 babyRunningServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babyRunningServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyRunningServerRpc(babyRunningServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2820995031(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 babyRunningClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babyRunningClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyRunningClientRpc(babyRunningClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1459662037(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 babySquirmingServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babySquirmingServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabySquirmingServerRpc(babySquirmingServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4060669687(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 babySquirmingClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babySquirmingClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabySquirmingClientRpc(babySquirmingClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3524158905(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 eatScrap = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref eatScrap, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).ClearBabyObservingServerRpc(eatScrap); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_167773896(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 eatScrap = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref eatScrap, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).ClearBabyObservingClientRpc(eatScrap); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_687891504(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setFocusLevel = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setFocusLevel); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyObservingPlayerServerRpc(playerId, setFocusLevel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4131295501(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setFocusLevel = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setFocusLevel); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyObservingPlayerClientRpc(playerId, setFocusLevel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_240324482(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_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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference babyObservingObjectServerRpc = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babyObservingObjectServerRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyObservingObjectServerRpc(babyObservingObjectServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2624838523(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_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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference babyObservingObjectClientRpc = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref babyObservingObjectClientRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetBabyObservingObjectClientRpc(babyObservingObjectClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3078820336(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 setHidingSpot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setHidingSpot); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SyncCaveHidingSpotServerRpc(setHidingSpot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2025883453(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 setHidingSpot = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setHidingSpot); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SyncCaveHidingSpotClientRpc(setHidingSpot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1027934819(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).KillPlayerAnimationServerRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1194338074(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).CancelKillAnimationClientRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1620567830(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).KillPlayerAnimationClientRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_432071377(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; ((CustomManeaterAdult)(object)target).TurnIntoAdultServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_806683873(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; ((CustomManeaterAdult)(object)target).TurnIntoAdultClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3808249388(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 fakingBabyVoiceServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref fakingBabyVoiceServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetFakingBabyVoiceServerRpc(fakingBabyVoiceServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3379771028(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 fakingBabyVoiceClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref fakingBabyVoiceClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((CustomManeaterAdult)(object)target).SetFakingBabyVoiceClientRpc(fakingBabyVoiceClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_229020816(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; ((CustomManeaterAdult)(object)target).MakeFakeCryServerRpc(clipIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3080001311(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; ((CustomManeaterAdult)(object)target).MakeFakeCryClientRpc(clipIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2041676338(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; ((CustomManeaterAdult)(object)target).SetClickingMandiblesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1044169379(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; ((CustomManeaterAdult)(object)target).SetClickingMandiblesClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2332938087(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; ((CustomManeaterAdult)(object)target).FinishLeapServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4268451845(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; ((CustomManeaterAdult)(object)target).FinishLeapClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2893697343(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; ((CustomManeaterAdult)(object)target).DoLeapServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1362115897(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; ((CustomManeaterAdult)(object)target).DoLeapClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_995778053(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; ((CustomManeaterAdult)(object)target).DoScreamServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4285515491(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; ((CustomManeaterAdult)(object)target).DoScreamClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "CustomManeaterAdult"; } } public class DarkLurkerAI : EnemyAI { private bool evadeModeStareDown; private bool stopTurningTowardsPlayers; public float evadeStealthTimer; private int stareDownChanceIncrease; public PlayerControllerB lookAtPlayer; private Transform localPlayerCamera; private RaycastHit rayHit; private Ray playerRay; public Transform turnCompass; private int roomAndEnemiesMask = 8915200; private Vector3 agentLocalVelocity; public Collider thisEnemyCollider; private Vector3 previousPosition; private float velX; private float velZ; [Header("Kill animation")] public bool inKillAnimation; private Coroutine killAnimationCoroutine; public bool carryingPlayerBody; public DeadBodyInfo bodyBeingCarried; public Transform rightHandGrip; public Transform animationContainer; private bool wasInEvadeMode; public List ignoredNodes = new List(); private Vector3 mainEntrancePosition; [Header("Anger phase")] public float angerMeter; public float angerCheckInterval; public bool isInAngerMode; public AudioSource creatureAngerVoice; public AudioSource crackNeckAudio; public AudioClip crackNeckSFX; public int timesThreatened; private Vector3 waitAroundEntrancePosition; private int timesFoundSneaking; private bool stunnedByPlayerLastFrame; private bool startingKillAnimationLocalClient; private float getPathToFavoriteNodeInterval; private bool gettingFarthestNodeFromPlayerAsync; private Transform farthestNodeFromTargetPlayer; [Header("Custom Stuff Dummy")] public float stareDownAngerAmount = 0.2f; public float evadeAngerAmount = 1.5f; public float stunnedAngerAmount; public float amountOfAngerInBrackenUponStun = 6f; public float carryBodyMinSpeed = 4f; public float carryBodyMaxSpeed = 9f; public float carryBodySpeedRampup = 7.25f; public float evadeSpeedRampup = 4.25f; public float evadeMinSpeed; public float evadeMaxSpeed = 6f; public float angerMeterDepletingRateBoost; public float regularAngularSpeed = 220f; public float carryBodyAngularSpeed = 50f; [Space(5f)] public int maxAsync = 50; public override void Start() { //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) ((EnemyAI)this).Start(); base.movingTowardsTargetPlayer = true; localPlayerCamera = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform; mainEntrancePosition = RoundManager.FindMainEntrancePosition(false, false); } public override void DoAIInterval() { //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_00f1: Unknown result type (might be due to invalid IL or missing references) if (StartOfRound.Instance.livingPlayers == 0) { ((EnemyAI)this).DoAIInterval(); return; } if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { if (base.currentBehaviourStateIndex == 2) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); if (!inKillAnimation && (Object)(object)base.targetPlayer != (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } ((EnemyAI)this).DoAIInterval(); return; } if (base.currentBehaviourStateIndex == 1) { if ((Object)(object)base.favoriteSpot != (Object)null && carryingPlayerBody) { if (base.mostOptimalDistance < 5f || ((EnemyAI)this).PathIsIntersectedByLineOfSight(base.favoriteSpot.position, false, true, false)) { AvoidClosestPlayer(); } else { base.targetNode = base.favoriteSpot; if (Time.realtimeSinceStartup - getPathToFavoriteNodeInterval > 1f) { ((EnemyAI)this).SetDestinationToPosition(base.favoriteSpot.position, true); getPathToFavoriteNodeInterval = Time.realtimeSinceStartup; } } } else { AvoidClosestPlayer(); } } else { ChooseClosestNodeToPlayer(); } } else { if (base.currentBehaviourStateIndex == 2) { ((EnemyAI)this).SetDestinationToPosition(waitAroundEntrancePosition, false); ((EnemyAI)this).DoAIInterval(); return; } Transform val = ((EnemyAI)this).ChooseFarthestNodeFromPosition(mainEntrancePosition, false, 0, false, 50, -1); if ((Object)(object)base.favoriteSpot == (Object)null) { base.favoriteSpot = val; } base.targetNode = val; ((EnemyAI)this).SetDestinationToPosition(val.position, true); } ((EnemyAI)this).DoAIInterval(); } public void AvoidClosestPlayer() { //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_0086: 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_005f: 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) if ((Object)(object)farthestNodeFromTargetPlayer == (Object)null) { gettingFarthestNodeFromPlayerAsync = true; return; } Transform val = farthestNodeFromTargetPlayer; farthestNodeFromTargetPlayer = null; float num = Vector3.Distance(((Component)val).transform.position, ((Component)this).transform.position); if ((Object)(object)val != (Object)null && num > 5f) { base.targetNode = val; ((EnemyAI)this).SetDestinationToPosition(base.targetNode.position, false); return; } if (carryingPlayerBody) { DropPlayerBody(); DropPlayerBodyServerRpc(); } if (!Physics.Linecast(((Component)val).transform.position, ((Component)base.targetPlayer.gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { AddToAngerMeter(stareDownAngerAmount); } base.agent.speed = 0f; base.destination = ((Component)this).transform.position; } public void AddToAngerMeter(float amountToAdd) { Debug.Log((object)$"Add to anger meter called! amount to add: {amountToAdd}; Time of day: {TimeOfDay.Instance.normalizedTimeOfDay}"); if (base.stunNormalizedTimer > 0f) { if ((Object)(object)base.stunnedByPlayer != (Object)null) { stunnedByPlayerLastFrame = true; angerMeter = 12f; } else { angerMeter = 2f; } return; } angerMeter += amountToAdd; if (angerMeter <= 0.4f) { return; } angerCheckInterval += amountToAdd; if (!(angerCheckInterval > 1f)) { return; } angerCheckInterval = 0f; float num = Mathf.Clamp(0.09f * angerMeter, 0f, 0.99f); if (Random.Range(0f, 1f) < num) { if (angerMeter < 2.5f) { timesThreatened++; } angerMeter += (float)timesThreatened / 1.75f; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); EnterAngerModeServerRpc(angerMeter); } } [ServerRpc] public void EnterAngerModeServerRpc(float angerTime) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4261562003u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref angerTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4261562003u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; EnterAngerModeClientRpc(angerTime); } } [ClientRpc] public void EnterAngerModeClientRpc(float angerTime) { //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) //IL_00f6: 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_0108: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3353532602u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref angerTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3353532602u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; angerMeter = angerTime; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); waitAroundEntrancePosition = RoundManager.Instance.GetRandomNavMeshPositionInRadius(mainEntrancePosition, 6f, default(NavMeshHit)); } } } public void ChooseClosestNodeToPlayer() { //IL_002d: 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_0060: 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_008e: 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 = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)base.targetPlayer).transform.position, true, 0); if ((Object)(object)val != (Object)null) { base.targetNode = val; } float num = Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position); if (num - base.mostOptimalDistance < 0.1f && (num < 4f || !((EnemyAI)this).PathIsIntersectedByLineOfSight(((Component)base.targetPlayer).transform.position, true, true, false))) { if (base.pathDistance > 10f && !ignoredNodes.Contains(base.targetNode) && ignoredNodes.Count < 4) { ignoredNodes.Add(base.targetNode); } base.movingTowardsTargetPlayer = true; } else { ((EnemyAI)this).SetDestinationToPosition(base.targetNode.position, false); } } public override void Update() { //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_00ef: 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_0124: 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) //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) //IL_06b5: 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_018c: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: 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_05f4: 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_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: 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_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_0727: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08bc: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: 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_093a: Unknown result type (might be due to invalid IL or missing references) //IL_08d8: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0509: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_051d: Unknown result type (might be due to invalid IL or missing references) //IL_053e: Unknown result type (might be due to invalid IL or missing references) //IL_0543: 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_035b: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead || inKillAnimation || (Object)(object)GameNetworkManager.Instance == (Object)null) { return; } if (((NetworkBehaviour)this).IsOwner && gettingFarthestNodeFromPlayerAsync && (Object)(object)base.targetPlayer != (Object)null) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position); if (num < 26f) { maxAsync = 80; } else if (num < 40f) { maxAsync = 35; } else { maxAsync = 4; } Transform val = ((EnemyAI)this).ChooseFarthestNodeFromPosition(((Component)base.targetPlayer).transform.position, true, 0, true, maxAsync, 90); if (!base.gotFarthestNodeAsync) { return; } farthestNodeFromTargetPlayer = val; gettingFarthestNodeFromPlayerAsync = false; } if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.5f, 30f, 60, -1f, -1)) { Debug.DrawLine(((Component)GameNetworkManager.Instance.localPlayerController.playerEye).transform.position, ((Component)this).transform.position, Color.yellow); if (base.currentBehaviourStateIndex == 0) { ((EnemyAI)this).SwitchToBehaviourState(1); if (!base.thisNetworkObject.IsOwner) { ((EnemyAI)this).ChangeOwnershipOfEnemy(GameNetworkManager.Instance.localPlayerController.actualClientId); } if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 5f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.6f, true); } else { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.3f, true); } base.agent.speed = 0f; evadeStealthTimer = 0f; } else if (evadeStealthTimer > 0.5f) { int playerObj = (int)GameNetworkManager.Instance.localPlayerController.playerClientId; LookAtFlowermanTrigger(playerObj); ResetFlowermanStealthTimerServerRpc(playerObj); } } Vector3 val2; switch (base.currentBehaviourStateIndex) { case 1: { if (isInAngerMode) { isInAngerMode = false; base.creatureAnimator.SetBool("anger", false); } if (!wasInEvadeMode) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 7f, 0.8f, 0, false, 0); wasInEvadeMode = true; base.movingTowardsTargetPlayer = false; if ((Object)(object)base.favoriteSpot != (Object)null && !carryingPlayerBody && Vector3.Distance(((Component)this).transform.position, base.favoriteSpot.position) < 7f) { base.favoriteSpot = null; } } if (base.stunNormalizedTimer > 0f) { base.creatureAnimator.SetLayerWeight(2, 1f); } else { base.creatureAnimator.SetLayerWeight(2, 0f); } evadeStealthTimer += Time.deltaTime; if (base.thisNetworkObject.IsOwner) { float num2 = ((timesFoundSneaking % 3 != 0) ? 11f : 24f); if ((Object)(object)base.favoriteSpot != (Object)null && carryingPlayerBody) { num2 = ((!(Vector3.Distance(((Component)this).transform.position, base.favoriteSpot.position) > 8f)) ? 3f : 24f); } if (evadeStealthTimer > num2) { evadeStealthTimer = 0f; ((EnemyAI)this).SwitchToBehaviourState(0); } if (!carryingPlayerBody && evadeModeStareDown && evadeStealthTimer < 1.25f) { AddToAngerMeter(Time.deltaTime * evadeAngerAmount); base.agent.speed = 0f; base.destination = ((Component)this).transform.position; } else { evadeModeStareDown = false; if (base.stunNormalizedTimer > 0f) { DropPlayerBody(); AddToAngerMeter(stunnedAngerAmount); base.agent.speed = 0f; base.destination = ((Component)this).transform.position; } else { if (stunnedByPlayerLastFrame) { stunnedByPlayerLastFrame = false; AddToAngerMeter(stunnedAngerAmount); } if (carryingPlayerBody) { base.agent.speed = Mathf.Clamp(base.agent.speed + Time.deltaTime * carryBodySpeedRampup, carryBodyMinSpeed, carryBodyMaxSpeed); } else { base.agent.speed = Mathf.Clamp(base.agent.speed + Time.deltaTime * evadeSpeedRampup, evadeMinSpeed, evadeMaxSpeed); } } } if (!carryingPlayerBody && base.ventAnimationFinished) { LookAtPlayerOfInterest(); } } if (!carryingPlayerBody) { CalculateAnimationDirection(); break; } Animator creatureAnimator2 = base.creatureAnimator; val2 = Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f); creatureAnimator2.SetFloat("speedMultiplier", ((Vector3)(ref val2)).sqrMagnitude / (Time.deltaTime * 2f)); previousPosition = ((Component)this).transform.position; break; } case 0: { if (isInAngerMode) { isInAngerMode = false; base.creatureAnimator.SetBool("anger", false); } if (wasInEvadeMode) { wasInEvadeMode = false; evadeStealthTimer = 0f; if (carryingPlayerBody) { DropPlayerBody(); ((Behaviour)base.agent).enabled = true; base.favoriteSpot = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, true, 0); if (!((NetworkBehaviour)this).IsOwner) { ((Behaviour)base.agent).enabled = false; } Debug.Log((object)"DarkLurker: Dropped player body"); } } Animator creatureAnimator = base.creatureAnimator; val2 = Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f); creatureAnimator.SetFloat("speedMultiplier", ((Vector3)(ref val2)).sqrMagnitude / (Time.deltaTime / 4f)); previousPosition = ((Component)this).transform.position; base.agent.speed = 6f; break; } case 2: { bool flag = false; if (!isInAngerMode) { isInAngerMode = true; DropPlayerBody(); creatureAngerVoice.Play(); creatureAngerVoice.pitch = Random.Range(0.9f, 1.3f); base.creatureAnimator.SetBool("anger", true); base.creatureAnimator.SetBool("sneak", false); if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position, 60f, 15, 2.5f, -1)) { flag = true; GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.5f, true); } } if (!flag && GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position, 60f, 13, 4f, -1)) { Debug.DrawLine(((Component)GameNetworkManager.Instance.localPlayerController.playerEye).transform.position, ((Component)this).transform.position, Color.green); GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 1f); } CalculateAnimationDirection(3f); if (base.stunNormalizedTimer > 0f) { base.creatureAnimator.SetLayerWeight(2, 1f); base.agent.speed = 0f; angerMeter = amountOfAngerInBrackenUponStun; Debug.Log((object)"DARKLURKER STUNNED!"); } else { base.creatureAnimator.SetLayerWeight(2, 0f); base.agent.speed = Mathf.Clamp(base.agent.speed + Time.deltaTime * 1.2f, 3f, 12f); Debug.Log((object)$"Increasing DarkLurker agent speed by {Time.deltaTime * 1.2f}; AGENT SPEED: {base.agent.speed}"); } angerMeter -= Time.deltaTime + angerMeterDepletingRateBoost; if (((NetworkBehaviour)this).IsOwner && angerMeter <= 0f) { ((EnemyAI)this).SwitchToBehaviourState(1); } break; } } if (isInAngerMode) { creatureAngerVoice.volume = Mathf.Lerp(creatureAngerVoice.volume, 1f, 10f * Time.deltaTime); } else { creatureAngerVoice.volume = Mathf.Lerp(creatureAngerVoice.volume, 0f, 2f * Time.deltaTime); } Vector3 localEulerAngles = animationContainer.localEulerAngles; if (carryingPlayerBody) { base.agent.angularSpeed = carryBodyAngularSpeed; localEulerAngles.z = Mathf.Lerp(localEulerAngles.z, 179f, 10f * Time.deltaTime); base.creatureAnimator.SetLayerWeight(1, Mathf.Lerp(base.creatureAnimator.GetLayerWeight(1), 1f, 10f * Time.deltaTime)); } else { base.agent.angularSpeed = regularAngularSpeed; localEulerAngles.z = Mathf.Lerp(localEulerAngles.z, 0f, 10f * Time.deltaTime); base.creatureAnimator.SetLayerWeight(1, Mathf.Lerp(base.creatureAnimator.GetLayerWeight(1), 0f, 10f * Time.deltaTime)); } animationContainer.localEulerAngles = localEulerAngles; } [ServerRpc] public void DropPlayerBodyServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(531995109u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 531995109u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropPlayerBodyClientRpc(); } } [ClientRpc] public void DropPlayerBodyClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(570514378u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 570514378u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropPlayerBody(); } } } private void DropPlayerBody() { if (carryingPlayerBody) { carryingPlayerBody = false; bodyBeingCarried.matchPositionExactly = false; bodyBeingCarried.attachedTo = null; bodyBeingCarried = null; base.creatureAnimator.SetBool("carryingBody", false); } } private void LookAtPlayerOfInterest() { //IL_0049: 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_006f: 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_0083: 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) if (isInAngerMode) { lookAtPlayer = base.targetPlayer; } else { lookAtPlayer = ((EnemyAI)this).GetClosestPlayer(false, false, false); } if ((Object)(object)lookAtPlayer != (Object)null) { turnCompass.LookAt(((Component)lookAtPlayer.gameplayCamera).transform.position); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(new Vector3(0f, turnCompass.eulerAngles.y, 0f)), 30f * Time.deltaTime); } } 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_00e2: 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) agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 2f)); velX = Mathf.Lerp(velX, agentLocalVelocity.x, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, 0f - agentLocalVelocity.y, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityZ", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); previousPosition = ((Component)this).transform.position; } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, inKillAnimation || startingKillAnimationLocalClient || carryingPlayerBody, false); if ((Object)(object)val != (Object)null) { KillPlayerAnimationServerRpc((int)val.playerClientId); startingKillAnimationLocalClient = true; } } [ServerRpc(RequireOwnership = false)] public void KillPlayerAnimationServerRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2342719778u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2342719778u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!inKillAnimation && !carryingPlayerBody) { inKillAnimation = true; base.inSpecialAnimation = true; base.isClientCalculatingAI = false; base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId]; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this; KillPlayerAnimationClientRpc(playerObjectId); } else { CancelKillAnimationClientRpc(playerObjectId); } } } [ClientRpc] public void CancelKillAnimationClientRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4108152899u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4108152899u, val2, (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 == playerObjectId) { startingKillAnimationLocalClient = false; } } } [ClientRpc] public void KillPlayerAnimationClientRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: 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_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: 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_0240: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2357429786u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2357429786u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId]; if ((Object)(object)base.inSpecialAnimationWithPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) { startingKillAnimationLocalClient = false; } if ((Object)(object)base.inSpecialAnimationWithPlayer == (Object)null || base.inSpecialAnimationWithPlayer.isPlayerDead || !base.inSpecialAnimationWithPlayer.isInsideFactory) { FinishKillAnimation(carryingBody: false); } base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this; inKillAnimation = true; base.inSpecialAnimation = true; base.creatureAnimator.SetBool("killing", true); ((Behaviour)base.agent).enabled = false; base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = true; base.inSpecialAnimationWithPlayer.snapToServerPosition = true; Vector3 val3 = ((!((NetworkBehaviour)base.inSpecialAnimationWithPlayer).IsOwner) ? ((Component)base.inSpecialAnimationWithPlayer).transform.parent.TransformPoint(base.inSpecialAnimationWithPlayer.serverPlayerPosition) : ((Component)base.inSpecialAnimationWithPlayer).transform.position); Vector3 position = ((Component)this).transform.position; position.y = ((Component)base.inSpecialAnimationWithPlayer).transform.position.y; playerRay = new Ray(val3, position - ((Component)base.inSpecialAnimationWithPlayer).transform.position); turnCompass.LookAt(val3); position = ((Component)this).transform.eulerAngles; position.y = turnCompass.eulerAngles.y; ((Component)this).transform.eulerAngles = position; if (killAnimationCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killAnimationCoroutine); } killAnimationCoroutine = ((MonoBehaviour)this).StartCoroutine(killAnimation()); } } private IEnumerator killAnimation() { WalkieTalkie.TransmitOneShotAudio(crackNeckAudio, crackNeckSFX, 1f); crackNeckAudio.PlayOneShot(crackNeckSFX); Vector3 endPosition = ((Ray)(ref playerRay)).GetPoint(1f); if (endPosition.y < -80f) { Vector3 startingPosition = ((Component)this).transform.position; for (int i = 0; i < 5; i++) { ((Component)this).transform.position = Vector3.Lerp(startingPosition, endPosition, (float)i / 5f); yield return null; } ((Component)this).transform.position = endPosition; } base.creatureAnimator.SetBool("killing", false); base.creatureAnimator.SetBool("carryingBody", true); yield return (object)new WaitForSeconds(0.65f); if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { base.inSpecialAnimationWithPlayer.KillPlayer(Vector3.zero, true, (CauseOfDeath)4, 0, default(Vector3), false); base.inSpecialAnimationWithPlayer.snapToServerPosition = false; float startTime = Time.timeSinceLevelLoad; yield return (object)new WaitUntil((Func)(() => (Object)(object)base.inSpecialAnimationWithPlayer.deadBody != (Object)null || Time.timeSinceLevelLoad - startTime > 2f)); } if ((Object)(object)base.inSpecialAnimationWithPlayer == (Object)null || (Object)(object)base.inSpecialAnimationWithPlayer.deadBody == (Object)null) { Debug.Log((object)"Flowerman: Player body was not spawned or found within 2 seconds."); FinishKillAnimation(carryingBody: false); } else { base.inSpecialAnimationWithPlayer.deadBody.bodyBleedingHeavily = true; FinishKillAnimation(); } } public void FinishKillAnimation(bool carryingBody = true) { //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_010e: 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_0117: 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_01a6: 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_0140: 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_0165: 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_0172: 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_019f: Unknown result type (might be due to invalid IL or missing references) if (killAnimationCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killAnimationCoroutine); } base.inSpecialAnimation = false; inKillAnimation = false; startingKillAnimationLocalClient = false; base.creatureAnimator.SetBool("killing", false); if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = false; base.inSpecialAnimationWithPlayer.snapToServerPosition = false; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = null; if (carryingBody) { bodyBeingCarried = base.inSpecialAnimationWithPlayer.deadBody; bodyBeingCarried.attachedTo = rightHandGrip; bodyBeingCarried.attachedLimb = base.inSpecialAnimationWithPlayer.deadBody.bodyParts[0]; bodyBeingCarried.matchPositionExactly = true; carryingPlayerBody = true; } } evadeStealthTimer = 0f; base.movingTowardsTargetPlayer = false; ignoredNodes.Clear(); if (!carryingBody) { base.creatureAnimator.SetBool("carryingBody", false); } if (((NetworkBehaviour)this).IsOwner) { Vector3 position = ((Component)this).transform.position; position = RoundManager.Instance.GetNavMeshPosition(position, default(NavMeshHit), 10f, -1); if (!RoundManager.Instance.GotNavMeshPositionResult) { RaycastHit val = default(RaycastHit); position = ((!Physics.Raycast(((Component)this).transform.position, -Vector3.up, ref val, 50f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) ? base.allAINodes[Random.Range(0, base.allAINodes.Length)].transform.position : RoundManager.Instance.GetNavMeshPosition(((RaycastHit)(ref val)).point, default(NavMeshHit), 10f, -1)); } ((Component)this).transform.position = position; ((Behaviour)base.agent).enabled = true; base.isClientCalculatingAI = true; } ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); if (((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).SwitchToBehaviourState(1); } } [ServerRpc(RequireOwnership = false)] public void ResetFlowermanStealthTimerServerRpc(int playerObj) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2361464299u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObj); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2361464299u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ResetFlowermanStealthClientRpc(playerObj); } } } [ClientRpc] public void ResetFlowermanStealthClientRpc(int playerObj) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2617973181u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObj); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2617973181u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (playerObj != (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { LookAtFlowermanTrigger(playerObj); } } } public void LookAtFlowermanTrigger(int playerObj) { //IL_0067: 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) if (!((NetworkBehaviour)this).IsOwner) { return; } if (!evadeModeStareDown) { if (Random.Range(0, 70) < stareDownChanceIncrease) { stareDownChanceIncrease = -6; evadeModeStareDown = true; } else { stareDownChanceIncrease++; } evadeStealthTimer = 0f; } if (carryingPlayerBody && (Object)(object)base.favoriteSpot != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.favoriteSpot).transform.position) < 5f) { DropPlayerBody(); } } public override void KillEnemy(bool destroy = false) { if ((Object)(object)base.creatureVoice != (Object)null) { base.creatureVoice.Stop(); } base.creatureSFX.Stop(); creatureAngerVoice.Stop(); base.creatureAnimator.SetLayerWeight(2, 0f); ((EnemyAI)this).KillEnemy(false); if (carryingPlayerBody) { carryingPlayerBody = false; if ((Object)(object)bodyBeingCarried != (Object)null) { bodyBeingCarried.matchPositionExactly = false; bodyBeingCarried.attachedTo = null; } } if (inKillAnimation) { FinishKillAnimation(carryingBody: false); } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (base.isEnemyDead) { return; } base.enemyHP -= force; if (((NetworkBehaviour)this).IsOwner) { if (base.enemyHP <= 0) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); return; } angerMeter = 11f; angerCheckInterval = 1f; AddToAngerMeter(0.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 ((NetworkBehaviour)this).__registerRpc(4261562003u, new RpcReceiveHandler(__rpc_handler_4261562003), "EnterAngerModeServerRpc"); ((NetworkBehaviour)this).__registerRpc(3353532602u, new RpcReceiveHandler(__rpc_handler_3353532602), "EnterAngerModeClientRpc"); ((NetworkBehaviour)this).__registerRpc(531995109u, new RpcReceiveHandler(__rpc_handler_531995109), "DropPlayerBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(570514378u, new RpcReceiveHandler(__rpc_handler_570514378), "DropPlayerBodyClientRpc"); ((NetworkBehaviour)this).__registerRpc(2342719778u, new RpcReceiveHandler(__rpc_handler_2342719778), "KillPlayerAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(4108152899u, new RpcReceiveHandler(__rpc_handler_4108152899), "CancelKillAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(2357429786u, new RpcReceiveHandler(__rpc_handler_2357429786), "KillPlayerAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(2361464299u, new RpcReceiveHandler(__rpc_handler_2361464299), "ResetFlowermanStealthTimerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2617973181u, new RpcReceiveHandler(__rpc_handler_2617973181), "ResetFlowermanStealthClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_4261562003(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 { float angerTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref angerTime, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkLurkerAI)(object)target).EnterAngerModeServerRpc(angerTime); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3353532602(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 angerTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref angerTime, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkLurkerAI)(object)target).EnterAngerModeClientRpc(angerTime); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_531995109(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; ((DarkLurkerAI)(object)target).DropPlayerBodyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_570514378(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; ((DarkLurkerAI)(object)target).DropPlayerBodyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2342719778(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkLurkerAI)(object)target).KillPlayerAnimationServerRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4108152899(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkLurkerAI)(object)target).CancelKillAnimationClientRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2357429786(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkLurkerAI)(object)target).KillPlayerAnimationClientRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2361464299(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 playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkLurkerAI)(object)target).ResetFlowermanStealthTimerServerRpc(playerObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2617973181(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 playerObj = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObj); target.__rpc_exec_stage = (__RpcExecStage)1; ((DarkLurkerAI)(object)target).ResetFlowermanStealthClientRpc(playerObj); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "DarkLurkerAI"; } } public class GazAI : EnemyAI { [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 bool useShaderGraph = true; public float defaultSpeed = 0.5f; public float defaultStoppingDistance = 0.1f; public float angeredSpeed = 0.6f; public float angyStoppingDistance = 0.1f; public float maxDanceSpeed = 3f; public float danceSpeedLerpTValue = 0.7f; 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_061d: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Unknown result type (might be due to invalid IL or missing references) //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_0663: Unknown result type (might be due to invalid IL or missing references) //IL_0673: 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) { if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Frequency", 4f); } slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 1f, 10f * Time.deltaTime); if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); } slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.17f, 10f * Time.deltaTime); if (useShaderGraph) { 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); if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Frequency", 3f); } slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 1f, 10f * Time.deltaTime); if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); } slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.14f, 10f * Time.deltaTime); if (useShaderGraph) { 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 = angyStoppingDistance; base.agent.speed = angeredSpeed; } } else if (tamedTimer > 0f) { tamedTimer -= Time.deltaTime; currentSlimeRange = 1.5f; if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Frequency", 4.3f); } slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 1.3f, 10f * Time.deltaTime); if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); } slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.2f, 10f * Time.deltaTime); if (useShaderGraph) { 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, maxDanceSpeed, danceSpeedLerpTValue * Time.deltaTime); } } else { if (partsMovingUpSlope >= 2) { currentSlimeRange = Mathf.Clamp(slimeRange / 2f, 1.5f, 100f); } else { currentSlimeRange = slimeRange; } if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Frequency", 2f); } slimeJiggleDensity = Mathf.Lerp(slimeJiggleDensity, 0.6f, 10f * Time.deltaTime); if (useShaderGraph) { thisSlimeMaterial.SetFloat("_Ripple_Density", slimeJiggleDensity); } slimeJiggleAmplitude = Mathf.Lerp(slimeJiggleAmplitude, 0.15f, 10f * Time.deltaTime); if (useShaderGraph) { 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 = defaultStoppingDistance; base.agent.speed = defaultSpeed; } } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2121330511u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerKilled); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2121330511u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2631106700u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerKilled); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2631106700u, val2, (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)); } } } private IEnumerator eatPlayerBody(int playerKilled) { yield return null; PlayerControllerB playerScript = StartOfRound.Instance.allPlayerScripts[playerKilled]; float startTime = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => (Object)(object)playerScript.deadBody != (Object)null || Time.realtimeSinceStartup - startTime > 2f)); if ((Object)(object)playerScript.deadBody == (Object)null) { Debug.Log((object)"Blob: Player body was not spawned or found within 2 seconds."); yield break; } playerScript.deadBody.attachedLimb = playerScript.deadBody.bodyParts[6]; playerScript.deadBody.attachedTo = centerPoint; playerScript.deadBody.matchPositionExactly = false; yield return (object)new WaitForSeconds(2f); playerScript.deadBody.attachedTo = null; playerScript.deadBody.ChangeMesh(emptySuitMesh, (Material)null); } 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(2121330511u, new RpcReceiveHandler(__rpc_handler_2121330511), "SlimeKillPlayerEffectServerRpc"); ((NetworkBehaviour)this).__registerRpc(2631106700u, new RpcReceiveHandler(__rpc_handler_2631106700), "SlimeKillPlayerEffectClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2121330511(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_2631106700(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 GiantAI : EnemyAI, IVisibleThreat { private Coroutine eatPlayerCoroutine; private bool inEatingPlayerAnimation; public Transform holdPlayerPoint; public AISearchRoutine roamPlanet; public AISearchRoutine searchForPlayers; private float velX; private float velZ; private Vector3 previousPosition; private Vector3 agentLocalVelocity; public Transform animationContainer; public TwoBoneIKConstraint reachForPlayerRig; public Transform reachForPlayerTarget; private float stopAndLookInterval; private float stopAndLookTimer; private float targetYRot; public float scrutiny = 1f; public float[] playerStealthMeters; public float timeSpentStaring; public bool investigating; private bool hasBegunInvestigating; public Vector3 investigatePosition; public PlayerControllerB chasingPlayer; private bool lostPlayerInChase; private float noticePlayerTimer; private bool lookingAtTarget; public Transform turnCompass; public Transform lookTarget; private bool chasingPlayerInLOS; private float timeSinceChangingTarget; private bool hasLostPlayerInChaseDebounce; private bool triggerChaseByTouchingDebounce; public AudioSource farWideSFX; public DecalProjector bloodOnFaceDecal; private Vector3 lastSeenPlayerPositionInChase; private float timeSinceDetectingVoice; public Transform centerPosition; public Transform handBone; public Transform deathFallPosition; public AudioClip giantFall; public AudioClip giantCry; public AudioSource giantBurningAudio; public GameObject burningParticlesContainer; private float timeAtStartOfBurning; public float roamingSpeed = 5f; public float minChaseSpeed = 0.1f; public float maxChaseSpeed = 7f; public float chaseSpeedRampup = 1.3f; public float minBurningSpeed = 0.1f; public float maxBurningSpeed = 8f; public float burnSpeedRampup = 1.3f; public float burningTimer = 10f; public bool canDieFromExplosion = true; public AdditionnalEnemyDetails additionnalEnemyDetails; public Vector3 itemDropSpot; public ScrapGenerator scrapgen; ThreatType IVisibleThreat.type => (ThreatType)4; bool IVisibleThreat.IsThreatDead() { return base.isEnemyDead; } GrabbableObject IVisibleThreat.GetHeldObject() { return null; } int IVisibleThreat.SendSpecialBehaviour(int id) { return 0; } int IVisibleThreat.GetThreatLevel(Vector3 seenByPosition) { return 18; } 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 (((Vector3)(ref agentLocalVelocity)).sqrMagnitude > 0f) { return 1f; } return 0.75f; } 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 ((float)base.enemyHP <= 0f && !base.isEnemyDead && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(destroy); base.agent.speed = 0f; if (eatPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(eatPlayerCoroutine); } DropPlayerBody(); base.creatureVoice.PlayOneShot(giantCry); burningParticlesContainer.SetActive(false); if ((Object)(object)additionnalEnemyDetails != (Object)null) { DropItemOnDeathRpc(); } } private void DropItemOnDeathRpc() { //IL_0031: 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 ((Object)(object)additionnalEnemyDetails.itemDropOnDeath != (Object)null && ((NetworkBehaviour)this).IsServer) { scrapgen.GenItemServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)additionnalEnemyDetails.itemDropOnDeath.GetComponent()), additionnalEnemyDetails.minValueOfSaidItem, additionnalEnemyDetails.maxValueOfSaidItem, additionnalEnemyDetails.itemDropPos); } } public override void AnimationEventA() { //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_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_0082: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).AnimationEventA(); RaycastHit[] array = Physics.SphereCastAll(deathFallPosition.position, 2.7f, deathFallPosition.forward, 3.9f, StartOfRound.Instance.playersMask, (QueryTriggerInteraction)1); for (int i = 0; i < array.Length; i++) { PlayerControllerB component = ((Component)((RaycastHit)(ref array[i])).transform).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController) { GameNetworkManager.Instance.localPlayerController.KillPlayer(Vector3.zero, true, (CauseOfDeath)2, 0, default(Vector3), false); break; } } } public override void HitFromExplosion(float distance) { if (!canDieFromExplosion) { return; } ((EnemyAI)this).HitFromExplosion(distance); if (!base.isEnemyDead && base.currentBehaviourStateIndex != 2) { timeAtStartOfBurning = Time.realtimeSinceStartup; if (((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SwitchToBehaviourState(2); } } } public override void Start() { ((EnemyAI)this).Start(); playerStealthMeters = new float[4]; for (int i = 0; i < playerStealthMeters.Length; i++) { playerStealthMeters[i] = 0f; } lookTarget.SetParent((Transform)null); } public override void DoAIInterval() { //IL_0211: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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_00db: 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_0106: 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_011b: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.livingPlayers == 0 || base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (investigating) { if (!hasBegunInvestigating) { hasBegunInvestigating = true; ((EnemyAI)this).StopSearch(roamPlanet, false); ((EnemyAI)this).SetDestinationToPosition(investigatePosition, false); } if (Vector3.Distance(((Component)this).transform.position, investigatePosition) < 5f) { investigating = false; hasBegunInvestigating = false; } } else if (!roamPlanet.inProgress) { Vector3 position = ((Component)this).transform.position; if (base.previousBehaviourStateIndex == 1 && Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.elevatorTransform.position) < 30f) { position = ((EnemyAI)this).ChooseFarthestNodeFromPosition(StartOfRound.Instance.elevatorTransform.position, false, 0, false, 50, -1).position; } ((EnemyAI)this).StartSearch(position, roamPlanet); } break; case 1: investigating = false; hasBegunInvestigating = false; if (roamPlanet.inProgress) { ((EnemyAI)this).StopSearch(roamPlanet, false); } if (lostPlayerInChase) { if (!searchForPlayers.inProgress) { Debug.Log((object)"Forest giant starting search for players routine"); searchForPlayers.searchWidth = 25f; ((EnemyAI)this).StartSearch(lastSeenPlayerPositionInChase, searchForPlayers); Debug.Log((object)"Lost player in chase; beginning search where the player was last seen"); } } else { if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); Debug.Log((object)"Found player during chase; stopping search coroutine and moving after target player"); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(chasingPlayer); } break; case 2: if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (!roamPlanet.inProgress) { roamPlanet.searchPrecision = 18f; ((EnemyAI)this).StartSearch(((EnemyAI)this).ChooseFarthestNodeFromPosition(((Component)this).transform.position, false, 0, false, 50, -1).position, roamPlanet); } break; } } public override void FinishedCurrentSearchRoutine() { if (((NetworkBehaviour)this).IsOwner && base.currentBehaviourStateIndex == 1 && lostPlayerInChase && !chasingPlayerInLOS) { Debug.Log((object)"Forest giant: Finished search; player not in line of sight, lost player, returning to roaming mode"); ((EnemyAI)this).SwitchToBehaviourState(0); } } public override void ReachedNodeInSearch() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).ReachedNodeInSearch(); if (((NetworkBehaviour)this).IsOwner && base.currentBehaviourStateIndex == 0 && stopAndLookInterval > 12f) { stopAndLookInterval = 0f; stopAndLookTimer = Random.Range(3f, 12f); targetYRot = RoundManager.Instance.YRotationThatFacesTheFarthestFromPosition(base.eye.position, 10f, 5); } } private void LateUpdate() { //IL_001f: 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_009c: 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) if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { ((Component)base.inSpecialAnimationWithPlayer).transform.position = holdPlayerPoint.position; ((Component)base.inSpecialAnimationWithPlayer).transform.rotation = holdPlayerPoint.rotation; } if (lookingAtTarget) { LookAtTarget(); } base.creatureAnimator.SetBool("staring", lookingAtTarget); if (!((Object)(object)GameNetworkManager.Instance == (Object)null) && !((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)) { farWideSFX.volume = Mathf.Clamp(Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) / (farWideSFX.maxDistance - 10f), 0f, 1f); } } private void GiantSeePlayerEffect() { //IL_0090: 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_00c3: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.localPlayerController.isPlayerDead || GameNetworkManager.Instance.localPlayerController.isInsideFactory) { return; } if (base.currentBehaviourStateIndex == 1 && (Object)(object)chasingPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController && !lostPlayerInChase) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(1.4f, 1f); return; } bool flag = false; if (!GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom && ((EnemyAI)this).CheckLineOfSightForPosition(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, 45f, 70, -1f, (Transform)null)) { if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 15f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.7f, true); } else { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true); } } } public override void Update() { //IL_0187: 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) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: 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_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_0308: 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_033e: 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_0359: 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) ((EnemyAI)this).Update(); if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || base.timeSinceSpawn < base.exitVentAnimationTime - 1.6f) { return; } if (base.isEnemyDead) { AudioSource obj = giantBurningAudio; obj.volume -= Time.deltaTime * 0.5f; } if ((base.stunNormalizedTimer > 0f && inEatingPlayerAnimation) || base.isEnemyDead || base.currentBehaviourStateIndex == 2) { StopKillAnimation(); } else { GiantSeePlayerEffect(); } if (base.isEnemyDead) { return; } base.creatureAnimator.SetBool("stunned", base.stunNormalizedTimer > 0f); CalculateAnimationDirection(); stopAndLookInterval += Time.deltaTime; timeSinceChangingTarget += Time.deltaTime; timeSinceDetectingVoice += Time.deltaTime; switch (base.currentBehaviourStateIndex) { case 0: ((RigConstraint>)(object)reachForPlayerRig).weight = Mathf.Lerp(((RigConstraint>)(object)reachForPlayerRig).weight, 0f, Time.deltaTime * 15f); lostPlayerInChase = false; triggerChaseByTouchingDebounce = false; hasLostPlayerInChaseDebounce = false; lookingAtTarget = false; if (!((NetworkBehaviour)this).IsOwner) { break; } if (stopAndLookTimer > 0f) { stopAndLookTimer -= Time.deltaTime; turnCompass.eulerAngles = new Vector3(((Component)this).transform.eulerAngles.x, targetYRot, ((Component)this).transform.eulerAngles.z); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, turnCompass.rotation, 5f * Time.deltaTime); base.agent.speed = 0f; } else { if (base.stunNormalizedTimer > 0f && (Object)(object)base.stunnedByPlayer != (Object)null && (Object)(object)base.stunnedByPlayer != (Object)(object)chasingPlayer) { FindAndTargetNewPlayerOnLocalClient(base.stunnedByPlayer); BeginChasingNewPlayerClientRpc((int)base.stunnedByPlayer.playerClientId); } base.agent.speed = roamingSpeed; } LookForPlayers(); break; case 1: ReachForPlayerIfClose(); if (!((NetworkBehaviour)this).IsOwner) { break; } if (inEatingPlayerAnimation) { base.agent.speed = 0f; break; } LookForPlayers(); if (lostPlayerInChase) { if (!hasLostPlayerInChaseDebounce) { lookingAtTarget = false; hasLostPlayerInChaseDebounce = true; HasLostPlayerInChaseClientRpc(); } ((RigConstraint>)(object)reachForPlayerRig).weight = Mathf.Lerp(((RigConstraint>)(object)reachForPlayerRig).weight, 0f, Time.deltaTime * 15f); if (stopAndLookTimer > 0f) { stopAndLookTimer -= Time.deltaTime; turnCompass.eulerAngles = new Vector3(((Component)this).transform.eulerAngles.x, targetYRot, ((Component)this).transform.eulerAngles.z); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, turnCompass.rotation, 5f * Time.deltaTime); base.agent.speed = 0f; } else if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = Mathf.Min(Mathf.Max(base.agent.speed, minChaseSpeed) * chaseSpeedRampup, maxChaseSpeed); Debug.Log((object)$"agent speed: {base.agent.speed}"); } if (chasingPlayerInLOS) { noticePlayerTimer = 0f; lostPlayerInChase = false; break; } noticePlayerTimer += Time.deltaTime; if (noticePlayerTimer > 9f) { ((EnemyAI)this).SwitchToBehaviourState(0); } break; } lookTarget.position = ((Component)chasingPlayer).transform.position; lookingAtTarget = true; if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = Mathf.Min(Mathf.Max(base.agent.speed, minChaseSpeed) * chaseSpeedRampup, maxChaseSpeed); } if (hasLostPlayerInChaseDebounce) { hasLostPlayerInChaseDebounce = false; HasFoundPlayerInChaseClientRpc(); } if (chasingPlayerInLOS) { noticePlayerTimer = 0f; lastSeenPlayerPositionInChase = ((Component)chasingPlayer).transform.position; break; } noticePlayerTimer += Time.deltaTime; if (noticePlayerTimer > 3f) { lostPlayerInChase = true; } break; case 2: lookingAtTarget = false; if (base.isEnemyDead) { break; } if (!burningParticlesContainer.activeSelf) { burningParticlesContainer.SetActive(true); } if (!giantBurningAudio.isPlaying) { giantBurningAudio.Play(); } giantBurningAudio.volume = Mathf.Min(giantBurningAudio.volume + Time.deltaTime * 0.5f, 1f); if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = Mathf.Min(Mathf.Max(base.agent.speed, minBurningSpeed) * burnSpeedRampup, maxBurningSpeed); if (Time.realtimeSinceStartup - timeAtStartOfBurning > burningTimer) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } break; } } private void ReachForPlayerIfClose() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_00bb: 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_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_00d4: 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_0107: 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) if (base.stunNormalizedTimer <= 0f && !lostPlayerInChase && (Object)(object)base.inSpecialAnimationWithPlayer == (Object)null && !Physics.Linecast(base.eye.position, ((Component)chasingPlayer).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault) && Vector3.Distance(((Component)this).transform.position, ((Component)chasingPlayer).transform.position) < 8f) { ((RigConstraint>)(object)reachForPlayerRig).weight = Mathf.Lerp(((RigConstraint>)(object)reachForPlayerRig).weight, 0.9f, Time.deltaTime * 6f); Vector3 val = ((Component)chasingPlayer).transform.position + Vector3.up * 0.5f; reachForPlayerTarget.position = new Vector3(val.x + Random.Range(-0.2f, 0.2f), val.y + Random.Range(-0.2f, 0.2f), val.z + Random.Range(-0.2f, 0.2f)); } else { ((RigConstraint>)(object)reachForPlayerRig).weight = Mathf.Lerp(((RigConstraint>)(object)reachForPlayerRig).weight, 0f, Time.deltaTime * 15f); } } private void LookAtTarget() { //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_0038: 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_0062: Unknown result type (might be due to invalid IL or missing references) turnCompass.LookAt(lookTarget); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, turnCompass.rotation, 15f * Time.deltaTime); ((Component)this).transform.localEulerAngles = new Vector3(0f, ((Component)this).transform.localEulerAngles.y, 0f); } private void LookForPlayers() { //IL_0084: 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_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_037f: 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_0391: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)this).GetAllPlayersInLineOfSightNonAlloc(50f, 70, base.eye, 3f, StartOfRound.Instance.collidersRoomDefaultAndFoliage) > 0) { PlayerControllerB[] tempPlayersArray = RoundManager.Instance.tempPlayersArray; PlayerControllerB val = tempPlayersArray[0]; int num = 0; float num2 = 1000f; PlayerControllerB val2 = tempPlayersArray[0]; float num3 = 0f; float num4 = 1f; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (tempPlayersArray.Contains(StartOfRound.Instance.allPlayerScripts[i])) { float num5 = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position, base.eye.position); if (num5 > 16f && StartOfRound.Instance.allPlayerScripts[i].isUnderwater) { playerStealthMeters[i] -= Time.deltaTime * 0.2f; continue; } if (!StartOfRound.Instance.allPlayerScripts[i].isCrouching) { num4 += 1f; } if (StartOfRound.Instance.allPlayerScripts[i].timeSincePlayerMoving < 0.1f) { num4 += 1f; } if (num4 >= 2f || num5 < 66f || (num4 >= 1f && num5 < 45f)) { playerStealthMeters[i] = Mathf.Clamp(playerStealthMeters[i] + Time.deltaTime / (num5 * 0.21f) * scrutiny * num4, 0f, 1f); } if (playerStealthMeters[i] > num3) { num3 = playerStealthMeters[i]; val2 = StartOfRound.Instance.allPlayerScripts[i]; } if (num5 < num2) { val = StartOfRound.Instance.allPlayerScripts[i]; num2 = num5; num = i; } } else { playerStealthMeters[i] -= Time.deltaTime * 0.33f; } } if (base.currentBehaviourStateIndex == 1) { if (lostPlayerInChase) { chasingPlayerInLOS = playerStealthMeters[chasingPlayer.playerClientId] > 0.35f; return; } chasingPlayerInLOS = tempPlayersArray.Contains(chasingPlayer); if ((Object)(object)base.stunnedByPlayer != (Object)null) { val = base.stunnedByPlayer; } if ((Object)(object)val != (Object)(object)chasingPlayer && playerStealthMeters[num] > 0.35f && timeSinceChangingTarget > 2f) { FindAndTargetNewPlayerOnLocalClient(val); if (((NetworkBehaviour)this).IsServer) { BeginChasingNewPlayerServerRpc((int)val.playerClientId); } } return; } if ((Object)(object)base.stunnedByPlayer != (Object)null) { val2 = base.stunnedByPlayer; } if (num3 >= 1f || Object.op_Implicit((Object)(object)base.stunnedByPlayer)) { BeginChasingNewPlayerClientRpc((int)val2.playerClientId); chasingPlayerInLOS = true; } else if (num3 > 0.35f) { if (stopAndLookTimer < 2f) { stopAndLookTimer = 2f; } turnCompass.LookAt(((Component)val2).transform); targetYRot = turnCompass.eulerAngles.y; timeSpentStaring += Time.deltaTime; } if (base.currentBehaviourStateIndex != 1 && timeSpentStaring > 3f && !investigating) { investigating = true; hasBegunInvestigating = false; investigatePosition = RoundManager.Instance.GetNavMeshPosition(((Component)val2).transform.position, default(NavMeshHit), 5f, base.agentMask); } } else { if (base.currentBehaviourStateIndex == 1) { chasingPlayerInLOS = false; } timeSpentStaring = 0f; for (int j = 0; j < playerStealthMeters.Length; j++) { playerStealthMeters[j] = Mathf.Clamp(playerStealthMeters[j] - Time.deltaTime * 0.33f, 0f, 1f); } } } public void FindAndTargetNewPlayerOnLocalClient(PlayerControllerB newPlayer) { chasingPlayer = newPlayer; timeSinceChangingTarget = 0f; stopAndLookTimer = 0f; } [ServerRpc] private void BeginChasingNewPlayerServerRpc(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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3293147003u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3293147003u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BeginChasingNewPlayerClientRpc(playerId); } } [ClientRpc] private void BeginChasingNewPlayerClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1365492785u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1365492785u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; noticePlayerTimer = 0f; timeSinceChangingTarget = 0f; chasingPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; hasLostPlayerInChaseDebounce = false; lostPlayerInChase = false; if (timeSinceChangingTarget > 1f) { base.agent.speed = 0f; } ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); } } [ClientRpc] private void HasLostPlayerInChaseClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4051195781u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4051195781u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; lostPlayerInChase = true; lookingAtTarget = false; } } } [ClientRpc] private void HasFoundPlayerInChaseClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(890468180u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 890468180u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; lostPlayerInChase = false; lookingAtTarget = true; } } } 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_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) agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 4f)); velX = Mathf.Lerp(velX, agentLocalVelocity.x, 5f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, agentLocalVelocity.z, 5f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityY", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); previousPosition = ((Component)this).transform.position; } public override void OnCollideWithPlayer(Collider other) { //IL_009e: 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_00c1: 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_00cb: 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_00df: 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_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_010a: 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_0119: 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) ((EnemyAI)this).OnCollideWithPlayer(other); if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null || inEatingPlayerAnimation || base.stunNormalizedTimer >= 0f || base.currentBehaviourStateIndex == 2) { return; } PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, inEatingPlayerAnimation, false); if (!((Object)(object)val != (Object)null) || !((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController)) { return; } VehicleController val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null && (Object)(object)val.physicsParent != (Object)null && (Object)(object)val.physicsParent == (Object)(object)((Component)val2).transform && !val2.backDoorOpen) { return; } Vector3 val3 = Vector3.Normalize((centerPosition.position - (((Component)GameNetworkManager.Instance.localPlayerController).transform.position + Vector3.up * 1.5f)) * 1000f); RaycastHit val4 = default(RaycastHit); if (!Physics.Linecast(centerPosition.position + val3 * 1.7f, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position + Vector3.up * 1.5f, ref val4, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && ((!StartOfRound.Instance.shipIsLeaving && StartOfRound.Instance.shipHasLanded) || !GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom) && !((Object)(object)val.inAnimationWithEnemy != (Object)null)) { if (val.inSpecialInteractAnimation && (Object)(object)val.currentTriggerInAnimationWith != (Object)null) { val.currentTriggerInAnimationWith.CancelAnimationExternally(); } if (base.currentBehaviourStateIndex == 0 && !triggerChaseByTouchingDebounce) { triggerChaseByTouchingDebounce = true; BeginChasingNewPlayerServerRpc((int)val.playerClientId); } else { 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_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_00f3: 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_0110: 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_0133: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4154236747u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4154236747u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null)) { Vector3 position = ((Component)this).transform.position; 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(position, 20f, 5); } GrabPlayerClientRpc(playerId, 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_0108: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1776553949u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enemyPosition); BytePacker.WriteValueBitPacked(val, enemyYRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1776553949u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null)) { BeginEatPlayer(StartOfRound.Instance.allPlayerScripts[playerId], enemyPosition, enemyYRot); } } } private void BeginEatPlayer(PlayerControllerB playerBeingEaten, Vector3 enemyPosition, int enemyYRot) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) base.inSpecialAnimationWithPlayer = playerBeingEaten; base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = true; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this; if (eatPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(eatPlayerCoroutine); } eatPlayerCoroutine = ((MonoBehaviour)this).StartCoroutine(EatPlayerAnimation(playerBeingEaten, enemyPosition, enemyYRot)); } private IEnumerator EatPlayerAnimation(PlayerControllerB playerBeingEaten, Vector3 enemyPosition, int enemyYRot) { //IL_0015: 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) lookingAtTarget = false; base.creatureAnimator.SetTrigger("EatPlayer"); inEatingPlayerAnimation = true; base.inSpecialAnimation = true; playerBeingEaten.isInElevator = false; playerBeingEaten.isInHangarShipRoom = false; Vector3 startPosition = ((Component)this).transform.position; Quaternion startRotation = ((Component)this).transform.rotation; for (int i = 0; i < 10; i++) { ((Component)this).transform.position = Vector3.Lerp(startPosition, enemyPosition, (float)i / 10f); ((Component)this).transform.rotation = Quaternion.Lerp(startRotation, Quaternion.Euler(((Component)this).transform.eulerAngles.x, (float)enemyYRot, ((Component)this).transform.eulerAngles.z), (float)i / 10f); yield return (object)new WaitForSeconds(0.01f); } ((Component)this).transform.position = enemyPosition; ((Component)this).transform.rotation = Quaternion.Euler(((Component)this).transform.eulerAngles.x, (float)enemyYRot, ((Component)this).transform.eulerAngles.z); base.serverRotation = ((Component)this).transform.eulerAngles; yield return (object)new WaitForSeconds(0.2f); base.inSpecialAnimation = false; yield return (object)new WaitForSeconds(4.4f); if ((Object)(object)playerBeingEaten.inAnimationWithEnemy == (Object)(object)this && !playerBeingEaten.isPlayerDead) { base.inSpecialAnimationWithPlayer = null; playerBeingEaten.KillPlayer(Vector3.zero, false, (CauseOfDeath)8, 0, default(Vector3), false); playerBeingEaten.inSpecialInteractAnimation = false; playerBeingEaten.inAnimationWithEnemy = null; ((Behaviour)bloodOnFaceDecal).enabled = true; yield return (object)new WaitForSeconds(3f); } else { base.creatureVoice.Stop(); } inEatingPlayerAnimation = false; base.inSpecialAnimationWithPlayer = null; if (((NetworkBehaviour)this).IsOwner) { if ((Object)(object)((EnemyAI)this).CheckLineOfSightForPlayer(50f, 15, -1) != (Object)null) { _ = chasingPlayer; } else { ((EnemyAI)this).SwitchToBehaviourState(0); } } } private void DropPlayerBody() { if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = false; base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = false; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = null; base.inSpecialAnimationWithPlayer = null; } } private void StopKillAnimation() { if (eatPlayerCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(eatPlayerCoroutine); } inEatingPlayerAnimation = false; base.inSpecialAnimation = false; DropPlayerBody(); base.creatureVoice.Stop(); } private void ReactToNoise(float distanceToNoise, Vector3 noisePosition) { //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_0114: 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_011d: 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_001b: 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_004e: 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_0097: 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) if (base.currentBehaviourStateIndex == 1) { if (chasingPlayerInLOS && distanceToNoise - Vector3.Distance(((Component)this).transform.position, ((Component)chasingPlayer).transform.position) < -3f) { stopAndLookTimer = 1f; turnCompass.LookAt(noisePosition); targetYRot = turnCompass.eulerAngles.y; } else if (distanceToNoise < 15f && noticePlayerTimer > 3f) { stopAndLookTimer = 2f; turnCompass.LookAt(noisePosition); targetYRot = turnCompass.eulerAngles.y; } } else { stopAndLookTimer = 1.5f; turnCompass.LookAt(noisePosition); targetYRot = turnCompass.eulerAngles.y; timeSpentStaring += 0.3f; if (timeSpentStaring > 3f) { investigating = true; hasBegunInvestigating = false; investigatePosition = RoundManager.Instance.GetNavMeshPosition(noisePosition, default(NavMeshHit), 5f, -1); } } } [ServerRpc] public void DetectPlayerVoiceServerRpc(Vector3 noisePosition) { //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_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012d: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(245713233u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref noisePosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 245713233u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; float distanceToNoise = Vector3.Distance(noisePosition, ((Component)this).transform.position); ReactToNoise(distanceToNoise, noisePosition); } } 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 ((NetworkBehaviour)this).__registerRpc(3293147003u, new RpcReceiveHandler(__rpc_handler_3293147003), "BeginChasingNewPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1365492785u, new RpcReceiveHandler(__rpc_handler_1365492785), "BeginChasingNewPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(4051195781u, new RpcReceiveHandler(__rpc_handler_4051195781), "HasLostPlayerInChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(890468180u, new RpcReceiveHandler(__rpc_handler_890468180), "HasFoundPlayerInChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(4154236747u, new RpcReceiveHandler(__rpc_handler_4154236747), "GrabPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1776553949u, new RpcReceiveHandler(__rpc_handler_1776553949), "GrabPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(245713233u, new RpcReceiveHandler(__rpc_handler_245713233), "DetectPlayerVoiceServerRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3293147003(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; ((GiantAI)(object)target).BeginChasingNewPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1365492785(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; ((GiantAI)(object)target).BeginChasingNewPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4051195781(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; ((GiantAI)(object)target).HasLostPlayerInChaseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_890468180(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; ((GiantAI)(object)target).HasFoundPlayerInChaseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4154236747(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; ((GiantAI)(object)target).GrabPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1776553949(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; ((GiantAI)(object)target).GrabPlayerClientRpc(playerId, enemyPosition, enemyYRot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_245713233(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 noisePosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref noisePosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((GiantAI)(object)target).DetectPlayerVoiceServerRpc(noisePosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GiantAI"; } } public class GravelingBloomAI : EnemyAI { private int previousBehaviourState = -1; private Vector3 fallToPosition; private RaycastHit rayHit; public bool hasBurst; private Coroutine fallToGroundCoroutine; public AnimationCurve fallCurve; public ParticleSystem burstParticle; public SkinnedMeshRenderer thisSkinnedRenderer; public AudioClip burstSFX; private Vector3 agentLocalVelocity; private float velX; private float velZ; public Transform animationContainer; private Vector3 previousPosition; public float seenPlayersTimer; public AISearchRoutine searchForPlayers; private Vector3 lastPositionOfSeenPlayer; private bool lostPlayerInChase; private float lostPlayerTimer; private float seePlayerMeter; private float jitterMoveInterval; private Vector3 jitterDest; private RaycastHit rayhit; public bool testingBloomEnemy; private bool chestPlantVisible; private float timeSinceBurst; public AudioSource breathingSFX; public AudioSource burstSource; public AudioClip plantFeetHit; public AudioClip chestBurst; private float timeAtLastChestBurst; public AudioClip[] chestPlantRoars; private float timeAtLastHeardNoise; private Vector3 pingAttentionPos; private float timeSinceHittingPlayer; private float timeAtLastHitStun; public GameObject killParticle; public PlayerControllerB burstPlayer; public AudioClip bitePlayer; private ScanNodeProperties playerScanNode; private float distanceToTarget; private RaycastHit hit; private bool isBehindObstacle; private float checkPathDistanceInterval; public Transform radarHeadTransform; public ParticleSystem teleportParticle; private IEnumerator teleportBloomCoroutine; [Space(5f)] [Header("Nav Agent stuff")] public float lostPlayerSpeed = 9f; public float chestPlantChompingDistance = 3.6f; public float chestPlantChompingSpeed = 5f; public float chaseSpeed = 15f; public float farChaseSpeed = 10f; public float speedD = 5f; [Space(1f)] public float minJitterSpeed = 7f; public float maxJitterSpeed = 18f; [Space(1f)] public float minJitterInterval = 0.1f; public float maxJitterInterval = 0.3f; [Space(1f)] public float maxAccel = 180f; [Space(5f)] [Header("LOS")] public float losWidth = 80f; public int losRange = 18; public int losRangeFoggy = 8; public float losProxAware = 5f; [Header("Unique Stuff")] public GameObject[] disableOnKill; public float[] disableTimer; public float disableTimerSingle = 0.05f; [Header("Damage")] public CauseOfDeath causeOfdeath; public int playerDamage = 30; public override Transform GetRadarHeadTransform() { return radarHeadTransform; } public override void ShipTeleportEnemy() { ((EnemyAI)this).ShipTeleportEnemy(); if (teleportBloomCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(teleportBloomCoroutine); } ((MonoBehaviour)this).StartCoroutine(teleportBloom()); } private IEnumerator teleportBloom() { teleportParticle.Play(); base.creatureVoice.PlayOneShot(Object.FindObjectOfType().beamUpPlayerBodySFX); yield return (object)new WaitForSeconds(3f); if (StartOfRound.Instance.shipIsLeaving || !hasBurst) { yield break; } ((EnemyAI)this).SetEnemyOutside(true); base.isInsidePlayerShip = true; ShipTeleporter[] array = Object.FindObjectsOfType(); ShipTeleporter val = null; if (array != null) { for (int i = 0; i < array.Length; i++) { if (!array[i].isInverseTeleporter) { val = array[i]; } } } if ((Object)(object)val != (Object)null) { if (((NetworkBehaviour)this).IsOwner) { ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = val.teleporterPosition.position; ((Behaviour)base.agent).enabled = true; base.isInsidePlayerShip = true; } base.serverPosition = val.teleporterPosition.position; PlayerControllerB closestPlayer = ((EnemyAI)this).GetClosestPlayer(false, false, false); if ((Object)(object)closestPlayer != (Object)null) { PingAttention(((Component)closestPlayer.playerEye).transform.position); } } teleportBloomCoroutine = null; } public override void Start() { //IL_006d: 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) Debug.Log((object)$"Graveling bloom enemy #{base.thisEnemyIndex} running Start()!"); ((EnemyAI)this).Start(); if (!testingBloomEnemy) { base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; if (!hasBurst) { ((EnemyAI)this).EnableEnemyMesh(false, false, true); } } else { BurstForth(StartOfRound.Instance.allPlayerScripts[0], kill: false, ((Component)StartOfRound.Instance.allPlayerScripts[0]).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[0]).transform.eulerAngles); } GravelingMasterAI gravelingMasterAI = Object.FindObjectOfType(); if ((Object)(object)gravelingMasterAI != (Object)null) { int num = -1; for (int i = 0; i < gravelingMasterAI.bloomEnemies.Length; i++) { if ((Object)(object)gravelingMasterAI.bloomEnemies[i] == (Object)null) { num = i; break; } } gravelingMasterAI.bloomEnemies[num] = this; } lostPlayerInChase = true; } public override void DetectNoise(Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot = 0, int noiseID = 0) { //IL_0049: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_00ae: 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_0090: 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_00d3: 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_00fc: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || !lostPlayerInChase || seePlayerMeter > 0.07f || base.inSpecialAnimation || base.isEnemyDead || Time.realtimeSinceStartup - timeAtLastHeardNoise < 1f || Vector3.Distance(noisePosition, ((Component)this).transform.position + Vector3.up * 0.4f) < 0.5f || (base.currentBehaviourStateIndex == 2 && Vector3.Angle(((Component)this).transform.forward, noisePosition - ((Component)this).transform.position) < 60f)) { return; } float num = Vector3.Distance(noisePosition, ((Component)this).transform.position); float num2 = noiseLoudness / num; if (!(num > 15f) && !(num2 <= 0.075f)) { if (Physics.Linecast(((Component)this).transform.position, noisePosition, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { num2 *= 0.6f; } if (!(num2 <= 0.022f)) { PingAttention(noisePosition); } } } public void PingAttention(Vector3 lookAtPos) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //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) timeAtLastHeardNoise = Time.realtimeSinceStartup; pingAttentionPos = lookAtPos; PingAttentionRpc(lookAtPos); } [Rpc(/*Could not decode attribute arguments.*/)] public void PingAttentionRpc(Vector3 lookAtPos) { //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_00c3: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1724664719u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lookAtPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1724664719u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; timeAtLastHeardNoise = Time.realtimeSinceStartup; pingAttentionPos = lookAtPos; } } } public void BurstForth(PlayerControllerB player, bool kill, Vector3 burstPosition, Vector3 burstRotation) { //IL_003d: 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) //IL_0072: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_00d1: 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_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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_012d: 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) //IL_010f: 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_017b: 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_018c: 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_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0163: 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_0174: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) burstPlayer = player; player.redirectToEnemy = (EnemyAI)(object)this; if (!base.isEnemyDead) { ((EnemyAI)this).EnableEnemyMesh(true, false, false); } base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; Debug.Log((object)$"Setting G bloom enemy to pos: {((Component)player).transform.position}; is agent enabled?: {((Behaviour)base.agent).enabled}"); ((Component)this).transform.position = burstPosition + Vector3.up * 0.005f; ((Component)this).transform.rotation = Quaternion.Euler(burstRotation); ((EnemyAI)this).SetEnemyOutside(burstPosition.y > -90f); SetSuit(player.currentSuitID); player.DropBlood(Vector3.down, true, false); timeSinceBurst = Time.realtimeSinceStartup; fallToPosition = burstPosition; if (Physics.Raycast(burstPosition + Vector3.up * 0.75f, Vector3.down, ref rayHit, 10f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { fallToPosition = ((RaycastHit)(ref rayHit)).point; } fallToPosition = RoundManager.Instance.GetNavMeshPosition(fallToPosition, default(NavMeshHit), 1f, base.agentMask); if (!RoundManager.Instance.GotNavMeshPositionResult) { fallToPosition = RoundManager.Instance.GetNavMeshPosition(fallToPosition, default(NavMeshHit), 10f, base.agentMask); } base.serverPosition = fallToPosition; base.serverRotation = ((Component)this).transform.eulerAngles; if (kill && (Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController) { if (!player.isPlayerDead) { player.KillPlayer(Vector3.zero, false, (CauseOfDeath)5, 0, default(Vector3), true); } else { player.overrideDontSpawnBody = true; player.overrideDropItems = true; } player.overrideGameOverSpectatePivot = base.eye; } playerScanNode = ((Component)this).gameObject.GetComponentInChildren(); playerScanNode.headerText = "Body of " + player.playerUsername; playerScanNode.subText = "Cause of death: Suffocation"; playerScanNode.maxRange = 0; hasBurst = true; if (fallToGroundCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(fallToGroundCoroutine); } fallToGroundCoroutine = ((MonoBehaviour)this).StartCoroutine(DoBurstAnimation()); } private IEnumerator DoBurstAnimation() { base.creatureAnimator.SetTrigger("Burst"); burstParticle.Play(true); burstSource.pitch = Random.Range(0.93f, 1.07f); burstSource.PlayOneShot(burstSFX); WalkieTalkie.TransmitOneShotAudio(burstSource, burstSFX, 1f); float num = Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position); if (num < 5f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 14f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } float fallTimer = 0f; float fallTime = Mathf.Min(Vector3.Distance(((Component)this).transform.position, fallToPosition), 15f) * 0.1f; Vector3 startFallingPos = ((Component)this).transform.position; Random random = new Random(StartOfRound.Instance.randomMapSeed + 7); CadaverGrowthAI val = Object.FindObjectOfType(); float animationTime = 1.7f; if ((Object)(object)val != (Object)null && (Object)(object)burstPlayer != (Object)null && Object.op_Implicit((Object)(object)((EnemyAI)this).GetClosestPlayer(false, false, false)) && base.mostOptimalDistance < 7f && val.playerInfections[burstPlayer.playerClientId].emittingSpores && random.Next(0, 100) < 40) { animationTime = 0.35f; } if (!((EnemyAI)this).IsInsideMineshaftElevator(((Component)this).transform.position) || RoundManager.Instance.currentMineshaftElevator.elevatorFinishedMoving) { while (fallTimer < fallTime) { fallTimer += Time.deltaTime; animationTime -= Time.deltaTime; ((Component)this).transform.position = Vector3.Lerp(startFallingPos, fallToPosition, Mathf.Clamp(fallCurve.Evaluate(fallTimer / (fallTime + 0.01f)), 0f, 1f)); yield return null; } ((Component)this).transform.position = fallToPosition; } if (animationTime > 0f) { yield return (object)new WaitForSeconds(animationTime); } base.creatureAnimator.SetBool("SproutLegs", true); base.creatureSFX.PlayOneShot(plantFeetHit); yield return (object)new WaitForSeconds(0.25f); breathingSFX.Play(); base.creatureSFX.Play(); base.inSpecialAnimation = false; base.creatureAnimator.SetBool("FinishBurst", true); base.exitVentAnimationTime = 0f; if (((NetworkBehaviour)this).IsOwner) { CheckForVeryClosePlayer(seeInstantly: true); } } public void SetSuit(int suitId) { Material suitMaterial = StartOfRound.Instance.unlockablesList.unlockables[suitId].suitMaterial; Material[] sharedMaterials = ((Renderer)thisSkinnedRenderer).sharedMaterials; sharedMaterials[1] = suitMaterial; ((Renderer)thisSkinnedRenderer).sharedMaterials = sharedMaterials; } public override void DoAIInterval() { //IL_008a: 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_0101: 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) //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_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: 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_0149: 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_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0249: 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_01aa: 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_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) if (base.inSpecialAnimation) { return; } ((EnemyAI)this).DoAIInterval(); switch (base.currentBehaviourStateIndex) { case 0: if (!CheckForVeryClosePlayer()) { if (!lostPlayerInChase) { Debug.Log((object)"Switch to state 1 a"); ((EnemyAI)this).SwitchToBehaviourState(1); } else if (!searchForPlayers.inProgress) { searchForPlayers.searchWidth = 80f; Debug.Log((object)$"Cadaver bloom burst: Started new search; is searching?: {searchForPlayers.inProgress}; transform position: {((Component)this).transform.position}"); ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } } break; case 1: if (CheckForVeryClosePlayer()) { break; } if ((Object)(object)base.targetPlayer != (Object)null) { checkPathDistanceInterval -= base.AIIntervalTime; if (checkPathDistanceInterval < 0f) { Vector3 val = ((Component)base.targetPlayer).transform.position; if (Physics.Raycast(((Component)base.targetPlayer).transform.position, Vector3.down, ref hit, 15f, base.agentMask, (QueryTriggerInteraction)1)) { val = ((RaycastHit)(ref hit)).point; } if (((EnemyAI)this).GetPathDistance(val, ((Component)this).transform.position)) { distanceToTarget = base.pathDistance; isBehindObstacle = distanceToTarget - Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) > distanceToTarget / 5f; } else { distanceToTarget = Vector3.Distance(((Component)base.targetPlayer).transform.position, ((Component)this).transform.position); isBehindObstacle = false; } if (distanceToTarget > 8.7f) { checkPathDistanceInterval = 0.5f; } else { checkPathDistanceInterval = 0f; } } } if (lostPlayerInChase) { base.movingTowardsTargetPlayer = false; base.agent.speed = lostPlayerSpeed; if (!searchForPlayers.inProgress) { searchForPlayers.searchWidth = 18f; if (lastPositionOfSeenPlayer == Vector3.zero) { lastPositionOfSeenPlayer = ((Component)this).transform.position; } ((EnemyAI)this).StartSearch(lastPositionOfSeenPlayer, searchForPlayers); Debug.Log((object)"Cadaver bloom burst: Lost player in chase; beginning search where the player was last seen"); } if (lostPlayerTimer > 9f) { ((EnemyAI)this).SwitchToBehaviourState(0); } } else if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); Debug.Log((object)"Cadaver bloom burst: Found player during chase; stopping search coroutine and moving after target player"); } break; case 2: break; } } private bool CheckForVeryClosePlayer(bool seeInstantly = false) { //IL_0033: 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_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_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) float num = -1f; if (seeInstantly) { num = 6f; } int allPlayersInLineOfSightNonAlloc = ((EnemyAI)this).GetAllPlayersInLineOfSightNonAlloc(70f, 50, (Transform)null, num, -1); float num2 = 2000f; int num3 = -1; for (int i = 0; i < allPlayersInLineOfSightNonAlloc; i++) { Vector3 val = base.eye.position - ((Component)RoundManager.Instance.tempPlayersArray[i]).transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; num3 = i; } } if (num3 != -1) { lostPlayerTimer = 0f; seePlayerMeter = Mathf.Min(seePlayerMeter + base.AIIntervalTime, 0.5f); if (seePlayerMeter > 0.25f || seeInstantly) { lastPositionOfSeenPlayer = ((Component)RoundManager.Instance.tempPlayersArray[num3]).transform.position; lostPlayerInChase = false; seePlayerMeter = 0f; if ((Object)(object)base.targetPlayer == (Object)null || (Object)(object)base.targetPlayer != (Object)(object)RoundManager.Instance.tempPlayersArray[num3]) { base.targetPlayer = RoundManager.Instance.tempPlayersArray[num3]; SetNewTargetPlayerRpc((int)RoundManager.Instance.tempPlayersArray[num3].playerClientId); ((EnemyAI)this).ChangeOwnershipOfEnemy(RoundManager.Instance.tempPlayersArray[num3].actualClientId); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); } return true; } } else { seePlayerMeter = Mathf.Max(seePlayerMeter - base.AIIntervalTime, 0f); lostPlayerTimer += base.AIIntervalTime; if (lostPlayerTimer > 6f) { lostPlayerInChase = true; } } return false; } [Rpc(/*Could not decode attribute arguments.*/)] public void SetNewTargetPlayerRpc(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_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_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_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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1565346103u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1565346103u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[playerId]; lostPlayerInChase = false; lostPlayerTimer = 0f; lastPositionOfSeenPlayer = ((Component)base.targetPlayer).transform.position; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); } } } private void CalculateAnimationDirection(float maxSpeed = 1f) { //IL_0077: 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_0082: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) if (((Vector3)(ref agentLocalVelocity)).sqrMagnitude > 0f) { base.creatureSFX.volume = Mathf.Lerp(base.creatureSFX.volume, 1f, Time.deltaTime * 10f); } else { base.creatureSFX.volume = Mathf.Lerp(base.creatureSFX.volume, 0f, Time.deltaTime * 10f); } agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 2f)); velX = Mathf.Lerp(velX, agentLocalVelocity.x, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("MoveX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, agentLocalVelocity.z, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("MoveZ", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); previousPosition = ((Component)this).transform.position; } public override void OnCollideWithPlayer(Collider other) { //IL_0074: 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) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(Time.realtimeSinceStartup - timeSinceHittingPlayer < 0.65f) && !base.isEnemyDead) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { timeSinceHittingPlayer = Time.realtimeSinceStartup; burstSource.PlayOneShot(bitePlayer); WalkieTalkie.TransmitOneShotAudio(burstSource, bitePlayer, 1f); val.DamagePlayer(playerDamage, true, true, causeOfdeath, 8, false, default(Vector3)); GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(1f, true); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncBitePlayerRpc() { //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_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_0073: 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_00a5: 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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1795973767u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1795973767u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; burstSource.PlayOneShot(bitePlayer); WalkieTalkie.TransmitOneShotAudio(burstSource, bitePlayer, 1f); } } } 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) { TakeDamage(stun: true); } } public void TakeDamage(bool stun = false) { if (stun && Time.realtimeSinceStartup - timeAtLastHitStun > 1.15f && base.stunNormalizedTimer <= 0.2f) { timeAtLastHitStun = Time.realtimeSinceStartup; } base.enemyHP--; if (base.enemyHP <= 0) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } public override void KillEnemy(bool destroy = false) { //IL_0013: 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_0051: 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_006e: 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_00d3: Unknown result type (might be due to invalid IL or missing references) base.removedPowerLevel = true; GameObject val = Object.Instantiate(killParticle, ((Component)this).transform.position, ((Component)this).transform.rotation, RoundManager.Instance.mapPropsContainer.transform); Transform physicsParentAtEnemyPosition = GetPhysicsParentAtEnemyPosition(); burstPlayer.SpawnDeadBody((int)burstPlayer.playerClientId, Vector3.zero, 5, burstPlayer, 11, physicsParentAtEnemyPosition, val.transform, default(Vector3)); if (((NetworkBehaviour)this).IsServer) { GameObject val2 = Object.Instantiate(StartOfRound.Instance.ragdollGrabbableObjectPrefab, StartOfRound.Instance.propsContainer); val2.GetComponent().Spawn(false); val2.GetComponent().bodyID = (int)burstPlayer.playerClientId; } if (Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)this).transform.position) < 8f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } ((EnemyAI)this).EnableEnemyMesh(false, true, true); base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; base.agent.speed = 0f; base.overrideSettingEnemyMeshes = true; burstSource.Stop(); base.creatureSFX.Stop(); base.creatureVoice.Stop(); breathingSFX.Stop(); ((MonoBehaviour)this).StartCoroutine("DisableTheDisableList"); ((EnemyAI)this).KillEnemy(false); } public IEnumerator DisableTheDisableList() { if (disableOnKill != null) { GameObject[] array = disableOnKill; foreach (GameObject obj in array) { yield return (object)new WaitForSeconds(disableTimerSingle); obj.SetActive(false); } } } private Transform GetPhysicsParentAtEnemyPosition() { //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_003d: 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_0085: 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_0099: 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_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) VehicleController val = Object.FindObjectOfType(); if ((Object)(object)val != (Object)null && !val.physicsRegion.disablePhysicsRegion && val.physicsRegion.physicsCollider.ClosestPoint(((Component)this).transform.position) == ((Component)this).transform.position) { return val.physicsRegion.physicsTransform; } MineshaftElevatorController val2 = Object.FindObjectOfType(); if ((Object)(object)val2 != (Object)null) { PlayerPhysicsRegion componentInChildren = ((Component)val2).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && componentInChildren.physicsCollider.ClosestPoint(((Component)this).transform.position + Vector3.up * 0.05f) == ((Component)this).transform.position + Vector3.up * 0.05f) { return componentInChildren.physicsTransform; } } return null; } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncChompingAnimRpc(bool chomping) { //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_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_0074: 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_008e: 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_00c0: 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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2420189019u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref chomping, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2420189019u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; chestPlantVisible = chomping; base.creatureAnimator.SetBool("ChestVisible", chomping); base.creatureAnimator.SetBool("ChestBite", chomping); if (chomping && !burstSource.isPlaying) { burstSource.Play(); } else if (!chomping && burstSource.isPlaying) { burstSource.Stop(); } } } private void LateUpdate() { if (base.inSpecialAnimation) { ((EnemyAI)this).MoveWithMineshaftElevator(); } } public override void Update() { //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Invalid comparison between Unknown and I4 //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: 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_027d: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_019b: 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_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: 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_042c: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_083c: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_0711: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) //IL_0744: Unknown result type (might be due to invalid IL or missing references) //IL_0778: Unknown result type (might be due to invalid IL or missing references) //IL_077c: Unknown result type (might be due to invalid IL or missing references) //IL_0784: Unknown result type (might be due to invalid IL or missing references) //IL_0789: Unknown result type (might be due to invalid IL or missing references) //IL_078e: Unknown result type (might be due to invalid IL or missing references) //IL_07d7: Unknown result type (might be due to invalid IL or missing references) //IL_07db: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_07fd: Unknown result type (might be due to invalid IL or missing references) //IL_0802: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead || base.inSpecialAnimation) { return; } bool flag = Time.realtimeSinceStartup - timeAtLastHeardNoise < 1.5f; bool flag2 = Time.realtimeSinceStartup - timeAtLastHitStun < 0.75f; if ((flag && (lostPlayerInChase || seePlayerMeter < 0.07f)) || flag2 || base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; velX = Mathf.Lerp(velX, 0f, Time.deltaTime * 3f); velZ = Mathf.Lerp(velZ, 0f, Time.deltaTime * 3f); base.creatureAnimator.SetFloat("MoveX", velX); base.creatureAnimator.SetFloat("MoveZ", velZ); base.creatureAnimator.SetBool("stun", base.stunNormalizedTimer > 0f); base.creatureAnimator.SetBool("hitStunned", flag2 && base.stunNormalizedTimer <= 0f); if ((Object)(object)base.stunnedByPlayer != (Object)null) { flag = true; pingAttentionPos = ((Component)base.stunnedByPlayer).transform.position; } if (flag) { RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(pingAttentionPos); ((Component)this).transform.eulerAngles = new Vector3(0f, Mathf.LerpAngle(((Component)this).transform.eulerAngles.y, RoundManager.Instance.tempTransform.eulerAngles.y, Time.deltaTime * 22f), 0f); } return; } base.creatureAnimator.SetBool("hitStunned", false); base.creatureAnimator.SetBool("stun", false); CalculateAnimationDirection(); if (breathingSFX.isPlaying && Time.realtimeSinceStartup - timeSinceBurst > 10f) { breathingSFX.Stop(); playerScanNode.maxRange = 17; } int num = losRange; if ((int)TimeOfDay.Instance.currentLevelWeather == 3) { num = losRangeFoggy; } if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, losWidth, num, losProxAware, -1)) { if (base.currentBehaviourStateIndex == 1 && !lostPlayerInChase) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 0.7f); } else { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 0.3f); } } switch (base.currentBehaviourStateIndex) { case 0: if (previousBehaviourState != base.currentBehaviourStateIndex) { if (base.previousBehaviourStateIndex == 1 && searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (burstSource.isPlaying) { burstSource.Stop(); } previousBehaviourState = base.currentBehaviourStateIndex; } if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = speedD; if (chestPlantVisible) { chestPlantVisible = false; base.creatureAnimator.SetBool("ChestVisible", false); ChestBurstRpc(burst: false); } } break; case 1: { if (previousBehaviourState != base.currentBehaviourStateIndex) { previousBehaviourState = base.currentBehaviourStateIndex; } if (!((NetworkBehaviour)this).IsOwner || (Object)(object)base.targetPlayer == (Object)null || lostPlayerInChase) { break; } RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(((Component)base.targetPlayer).transform); ((Component)this).transform.eulerAngles = new Vector3(0f, Mathf.LerpAngle(((Component)this).transform.eulerAngles.y, RoundManager.Instance.tempTransform.eulerAngles.y, Time.deltaTime * 35f), 0f); float num2 = distanceToTarget; if (num2 < chestPlantChompingDistance) { base.agent.speed = chestPlantChompingSpeed; base.movingTowardsTargetPlayer = true; base.agent.acceleration = Mathf.Lerp(base.agent.acceleration, 50f, Time.deltaTime * 12f); chestPlantVisible = true; base.creatureAnimator.SetBool("ChestVisible", true); if (!base.creatureAnimator.GetBool("ChestBite")) { base.creatureAnimator.SetBool("ChestBite", true); SyncChompingAnimRpc(chomping: true); } if (!burstSource.isPlaying) { burstSource.Play(); } break; } if (base.creatureAnimator.GetBool("ChestBite")) { base.creatureAnimator.SetBool("ChestBite", false); SyncChompingAnimRpc(chomping: false); } if (burstSource.isPlaying) { burstSource.Stop(); } if (chestPlantVisible) { if (num2 > 8f && Time.realtimeSinceStartup - timeAtLastChestBurst > 3f) { chestPlantVisible = false; base.creatureAnimator.SetBool("ChestVisible", false); ChestBurstRpc(burst: false); } } else if (num2 < 6f) { timeAtLastChestBurst = Time.realtimeSinceStartup; chestPlantVisible = true; base.creatureAnimator.SetBool("ChestVisible", true); base.creatureVoice.PlayOneShot(chestBurst); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, chestBurst, 1f); base.creatureVoice.clip = chestPlantRoars[Random.Range(0, chestPlantRoars.Length)]; base.creatureVoice.Play(); ChestBurstRpc(burst: true); } if (num2 > 18f || isBehindObstacle) { base.movingTowardsTargetPlayer = true; base.agent.speed = farChaseSpeed; base.agent.acceleration = Mathf.Lerp(base.agent.acceleration, 120f, Time.deltaTime * 12f); break; } float num3 = 3f; if (base.pathDistance > 12f) { num3 = 6f; } base.agent.speed = Random.Range(minJitterSpeed, maxJitterSpeed); jitterMoveInterval -= Time.deltaTime; if (jitterMoveInterval < 0f) { jitterMoveInterval = Random.Range(minJitterInterval, maxJitterInterval); Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)this).transform.position + Vector3.up * 0.75f, ((Component)base.targetPlayer).transform.position - ((Component)this).transform.position); Vector3 point = ((Ray)(ref val)).GetPoint(Random.Range(0f, num2 / 2f)); float num4 = Random.Range(0f, Mathf.Clamp(num2 / num3, 4f, 15f)); int num5 = 1; if (Random.Range(0, 100) < 50) { num5 = -1; } if (Physics.Raycast(point, Vector3.Cross(((Ray)(ref val)).direction * (float)num5, Vector3.up), ref rayhit, num4, StartOfRound.Instance.collidersAndRoomMask, (QueryTriggerInteraction)1)) { num4 = Random.Range(0f, Mathf.Clamp(num2 / 3f, 4f, ((RaycastHit)(ref rayhit)).distance)); } Ray val2 = new Ray(point, Vector3.Cross(((Ray)(ref val)).direction * (float)num5, Vector3.up)); jitterDest = ((Ray)(ref val2)).GetPoint(num4); } base.agent.acceleration = Mathf.Lerp(base.agent.acceleration, maxAccel, Time.deltaTime * 12f); base.movingTowardsTargetPlayer = false; ((EnemyAI)this).SetDestinationToPosition(jitterDest, false); break; } case 2: if (previousBehaviourState != base.currentBehaviourStateIndex) { previousBehaviourState = base.currentBehaviourStateIndex; } break; } } [Rpc(/*Could not decode attribute arguments.*/)] public void ChestBurstRpc(bool burst) { //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_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_0074: 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_008e: 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_00c0: 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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2118194073u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref burst, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2118194073u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetBool("ChestVisible", burst); chestPlantVisible = burst; if (burst) { timeAtLastChestBurst = Time.realtimeSinceStartup; base.creatureVoice.PlayOneShot(chestBurst); base.creatureVoice.clip = chestPlantRoars[Random.Range(0, chestPlantRoars.Length)]; base.creatureVoice.Play(); } } } 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(1724664719u, new RpcReceiveHandler(__rpc_handler_1724664719), "PingAttentionRpc"); ((NetworkBehaviour)this).__registerRpc(1565346103u, new RpcReceiveHandler(__rpc_handler_1565346103), "SetNewTargetPlayerRpc"); ((NetworkBehaviour)this).__registerRpc(1795973767u, new RpcReceiveHandler(__rpc_handler_1795973767), "SyncBitePlayerRpc"); ((NetworkBehaviour)this).__registerRpc(2420189019u, new RpcReceiveHandler(__rpc_handler_2420189019), "SyncChompingAnimRpc"); ((NetworkBehaviour)this).__registerRpc(2118194073u, new RpcReceiveHandler(__rpc_handler_2118194073), "ChestBurstRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1724664719(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 lookAtPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lookAtPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingBloomAI)(object)target).PingAttentionRpc(lookAtPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1565346103(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 newTargetPlayerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref newTargetPlayerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingBloomAI)(object)target).SetNewTargetPlayerRpc(newTargetPlayerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1795973767(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; ((GravelingBloomAI)(object)target).SyncBitePlayerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2420189019(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 chomping = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref chomping, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingBloomAI)(object)target).SyncChompingAnimRpc(chomping); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2118194073(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 burst = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref burst, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingBloomAI)(object)target).ChestBurstRpc(burst); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GravelingBloomAI"; } } public class GravelingMasterAI : EnemyAI { public List GrowthTiles = new List(); public Random growthRandom; private int previousBehaviourState = -1; [Header("Growth Properties")] public float GrowthInterval = 3f; public AnimationCurve growthIntervalCurveOverDay; [Range(0f, 100f)] public float baseSpreadChance = 3f; public int TileCapacity = 40; [Range(0f, 100f)] public float GrowthChancePerInterval = 20f; [Space(5f)] [Header("Infect Properties")] public float InfectIntervalTime = 1f; [Range(0f, 2f)] public float ChanceToInfectMultiplier = 0.25f; [Range(0f, 2f)] public float InfectionSpeedMultiplier = 0.25f; [Range(0f, 2f)] public float BurstSpeedMultiplier = 0.25f; public GameObject[] plantPrefabs; private RaycastHit hit; public Tag RoomTileTag; public Tag TunnelTileTag; public Tag CaveTileTag; private float spreadInterval; public GameObject gravelingSporesParticle; public BatchAllMeshChildren[] plantBatchers; private int previousTileIndex; public int[,] moldPositions; public GameObject destroyPlantParticle; public AudioSource destroyAudio; public AudioSource plantAudio; private float cullIntervalTime = 0.75f; private float cullInterval; private float infectInterval; public PlayerInfection[] playerInfections; private int numberOfInfected; public GameObject backFlowersPrefab; private float showSignsMeter; public bool growingRecentPlant; public Vector3 recentPlantPosition; private float recentPlantSizeTarget = 1f; private (int batchNum, int positionIndex, int plantType) growingPlant; public GameObject bloomEnemyPrefab; public EnemyType bloomEnemyType; public GravelingBloomAI[] bloomEnemies; private float timeLastMusicPlayed; public AudioSource bloomMusic; public GameObject faceSporesPrefab; public AudioSource sporeAmbienceSource; private float updateSporeAudioInterval; private float distToPlants = 100f; private bool growingInTiles; public GameObject scanNodePrefab; private const string sporesWarningText = "HEALTH RISK!\n\nAir filter overwhelmed by particulates"; private List particlesTempArray; private Random playerDeathChanceRandom; public GameObject crackDecal; public AudioClip[] healPlayerSFX; public float totalTimeSpentInPlants; private float growthBurstTimer; private bool inGrowthBurst; private float timeAtLastHealing; public AudioSource vinesInHeadAudio; public AudioClip[] vinesInHeadSFX; private bool hinderingLocalPlayer; private float setPoison; private float localPlayerImmunityTimer; private bool stoodInWeedsLastCheck; [Header("VFX Replacement Stuff")] [Tooltip("If your 'usesVanillaSporesVFX' is set to true, vanilla spore VFX will replace the ones you set up above")] public bool usesVanillaSporesVFX = true; [Tooltip("If your 'usesVanillaSporesVFX' is set to true, this won't apply")] public GameObject replacementSporesVFX; [Tooltip("If your 'usesVanillaSporesVFX' is set to true, this won't apply")] public GameObject replacementPlayerSporesVFX; public void OnEnable() { ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerTalkEvent).AddListener((UnityAction)OnLocalPlayerTalk); ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerDieEvent).AddListener((UnityAction)OnLocalPlayerDie); } public void OnDisable() { ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerTalkEvent).RemoveListener((UnityAction)OnLocalPlayerTalk); ((UnityEvent)(object)StartOfRound.Instance.LocalPlayerDieEvent).RemoveListener((UnityAction)OnLocalPlayerDie); if (hinderingLocalPlayer) { hinderingLocalPlayer = false; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.isMovementHindered--; playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].hinderingPlayerMovement = false; } setPoison = 0f; if (GameNetworkManager.Instance.localPlayerController.overridePoisonValue) { GameNetworkManager.Instance.localPlayerController.overridePoisonValue = false; } } public void OnLocalPlayerDie(PlayerControllerB player, int deathAnimation) { //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_0119: 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_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_019d: 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_0153: 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_017d: 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) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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) switch (deathAnimation) { case -1: case 7: case 9: Debug.Log((object)$"Cadaver growth: Unable to burst from dying player '{player.playerUsername}'. Reason A (incompatible cause of death). Time:{TimeOfDay.Instance.normalizedTimeOfDay} "); return; default: if ((Object)(object)player.enemyWaitingForBodyRagdoll != (Object)null && player.enemyWaitingForBodyRagdoll.enemyType.enemyName == "MouthDog") { Debug.Log((object)$"Cadaver growth: Unable to burst from dying player '{player.playerUsername}'. Reason B (eyeless dog). Time:{TimeOfDay.Instance.normalizedTimeOfDay} "); return; } break; case 200: break; } if (!playerInfections[player.playerClientId].infected || (!playerInfections[player.playerClientId].bloomOnDeath && (double)(playerInfections[player.playerClientId].infectionMeter + 0.15f) < playerDeathChanceRandom.NextDouble())) { Debug.Log((object)$"Cadaver growth: Unable to burst from dying player '{player.playerUsername}'. Reason C (infection not progressed enough). Time:{TimeOfDay.Instance.normalizedTimeOfDay} "); return; } Vector3 val = ((Component)player).transform.position; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(((Component)player).transform.position, Vector3.down, ref val2, 10f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { Debug.Log((object)$"Cadaver growth: Burst on player death found raycast to ground. player position: {((Component)player).transform.position}; rayhit position: {((RaycastHit)(ref val2)).point}; Time:{TimeOfDay.Instance.normalizedTimeOfDay} "); val = ((RaycastHit)(ref val2)).point; } val = RoundManager.Instance.GetNavMeshPosition(val, default(NavMeshHit), 10f, base.agentMask); if (!RoundManager.Instance.GotNavMeshPositionResult) { Debug.Log((object)$"Cadaver growth: Unable to burst from dying player '{player.playerUsername}' Reason D (no navmesh position result). player position: {((Component)player).transform.position}; Time:{TimeOfDay.Instance.normalizedTimeOfDay} "); return; } playerInfections[player.playerClientId].infected = false; numberOfInfected--; BurstFromPlayer(player, ((Component)player).transform.position, ((Component)player).transform.eulerAngles); SyncBurstFromPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)player).transform.position, ((Component)player).transform.eulerAngles); } public void OnLocalPlayerTalk(float loudness) { //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0164: 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) //IL_0196: 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_01cd: 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_01dc: 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) if (!GameNetworkManager.Instance.localPlayerController.isPlayerControlled) { return; } PlayerInfection val = playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId]; Debug.Log((object)"On local player talk!"); if (!val.infected) { return; } Debug.Log((object)$"On local player talk! B ; {val.infectionMeter} ; {val.emittingSpores}"); if ((Object)(object)faceSporesPrefab != (Object)null && (Object)(object)gravelingSporesParticle != (Object)null && val.infectionMeter > 0.6f && (val.emittingSpores || Random.Range(0, 1000) < 10)) { Debug.Log((object)$"On local player talk! C {(Object)(object)val.backFlowers == (Object)null}; {(Object)(object)val.faceSpores == (Object)null}"); if (!((Object)(object)val.backFlowers == (Object)null) && (Object)(object)val.faceSpores != (Object)null) { val.faceSpores.SetFloat("BurstAmount", Mathf.Lerp(370f, 700f, loudness)); val.faceSporesOutput = 0.16f; ((Component)val.faceSpores).transform.position = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 0.25f; Debug.Log((object)$"Face spore object position: {((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position}; {((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position + ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward * 0.25f}"); ((Component)val.faceSpores).transform.rotation = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.rotation; val.faceSpores.Play(); CoughSporesRpc(loudness, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void CoughSporesRpc(float loudness, 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_005f: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00ad: 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_0132: 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_0186: 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_01e4: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3691068444u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref loudness, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3691068444u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerInfection val4 = playerInfections[playerId]; val4.faceSpores.SetFloat("BurstAmount", Mathf.Lerp(870f, 1300f, loudness)); val4.faceSporesOutput = 0.45f; ((Component)val4.faceSpores).transform.position = StartOfRound.Instance.allPlayerScripts[playerId].bodyParts[0].position + StartOfRound.Instance.allPlayerScripts[playerId].bodyParts[0].forward * 0.15f; ((Component)val4.faceSpores).transform.rotation = ((Component)StartOfRound.Instance.allPlayerScripts[playerId].bodyParts[0]).transform.rotation; val4.faceSpores.Play(); if (!(StartOfRound.Instance.allPlayerScripts[playerId].LineOfSightToPositionAngle(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, 12, 0f, -1) < 30f)) { return; } float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[playerId]).transform.position); if (num < 6f) { HUDManager.Instance.DisplayStatusEffect("HEALTH RISK!\n\nAir filter overwhelmed by particulates"); } if ((float)Random.Range(0, 1000) < Mathf.Lerp(50f, 1f, Mathf.Clamp(num * num / 60f, 0f, 1f))) { bool flag = false; if (Random.Range(0, 100) < 70) { flag = true; } bool flag2 = flag || Random.Range(0, 100) < 40; InfectPlayer(GameNetworkManager.Instance.localPlayerController, flag, flag2); InfectPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, flag, flag2); } } public bool GetAllPlantPositionsInRadius(Vector3 position, float radius, bool fillArray = false) { //IL_0015: 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_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_0092: Unknown result type (might be due to invalid IL or missing references) bool result = false; int[] array = new int[plantBatchers.Length]; Debug.Log((object)$"Checking nearby cadaver plant positions to position {position}"); int length = moldPositions.GetLength(0); for (int i = 0; i < plantBatchers.Length; i++) { List batchedPositions = plantBatchers[i].batchedPositions; Debug.Log((object)$"Checking plant type {i}"); for (int j = 0; j < batchedPositions.Count; j++) { Vector3 val = batchedPositions[j] - position; if (!(((Vector3)(ref val)).sqrMagnitude <= radius * radius)) { continue; } Debug.Log((object)$"Got nearby cadaver plant at index {j}, position {batchedPositions[j]}; addToArrayIndex: {array[i]}"); result = true; if (fillArray) { moldPositions[array[i], i] = j; array[i]++; if (array[i] >= length) { return true; } } else { array[i]++; } } } if (fillArray) { for (int k = 0; k < plantBatchers.Length; k++) { Debug.Log((object)$"batcher #{k}; addToArrayIndex: {array[k]}"); for (int l = array[k]; l < length; l++) { Debug.Log((object)$"setting to -1: ({l}, {k})"); moldPositions[l, k] = -1; } } } return result; } public void DestroyPlantAtPosition(Vector3 pos, bool playEffect = false) { //IL_0007: 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_001a: 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_01d7: 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_011a: 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_012e: 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_0138: 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_017c: Unknown result type (might be due to invalid IL or missing references) float radius = 1.5f; if (!GetAllPlantPositionsInRadius(pos, 1.5f, fillArray: true)) { Debug.LogError((object)$"Error: DestroyPlantAtPosition was called but could not find any plants at position: {pos}"); return; } Debug.Log((object)$"cadaver plants found at pos {pos}"); int length = moldPositions.GetLength(0); for (int i = 0; i < plantBatchers.Length; i++) { for (int j = 0; j < length && moldPositions[j, i] != -1; j++) { Debug.Log((object)$"moldPositions[{j},{i}]: {moldPositions[j, i]} -- corresponding to batchedPosition: {plantBatchers[i].batchedPositions[j]}"); } } for (int k = 0; k < plantBatchers.Length; k++) { List batchedPositions = plantBatchers[k].batchedPositions; for (int l = 0; l < length && moldPositions[l, k] != -1; l++) { if (playEffect) { Vector3 val = batchedPositions[moldPositions[l, k]] + Vector3.up * 0.5f; Object.Instantiate(destroyPlantParticle, val, Quaternion.identity, (Transform)null); destroyAudio.Stop(); ((Component)destroyAudio).transform.position = val; destroyAudio.Play(); RoundManager.Instance.PlayAudibleNoise(((Component)destroyAudio).transform.position, 6f, 0.5f, 0, false, 99611); } Debug.Log((object)$"Destroying: planttype:{k}, index:{l}"); RemoveWeedFromTile(plantBatchers[k].batchedPositionTiles[moldPositions[l, k]], pos, radius); } } int[] array = new int[40]; for (int m = 0; m < plantBatchers.Length; m++) { List batchedPositions2 = plantBatchers[m].batchedPositions; for (int n = 0; n < length; n++) { array[n] = moldPositions[n, m]; } Array.Sort(array, (int a, int b) => b.CompareTo(a)); for (int num = 0; num < length; num++) { moldPositions[num, m] = array[num]; if (moldPositions[num, m] < 0 || moldPositions[num, m] >= batchedPositions2.Count) { break; } plantBatchers[m].DestroyWeedAtIndexInMatrixList(moldPositions[num, m]); } } } private void RemoveWeedFromTile(int tileIndex, Vector3 destroyAtPos, float radius) { //IL_0046: 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_0067: 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_0071: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_01db: 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_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: 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_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_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) TileWithGrowth obj = GrowthTiles[tileIndex]; obj.plantsInTile--; GrowthTiles[tileIndex].particlesContainer.GetComponentsInChildren(true, particlesTempArray); Vector3 val; for (int num = particlesTempArray.Count - 1; num >= 0; num--) { val = destroyAtPos + Vector3.up * 0.75f - particlesTempArray[num].position; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { Object.Destroy((Object)(object)((Component)particlesTempArray[num]).gameObject); } } GrowthTiles[tileIndex].scanNodesContainer.GetComponentsInChildren(true, particlesTempArray); for (int num2 = particlesTempArray.Count - 1; num2 >= 0; num2--) { val = destroyAtPos + Vector3.up * 0.35f - particlesTempArray[num2].position; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { Object.Destroy((Object)(object)((Component)particlesTempArray[num2]).gameObject); } } if (growingRecentPlant && growingPlant.positionIndex < plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum].Count) { Matrix4x4 val2 = plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex]; val = ((Matrix4x4)(ref val2)).GetPosition() - destroyAtPos; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { growingPlant = (batchNum: -1, positionIndex: -1, plantType: -1); growingRecentPlant = false; } } GrowthTiles[tileIndex].plantPositions.Remove(destroyAtPos); for (int i = 0; i < GrowthTiles[tileIndex].plantPositions.Count; i++) { val = GrowthTiles[tileIndex].plantPositions[i] - destroyAtPos; if (((Vector3)(ref val)).sqrMagnitude <= radius * radius) { GrowthTiles[tileIndex].plantPositions.RemoveAt(i); } } if (GrowthTiles[tileIndex].plantsInTile <= 0) { GrowthTiles[tileIndex].eradicated = true; GrowthTiles[tileIndex].eradicatedAtTime = Time.realtimeSinceStartup; IEnumerable adjacentTiles = GrowthTiles[tileIndex].tile.GetAdjacentTiles(); List list = new List(); foreach (Tile item in adjacentTiles) { list.Add(item); } for (int j = 0; j < list.Count; j++) { for (int k = 0; k < GrowthTiles.Count; k++) { if ((Object)(object)GrowthTiles[k].tile == (Object)(object)list[j]) { GrowthTiles[k].cannotSpread = false; } } } } spreadInterval = Mathf.Min(spreadInterval + 2f, 12f); } public override void Start() { //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown if (Object.FindObjectsByType((FindObjectsSortMode)0).Length > 1) { base.isEnemyDead = true; base.inSpecialAnimation = true; if (((NetworkBehaviour)this).IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } return; } ((EnemyAI)this).Start(); particlesTempArray = new List(TileCapacity); bloomEnemies = new GravelingBloomAI[StartOfRound.Instance.allPlayerScripts.Length]; Debug.Log((object)$"Cadaver bloom growth ai spawning bloomEnemy array; Players length: {StartOfRound.Instance.allPlayerScripts.Length}; {bloomEnemies.Length}"); plantBatchers = ((Component)this).gameObject.GetComponents(); moldPositions = new int[40, plantBatchers.Length]; playerInfections = (PlayerInfection[])(object)new PlayerInfection[StartOfRound.Instance.allPlayerScripts.Length]; for (int i = 0; i < playerInfections.Length; i++) { playerInfections[i] = new PlayerInfection(); } for (int j = 0; j < plantBatchers.Length; j++) { int length = moldPositions.GetLength(0); for (int k = 0; k < length; k++) { moldPositions[k, j] = -1; } } growthRandom = new Random(StartOfRound.Instance.randomMapSeed + 11); playerDeathChanceRandom = new Random(StartOfRound.Instance.randomMapSeed + 12); if (((NetworkBehaviour)this).IsOwner) { GetRandomTileToStart(); } } private void GetRandomTileToStart() { //IL_0287: 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_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: 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) RuntimeDungeon val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null || (Object)(object)val.Generator.CurrentDungeon == (Object)null || val.Generator.CurrentDungeon.AllTiles.Count <= 0) { Debug.LogError((object)"Cadaver plant growth AI: Error! Found no dungeon"); if (((NetworkBehaviour)this).IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } return; } List list = new List(); List list2 = new List(); for (int i = 0; i < val.Generator.CurrentDungeon.MainPathTiles.Count; i++) { if ((RoundManager.Instance.currentDungeonType == 4 && val.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(CaveTileTag)) || val.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(RoomTileTag)) { list.Add(val.Generator.CurrentDungeon.AllTiles[i]); } else { list2.Add(val.Generator.CurrentDungeon.AllTiles[i]); } } bool flag = true; List list3; if (growthRandom.Next(0, 100) < 30 || list.Count == 0) { list3 = list2; flag = false; if (RoundManager.Instance.currentDungeonType == 0 || (RoundManager.Instance.currentDungeonType == 3 && (Object)(object)list3[0] == (Object)(object)RoundManager.Instance.dungeonGenerator.Generator.CurrentDungeon.MainPathTiles[0])) { list3.RemoveAt(0); } } else { if ((Object)(object)list[list.Count - 1] == (Object)(object)val.Generator.CurrentDungeon.MainPathTiles[val.Generator.CurrentDungeon.MainPathTiles.Count - 1]) { list.RemoveAt(list.Count - 1); if (list.Count == 0) { list3 = list2; flag = false; } } list3 = list; } if (list3.Count == 0) { Debug.LogError((object)"Graveling plant growth AI: Could not find any tile in AllTiles list!"); if (((NetworkBehaviour)this).IsServer) { Object.Destroy((Object)(object)((Component)this).gameObject); } } else { int num = (flag ? growthRandom.Next(0, list3.Count) : growthRandom.Next(0, list3.Count / 2)); GrowthTiles.Add(new TileWithGrowth(list3[num], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, Vector3.zero + Vector3.down * 30f)); SyncAddInitialGrowthTileRpc(num, Vector3.zero + Vector3.down * 30f, flag); } } private Transform FindChildWithTag(string tag, Transform inTransform) { Transform[] componentsInChildren = ((Component)inTransform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if (((Component)componentsInChildren[i]).CompareTag(tag)) { return componentsInChildren[i]; } } return null; } public void CullParticlesForTiles() { //IL_000f: 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_007c: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: 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_00d9: 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_00fd: 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_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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: 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_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: 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_0209: 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_0212: Unknown result type (might be due to invalid IL or missing references) bool flag = ((Component)StartOfRound.Instance.activeCamera).transform.position.y < -90f; Vector3 val = default(Vector3); for (int i = 0; i < GrowthTiles.Count; i++) { if ((Object)(object)GrowthTiles[i].particlesContainer == (Object)null || (Object)(object)GrowthTiles[i].plantsContainer == (Object)null) { continue; } Bounds bounds = GrowthTiles[i].tile.Bounds; float x = ((Bounds)(ref bounds)).center.x; float y = ((Component)StartOfRound.Instance.activeCamera).transform.position.y; bounds = GrowthTiles[i].tile.Bounds; ((Vector3)(ref val))..ctor(x, y, ((Bounds)(ref bounds)).center.z); bool flag2 = false; float y2 = ((Component)StartOfRound.Instance.activeCamera).transform.position.y; bounds = GrowthTiles[i].tile.Bounds; if (!(y2 < ((Bounds)(ref bounds)).min.y)) { float y3 = ((Component)StartOfRound.Instance.activeCamera).transform.position.y; bounds = GrowthTiles[i].tile.Bounds; if (!(y3 > ((Bounds)(ref bounds)).max.y)) { goto IL_014a; } } flag2 = true; goto IL_014a; IL_014a: if (!flag || flag2) { if (GrowthTiles[i].plantsContainer.activeSelf) { GrowthTiles[i].plantsContainer.SetActive(false); } if (GrowthTiles[i].particlesContainer.activeSelf) { GrowthTiles[i].particlesContainer.SetActive(false); } continue; } float num = Vector3.Distance(val, ((Component)StartOfRound.Instance.activeCamera).transform.position); bounds = GrowthTiles[i].tile.Bounds; float x2 = ((Bounds)(ref bounds)).size.x; bounds = GrowthTiles[i].tile.Bounds; float num2 = Mathf.Max(x2, ((Bounds)(ref bounds)).size.z); if (num > num2 + 16f) { if (GrowthTiles[i].plantsContainer.activeSelf) { GrowthTiles[i].plantsContainer.SetActive(false); } if (GrowthTiles[i].particlesContainer.activeSelf) { GrowthTiles[i].particlesContainer.SetActive(false); } continue; } if (!GrowthTiles[i].plantsContainer.activeSelf) { GrowthTiles[i].plantsContainer.SetActive(true); } if (!GrowthTiles[i].particlesContainer.activeSelf) { if (num < num2 + 6f) { GrowthTiles[i].particlesContainer.SetActive(true); } } else if (num > num2 + 8f) { GrowthTiles[i].particlesContainer.SetActive(false); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncSpawnPlantRpc(int plantId, int tileIndex, Vector3 spawnPosition, Quaternion spawnRotation, float randomSize, bool spawnScanNode, bool spawnDecal) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_00a8: 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_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_00de: 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_00f8: 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_012a: 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_0178: Expected O, but got Unknown //IL_0190: 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_0199: 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_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_020a: 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_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: 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_02e5: 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_0332: 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_035c: 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_0365: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Expected O, but got Unknown //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_0394: Expected O, but got Unknown //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: 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_03fe: 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_040d: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0417: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Expected O, but got Unknown //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0485: 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_0580: 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_0591: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Unknown result type (might be due to invalid IL or missing references) //IL_04d7: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1081245869u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, plantId); BytePacker.WriteValueBitPacked(val2, tileIndex); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref randomSize, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnScanNode, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref spawnDecal, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1081245869u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (GrowthTiles.Count <= tileIndex) { Debug.LogError((object)$"Error: Client does not have tile at index of {tileIndex}"); return; } Bounds bounds; if ((Object)(object)GrowthTiles[tileIndex].plantsContainer == (Object)null) { GameObject val4 = new GameObject("PlantsContainer"); Transform transform = val4.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform.position = ((Bounds)(ref bounds)).center; val4.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].plantsContainer = val4; } else { GameObject plantsContainer = GrowthTiles[tileIndex].plantsContainer; } GameObject val5 = Object.Instantiate(plantPrefabs[plantId], spawnPosition, spawnRotation, (Transform)null); GrowthTiles[tileIndex].plantPositions.Add(spawnPosition); val5.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); if ((Object)(object)GrowthTiles[tileIndex].particlesContainer == (Object)null) { GameObject val6 = new GameObject("SporesContainer"); Transform transform2 = val6.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform2.position = ((Bounds)(ref bounds)).center; val6.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].particlesContainer = val6; } GameObject val7 = Object.Instantiate(gravelingSporesParticle, val5.transform.position + Vector3.up * 0.75f, Quaternion.identity, (Transform)null); val7.transform.localScale = Vector3.one; val7.transform.SetParent(GrowthTiles[tileIndex].particlesContainer.transform, true); VisualEffect component = val7.GetComponent(); bounds = GrowthTiles[tileIndex].tile.Bounds; component.SetVector3("RoomBoundsCenter", ((Bounds)(ref bounds)).center); VisualEffect component2 = val7.GetComponent(); bounds = GrowthTiles[tileIndex].tile.Bounds; component2.SetVector3("RoomBoundsSize", ((Bounds)(ref bounds)).size); if ((Object)(object)GrowthTiles[tileIndex].scanNodesContainer == (Object)null) { GameObject val8 = new GameObject("ScanNodesContainer"); Transform transform3 = val8.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform3.position = ((Bounds)(ref bounds)).center; val8.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].scanNodesContainer = val8; } if (spawnScanNode) { Object.Instantiate(scanNodePrefab, val7.transform.position + Vector3.up * 0.35f, Quaternion.identity, (Transform)null).transform.SetParent(GrowthTiles[tileIndex].scanNodesContainer.transform, true); } if ((Object)(object)GrowthTiles[tileIndex].decalsContainer == (Object)null) { GameObject val9 = new GameObject("DecalsContainer"); Transform transform4 = val9.transform; bounds = GrowthTiles[tileIndex].tile.Bounds; transform4.position = ((Bounds)(ref bounds)).center; val9.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[tileIndex].decalsContainer = val9; } if (spawnDecal) { Object.Instantiate(crackDecal, val7.transform.position + Vector3.up * 0.35f, Quaternion.Euler(0f, Random.Range(-360f, 360f), 0f), (Transform)null).transform.SetParent(GrowthTiles[tileIndex].scanNodesContainer.transform, true); } QuickFinishGrowingPlant(); (int, int) tuple = plantBatchers[plantId].AddToBatchedChildren(val5.GetComponent(), true, tileIndex); int item = tuple.Item1; int item2 = tuple.Item2; growingPlant = (batchNum: item, positionIndex: item2, plantType: plantId); recentPlantSizeTarget = randomSize * 7.75f; growingRecentPlant = true; recentPlantPosition = spawnPosition; ((Component)plantAudio).transform.position = spawnPosition; plantAudio.pitch = Random.Range(0.8f, 1.2f); plantAudio.Play(); TileWithGrowth obj = GrowthTiles[tileIndex]; obj.plantsInTile++; } public void GrowInTiles() { //IL_0155: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0169: 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_0235: 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_01d0: 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_01d9: 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_01f5: 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) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0211: 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_01b2: 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_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0275: 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_027e: Unknown result type (might be due to invalid IL or missing references) //IL_029a: 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_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: 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_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_030b: 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_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0335: Unknown result type (might be due to invalid IL or missing references) //IL_0339: 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_035b: 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_037b: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: 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_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03cb: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: 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_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: 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_0429: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0446: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_044d: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0465: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0476: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0512: Expected O, but got Unknown //IL_052b: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0534: 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_058f: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05b3: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_061c: 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_064f: Unknown result type (might be due to invalid IL or missing references) //IL_04cf: Unknown result type (might be due to invalid IL or missing references) //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_06f2: Unknown result type (might be due to invalid IL or missing references) //IL_06f7: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_075c: 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_0765: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_0792: Unknown result type (might be due to invalid IL or missing references) //IL_0796: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Expected O, but got Unknown //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Expected O, but got Unknown //IL_07df: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_0d73: Unknown result type (might be due to invalid IL or missing references) //IL_0d78: Unknown result type (might be due to invalid IL or missing references) //IL_0d82: Unknown result type (might be due to invalid IL or missing references) //IL_0d87: Unknown result type (might be due to invalid IL or missing references) //IL_0d8c: Unknown result type (might be due to invalid IL or missing references) //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Expected O, but got Unknown //IL_0861: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_08e0: Unknown result type (might be due to invalid IL or missing references) //IL_08f2: Unknown result type (might be due to invalid IL or missing references) //IL_08f7: Unknown result type (might be due to invalid IL or missing references) //IL_08fc: Unknown result type (might be due to invalid IL or missing references) //IL_0de3: Unknown result type (might be due to invalid IL or missing references) //IL_0de8: Unknown result type (might be due to invalid IL or missing references) //IL_0e35: Unknown result type (might be due to invalid IL or missing references) //IL_0e37: Unknown result type (might be due to invalid IL or missing references) //IL_0e41: Expected O, but got Unknown //IL_0952: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_0969: Unknown result type (might be due to invalid IL or missing references) //IL_096e: Unknown result type (might be due to invalid IL or missing references) //IL_099f: Unknown result type (might be due to invalid IL or missing references) //IL_09a4: Unknown result type (might be due to invalid IL or missing references) //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09b8: Unknown result type (might be due to invalid IL or missing references) //IL_0a87: Unknown result type (might be due to invalid IL or missing references) //IL_0a90: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Unknown result type (might be due to invalid IL or missing references) //IL_0b01: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a08: Unknown result type (might be due to invalid IL or missing references) //IL_0a0d: Unknown result type (might be due to invalid IL or missing references) //IL_0a2b: Unknown result type (might be due to invalid IL or missing references) //IL_0a40: Unknown result type (might be due to invalid IL or missing references) //IL_0a54: Unknown result type (might be due to invalid IL or missing references) //IL_0ef2: Unknown result type (might be due to invalid IL or missing references) bool flag = false; bool flag2 = false; List list = new List(); int num = 0; for (int i = previousTileIndex; i < GrowthTiles.Count; i++) { num = i; if (flag) { growingInTiles = false; previousTileIndex = i; return; } if (flag2) { previousTileIndex = i; return; } int num2 = GrowthTiles[i].tileCapacity; if (RoundManager.Instance.currentDungeonType == 4) { if (GrowthTiles[i].tile.Tags.Tags.Contains(CaveTileTag)) { num2 = TileCapacity / 4; } } else if (!GrowthTiles[i].tile.Tags.Tags.Contains(RoomTileTag) && (RoundManager.Instance.currentDungeonType != 1 || !GrowthTiles[i].tile.Tags.Tags.Contains(TunnelTileTag))) { num2 = TileCapacity / 4; } float num3 = growthRandom.Next(0, 100); if (GrowthTiles[i].plantsInTile < num2 && num3 < GrowthChancePerInterval && !GrowthTiles[i].eradicated) { Bounds bounds; Vector3 val3; if (GrowthTiles[i].lastPlantGrownPosition == Vector3.zero + Vector3.down * 30f) { Transform val = FindChildWithTag("AINode", ((Component)GrowthTiles[i].tile).gameObject.transform); Vector3 val2; if ((Object)(object)val != (Object)null) { val2 = val.position; } else { RoundManager instance = RoundManager.Instance; bounds = GrowthTiles[i].tile.Bounds; Vector3 center = ((Bounds)(ref bounds)).center; bounds = GrowthTiles[i].tile.Bounds; val2 = instance.GetRandomNavMeshPositionInBoxPredictable(center, ((Bounds)(ref bounds)).extents.x * 2f, default(NavMeshHit), growthRandom, -1, 1f); } val3 = val2; } else { val3 = GrowthTiles[i].lastPlantGrownPosition; } float num4 = ((growthRandom.Next(0, 100) >= 25) ? 3f : 5f); RoundManager instance2 = RoundManager.Instance; Vector3 val4 = val3; bounds = GrowthTiles[i].tile.Bounds; float x = ((Bounds)(ref bounds)).center.x; bounds = GrowthTiles[i].tile.Bounds; float num5 = x - ((Bounds)(ref bounds)).extents.x; bounds = GrowthTiles[i].tile.Bounds; float x2 = ((Bounds)(ref bounds)).center.x; bounds = GrowthTiles[i].tile.Bounds; float num6 = x2 + ((Bounds)(ref bounds)).extents.x; bounds = GrowthTiles[i].tile.Bounds; float z = ((Bounds)(ref bounds)).center.z; bounds = GrowthTiles[i].tile.Bounds; float num7 = z - ((Bounds)(ref bounds)).extents.z; bounds = GrowthTiles[i].tile.Bounds; float z2 = ((Bounds)(ref bounds)).center.z; bounds = GrowthTiles[i].tile.Bounds; float num8 = z2 + ((Bounds)(ref bounds)).extents.z; bounds = GrowthTiles[i].tile.Bounds; float y = ((Bounds)(ref bounds)).center.y; bounds = GrowthTiles[i].tile.Bounds; float num9 = y - ((Bounds)(ref bounds)).extents.y; bounds = GrowthTiles[i].tile.Bounds; float y2 = ((Bounds)(ref bounds)).center.y; bounds = GrowthTiles[i].tile.Bounds; Vector3 randomNavMeshPositionInBoxWithLimits = instance2.GetRandomNavMeshPositionInBoxWithLimits(val4, num5, num6, num7, num8, num9, y2 + ((Bounds)(ref bounds)).extents.y, num4, default(NavMeshHit), growthRandom, StartOfRound.Instance.collidersAndRoomMaskAndDefault, 3f); if (randomNavMeshPositionInBoxWithLimits == Vector3.zero) { continue; } Vector3 val5 = Vector3.zero; if (Physics.Raycast(randomNavMeshPositionInBoxWithLimits + Vector3.up * 0.2f, Vector3.down, ref hit, 3f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { float num10 = Vector3.Angle(Vector3.up, ((RaycastHit)(ref hit)).normal); if (num10 > 75f) { continue; } if (num10 > 30f) { val5 = ((RaycastHit)(ref hit)).normal; } } int num11 = growthRandom.Next(0, plantPrefabs.Length); if ((Object)(object)GrowthTiles[i].plantsContainer == (Object)null) { GameObject val6 = new GameObject("PlantsContainer"); Transform transform = val6.transform; bounds = GrowthTiles[i].tile.Bounds; transform.position = ((Bounds)(ref bounds)).center; val6.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].plantsContainer = val6; } else { GameObject plantsContainer = GrowthTiles[i].plantsContainer; } GameObject val7 = Object.Instantiate(plantPrefabs[num11], randomNavMeshPositionInBoxWithLimits, Quaternion.Euler(val5.x, (float)growthRandom.Next(-180, 180), val5.z), (Transform)null); float num12 = Mathf.Clamp((float)(growthRandom.NextDouble() * 0.6000000238418579), 0.35f, 1f) + 0.75f; GrowthTiles[i].plantPositions.Add(randomNavMeshPositionInBoxWithLimits); val7.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); TileWithGrowth obj = GrowthTiles[i]; obj.plantsInTile++; GrowthTiles[i].lastPlantGrownPosition = randomNavMeshPositionInBoxWithLimits; if ((Object)(object)GrowthTiles[i].particlesContainer == (Object)null) { GameObject val8 = new GameObject("SporesContainer"); Transform transform2 = val8.transform; bounds = GrowthTiles[i].tile.Bounds; transform2.position = ((Bounds)(ref bounds)).center; val8.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].particlesContainer = val8; } GameObject val9 = Object.Instantiate(gravelingSporesParticle, val7.transform.position + Vector3.up * 0.75f, Quaternion.identity, (Transform)null); val9.transform.localScale = Vector3.one; val9.transform.SetParent(GrowthTiles[i].particlesContainer.transform, true); VisualEffect component = val9.GetComponent(); bounds = GrowthTiles[i].tile.Bounds; component.SetVector3("RoomBoundsCenter", ((Bounds)(ref bounds)).center); VisualEffect component2 = val9.GetComponent(); bounds = GrowthTiles[i].tile.Bounds; component2.SetVector3("RoomBoundsSize", ((Bounds)(ref bounds)).size); if ((Object)(object)GrowthTiles[i].scanNodesContainer == (Object)null) { GameObject val10 = new GameObject("ScanNodesContainer"); Transform transform3 = val10.transform; bounds = GrowthTiles[i].tile.Bounds; transform3.position = ((Bounds)(ref bounds)).center; val10.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].scanNodesContainer = val10; } if ((Object)(object)GrowthTiles[i].decalsContainer == (Object)null) { GameObject val11 = new GameObject("DecalsContainer"); Transform transform4 = val11.transform; bounds = GrowthTiles[i].tile.Bounds; transform4.position = ((Bounds)(ref bounds)).center; val11.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); GrowthTiles[i].decalsContainer = val11; } GrowthTiles[i].scanNodesContainer.GetComponentsInChildren(true, particlesTempArray); bool flag3 = false; bool flag4 = false; Vector3 val12; for (int num13 = particlesTempArray.Count - 1; num13 >= 0; num13--) { val12 = val9.transform.position - particlesTempArray[num13].position; if (((Vector3)(ref val12)).sqrMagnitude <= 9f) { flag3 = true; break; } } GrowthTiles[i].decalsContainer.GetComponentsInChildren(true, particlesTempArray); for (int num14 = particlesTempArray.Count - 1; num14 >= 0; num14--) { val12 = val9.transform.position - particlesTempArray[num14].position; if (((Vector3)(ref val12)).sqrMagnitude <= 36f) { flag4 = true; break; } } if (!flag3) { Object.Instantiate(scanNodePrefab, val9.transform.position + Vector3.up * 0.35f, Quaternion.identity, (Transform)null).transform.SetParent(GrowthTiles[i].scanNodesContainer.transform, true); } if (!flag4) { GameObject val13 = Object.Instantiate(crackDecal, val9.transform.position + Vector3.up * 0.35f, Quaternion.Euler(90f, Random.Range(-360f, 360f), 0f), (Transform)null); Transform transform5 = val13.transform; transform5.localScale *= Random.Range(0.7f, 1f); val13.transform.SetParent(GrowthTiles[i].scanNodesContainer.transform, true); } SyncSpawnPlantRpc(num11, i, randomNavMeshPositionInBoxWithLimits, val7.transform.rotation, num12, !flag3, !flag4); QuickFinishGrowingPlant(); (int, int) tuple = plantBatchers[num11].AddToBatchedChildren(val7.GetComponent(), true, i); int item = tuple.Item1; int item2 = tuple.Item2; growingPlant = (batchNum: item, positionIndex: item2, plantType: num11); recentPlantSizeTarget = num12 * 7.75f; growingRecentPlant = true; recentPlantPosition = randomNavMeshPositionInBoxWithLimits; ((Component)plantAudio).transform.position = randomNavMeshPositionInBoxWithLimits; plantAudio.pitch = Random.Range(0.8f, 1.2f); plantAudio.Play(); flag = true; } if (GrowthTiles[i].cannotSpread || GrowthTiles[i].plantsInTile < 7) { continue; } float num15 = Mathf.Clamp(Mathf.Lerp(-12f, 14f, (float)GrowthTiles[i].plantsInTile / (float)num2), baseSpreadChance, 100f); if (GrowthTiles.Count >= 6) { num15 *= 0.66f; } if ((float)growthRandom.NextDouble() * 100f > num15) { continue; } flag2 = true; IEnumerable adjacentTiles = GrowthTiles[i].tile.GetAdjacentTiles(); list?.Clear(); foreach (Tile item3 in adjacentTiles) { list.Add(item3); } bool flag5 = false; bool flag6 = false; for (int num16 = list.Count - 1; num16 >= 0; num16--) { for (int j = 0; j < GrowthTiles.Count; j++) { if (!((Object)(object)GrowthTiles[j].tile == (Object)(object)list[num16])) { continue; } if (GrowthTiles[j].eradicated) { if (Time.realtimeSinceStartup - GrowthTiles[j].eradicatedAtTime < 45f) { list.RemoveAt(num16); flag6 = true; } else { flag5 = true; } } else { list.RemoveAt(num16); } break; } } if (list.Count == 0) { if (!flag6) { GrowthTiles[i].cannotSpread = true; } continue; } int index = growthRandom.Next(0, list.Count); bool flag7 = false; if (flag5) { for (int k = 0; k < GrowthTiles.Count; k++) { if ((Object)(object)GrowthTiles[k].tile == (Object)(object)list[index]) { GrowthTiles[k].eradicated = false; flag7 = true; break; } } } Vector3 val14 = Vector3.zero + Vector3.down * 30f; for (int l = 0; l < list[index].UsedDoorways.Count; l++) { if ((Object)(object)list[index].UsedDoorways[l].ConnectedDoorway.Tile == (Object)(object)GrowthTiles[i].tile) { val14 = ((Component)list[index].UsedDoorways[l]).transform.position; break; } } if (!flag7) { GrowthTiles.Add(new TileWithGrowth(list[index], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, val14)); RuntimeDungeon val15 = Object.FindObjectOfType(); if ((Object)(object)val15 == (Object)null || (Object)(object)val15.Generator.CurrentDungeon == (Object)null || val15.Generator.CurrentDungeon.AllTiles.Count <= 0) { Debug.LogError((object)"Graveling plant growth AI: Error! Found no dungeon when adding new tile"); return; } int num17 = -1; for (int m = 0; m < val15.Generator.CurrentDungeon.AllTiles.Count; m++) { if ((Object)(object)val15.Generator.CurrentDungeon.AllTiles[m] == (Object)(object)list[index]) { num17 = m; break; } } if (num17 == -1) { Debug.LogError((object)"Graveling plant growth AI: Could not find adjacent tile in AllTiles list! Unable to sync to clients."); return; } SyncAddGrowthTileRpc(num17, val14); continue; } int num18 = -1; for (int n = 0; n < GrowthTiles.Count; n++) { if ((Object)(object)GrowthTiles[n].tile == (Object)(object)list[index]) { num18 = n; break; } } if (num18 == -1) { Debug.LogError((object)"Graveling plant growth AI: Could not find growth tile in alltiles list! Unable to sync un-eradicated tile to clients"); return; } SyncRemoveEradicationFromTileRpc(num18); } if (num == GrowthTiles.Count - 1) { growingInTiles = false; previousTileIndex = 0; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncRemoveEradicationFromTileRpc(int tileIndex) { //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_0068: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4276684530u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, tileIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4276684530u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (tileIndex >= GrowthTiles.Count) { Debug.LogError((object)$"Client sent tile index greater than GrowthTiles count! tile index: {tileIndex}"); } else { GrowthTiles[tileIndex].eradicated = false; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncAddGrowthTileRpc(int tileAtIndex, Vector3 doorPos) { //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_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) //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_0148: Expected O, but got Unknown NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4145819552u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, tileAtIndex); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref doorPos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4145819552u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RuntimeDungeon val4 = Object.FindObjectOfType(); if ((Object)(object)val4 == (Object)null || (Object)(object)val4.Generator.CurrentDungeon == (Object)null || val4.Generator.CurrentDungeon.AllTiles.Count <= 0) { Debug.LogError((object)"Graveling plant growth AI: Error! Found no dungeon when syncing from host"); } else { GrowthTiles.Add(new TileWithGrowth(val4.Generator.CurrentDungeon.AllTiles[tileAtIndex], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, doorPos)); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncAddInitialGrowthTileRpc(int tileAtIndex, Vector3 doorPos, bool gotRoomTile) { //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_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_008e: 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_00a8: 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_00da: 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_0357: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Expected O, but got Unknown NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(948426614u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, tileAtIndex); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref doorPos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref gotRoomTile, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 948426614u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RuntimeDungeon val4 = Object.FindObjectOfType(); if ((Object)(object)val4 == (Object)null || (Object)(object)val4.Generator.CurrentDungeon == (Object)null || val4.Generator.CurrentDungeon.AllTiles.Count <= 0) { Debug.LogError((object)"Graveling growth AI: Error! Found no dungeon when syncing from host"); return; } List list = new List(); List list2 = new List(); for (int i = 0; i < val4.Generator.CurrentDungeon.MainPathTiles.Count; i++) { if ((RoundManager.Instance.currentDungeonType == 4 && val4.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(CaveTileTag)) || val4.Generator.CurrentDungeon.AllTiles[i].Tags.Tags.Contains(RoomTileTag)) { list.Add(val4.Generator.CurrentDungeon.AllTiles[i]); } else { list2.Add(val4.Generator.CurrentDungeon.AllTiles[i]); } } if (RoundManager.Instance.currentDungeonType == 0 || (RoundManager.Instance.currentDungeonType == 3 && (Object)(object)list2[0] == (Object)(object)RoundManager.Instance.dungeonGenerator.Generator.CurrentDungeon.MainPathTiles[0])) { list2.RemoveAt(0); } if (gotRoomTile && (Object)(object)list[list.Count - 1] == (Object)(object)val4.Generator.CurrentDungeon.MainPathTiles[val4.Generator.CurrentDungeon.MainPathTiles.Count - 1]) { list.RemoveAt(list.Count - 1); if (list.Count == 0) { Debug.LogError((object)"Graveling growth AI: Client found no room tiles after removing last room tile! Unable to sync"); return; } } if (gotRoomTile) { if (tileAtIndex >= list.Count) { Debug.LogError((object)$"Graveling growth AI: Tile index synced from host ({tileAtIndex}) is greater than the amount of rooms on the main path! {list.Count} Cannot sync!"); } else { GrowthTiles.Add(new TileWithGrowth(list[tileAtIndex], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, doorPos)); } } else if (tileAtIndex >= list2.Count) { Debug.LogError((object)$"Graveling growth AI: Non-room tile index synced from host ({tileAtIndex}) is greater than the amount of tiles on the main path! {list.Count} Cannot sync!"); } else { GrowthTiles.Add(new TileWithGrowth(list2[tileAtIndex], TileCapacity, CaveTileTag, RoomTileTag, TunnelTileTag, doorPos)); } } public static void Shuffle(MeshRenderer[] array) { for (int num = array.Length - 1; num > 0; num--) { int num2 = Random.Range(0, num + 1); MeshRenderer val = array[num]; array[num] = array[num2]; array[num2] = val; } } private void IncreaseBackFlowers(int playerId) { //IL_011f: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId]; Debug.Log((object)$"Increase back flowers called for player #{playerId}"); if ((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } if ((Object)(object)playerInfections[playerId].backFlowers == (Object)null) { playerInfections[playerId].backFlowers = Object.Instantiate(backFlowersPrefab, (Transform)null, true); playerInfections[playerId].backFlowers.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform); playerInfections[playerId].backFlowerRenderers = playerInfections[playerId].backFlowers.GetComponentsInChildren(); Shuffle(playerInfections[playerId].backFlowerRenderers); if ((Object)(object)playerInfections[playerId].backFlowersScanNode == (Object)null) { playerInfections[playerId].backFlowersScanNode = Object.Instantiate(scanNodePrefab, playerInfections[playerId].backFlowers.transform, true); playerInfections[playerId].backFlowersScanNode.transform.localPosition = new Vector3(0f, 0.18f, -0.3f); } playerInfections[playerId].backFlowersScanNode.SetActive(true); } int num = 0; int num2 = Random.Range(0, 4); for (int i = 0; i < playerInfections[playerId].backFlowerRenderers.Length; i++) { if (!((Renderer)playerInfections[playerId].backFlowerRenderers[i]).enabled) { ((Renderer)playerInfections[playerId].backFlowerRenderers[i]).enabled = true; num++; if (num >= num2) { break; } } } } [Rpc(/*Could not decode attribute arguments.*/)] public void IncreaseBackFlowersRpc(int playerId, float infectionMeter) { //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_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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00cd: 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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3656129568u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref infectionMeter, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3656129568u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; playerInfections[playerId].infectionMeter = infectionMeter; if (playerInfections[playerId].infectionMeter > 0.55f) { playerInfections[playerId].bloomOnDeath = true; } IncreaseBackFlowers(playerId); } } public void InfectPlayers() { //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_02bf: 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_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.localPlayerController.isPlayerDead || !GameNetworkManager.Instance.localPlayerController.isInsideFactory || (Object)(object)StartOfRound.Instance.occlusionCuller.currentTile == (Object)null) { return; } Tile currentTile = StartOfRound.Instance.occlusionCuller.currentTile; bool infected = playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected; bool flag = false; bool flag2 = false; int index = -1; for (int i = 0; i < GrowthTiles.Count; i++) { if ((Object)(object)GrowthTiles[i].tile == (Object)(object)currentTile && !GrowthTiles[i].eradicated && GrowthTiles[i].plantsInTile > 0) { flag = true; flag2 = true; index = i; break; } } float num = 0f; if (flag) { float num2 = 1000f; int num3 = -1; float num4 = 0f; for (int j = 0; j < GrowthTiles[index].plantPositions.Count; j++) { Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position - GrowthTiles[index].plantPositions[j]; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; num3 = j; } if (sqrMagnitude < 100f) { num4 += 1f; } } num = Mathf.Clamp(Mathf.Lerp(2f, 16f, num4 / (float)TileCapacity), 0f, 100f); num *= ChanceToInfectMultiplier; if (!infected) { num *= Mathf.Lerp(1f, 0.75f, (float)numberOfInfected / (float)StartOfRound.Instance.livingPlayers); } if (num3 != -1) { float num5 = Vector3.Distance(GrowthTiles[index].plantPositions[num3], ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); num *= Mathf.Lerp(3f, 0.015f, Mathf.Clamp(num5 / 10f, 0f, 1f)); if (num5 < 8f && sporeAmbienceSource.isPlaying) { sporeAmbienceSource.volume = Mathf.MoveTowards(sporeAmbienceSource.volume, 0f, Time.deltaTime); } } } bool flag3 = false; for (int k = 0; k < playerInfections.Length; k++) { if (k == (int)GameNetworkManager.Instance.localPlayerController.playerClientId || !playerInfections[k].infected) { continue; } float num6 = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[k]).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num6 < 7f) { if (!flag && !flag3) { flag3 = true; num = 1.25f; } float num7 = 0.35f; if (flag2) { num7 = 1f; } num *= Mathf.Clamp(Mathf.Lerp(2f, 0.35f, Mathf.Clamp(num6 / 7f, 0f, 1f)), num7, 100f); } } if (num >= 1.5f && flag) { bool flag4 = false; if (num >= 1.9f) { if (stoodInWeedsLastCheck) { localPlayerImmunityTimer += InfectIntervalTime; totalTimeSpentInPlants += InfectIntervalTime; if (StartOfRound.Instance.connectedPlayersAmount == 0) { flag4 = true; if (localPlayerImmunityTimer >= 7f) { HUDManager.Instance.DisplayStatusEffect("HEALTH RISK!\nAir filter overwhelmed by particulates;\n\nFilter inoperative!"); } else { HUDManager.Instance.DisplayStatusEffect($"HEALTH RISK!\nAir filter overwhelmed by particulates;\n\nFilter quality: {Mathf.RoundToInt(Mathf.Lerp(0f, 100f, Mathf.Abs(localPlayerImmunityTimer - 7f) / 7f))}%"); } } } stoodInWeedsLastCheck = true; } if (!flag4) { HUDManager.Instance.DisplayStatusEffect("HEALTH RISK!\n\nAir filter overwhelmed by particulates"); } } else if (stoodInWeedsLastCheck) { stoodInWeedsLastCheck = false; if (playerInfections[GameNetworkManager.Instance.localPlayerController.playerClientId].infected) { totalTimeSpentInPlants = Mathf.Max(0f, totalTimeSpentInPlants - InfectIntervalTime * 0.25f); } } if (!infected && flag) { if (GameNetworkManager.Instance.localPlayerController.health == 100) { num *= 0.75f; } else if (GameNetworkManager.Instance.localPlayerController.health <= 60) { num *= 1.2f; } if (GameNetworkManager.Instance.localPlayerController.criticallyInjured && stoodInWeedsLastCheck && num >= 1.9f) { num *= 1.5f; } if ((StartOfRound.Instance.connectedPlayersAmount != 0 || !(localPlayerImmunityTimer < 7f)) && (StartOfRound.Instance.connectedPlayersAmount <= 0 || !(localPlayerImmunityTimer <= 4f)) && Random.Range(0f, 100f) < num) { bool flag5 = Random.Range(0, 100) < 60; bool flag6 = flag5 || Random.Range(0, 100) < 40; InfectPlayer(GameNetworkManager.Instance.localPlayerController, flag5, flag6); InfectPlayerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, flag5, flag6); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void AddToTimeSpentInPlantsRpc() { //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_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_0073: 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_00a5: 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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2978264817u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2978264817u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; totalTimeSpentInPlants += infectInterval; } } } public void InfectPlayer(PlayerControllerB playerScript, bool severe, bool emittingSpores = false) { if (playerInfections[playerScript.playerClientId].infected) { Debug.Log((object)$"Growth AI: Attempted to infect player #{playerScript.playerClientId} but they are already infected"); return; } if (!playerScript.isPlayerControlled) { Debug.Log((object)$"Growth AI: Attempted to infect player #{playerScript.playerClientId} but they are dead"); return; } if ((Object)(object)playerScript == (Object)(object)GameNetworkManager.Instance.localPlayerController) { totalTimeSpentInPlants = 0f; } if (severe) { GameObject val = Object.Instantiate(faceSporesPrefab, (Transform)null, true); val.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform); playerInfections[playerScript.playerClientId].faceSpores = val.GetComponent(); } totalTimeSpentInPlants = 0f; numberOfInfected++; playerInfections[playerScript.playerClientId].infected = true; playerInfections[playerScript.playerClientId].severe = severe; playerInfections[playerScript.playerClientId].emittingSpores = emittingSpores; if (((NetworkBehaviour)this).IsServer) { CreateBloomEnemyOnStandby(); } } private void CreateBloomEnemyOnStandby() { //IL_0056: 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) int num = -1; for (int i = 0; i < bloomEnemies.Length; i++) { if ((Object)(object)bloomEnemies[i] == (Object)null) { num = i; break; } } if (num == -1) { Debug.LogError((object)"Attempted to spawn standby Bloom enemy, but the array is full of standby enemies!"); return; } Debug.Log((object)"Player infected; spawning bloom enemy on standby"); RoundManager.Instance.SpawnEnemyGameObject(new Vector3(1200f, -300f, 0f), 0f, -1, bloomEnemyType); } [Rpc(/*Could not decode attribute arguments.*/)] public void InfectPlayerRpc(int playerId, bool severe, bool emitSpores = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_005f: 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_0076: 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_0095: 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_00c4: 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_00f6: 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 = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1740615241u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref severe, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref emitSpores, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1740615241u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB playerScript = StartOfRound.Instance.allPlayerScripts[playerId]; InfectPlayer(playerScript, severe, emitSpores); } } } private void CheckForLivingPlayers() { for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && playerInfections[i].infected) { playerInfections[i].infected = false; numberOfInfected--; } } } public void BurstFromPlayer(PlayerControllerB playerScript, Vector3 burstPosition, Vector3 burstRotation) { //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_0055: 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_011a: 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_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: 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_01df: 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) //IL_0205: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)$"Burst out of player! #{playerScript.playerClientId}"); int num = -1; Vector3 position = ((Component)playerScript).transform.position; for (int i = 0; i < bloomEnemies.Length; i++) { if (!((Object)(object)bloomEnemies[i] == (Object)null) && !bloomEnemies[i].hasBurst) { bloomEnemies[i].BurstForth(playerScript, kill: true, burstPosition, burstRotation); if ((Object)(object)playerInfections[playerScript.playerClientId].backFlowers != (Object)null) { Object.Destroy((Object)(object)playerInfections[playerScript.playerClientId].backFlowers); } num = i; break; } } if (num == -1) { Debug.LogError((object)"Graveling growth AI: Tried to burst from player, but there are no bloom enemies on standby? B"); return; } for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if ((Object)(object)StartOfRound.Instance.allPlayerScripts[j] == (Object)(object)playerScript) { playerInfections[j].infected = false; numberOfInfected--; } } if (Time.realtimeSinceStartup - timeLastMusicPlayed > 10f && Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, position) < 10f) { timeLastMusicPlayed = Time.realtimeSinceStartup; bloomMusic.Play(); } if (StartOfRound.Instance.livingPlayers > 1) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; PlayerInfection val = playerInfections[localPlayerController.playerClientId]; if ((Object)(object)localPlayerController != (Object)(object)playerScript && localPlayerController.isPlayerControlled && val.infected && val.infectionMeter > 0.85f && Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)bloomEnemies[num]).transform.position) < 14f) { BurstFromPlayer(localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); SyncBurstFromPlayerRpc((int)localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncBurstFromPlayerRpc(int playerId, Vector3 playerPosition, Vector3 playerRotation) { //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_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_005f: 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_0076: 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_00ac: 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_00ec: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2338412702u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerRotation); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2338412702u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BurstFromPlayer(StartOfRound.Instance.allPlayerScripts[playerId], playerPosition, playerRotation); } } } private void ProgressPlayerInfections() { //IL_00c7: 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_00ea: 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_0404: 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_02a0: 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) for (int i = 0; i < playerInfections.Length; i++) { if (!playerInfections[i].infected) { continue; } if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled) { playerInfections[i].infected = false; numberOfInfected--; } else { if ((Object)(object)StartOfRound.Instance.allPlayerScripts[i] != (Object)(object)GameNetworkManager.Instance.localPlayerController) { continue; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (playerInfections[i].infectionMeter >= 1f) { if (playerInfections[i].burstMeter >= 1f) { playerInfections[i].infected = false; numberOfInfected--; BurstFromPlayer(localPlayerController, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); SyncBurstFromPlayerRpc((int)localPlayerController.playerClientId, ((Component)localPlayerController).transform.position, ((Component)localPlayerController).transform.eulerAngles); continue; } localPlayerController.poison = Mathf.Lerp(localPlayerController.poison, 0f, Time.deltaTime * 0.3f); if (playerInfections[i].burstMeter >= 0.9f) { if (!StartOfRound.Instance.shipIsLeaving) { if (StartOfRound.Instance.livingPlayers <= 1) { HUDManager.Instance.DisplayStatusEffect("HIGH FEVER DETECTED!!!\nFOREIGN BODIES DETECTED!!!\nIRREGULAR BRAINWAVE DETECTED!!!"); PlayerInfection obj = playerInfections[i]; obj.burstMeter += Time.deltaTime * 0.0055f; } else { PlayerInfection obj2 = playerInfections[i]; obj2.burstMeter += Time.deltaTime * 0.058f; } if (StartOfRound.Instance.connectedPlayersAmount > 0 && !hinderingLocalPlayer) { hinderingLocalPlayer = true; PlayerControllerB obj3 = StartOfRound.Instance.allPlayerScripts[i]; obj3.isMovementHindered++; playerInfections[i].hinderingPlayerMovement = true; } HUDManager.Instance.cadaverFilter = Mathf.Lerp(0f, 1f, (playerInfections[i].burstMeter - 0.9f) / 0.1f); SoundManager.Instance.alternateEarsRinging = true; SoundManager.Instance.earsRingingTimer = 1f; } continue; } float num; if (StartOfRound.Instance.connectedPlayersAmount > 0) { if (StartOfRound.Instance.livingPlayers == 1) { num = 0.75f; } else { float num2 = 2000f; for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if (!((Object)(object)StartOfRound.Instance.allPlayerScripts[j] == (Object)(object)GameNetworkManager.Instance.localPlayerController)) { float num3 = Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num3 < num2) { num2 = num3; } } } num = 1f; num = Mathf.Lerp(3f, 0.015f, Mathf.Clamp(num2 / 30f, 0f, 1f)); } } else { num = 1.25f; } PlayerInfection obj4 = playerInfections[i]; obj4.burstMeter += Time.deltaTime * num * BurstSpeedMultiplier; continue; } if (playerInfections[i].healing > 0) { PlayerInfection obj5 = playerInfections[i]; obj5.infectionMeter -= Time.deltaTime * 0.08f * (float)playerInfections[i].healing; HUDManager.Instance.DisplayStatusEffect("FIGHTING INFECTION!\nReduction in fever"); if (playerInfections[i].infectionMeter <= 0f) { playerInfections[i].infectionMeter = 0f; CurePlayer(i); CurePlayerRpc(i); } continue; } float num4 = 1f; bool flag = false; if (!StartOfRound.Instance.allPlayerScripts[i].isInsideFactory && TimeOfDay.Instance.normalizedTimeOfDay < 0.6f && !Physics.Linecast(((Component)TimeOfDay.Instance.sunDirect).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, StartOfRound.Instance.collidersRoomDefaultAndFoliage, (QueryTriggerInteraction)1)) { flag = true; } if (flag) { num4 *= 1.15f; } if (GameNetworkManager.Instance.localPlayerController.NearOtherPlayers(15f)) { num4 = ((!(playerInfections[i].infectionMeter > 0.925f)) ? (num4 * 0.7f) : (num4 * 1.5f)); } num4 *= Mathf.Lerp(1f, 0.85f, (float)numberOfInfected / (float)StartOfRound.Instance.livingPlayers); num4 *= 1f + totalTimeSpentInPlants / 18f; if (localPlayerController.health <= 40) { num4 *= 1.15f; } else if (localPlayerController.health == 100) { num4 *= 0.85f; } bool flag2 = StartOfRound.Instance.connectedPlayersAmount == 0; float num5 = Time.deltaTime * InfectionSpeedMultiplier * num4 * playerInfections[i].multiplier; if (flag2) { num5 *= 0.45f; } if (Time.realtimeSinceStartup - timeAtLastHealing < 0.7f) { continue; } playerInfections[i].infectionMeter = Mathf.Clamp(playerInfections[i].infectionMeter + num5, 0f, 1f); showSignsMeter += num5; if (playerInfections[i].infectionMeter > 0.35f && !flag2) { playerInfections[i].bloomOnDeath = true; } if (localPlayerController.overridePoisonValue) { localPlayerController.poison = Mathf.Lerp(localPlayerController.poison, setPoison, Time.deltaTime * 0.7f); } if (StartOfRound.Instance.connectedPlayersAmount == 0) { if (showSignsMeter > 0.05f) { showSignsMeter = 0f; DisplayFeverStatusEffect(i); if (playerInfections[i].severe && playerInfections[i].infectionMeter > 0.6f && Random.Range(0, 100) < 50) { vinesInHeadAudio.pitch = Random.Range(0.8f, 1.2f); vinesInHeadAudio.PlayOneShot(vinesInHeadSFX[Random.Range(0, vinesInHeadSFX.Length)], Random.Range(0.3f, 1f)); } } } else if (showSignsMeter > 0.05f) { if (playerInfections[i].severe && playerInfections[i].infectionMeter > 0.8f && Random.Range(0, 100) < 50) { vinesInHeadAudio.PlayOneShot(vinesInHeadSFX[Random.Range(0, vinesInHeadSFX.Length)], Random.Range(0.3f, 1f)); } showSignsMeter = 0f; float num6 = Mathf.Lerp(5f, 50f, Mathf.Clamp(playerInfections[i].infectionMeter / 0.9f, 0f, 1f)); if (Random.Range(0f, 100f) < num6) { IncreaseBackFlowers(i); IncreaseBackFlowersRpc(i, playerInfections[i].infectionMeter); } else { SyncInfectionMeterRpc((int)localPlayerController.playerClientId, playerInfections[i].infectionMeter); } } } } } private void DisplayFeverStatusEffect(int infectionId, float infectionThreshold = 0.8f) { if (playerInfections[infectionId].infectionMeter > infectionThreshold) { float num = (playerInfections[infectionId].infectionMeter - infectionThreshold) / (1f - infectionThreshold); HUDManager.Instance.DisplayStatusEffect($"HIGH FEVER DETECTED!\nREACHING {Mathf.RoundToInt(Mathf.Lerp(101f, 112f, num))}°F"); GameNetworkManager.Instance.localPlayerController.overridePoisonValue = true; setPoison = Mathf.Lerp(0f, 0.4f, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncInfectionMeterRpc(int playerId, float infectionMeter) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: 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_005f: 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_0076: 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_0095: 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_00ad: 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) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(543540046u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref infectionMeter, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 543540046u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; playerInfections[playerId].infectionMeter = infectionMeter; if (playerInfections[playerId].infectionMeter > 0.55f) { playerInfections[playerId].bloomOnDeath = true; } } } public void HealInfection(int infectionId, float healAmount) { PlayerInfection val = playerInfections[infectionId]; int clipIndex = Random.Range(0, healPlayerSFX.Length); HealPlayerSporeEffect(infectionId, clipIndex); val.infectionMeter -= healAmount; timeAtLastHealing = Time.realtimeSinceStartup; totalTimeSpentInPlants = Mathf.Clamp(totalTimeSpentInPlants - totalTimeSpentInPlants / 4f, 0f, 100f); if (val.infectionMeter <= 0f) { CurePlayer(infectionId); CurePlayerRpc(infectionId); } else { HealInfectionSyncRpc(infectionId, healAmount, clipIndex); } } private void HealPlayerSporeEffect(int infectionId, int clipIndex) { //IL_0102: 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_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_0156: 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_00a4: Unknown result type (might be due to invalid IL or missing references) PlayerInfection val = playerInfections[infectionId]; if (clipIndex == 0 || clipIndex == 2) { if ((Object)(object)val.faceSpores == (Object)null) { GameObject val2 = Object.Instantiate(faceSporesPrefab, (Transform)null, true); val2.transform.SetParent(RoundManager.Instance.mapPropsContainer.transform); val.faceSpores = val2.GetComponent(); ((Component)val.faceSpores).transform.position = ((Component)StartOfRound.Instance.allPlayerScripts[infectionId].gameplayCamera).transform.position; ((Component)val.faceSpores).transform.rotation = ((Component)StartOfRound.Instance.allPlayerScripts[infectionId].gameplayCamera).transform.rotation; } val.faceSpores.SetFloat("BurstAmount", Mathf.Lerp(420f, 1400f, val.infectionMeter / 1f)); val.faceSporesOutput = 0.6f; ((Component)val.faceSpores).transform.position = StartOfRound.Instance.allPlayerScripts[infectionId].bodyParts[0].position + StartOfRound.Instance.allPlayerScripts[infectionId].bodyParts[0].forward * 0.15f; ((Component)val.faceSpores).transform.rotation = ((Component)StartOfRound.Instance.allPlayerScripts[infectionId].bodyParts[0]).transform.rotation; } AudioClip val3 = healPlayerSFX[clipIndex]; StartOfRound.Instance.allPlayerScripts[infectionId].itemAudio.PlayOneShot(val3, 1f); WalkieTalkie.TransmitOneShotAudio(StartOfRound.Instance.allPlayerScripts[infectionId].itemAudio, val3, 1f); val.faceSpores.Play(); if (infectionId == (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } } [Rpc(/*Could not decode attribute arguments.*/)] public void HealInfectionSyncRpc(int infectionId, float healAmount, 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_005f: 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_0076: 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_0095: 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_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_00e8: 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 = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2850072276u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, infectionId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref healAmount, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, clipIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2850072276u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerInfection val4 = playerInfections[infectionId]; HealPlayerSporeEffect(infectionId, clipIndex); val4.infectionMeter -= healAmount; } } } public void CurePlayer(int playerId) { //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_00d4: 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_00f7: Unknown result type (might be due to invalid IL or missing references) playerInfections[playerId].infected = false; playerInfections[playerId].infectionMeter = 0f; playerInfections[playerId].burstMeter = 0f; playerInfections[playerId].severe = false; playerInfections[playerId].emittingSpores = false; StartOfRound.Instance.allPlayerScripts[playerId].overridePoisonValue = false; if (playerInfections[playerId].backFlowerRenderers != null) { for (int i = 0; i < playerInfections[playerId].backFlowerRenderers.Length; i++) { ((Renderer)playerInfections[playerId].backFlowerRenderers[i]).enabled = false; } playerInfections[playerId].backFlowersScanNode.SetActive(false); Vector3 position = ((Component)playerInfections[playerId].backFlowerRenderers[0]).transform.position; Object.Instantiate(destroyPlantParticle, position, Quaternion.identity, (Transform)null); destroyAudio.Stop(); ((Component)destroyAudio).transform.position = position; destroyAudio.Play(); } if ((Object)(object)playerInfections[playerId].faceSpores != (Object)null) { playerInfections[playerId].faceSpores.Stop(); } if (playerInfections[playerId].hinderingPlayerMovement) { StartOfRound.Instance.allPlayerScripts[playerId].isMovementHindered = Mathf.Max(StartOfRound.Instance.allPlayerScripts[playerId].isMovementHindered - 1, 0); playerInfections[playerId].hinderingPlayerMovement = false; } } [Rpc(/*Could not decode attribute arguments.*/)] public void CurePlayerRpc(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_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_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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3926112701u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3926112701u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CurePlayer(playerId); } } } public override void DoAIInterval() { ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead) { return; } int currentBehaviourStateIndex = base.currentBehaviourStateIndex; if (currentBehaviourStateIndex != 0) { _ = currentBehaviourStateIndex - 1; _ = 1; return; } if (inGrowthBurst) { if (growthBurstTimer > 4f) { inGrowthBurst = false; } else { growthBurstTimer += base.AIIntervalTime; } } else if (growthBurstTimer > 25f) { growthBurstTimer = 0f; inGrowthBurst = true; } else if (TimeOfDay.Instance.normalizedTimeOfDay < 0.2f) { growthBurstTimer += base.AIIntervalTime * 0.66f; } else { growthBurstTimer += base.AIIntervalTime; } float num = Mathf.Clamp(growthIntervalCurveOverDay.Evaluate(TimeOfDay.Instance.normalizedTimeOfDay) * GrowthInterval, 0.25f, 12f); if (inGrowthBurst) { num = 0.15f; } if (growingInTiles || spreadInterval > num) { growingInTiles = true; spreadInterval = 0f; GrowInTiles(); } else { spreadInterval += base.AIIntervalTime; } } public override void Update() { //IL_0081: 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) ((EnemyAI)this).Update(); if (!base.isEnemyDead) { if (cullInterval > cullIntervalTime) { cullInterval = 0f; CullParticlesForTiles(); } else { cullInterval += Time.deltaTime; } if (infectInterval > InfectIntervalTime) { infectInterval = 0f; InfectPlayers(); } else { infectInterval += Time.deltaTime; } ProgressPlayerInfections(); base.destination = ((Component)this).transform.position; } } public void UpdateInfectionMeshes() { //IL_0095: 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_0125: 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) for (int i = 0; i < playerInfections.Length; i++) { if (!playerInfections[i].infected) { if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && (Object)(object)playerInfections[i].backFlowers != (Object)null) { Object.Destroy((Object)(object)playerInfections[i].backFlowers); } continue; } if ((Object)(object)playerInfections[i].backFlowers != (Object)null) { playerInfections[i].backFlowers.transform.position = StartOfRound.Instance.allPlayerScripts[i].bodyParts[5].position; playerInfections[i].backFlowers.transform.rotation = StartOfRound.Instance.allPlayerScripts[i].bodyParts[5].rotation; } if (playerInfections[i].faceSporesOutput > 0f && (Object)(object)playerInfections[i].faceSpores != (Object)null) { ((Component)playerInfections[i].faceSpores).transform.position = ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position; ((Component)playerInfections[i].faceSpores).transform.rotation = ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.rotation; playerInfections[i].faceSporesOutput = Mathf.Max(0f, playerInfections[i].faceSporesOutput - Time.deltaTime); playerInfections[i].faceSpores.SetFloat("TimeSinceBurst", Mathf.Abs(1f - playerInfections[i].faceSporesOutput)); if (playerInfections[i].faceSporesOutput <= 0f) { playerInfections[i].faceSpores.Stop(); } } } } private void UpdateSporeAmbience() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0120: 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_0142: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) if (!GameNetworkManager.Instance.localPlayerController.isInsideFactory) { sporeAmbienceSource.volume = 0f; } if (updateSporeAudioInterval > 1f) { updateSporeAudioInterval = 0f; if ((Object)(object)StartOfRound.Instance.occlusionCuller.currentTile == (Object)null) { return; } if (((Component)StartOfRound.Instance.audioListener).transform.position.y > -90f) { distToPlants = 100f; return; } Tile currentTile = StartOfRound.Instance.occlusionCuller.currentTile; int num = -1; for (int i = 0; i < GrowthTiles.Count; i++) { if ((Object)(object)GrowthTiles[i].tile == (Object)(object)currentTile && !GrowthTiles[i].eradicated && GrowthTiles[i].plantsInTile > 0) { num = i; break; } } if (num == -1) { distToPlants = 100f; return; } float num2 = 1000f; int num3 = -1; for (int j = 0; j < GrowthTiles[num].plantPositions.Count; j++) { Vector3 val = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position - GrowthTiles[num].plantPositions[j]; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num2) { num2 = sqrMagnitude; num3 = j; } } if (num3 != -1) { distToPlants = Vector3.Distance(GrowthTiles[num].plantPositions[num3], ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } else { updateSporeAudioInterval += Time.deltaTime; } if (distToPlants < 8f) { if (!sporeAmbienceSource.isPlaying) { sporeAmbienceSource.Play(); } sporeAmbienceSource.volume = Mathf.Lerp(sporeAmbienceSource.volume, Mathf.Lerp(1f, 0f, distToPlants / 7f), Time.deltaTime * 0.25f); } else { sporeAmbienceSource.volume = Mathf.MoveTowards(sporeAmbienceSource.volume, 0f, Time.deltaTime * 0.5f); if (sporeAmbienceSource.isPlaying && sporeAmbienceSource.volume <= 0f) { sporeAmbienceSource.Stop(); } } } public void LateUpdate() { //IL_00ec: 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_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) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: 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) UpdateSporeAmbience(); UpdateInfectionMeshes(); if (!growingRecentPlant) { return; } if (growingPlant.positionIndex >= plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum].Count) { growingRecentPlant = false; return; } float num = Mathf.Lerp(12f, 4f, growthIntervalCurveOverDay.Evaluate(TimeOfDay.Instance.normalizedTimeOfDay) * GrowthInterval / 8f); plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex] = SprayPaintItem.ResizeMatrix(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex], num, false); if (SprayPaintItem.ExtractScaleFromMatrix(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex]).x > recentPlantSizeTarget) { growingRecentPlant = false; } plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex] = SprayOrPlantReaperItem.ResizeMatrix(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex], num, shrink: false); if (SprayOrPlantReaperItem.ExtractScaleFromMatrix(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex]).x > recentPlantSizeTarget) { growingRecentPlant = false; } } private void QuickFinishGrowingPlant() { //IL_0080: 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_00f9: 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) if (growingRecentPlant && growingPlant.plantType != -1) { plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex] = SprayPaintItem.SetMatrixScale(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex], recentPlantSizeTarget); plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex] = SprayOrPlantReaperItem.SetMatrixScale(plantBatchers[growingPlant.plantType].Batches[growingPlant.batchNum][growingPlant.positionIndex], recentPlantSizeTarget); growingRecentPlant = 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 //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 ((NetworkBehaviour)this).__registerRpc(3691068444u, new RpcReceiveHandler(__rpc_handler_3691068444), "CoughSporesRpc"); ((NetworkBehaviour)this).__registerRpc(1081245869u, new RpcReceiveHandler(__rpc_handler_1081245869), "SyncSpawnPlantRpc"); ((NetworkBehaviour)this).__registerRpc(4276684530u, new RpcReceiveHandler(__rpc_handler_4276684530), "SyncRemoveEradicationFromTileRpc"); ((NetworkBehaviour)this).__registerRpc(4145819552u, new RpcReceiveHandler(__rpc_handler_4145819552), "SyncAddGrowthTileRpc"); ((NetworkBehaviour)this).__registerRpc(948426614u, new RpcReceiveHandler(__rpc_handler_948426614), "SyncAddInitialGrowthTileRpc"); ((NetworkBehaviour)this).__registerRpc(3656129568u, new RpcReceiveHandler(__rpc_handler_3656129568), "IncreaseBackFlowersRpc"); ((NetworkBehaviour)this).__registerRpc(2978264817u, new RpcReceiveHandler(__rpc_handler_2978264817), "AddToTimeSpentInPlantsRpc"); ((NetworkBehaviour)this).__registerRpc(1740615241u, new RpcReceiveHandler(__rpc_handler_1740615241), "InfectPlayerRpc"); ((NetworkBehaviour)this).__registerRpc(2338412702u, new RpcReceiveHandler(__rpc_handler_2338412702), "SyncBurstFromPlayerRpc"); ((NetworkBehaviour)this).__registerRpc(543540046u, new RpcReceiveHandler(__rpc_handler_543540046), "SyncInfectionMeterRpc"); ((NetworkBehaviour)this).__registerRpc(2850072276u, new RpcReceiveHandler(__rpc_handler_2850072276), "HealInfectionSyncRpc"); ((NetworkBehaviour)this).__registerRpc(3926112701u, new RpcReceiveHandler(__rpc_handler_3926112701), "CurePlayerRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3691068444(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_003e: 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) { float loudness = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref loudness, default(ForPrimitives)); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).CoughSporesRpc(loudness, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1081245869(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_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_007e: 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_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) //IL_00ae: 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_00c5: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int plantId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref plantId); int tileIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileIndex); Vector3 spawnPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnPosition); Quaternion spawnRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnRotation); float randomSize = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref randomSize, default(ForPrimitives)); bool spawnScanNode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnScanNode, default(ForPrimitives)); bool spawnDecal = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnDecal, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).SyncSpawnPlantRpc(plantId, tileIndex, spawnPosition, spawnRotation, randomSize, spawnScanNode, spawnDecal); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4276684530(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 tileIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).SyncRemoveEradicationFromTileRpc(tileIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4145819552(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_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) { int tileAtIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileAtIndex); Vector3 doorPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref doorPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).SyncAddGrowthTileRpc(tileAtIndex, doorPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_948426614(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_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_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) { int tileAtIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref tileAtIndex); Vector3 doorPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref doorPos); bool gotRoomTile = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gotRoomTile, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).SyncAddInitialGrowthTileRpc(tileAtIndex, doorPos, gotRoomTile); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3656129568(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); float infectionMeter = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref infectionMeter, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).IncreaseBackFlowersRpc(playerId, infectionMeter); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2978264817(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; ((GravelingMasterAI)(object)target).AddToTimeSpentInPlantsRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1740615241(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_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) //IL_006c: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool severe = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref severe, default(ForPrimitives)); bool emitSpores = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref emitSpores, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).InfectPlayerRpc(playerId, severe, emitSpores); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2338412702(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_0063: 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 playerPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerPosition); Vector3 playerRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).SyncBurstFromPlayerRpc(playerId, playerPosition, playerRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_543540046(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); float infectionMeter = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref infectionMeter, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).SyncInfectionMeterRpc(playerId, infectionMeter); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2850072276(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_004b: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int infectionId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref infectionId); float healAmount = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref healAmount, default(ForPrimitives)); int clipIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((GravelingMasterAI)(object)target).HealInfectionSyncRpc(infectionId, healAmount, clipIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3926112701(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; ((GravelingMasterAI)(object)target).CurePlayerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GravelingMasterAI"; } } public class GuardianAI : EnemyAI { 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 OBSOLETE")] public string allTheJunkBelowIsUseless = "All the stuff in 'Gun Damage Stuff' is useless because it doesn't actually control the gun's damage or anything, the gun prefab itself controls that"; public float gunDamageClose; public float gunDamageMidrange; public float gunDamageFar; public float gunRangeClose; public float gunRangeMidrange; public float gunRangeFar; [Header("Gun Values")] public int gunValue = 60; public bool setGunValueRandom; public int minGunValue = 30; public int maxGunValue = 90; [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; public float chaseLOSWidth = 70f; public int chaseLOSRange = 25; public int chaseLOSProxAware = 1; public float distanceToAimDown = 2f; public float heightDistanceToAimDown = 1f; [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; [Header("Misc")] public int amountOfShellsDropped = 2; public float shellSpawnRangeX = 0.8f; public float shellSpawnRangeZ = 0.8f; public float minTimeBeforeNextInspect = 6f; public float maxTimeBeforeNextInspect = 15f; public float timeSinceLastInspectThreshold = 4f; [SerializeField] [Range(0f, 100f)] public int chanceOfInspectRandom = 40; public float mostOptimalDistanceThreshold = 27f; [Space(10f)] public bool enableObjectIfLeader; public GameObject leaderGameobject; public bool normalItemDropSystem = true; public ItemDataStoring[] itemsToDropOnDeath; [Header("Leader Settings")] private bool isBuffed; public bool randomlyBuff; [SerializeField] [Range(0f, 100f)] public float buffChance = 5f; public bool leaderUniqueBuff = true; public int leaderHPBuff = 2; public int buffHP = 1; public List allGuardians; private bool canBeElected = true; public string[] internalNameList; private string chosenName; private bool currentElection = true; public bool playSoundOnElection = true; public AudioClip electionWin; public TextMesh debugNameVisualizer; public bool groupingBehaviour; private GuardianAI leader; public float groupingDistance = 1f; public override void Start() { //IL_0113: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); leaderGameobject.SetActive(false); if (((NetworkBehaviour)this).IsServer) { int num = Random.Range(0, internalNameList.Length); chosenName = internalNameList[num]; debugNameVisualizer.text = chosenName; InitializeNutcrackerValuesServerRpc(); allGuardians = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); if (allGuardians != null) { for (int i = 0; i < allGuardians.Count; i++) { if (!((EnemyAI)allGuardians[i]).isEnemyDead && allGuardians[i].isLeaderScript) { currentElection = false; leader = allGuardians[i]; } } } if (chosenName == "Marine" || chosenName == "Lepen") { canBeElected = false; } if (canBeElected && currentElection) { isLeaderScript = true; SetLeaderOnServerRpc(); } SetBuffOnServerRpc(); } rayHit = default(RaycastHit); } public void ChangeTargetLeader() { allGuardians = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); for (int i = 0; i < allGuardians.Count; i++) { if (!((EnemyAI)allGuardians[i]).isEnemyDead && allGuardians[i].isLeaderScript) { currentElection = false; leader = allGuardians[i]; } } } [ServerRpc] public void SetBuffOnServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3258050043u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3258050043u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsServer) { return; } if (isLeaderScript && leaderUniqueBuff) { base.enemyHP += leaderHPBuff; } else if (isLeaderScript) { base.enemyHP += buffHP; } else if (randomlyBuff) { float num = Random.Range(0f, 99f); if (num < buffChance) { base.enemyHP += buffHP; } } SetBuffOnClientRpc(base.enemyHP); } [ClientRpc] public void SetBuffOnClientRpc(int buffedHP) { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1555864529u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, buffedHP); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1555864529u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.enemyHP = buffedHP; } } } [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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1850026131u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1850026131u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(178493005u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, randomSeed); ((FastBufferWriter)(ref val)).WriteValueSafe(ref gunObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 178493005u, val2, (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"); if (setGunValueRandom) { ((GrabbableObject)gun).SetScrapValue(Random.Range(minGunValue, maxGunValue)); } else { ((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_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_00f0: 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_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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_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_003d: 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_006c: 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_0078: 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) if (!((NetworkBehaviour)this).IsOwner) { return; } if (normalItemDropSystem) { for (int i = 0; i < amountOfShellsDropped; i++) { Vector3 val = ((Component)this).transform.position + Vector3.up * 0.6f; val += new Vector3(Random.Range(0f - shellSpawnRangeX, shellSpawnRangeX), 0f, Random.Range(0f - shellSpawnRangeZ, shellSpawnRangeZ)); GameObject val2 = Object.Instantiate(shotgunShellPrefab, val, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); val2.GetComponent().fallTime = 0f; val2.GetComponent().Spawn(false); } return; } for (int j = 0; j < itemsToDropOnDeath.Length; j++) { GameObject item = itemsToDropOnDeath[j].item; Vector3 val3 = ((Component)this).transform.position + Vector3.up * 0.6f; float spawnRangeX = itemsToDropOnDeath[j].spawnRangeX; float spawnRangeZ = itemsToDropOnDeath[j].spawnRangeZ; val3 += new Vector3(Random.Range(0f - spawnRangeX, spawnRangeX), 0f, Random.Range(0f - spawnRangeZ, spawnRangeZ)); item = Object.Instantiate(shotgunShellPrefab, val3, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); item.GetComponent().fallTime = 0f; item.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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(648317801u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref dropPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 648317801u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(516241697u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref dropPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 516241697u, val2, (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_00e9: 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_00a4: 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_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_022c: 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_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: 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_02e3: 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_0311: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_037f: Unknown result type (might be due to invalid IL or missing references) //IL_0386: 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_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_0359: 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_0366: Unknown result type (might be due to invalid IL or missing references) //IL_036b: 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_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0271: 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 (groupingBehaviour && !isLeaderScript) { if (!patrol.inProgress && Vector3.Distance(((Component)this).transform.position, ((Component)leader).transform.position) > groupingDistance) { ((EnemyAI)this).SetDestinationToPosition(((Component)leader).transform.position, false); } } else 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4277265591u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref lostPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4277265591u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1709725353u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref lostPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1709725353u, val2, (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()); } } private IEnumerator InspectionTurn() { yield return (object)new WaitForSeconds(0.75f); isInspecting = true; NutcrackerRandom = new Random(randomSeedNumber + timesDoingInspection); int degrees = 0; int turnTime = 1; for (int i = 0; i < 8; i++) { degrees = Mathf.Min(degrees + NutcrackerRandom.Next(45, 95), 360); if (Physics.Raycast(base.eye.position, base.eye.forward, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { turnTime = 1; } else { int num = ((!((float)turnTime > 2f)) ? 4 : (turnTime / 3)); turnTime = NutcrackerRandom.Next(1, Mathf.Max(num, 3)); } targetTorsoDegrees = degrees; torsoTurnSpeed = NutcrackerRandom.Next(275, 855) / turnTime; yield return (object)new WaitForSeconds((float)turnTime); if (degrees >= 360) { break; } } if (((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SwitchToBehaviourState(0); } } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1431248118u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1431248118u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(472820791u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 472820791u, val2, (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(minTimeBeforeNextInspect, maxTimeBeforeNextInspect); } } 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_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_0649: 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_0674: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_060b: 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_0583: Unknown result type (might be due to invalid IL or missing references) //IL_0593: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: 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 > timeSinceLastInspectThreshold) { if (Random.Range(0, 100) < chanceOfInspectRandom || ((Object)(object)((EnemyAI)this).GetClosestPlayer(false, false, false) != (Object)null && base.mostOptimalDistance < mostOptimalDistanceThreshold)) { ((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, chaseLOSWidth, chaseLOSRange, (float)chaseLOSProxAware, (Transform)null)) { timeSinceSeeingTarget = 0f; lastSeenPlayerPos = ((Component)StartOfRound.Instance.allPlayerScripts[lastPlayerSeenMoving]).transform.position; base.creatureAnimator.SetBool("AimDown", Vector3.Distance(lastSeenPlayerPos, ((Component)this).transform.position) < distanceToAimDown && lastSeenPlayerPos.y - ((Component)this).transform.position.y < heightDistanceToAimDown); } if (!CheckLineOfSightForLocalPlayer(chaseLOSWidth, chaseLOSRange, chaseLOSProxAware)) { 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3451591421u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3451591421u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4267227050u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4267227050u, val2, (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()); } } } private IEnumerator ReloadGun() { reloadingGun = true; base.creatureSFX.PlayOneShot(base.enemyType.audioClips[2]); base.creatureAnimator.SetBool("Reloading", true); yield return (object)new WaitForSeconds(0.32f); gun.gunAnimator.SetBool("Reloading", true); yield return (object)new WaitForSeconds(0.92f); gun.gunAnimator.SetBool("Reloading", false); base.creatureAnimator.SetBool("Reloading", false); yield return (object)new WaitForSeconds(0.5f); reloadingGun = false; } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4256249019u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enemyPos); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4256249019u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1522794910u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enemyPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1522794910u, val2, (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)); } } } 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) aimingGun = true; if (lastPlayerSeenMoving == previousPlayerSeenWhenAiming) { timesSeeingSamePlayer++; } else { previousPlayerSeenWhenAiming = lastPlayerSeenMoving; timesSeeingSamePlayer = 1; } RoundManager.PlayRandomClip(longRangeAudio, aimSFX, true, 1f, 0, 1000); if (timesSeeingSamePlayer >= 3) { speedWhileAiming = 2.25f; } else { speedWhileAiming = 0f; } base.updatePositionThreshold = 0.45f; base.serverPosition = enemyPos; if (base.enemyHP <= berserkThreshold) { yield return (object)new WaitForSeconds(berserkAimTime); } else if (gun.shellsLoaded <= gun.maxAmmo / 2) { yield return (object)new WaitForSeconds(shellBAimTime); } else { yield return (object)new WaitForSeconds(shellAAimtTime); } yield return (object)new WaitForEndOfFrame(); if (((NetworkBehaviour)this).IsOwner) { FireGunServerRpc(); } timeSinceFiringGun = 0f; yield return (object)new WaitForSeconds(0.35f); aimingGun = false; base.inSpecialAnimation = false; base.updatePositionThreshold = 1f; if (!base.isEnemyDead) { base.creatureVoice.Play(); base.creatureVoice.pitch = Random.Range(minPitchAngry, maxPitchAngry); } } [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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4004525427u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4004525427u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2796426551u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2796426551u, val2, (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); } } } private IEnumerator waitToFireGun() { yield return (object)new WaitUntil((Func)(() => base.stunNormalizedTimer <= 0f)); yield return (object)new WaitForSeconds(0.5f); FireGunClientRpc(); } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1985495632u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1985495632u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2795611288u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2795611288u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3730722768u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3730722768u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3640161003u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3640161003u, val2, (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_0045: Unknown result type (might be due to invalid IL or missing references) base.creatureVoice.Stop(); ((EnemyAI)this).KillEnemy(destroy); base.isEnemyDead = true; canBeElected = false; targetTorsoDegrees = 0; StopInspection(); StopReloading(); if (((NetworkBehaviour)this).IsOwner) { DropGunServerRpc(gunPoint.position); ((MonoBehaviour)this).StartCoroutine(spawnShotgunShellsOnDelay()); if (isLeaderScript) { allGuardians = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); for (int i = 0; i < allGuardians.Count; i++) { if (!allGuardians[i].isLeaderScript && !((EnemyAI)allGuardians[i]).isEnemyDead && allGuardians[i].canBeElected) { allGuardians[i].SetLeaderOnServerRpc(); allGuardians[i].isLeaderScript = true; break; } } isLeaderScript = false; } } torsoTurnAudio.Stop(); base.creatureSFX.Stop(); } [ServerRpc] public void SetLeaderOnServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1208341654u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1208341654u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetLeaderOnClientRpc(); } } [ClientRpc] public void SetLeaderOnClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3770834393u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3770834393u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)electionWin != (Object)null) { base.creatureSFX.PlayOneShot(electionWin); } if (enableObjectIfLeader) { leaderGameobject.SetActive(true); } } } private IEnumerator spawnShotgunShellsOnDelay() { yield return (object)new WaitForSeconds(1.2f); SpawnShotgunShells(); } 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(3258050043u, new RpcReceiveHandler(__rpc_handler_3258050043), "SetBuffOnServerRpc"); ((NetworkBehaviour)this).__registerRpc(1555864529u, new RpcReceiveHandler(__rpc_handler_1555864529), "SetBuffOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(1850026131u, new RpcReceiveHandler(__rpc_handler_1850026131), "InitializeNutcrackerValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(178493005u, new RpcReceiveHandler(__rpc_handler_178493005), "InitializeNutcrackerValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(648317801u, new RpcReceiveHandler(__rpc_handler_648317801), "DropGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(516241697u, new RpcReceiveHandler(__rpc_handler_516241697), "DropGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(4277265591u, new RpcReceiveHandler(__rpc_handler_4277265591), "SetLostPlayerInChaseServerRpc"); ((NetworkBehaviour)this).__registerRpc(1709725353u, new RpcReceiveHandler(__rpc_handler_1709725353), "SetLostPlayerInChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(1431248118u, new RpcReceiveHandler(__rpc_handler_1431248118), "SeeMovingThreatServerRpc"); ((NetworkBehaviour)this).__registerRpc(472820791u, new RpcReceiveHandler(__rpc_handler_472820791), "SeeMovingThreatClientRpc"); ((NetworkBehaviour)this).__registerRpc(3451591421u, new RpcReceiveHandler(__rpc_handler_3451591421), "ReloadGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(4267227050u, new RpcReceiveHandler(__rpc_handler_4267227050), "ReloadGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(4256249019u, new RpcReceiveHandler(__rpc_handler_4256249019), "AimGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(1522794910u, new RpcReceiveHandler(__rpc_handler_1522794910), "AimGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(4004525427u, new RpcReceiveHandler(__rpc_handler_4004525427), "FireGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(2796426551u, new RpcReceiveHandler(__rpc_handler_2796426551), "FireGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(1985495632u, new RpcReceiveHandler(__rpc_handler_1985495632), "SwitchTargetServerRpc"); ((NetworkBehaviour)this).__registerRpc(2795611288u, new RpcReceiveHandler(__rpc_handler_2795611288), "SwitchTargetClientRpc"); ((NetworkBehaviour)this).__registerRpc(3730722768u, new RpcReceiveHandler(__rpc_handler_3730722768), "LegKickPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3640161003u, new RpcReceiveHandler(__rpc_handler_3640161003), "LegKickPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1208341654u, new RpcReceiveHandler(__rpc_handler_1208341654), "SetLeaderOnServerRpc"); ((NetworkBehaviour)this).__registerRpc(3770834393u, new RpcReceiveHandler(__rpc_handler_3770834393), "SetLeaderOnClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3258050043(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).SetBuffOnServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1555864529(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 buffOnClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref buffOnClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((GuardianAI)(object)target).SetBuffOnClientRpc(buffOnClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1850026131(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_178493005(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_648317801(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_516241697(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_4277265591(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_1709725353(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_1431248118(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_472820791(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_3451591421(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_4267227050(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_4256249019(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_1522794910(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_4004525427(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_2796426551(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_1985495632(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_2795611288(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_3730722768(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_3640161003(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; } } private static void __rpc_handler_1208341654(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).SetLeaderOnServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3770834393(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).SetLeaderOnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GuardianAI"; } } public class IronMaidenAI : EnemyAI { 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2952126302u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2952126302u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(981120720u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setTrue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 981120720u, val2, (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; } } } private IEnumerator Parabola(NavMeshAgent agent, float height, float duration) { OffMeshLinkData data = agent.currentOffMeshLinkData; Vector3 startPos = ((Component)agent).transform.position; Vector3 endPos = ((OffMeshLinkData)(ref data)).endPos + Vector3.up * agent.baseOffset; float normalizedTime = 0f; while (normalizedTime < 1f && ((OffMeshLinkData)(ref data)).valid && ((OffMeshLinkData)(ref data)).activated && ((NetworkBehaviour)this).IsOwner) { float num = height * 4f * (normalizedTime - normalizedTime * normalizedTime); ((Component)agent).transform.position = Vector3.Lerp(startPos, endPos, normalizedTime) + num * Vector3.up; normalizedTime += Time.deltaTime / duration; yield return null; } agent.CompleteOffMeshLink(); offMeshLinkCoroutine = null; } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3834444002u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3834444002u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(407210166u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 407210166u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(228084288u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 228084288u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(95591236u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 95591236u, val2, (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(2952126302u, new RpcReceiveHandler(__rpc_handler_2952126302), "SetCoilheadOnCooldownServerRpc"); ((NetworkBehaviour)this).__registerRpc(981120720u, new RpcReceiveHandler(__rpc_handler_981120720), "SetCoilheadOnCooldownClientRpc"); ((NetworkBehaviour)this).__registerRpc(3834444002u, new RpcReceiveHandler(__rpc_handler_3834444002), "SetAnimationStopServerRpc"); ((NetworkBehaviour)this).__registerRpc(407210166u, new RpcReceiveHandler(__rpc_handler_407210166), "SetAnimationStopClientRpc"); ((NetworkBehaviour)this).__registerRpc(228084288u, new RpcReceiveHandler(__rpc_handler_228084288), "SetAnimationGoServerRpc"); ((NetworkBehaviour)this).__registerRpc(95591236u, new RpcReceiveHandler(__rpc_handler_95591236), "SetAnimationGoClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2952126302(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_981120720(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_3834444002(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_407210166(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_228084288(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_95591236(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 MaskedAI : EnemyAI, IVisibleThreat { public SkinnedMeshRenderer rendererLOD0; public SkinnedMeshRenderer rendererLOD1; public SkinnedMeshRenderer rendererLOD2; private Ray enemyRay; private RaycastHit enemyRayHit; private int currentFootstepSurfaceIndex; private int previousFootstepClip; public AudioSource movementAudio; private bool sprinting; private int previousBehaviourState = -1; public float walkCheckInterval; private Vector3 positionLastCheck; private Coroutine teleportCoroutine; public ParticleSystem teleportParticle; public AISearchRoutine searchForPlayers; private Vector3 agentLocalVelocity; private Vector3 previousPosition; private float velX; private float velZ; public Transform animationContainer; private Vector3 currentRandomLookDirection; private Vector3 focusOnPosition; private float verticalLookAngle; private float currentLookAngle; public Transform headTiltTarget; private float lookAtPositionTimer; private float randomLookTimer; private bool lostPlayerInChase; private float lostLOSTimer; private bool running; private bool crouching; [Space(3f)] public PlayerControllerB mimickingPlayer; public bool allowSpawningWithoutPlayer; [Space(3f)] public Transform lerpTarget; public float turnSpeedMultiplier; public MultiRotationConstraint lookRig1; public MultiRotationConstraint lookRig2; private float stopAndStareTimer; public Transform stareAtTransform; private bool handsOut; private bool inKillAnimation; public bool startingKillAnimationLocalClient; private Coroutine killAnimationCoroutine; private Ray playerRay; public MeshRenderer[] maskEyesGlow; public Light maskEyesGlowLight; public ParticleSystem maskFloodParticle; private PlayerControllerB lastPlayerKilled; private float timeLookingAtLastNoise; private Vector3 shipHidingSpot; private float staminaTimer; private bool runningRandomly; private bool enemyEnabled; public GameObject[] maskTypes; public int maskTypeIndex; private Vector3 mainEntrancePosition; private float timeAtLastUsingEntrance; private float interestInShipCooldown; private List playersKilled = new List(); private bool isInElevatorStartRoom; private MineshaftElevatorController elevatorScript; public Transform headTransform; [Space(5f)] [Header("Custom")] [Header("Speed Control")] public float roamingWalkSpeed = 3.8f; public float roamingRunSpeed = 7f; [Space(1f)] public float followWalkSpeed = 3.8f; public float followRunSpeed = 8f; [Space(1f)] public float waitStateSpeed = 5f; [Space(2f)] [Header("Misc")] public float minRoamStareTimer = 2f; public float maxRoamStareTimer = 5f; public float minFollowStareTimer = 1f; public float maxFollowStareTimer = 3f; public float shipIntrestCooldown = 17f; public bool copyPlayerAttributes = true; ThreatType IVisibleThreat.type => (ThreatType)6; public override Transform GetRadarHeadTransform() { return headTransform; } bool IVisibleThreat.IsThreatDead() { return base.isEnemyDead; } GrabbableObject IVisibleThreat.GetHeldObject() { return null; } int IVisibleThreat.SendSpecialBehaviour(int id) { return 0; } int IVisibleThreat.GetThreatLevel(Vector3 seenByPosition) { return 3; } 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 (crouching) { return 0.5f; } return 1f; } public override void Start() { //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_009d: 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_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown try { base.agent = ((Component)this).gameObject.GetComponentInChildren(); base.skinnedMeshRenderers = ((Component)this).gameObject.GetComponentsInChildren(); base.meshRenderers = ((Component)this).gameObject.GetComponentsInChildren(); if ((Object)(object)base.creatureAnimator == (Object)null) { base.creatureAnimator = ((Component)this).gameObject.GetComponentInChildren(); } base.thisNetworkObject = ((Component)this).gameObject.GetComponentInChildren(); base.serverPosition = ((Component)this).transform.position; base.thisEnemyIndex = RoundManager.Instance.numberOfEnemiesInScene; RoundManager instance = RoundManager.Instance; instance.numberOfEnemiesInScene++; base.isOutside = ((Component)this).transform.position.y > -80f; ((EnemyAI)this).GetAINodes(); mainEntrancePosition = RoundManager.FindMainEntrancePosition(true, base.isOutside); if (base.isOutside) { if (base.allAINodes == null || base.allAINodes.Length == 0) { base.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); } if ((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null) { ((EnemyAI)this).EnableEnemyMesh(!StartOfRound.Instance.hangarDoorsClosed || !GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom, false, false); } } else if (base.allAINodes == null || base.allAINodes.Length == 0) { base.allAINodes = GameObject.FindGameObjectsWithTag("AINode"); } base.path1 = new NavMeshPath(); base.openDoorSpeedMultiplier = base.enemyType.doorSpeedMultiplier; if (((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SyncPositionToClients(); } else { ((EnemyAI)this).SetClientCalculatingAI(false); } } catch (Exception arg) { Debug.LogError((object)$"Error when initializing enemy variables for {((Object)((Component)this).gameObject).name} : {arg}"); } lerpTarget.SetParent(RoundManager.Instance.mapPropsContainer.transform); enemyRayHit = default(RaycastHit); base.addPlayerVelocityToDestination = 3f; if (((NetworkBehaviour)this).IsServer && (Object)(object)mimickingPlayer == (Object)null) { SetEnemyAsHavingNoPlayerServerRpc(); } } [ServerRpc] public void SetEnemyAsHavingNoPlayerServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(566955271u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 566955271u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetEnemyAsHavingNoPlayerClientRpc(); } } [ClientRpc] public void SetEnemyAsHavingNoPlayerClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(632198526u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 632198526u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; allowSpawningWithoutPlayer = true; } } } public override void Awake() { ((EnemyAI)this).Awake(); SetVisibilityOfMaskedEnemy(); } private void LookAndRunRandomly(bool canStartRunning = false, bool onlySetRunning = false) { //IL_00e8: 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_00fa: 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_013b: 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) randomLookTimer -= base.AIIntervalTime; if (!runningRandomly && !running) { staminaTimer = Mathf.Min(6f, staminaTimer + base.AIIntervalTime); } else { staminaTimer = Mathf.Max(0f, staminaTimer - base.AIIntervalTime); } if (!(randomLookTimer <= 0f)) { return; } randomLookTimer = Random.Range(0.7f, 5f); if (!runningRandomly) { int num = ((!base.isOutside) ? 20 : 35); if (onlySetRunning) { num /= 3; } if (staminaTimer >= 5f && Random.Range(0, 100) < num) { running = true; runningRandomly = true; base.creatureAnimator.SetBool("Running", true); SetRunningServerRpc(running: true); } else if (!onlySetRunning) { Vector3 onUnitSphere = Random.onUnitSphere; float y = 0f; if (Physics.Raycast(base.eye.position, onUnitSphere, 5f, StartOfRound.Instance.collidersRoomMaskDefaultAndPlayers)) { y = RoundManager.Instance.YRotationThatFacesTheFarthestFromPosition(base.eye.position, 12f, 5); } onUnitSphere.y = y; LookAtDirectionServerRpc(onUnitSphere, Random.Range(0.25f, 2f), Random.Range(-60f, 60f)); } } else { int num2 = ((!base.isOutside) ? 30 : 80); if (onlySetRunning) { num2 /= 5; } if (Random.Range(0, 100) > num2 || staminaTimer <= 0f) { running = false; runningRandomly = false; staminaTimer = -6f; base.creatureAnimator.SetBool("Running", false); SetRunningServerRpc(running: false); } } } private void TeleportMaskedEnemyAndSync(Vector3 pos, bool setOutside) { //IL_0009: 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) if (((NetworkBehaviour)this).IsOwner) { TeleportMaskedEnemy(pos, setOutside); TeleportMaskedEnemyServerRpc(pos, setOutside); } } [ServerRpc] public void TeleportMaskedEnemyServerRpc(Vector3 pos, bool setOutside) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1932319315u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1932319315u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; TeleportMaskedEnemyClientRpc(pos, setOutside); } } [ClientRpc] public void TeleportMaskedEnemyClientRpc(Vector3 pos, bool setOutside) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3086087784u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOutside, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3086087784u, val2, (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) { TeleportMaskedEnemy(pos, setOutside); } } } private void TeleportMaskedEnemy(Vector3 pos, bool setOutside) { //IL_0010: 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_0019: 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_005a: 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_0061: 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) timeAtLastUsingEntrance = Time.realtimeSinceStartup; Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(pos, default(NavMeshHit), 5f, -1); if (((NetworkBehaviour)this).IsOwner) { ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = navMeshPosition; ((Behaviour)base.agent).enabled = true; } else { ((Component)this).transform.position = navMeshPosition; } base.serverPosition = navMeshPosition; ((EnemyAI)this).SetEnemyOutside(setOutside); EntranceTeleport val = RoundManager.FindMainEntranceScript(setOutside); if (val.doorAudios != null && val.doorAudios.Length != 0) { val.entrancePointAudio.PlayOneShot(val.doorAudios[0]); WalkieTalkie.TransmitOneShotAudio(val.entrancePointAudio, val.doorAudios[0], 1f); } } private bool GoTowardsEntrance() { //IL_0002: 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) if (!((EnemyAI)this).PathIsIntersectedByLineOfSight(mainEntrancePosition, false, false, false)) { ((EnemyAI)this).SetDestinationToPosition(mainEntrancePosition, false); return true; } return false; } private bool UseElevator(bool goUp) { //IL_0020: 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_0025: 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_019a: 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_0097: 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_00e9: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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_0214: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((!goUp) ? elevatorScript.elevatorTopPoint.position : elevatorScript.elevatorBottomPoint.position); Debug.Log((object)$"goUp: {goUp}"); Debug.Log((object)$"{elevatorScript.elevatorFinishedMoving}, {!((EnemyAI)this).PathIsIntersectedByLineOfSight(elevatorScript.elevatorInsidePoint.position, false, false, false)}"); if (elevatorScript.elevatorFinishedMoving && !((EnemyAI)this).PathIsIntersectedByLineOfSight(elevatorScript.elevatorInsidePoint.position, false, false, false)) { Debug.Log((object)$"goUp: {goUp}, elevatormovingdown: {elevatorScript.elevatorMovingDown}"); Debug.Log((object)$"{elevatorScript.elevatorDoorOpen}, {Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorInsidePoint.position) < 1f}, {elevatorScript.elevatorMovingDown == goUp}"); if (elevatorScript.elevatorDoorOpen && Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorInsidePoint.position) < 1f && elevatorScript.elevatorMovingDown == goUp) { elevatorScript.PressElevatorButtonOnServer(true); } ((EnemyAI)this).SetDestinationToPosition(elevatorScript.elevatorInsidePoint.position, false); return true; } if (Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorInsidePoint.position) > 1f && !((EnemyAI)this).PathIsIntersectedByLineOfSight(val, false, false, false)) { if (elevatorScript.elevatorDoorOpen && Vector3.Distance(((Component)this).transform.position, val) < 1f && elevatorScript.elevatorMovingDown != goUp && !elevatorScript.elevatorCalled) { elevatorScript.CallElevatorOnServer(goUp); } ((EnemyAI)this).SetDestinationToPosition(val, false); return true; } return false; } public override void DoAIInterval() { //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_054a: 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_00b9: 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_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_06ed: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) //IL_05fb: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_07a6: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_019f: 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_02c2: 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_02e4: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead) { base.agent.speed = 0f; return; } PlayerControllerB val = null; switch (base.currentBehaviourStateIndex) { case 0: LookAndRunRandomly(canStartRunning: true); val = ((EnemyAI)this).CheckLineOfSightForClosestPlayer(45f, 60, -1, 0f); if ((Object)(object)val != (Object)null) { LookAtPlayerServerRpc((int)val.playerClientId); ((EnemyAI)this).SetMovingTowardsTargetPlayer(val); ((EnemyAI)this).SwitchToBehaviourState(1); break; } interestInShipCooldown += base.AIIntervalTime; if (interestInShipCooldown >= 17f && Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.elevatorTransform.position) < 22f) { ((EnemyAI)this).SwitchToBehaviourState(2); break; } if (Time.realtimeSinceStartup - timeAtLastUsingEntrance > 3f) { bool flag = false; PlayerControllerB closestPlayer2 = ((EnemyAI)this).GetClosestPlayer(false, false, false); if (!base.isOutside && (Object)(object)closestPlayer2 != (Object)null && RoundManager.Instance.currentDungeonType == 4 && Vector3.Distance(((Component)closestPlayer2).transform.position, mainEntrancePosition) < 30f) { flag = true; } if ((Object)(object)closestPlayer2 == (Object)null || flag != isInElevatorStartRoom) { bool flag2 = false; bool flag3 = false; bool flag4 = RoundManager.Instance.currentDungeonType == 4; if (flag4 && (Object)(object)elevatorScript == (Object)null) { elevatorScript = Object.FindObjectOfType(); if ((Object)(object)elevatorScript == (Object)null) { flag4 = false; } } if (flag4) { if (isInElevatorStartRoom) { if (Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorBottomPoint.position) < 10f) { isInElevatorStartRoom = false; } } else if (Vector3.Distance(((Component)this).transform.position, elevatorScript.elevatorTopPoint.position) < 10f) { isInElevatorStartRoom = true; } } if (flag4 && RoundManager.Instance.currentDungeonType == 4 && !base.isOutside) { if (!isInElevatorStartRoom) { flag2 = UseElevator(goUp: true); } else { bool flag5 = false; for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (!StartOfRound.Instance.allPlayerScripts[i].isPlayerDead && StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && StartOfRound.Instance.allPlayerScripts[i].isInsideFactory) { flag5 = true; break; } } if (!flag5) { flag3 = true; flag2 = GoTowardsEntrance(); } else if (!flag) { flag2 = UseElevator(goUp: false); } } } else { flag3 = true; flag2 = GoTowardsEntrance(); } if (flag3 && Vector3.Distance(((Component)this).transform.position, mainEntrancePosition) < 1f) { TeleportMaskedEnemyAndSync(RoundManager.FindMainEntrancePosition(true, !base.isOutside), !base.isOutside); return; } if (flag2) { if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } return; } } } if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } break; case 1: LookAndRunRandomly(canStartRunning: true, onlySetRunning: true); val = ((EnemyAI)this).CheckLineOfSightForClosestPlayer(70f, 50, 1, 3f); if ((Object)(object)val != (Object)null) { lostPlayerInChase = false; lostLOSTimer = 0f; if ((Object)(object)val != (Object)(object)base.targetPlayer) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(val); LookAtPlayerServerRpc((int)val.playerClientId); } if (base.mostOptimalDistance > 17f) { if (handsOut) { handsOut = false; SetHandsOutServerRpc(setOut: false); } if (!running) { running = true; base.creatureAnimator.SetBool("Running", true); SetRunningServerRpc(running: true); } } else if (base.mostOptimalDistance < 6f) { if (!handsOut) { handsOut = true; SetHandsOutServerRpc(setOut: true); } } else if (base.mostOptimalDistance < 12f) { if (handsOut) { handsOut = false; SetHandsOutServerRpc(setOut: false); } if (running && !runningRandomly) { running = false; base.creatureAnimator.SetBool("Running", false); SetRunningServerRpc(running: false); } } break; } lostLOSTimer += base.AIIntervalTime; if (lostLOSTimer > 10f) { ((EnemyAI)this).SwitchToBehaviourState(0); base.targetPlayer = null; } else if (lostLOSTimer > 3.5f) { lostPlayerInChase = true; StopLookingAtTransformServerRpc(); base.targetPlayer = null; if (running) { running = false; base.creatureAnimator.SetBool("Running", false); SetRunningServerRpc(running: false); } if (handsOut) { handsOut = false; SetHandsOutServerRpc(setOut: false); } } break; case 2: { if (!base.isInsidePlayerShip) { interestInShipCooldown -= base.AIIntervalTime; } if (Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.insideShipPositions[0].position) > 27f || interestInShipCooldown <= 0f) { ((EnemyAI)this).SwitchToBehaviourState(0); break; } PlayerControllerB closestPlayer = ((EnemyAI)this).GetClosestPlayer(false, false, false); if ((Object)(object)closestPlayer != (Object)null) { PlayerControllerB val2 = ((EnemyAI)this).CheckLineOfSightForClosestPlayer(70f, 20, 0, 0f); if ((Object)(object)val2 != (Object)null) { if ((Object)(object)stareAtTransform != (Object)(object)((Component)val2.gameplayCamera).transform) { LookAtPlayerServerRpc((int)val2.playerClientId); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(val2); ((EnemyAI)this).SwitchToBehaviourState(1); } else if (base.isInsidePlayerShip && closestPlayer.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.7f, 4f, 20, -1f, -1)) { if ((Object)(object)stareAtTransform != (Object)(object)((Component)closestPlayer.gameplayCamera).transform) { LookAtPlayerServerRpc((int)closestPlayer.playerClientId); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(closestPlayer); ((EnemyAI)this).SwitchToBehaviourState(1); } else if (base.mostOptimalDistance < 6f) { if ((Object)(object)stareAtTransform != (Object)(object)((Component)closestPlayer.gameplayCamera).transform) { stareAtTransform = ((Component)closestPlayer.gameplayCamera).transform; LookAtPlayerServerRpc((int)closestPlayer.playerClientId); } } else if (base.mostOptimalDistance > 12f && (Object)(object)stareAtTransform != (Object)null) { stareAtTransform = null; StopLookingAtTransformServerRpc(); } } ((EnemyAI)this).SetDestinationToPosition(shipHidingSpot, false); if (!crouching && Vector3.Distance(((Component)this).transform.position, shipHidingSpot) < 0.4f) { base.agent.speed = 0f; crouching = true; SetCrouchingServerRpc(setOut: true); } else if (crouching && Vector3.Distance(((Component)this).transform.position, shipHidingSpot) > 1f) { crouching = false; SetCrouchingServerRpc(setOut: false); } break; } } if (!((Object)(object)base.targetPlayer != (Object)null) || !((EnemyAI)this).PlayerIsTargetable(base.targetPlayer, false, false, false) || (base.currentBehaviourStateIndex != 1 && base.currentBehaviourStateIndex != 2)) { return; } if (lostPlayerInChase) { base.movingTowardsTargetPlayer = false; if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } } else { if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } ((EnemyAI)this).SetMovingTowardsTargetPlayer(base.targetPlayer); } } [ServerRpc] public void LookAtDirectionServerRpc(Vector3 dir, float time, float vertLookAngle) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Invalid comparison between Unknown and I4 //IL_014a: 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_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_00eb: 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_0105: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2663711730u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref dir); ((FastBufferWriter)(ref val)).WriteValueSafe(ref time, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vertLookAngle, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2663711730u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LookAtDirectionClientRpc(dir, time, vertLookAngle); } } [ClientRpc] public void LookAtDirectionClientRpc(Vector3 dir, float time, float vertLookAngle) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_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_00bf: 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_010a: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3080554203u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref dir); ((FastBufferWriter)(ref val)).WriteValueSafe(ref time, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref vertLookAngle, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3080554203u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LookAtDirection(dir, time, vertLookAngle); } } } [ServerRpc] public void LookAtPositionServerRpc(Vector3 pos, float time) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(445254365u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref time, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 445254365u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LookAtPositionClientRpc(pos, time); } } [ClientRpc] public void LookAtPositionClientRpc(Vector3 pos, float time) { //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_00ef: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2638717008u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref time, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2638717008u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LookAtPosition(pos, time); } } } [ServerRpc] public void LookAtPlayerServerRpc(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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1733499726u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1733499726u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LookAtPlayerClientRpc(playerId); } } [ClientRpc] public void LookAtPlayerClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(580505662u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 580505662u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stareAtTransform = ((Component)StartOfRound.Instance.allPlayerScripts[playerId].gameplayCamera).transform; } } } [ServerRpc] public void StopLookingAtTransformServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(662471551u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 662471551u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopLookingAtTransformClientRpc(); } } [ClientRpc] public void StopLookingAtTransformClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(4257254603u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 4257254603u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stareAtTransform = null; } } } [ServerRpc] public void SetHandsOutServerRpc(bool setOut) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2276740878u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOut, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2276740878u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetHandsOutClientRpc(setOut); } } [ClientRpc] public void SetHandsOutClientRpc(bool setOut) { //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.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2926655268u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOut, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2926655268u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; handsOut = setOut; base.creatureAnimator.SetBool("HandsOut", setOut); } } } [ServerRpc] public void SetCrouchingServerRpc(bool setOut) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3000285723u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setOut, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3000285723u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetCrouchingClientRpc(setOut); } } [ClientRpc] public void SetCrouchingClientRpc(bool setCrouch) { //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.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3619533588u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setCrouch, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3619533588u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; crouching = setCrouch; base.creatureAnimator.SetBool("Crouching", setCrouch); } } } public void LookAtFocusedPosition() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: 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_0214: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: 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_0098: 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_00f7: 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) //IL_0117: 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_0141: 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_017c: Unknown result type (might be due to invalid IL or missing references) if (base.inSpecialAnimation) { verticalLookAngle = Mathf.Lerp(verticalLookAngle, 0f, 10f * Time.deltaTime); currentLookAngle = Mathf.Lerp(currentLookAngle, verticalLookAngle, 7f); headTiltTarget.localEulerAngles = new Vector3(currentLookAngle, 0f, 0f); return; } if (lookAtPositionTimer <= 0f) { if ((Object)(object)stareAtTransform != (Object)null) { if (!(Vector3.Distance(stareAtTransform.position, ((Component)this).transform.position) > 80f)) { base.agent.angularSpeed = 0f; RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(stareAtTransform); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, RoundManager.Instance.tempTransform.rotation, turnSpeedMultiplier * Time.deltaTime); ((Component)this).transform.eulerAngles = new Vector3(0f, ((Component)this).transform.eulerAngles.y, 0f); headTiltTarget.LookAt(stareAtTransform); headTiltTarget.localEulerAngles = new Vector3(headTiltTarget.localEulerAngles.x, 0f, 0f); } return; } base.agent.angularSpeed = 450f; verticalLookAngle = Mathf.Clamp(verticalLookAngle, -30f, 10f); } else { base.agent.angularSpeed = 0f; lookAtPositionTimer -= Time.deltaTime; RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(focusOnPosition); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, RoundManager.Instance.tempTransform.rotation, turnSpeedMultiplier * Time.deltaTime); ((Component)this).transform.eulerAngles = new Vector3(0f, ((Component)this).transform.eulerAngles.y, 0f); verticalLookAngle = Mathf.Clamp(verticalLookAngle + Random.Range(-3f * Time.deltaTime, 3f * Time.deltaTime), -70f, 70f); } currentLookAngle = Mathf.Lerp(currentLookAngle, verticalLookAngle, 7f); headTiltTarget.localEulerAngles = new Vector3(currentLookAngle, 0f, 0f); } public void LookAtDirection(Vector3 direction, float lookAtTime = 1f, float vertLookAngle = 0f) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //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_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_0025: 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) verticalLookAngle = vertLookAngle; direction = Vector3.Normalize(direction * 100f); focusOnPosition = ((Component)this).transform.position + direction * 1000f; lookAtPositionTimer = lookAtTime; } public void LookAtPosition(Vector3 pos, float lookAtTime = 1f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0019: 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_0030: 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) focusOnPosition = pos; lookAtPositionTimer = lookAtTime; float num = Vector3.Angle(((Component)this).transform.forward, pos - ((Component)this).transform.position); if (pos.y - headTiltTarget.position.y < 0f) { num *= -1f; } verticalLookAngle = num; } [ServerRpc] public void SetRunningServerRpc(bool running) { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3852143648u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref running, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3852143648u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetRunningClientRpc(running); } } [ClientRpc] public void SetRunningClientRpc(bool setRunning) { //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.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3615062751u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref setRunning, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3615062751u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; running = setRunning; base.creatureAnimator.SetBool("Running", setRunning); } } } private void CalculateAnimationDirection(float maxSpeed = 1f) { //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_003a: 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_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_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_0069: 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) base.creatureAnimator.SetBool("IsMoving", Vector3.Distance(((Component)this).transform.position, previousPosition) > 0f); agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 2f)); velX = Mathf.Lerp(velX, agentLocalVelocity.x, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, agentLocalVelocity.z, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityZ", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); previousPosition = ((Component)this).transform.position; } 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_0024: 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_003a: 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_0094: 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_0071: 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_00e6: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DetectNoise(noisePosition, noiseLoudness, timesPlayedInOneSpot, noiseID); if (!((NetworkBehaviour)this).IsOwner || base.isEnemyDead || base.inSpecialAnimation) { return; } if (Vector3.Distance(noisePosition, ((Component)this).transform.position + Vector3.up * 0.4f) < 0.75f) { Debug.Log((object)"Can't hear noise reason A"); return; } if (handsOut || ((Object)(object)stareAtTransform != (Object)null && Vector3.Distance(noisePosition, stareAtTransform.position) < 2f)) { Debug.Log((object)"Can't hear noise reason B"); return; } float num = Vector3.Distance(noisePosition, ((Component)this).transform.position); float num2 = noiseLoudness / num; Debug.Log((object)$"Noise heard relative loudness: {num2}"); if (!(num2 < 0.12f) && !(Time.realtimeSinceStartup - timeLookingAtLastNoise < 3f)) { timeLookingAtLastNoise = Time.realtimeSinceStartup; LookAtPositionServerRpc(noisePosition, Mathf.Min(num2 * 6f, 2f)); } } public void LateUpdate() { if (!(base.stunNormalizedTimer >= 0f) && !base.isEnemyDead) { LookAtFocusedPosition(); } } public void SetVisibilityOfMaskedEnemy() { if (allowSpawningWithoutPlayer) { if ((Object)(object)mimickingPlayer != (Object)null && (Object)(object)mimickingPlayer.deadBody != (Object)null && !mimickingPlayer.deadBody.deactivated) { if (enemyEnabled) { enemyEnabled = false; ((EnemyAI)this).EnableEnemyMesh(false, false, true); } } else if (!enemyEnabled) { enemyEnabled = true; ((EnemyAI)this).EnableEnemyMesh(true, false, false); } } else if ((Object)(object)mimickingPlayer == (Object)null || ((Object)(object)mimickingPlayer.deadBody != (Object)null && !mimickingPlayer.deadBody.deactivated)) { if (enemyEnabled) { enemyEnabled = false; ((EnemyAI)this).EnableEnemyMesh(false, false, true); } } else if (!enemyEnabled) { enemyEnabled = true; ((EnemyAI)this).EnableEnemyMesh(true, false, false); } } public override void Update() { //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); CalculateAnimationDirection(); SetVisibilityOfMaskedEnemy(); if (base.isEnemyDead) { base.agent.speed = 0f; if (base.inSpecialAnimation) { FinishKillAnimation(); } return; } if ((Object)(object)lastPlayerKilled != (Object)null && (Object)(object)lastPlayerKilled.deadBody != (Object)null && !lastPlayerKilled.deadBody.deactivated) { lastPlayerKilled.deadBody.DeactivateBody(false); lastPlayerKilled = null; } if (!enemyEnabled) { return; } if (base.ventAnimationFinished) { ((RigConstraint>)(object)lookRig1).weight = 0.452f; ((RigConstraint>)(object)lookRig2).weight = 1f; base.creatureAnimator.SetBool("Stunned", base.stunNormalizedTimer >= 0f); if (base.stunNormalizedTimer >= 0f) { base.agent.speed = 0f; if (((NetworkBehaviour)this).IsOwner && searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (base.inSpecialAnimation) { FinishKillAnimation(); } } else { if (base.inSpecialAnimation) { return; } if (walkCheckInterval <= 0f) { walkCheckInterval = 0.1f; positionLastCheck = ((Component)this).transform.position; } else { walkCheckInterval -= Time.deltaTime; } switch (base.currentBehaviourStateIndex) { case 0: if (previousBehaviourState != base.currentBehaviourStateIndex) { stareAtTransform = null; running = false; runningRandomly = false; base.creatureAnimator.SetBool("Running", false); handsOut = false; base.creatureAnimator.SetBool("HandsOut", false); crouching = false; base.creatureAnimator.SetBool("Crouching", false); previousBehaviourState = base.currentBehaviourStateIndex; } if (running || runningRandomly) { base.agent.speed = roamingRunSpeed; } else { base.agent.speed = roamingWalkSpeed; } break; case 1: if (previousBehaviourState != base.currentBehaviourStateIndex) { lookAtPositionTimer = 0f; if (previousBehaviourState == 0) { stopAndStareTimer = Random.Range(minRoamStareTimer, maxRoamStareTimer); } runningRandomly = false; running = false; base.creatureAnimator.SetBool("Running", false); crouching = false; base.creatureAnimator.SetBool("Crouching", false); previousBehaviourState = base.currentBehaviourStateIndex; } if (!((NetworkBehaviour)this).IsOwner) { break; } stopAndStareTimer -= Time.deltaTime; if (stopAndStareTimer >= 0f) { base.agent.speed = 0f; break; } if (stopAndStareTimer <= -5f) { stopAndStareTimer = Random.Range(minFollowStareTimer, maxFollowStareTimer); } if (running || runningRandomly) { base.agent.speed = followRunSpeed; } else { base.agent.speed = followWalkSpeed; } break; case 2: if (previousBehaviourState != base.currentBehaviourStateIndex) { base.movingTowardsTargetPlayer = false; interestInShipCooldown = shipIntrestCooldown; base.agent.speed = waitStateSpeed; runningRandomly = false; running = false; base.creatureAnimator.SetBool("Running", false); handsOut = false; base.creatureAnimator.SetBool("HandsOut", false); if (((NetworkBehaviour)this).IsOwner) { ChooseShipHidingSpot(); } previousBehaviourState = base.currentBehaviourStateIndex; } break; } } } else { ((RigConstraint>)(object)lookRig1).weight = 0f; ((RigConstraint>)(object)lookRig2).weight = 0f; } } private void ChooseShipHidingSpot() { //IL_0015: 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_004a: 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_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) bool flag = false; for (int i = 0; i < StartOfRound.Instance.insideShipPositions.Length; i++) { if (Physics.Linecast(((Component)StartOfRound.Instance.shipDoorAudioSource).transform.position, StartOfRound.Instance.insideShipPositions[i].position, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && ((EnemyAI)this).SetDestinationToPosition(StartOfRound.Instance.insideShipPositions[i].position, true)) { flag = true; shipHidingSpot = base.destination; break; } } if (!flag) { shipHidingSpot = StartOfRound.Instance.insideShipPositions[Random.Range(0, StartOfRound.Instance.insideShipPositions.Length)].position; } } public override void ShipTeleportEnemy() { ((EnemyAI)this).ShipTeleportEnemy(); if (teleportCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(teleportCoroutine); } ((MonoBehaviour)this).StartCoroutine(teleportMasked()); } private IEnumerator teleportMasked() { teleportParticle.Play(); movementAudio.PlayOneShot(Object.FindObjectOfType().beamUpPlayerBodySFX); yield return (object)new WaitForSeconds(3f); if (StartOfRound.Instance.shipIsLeaving) { yield break; } ((EnemyAI)this).SetEnemyOutside(true); base.isInsidePlayerShip = true; ShipTeleporter[] array = Object.FindObjectsOfType(); ShipTeleporter val = null; if (array != null) { for (int i = 0; i < array.Length; i++) { if (!array[i].isInverseTeleporter) { val = array[i]; } } } if ((Object)(object)val != (Object)null) { if (((NetworkBehaviour)this).IsOwner) { ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = val.teleporterPosition.position; ((Behaviour)base.agent).enabled = true; base.isInsidePlayerShip = true; } base.serverPosition = val.teleporterPosition.position; } teleportCoroutine = null; } public override void SetEnemyOutside(bool outside = false) { //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) ((EnemyAI)this).SetEnemyOutside(outside); mainEntrancePosition = RoundManager.FindMainEntrancePosition(true, base.isOutside); if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } } public override void OnDestroy() { ((EnemyAI)this).OnDestroy(); } public override void KillEnemy(bool destroy = false) { if ((Object)(object)mimickingPlayer != (Object)null) { base.removedPowerLevel = true; } ((EnemyAI)this).KillEnemy(destroy); base.creatureAnimator.SetBool("Stunned", false); base.creatureAnimator.SetBool("Dead", true); } 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; base.stunNormalizedTimer = 0.5f; base.creatureAnimator.SetTrigger("HitEnemy"); stopAndStareTimer = 0f; if (((float)Random.Range(0, 100) < 40f || base.enemyHP == 1) && !running) { running = true; runningRandomly = true; base.creatureAnimator.SetBool("Running", true); SetRunningServerRpc(running: true); staminaTimer = 5f; } if (base.enemyHP <= 0) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); if (!(base.stunNormalizedTimer >= 0f) && !base.isEnemyDead && !(Time.realtimeSinceStartup - timeAtLastUsingEntrance < 1.75f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, inKillAnimation || startingKillAnimationLocalClient || !enemyEnabled, false); if ((Object)(object)val != (Object)null) { startingKillAnimationLocalClient = true; KillPlayerAnimationServerRpc((int)val.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void KillPlayerAnimationServerRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3332348622u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3332348622u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!inKillAnimation && !playersKilled.Contains(playerObjectId)) { base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId]; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this; inKillAnimation = true; base.inSpecialAnimation = true; base.isClientCalculatingAI = false; KillPlayerAnimationClientRpc(playerObjectId); } else { CancelKillAnimationClientRpc(playerObjectId); } } } [ClientRpc] public void CancelKillAnimationClientRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3911808553u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3911808553u, val2, (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 == playerObjectId) { startingKillAnimationLocalClient = false; } } } [ClientRpc] public void KillPlayerAnimationClientRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_023c: 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_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1676626956u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1676626956u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } base.inSpecialAnimationWithPlayer = StartOfRound.Instance.allPlayerScripts[playerObjectId]; if ((Object)(object)base.inSpecialAnimationWithPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) { startingKillAnimationLocalClient = false; } if ((Object)(object)base.inSpecialAnimationWithPlayer == (Object)null || base.inSpecialAnimationWithPlayer.isPlayerDead || base.inSpecialAnimationWithPlayer.isInsideFactory != !base.isOutside) { FinishKillAnimation(); return; } base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = (EnemyAI)(object)this; if ((Object)(object)base.inSpecialAnimationWithPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController) { base.inSpecialAnimationWithPlayer.CancelSpecialTriggerAnimations(); } inKillAnimation = true; base.inSpecialAnimation = true; base.creatureAnimator.SetBool("killing", true); ((Behaviour)base.agent).enabled = false; base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = true; base.inSpecialAnimationWithPlayer.snapToServerPosition = true; Vector3 val3 = ((!((NetworkBehaviour)base.inSpecialAnimationWithPlayer).IsOwner) ? ((Component)base.inSpecialAnimationWithPlayer).transform.parent.TransformPoint(base.inSpecialAnimationWithPlayer.serverPlayerPosition) : ((Component)base.inSpecialAnimationWithPlayer).transform.position); Vector3 val4 = ((Component)this).transform.position - ((Component)this).transform.forward * 2f; val4.y = val3.y; playerRay = new Ray(val3, val4 - ((Component)base.inSpecialAnimationWithPlayer).transform.position); if (killAnimationCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killAnimationCoroutine); } killAnimationCoroutine = ((MonoBehaviour)this).StartCoroutine(killAnimation()); } private IEnumerator killAnimation() { WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, base.enemyType.audioClips[0], 1f); base.creatureSFX.PlayOneShot(base.enemyType.audioClips[0]); Vector3 endPosition = ((Ray)(ref playerRay)).GetPoint(0.7f); if (base.isOutside && endPosition.y < -80f) { ((EnemyAI)this).SetEnemyOutside(false); } else if (!base.isOutside && endPosition.y > -80f) { ((EnemyAI)this).SetEnemyOutside(true); } base.inSpecialAnimationWithPlayer.disableSyncInAnimation = true; base.inSpecialAnimationWithPlayer.disableLookInput = true; RoundManager.Instance.tempTransform.position = ((Component)base.inSpecialAnimationWithPlayer).transform.position; RoundManager.Instance.tempTransform.LookAt(endPosition); Quaternion startingPlayerRot = ((Component)base.inSpecialAnimationWithPlayer).transform.rotation; Quaternion targetRot = RoundManager.Instance.tempTransform.rotation; Vector3 startingPosition = ((Component)this).transform.position; for (int i = 0; i < 8; i++) { if (i > 0) { ((Component)this).transform.LookAt(((Component)base.inSpecialAnimationWithPlayer).transform.position); ((Component)this).transform.eulerAngles = new Vector3(0f, ((Component)this).transform.eulerAngles.y, 0f); } ((Component)this).transform.position = Vector3.Lerp(startingPosition, endPosition, (float)i / 8f); ((Component)base.inSpecialAnimationWithPlayer).transform.rotation = Quaternion.Lerp(startingPlayerRot, targetRot, (float)i / 8f); ((Component)base.inSpecialAnimationWithPlayer).transform.eulerAngles = new Vector3(0f, ((Component)base.inSpecialAnimationWithPlayer).transform.eulerAngles.y, 0f); yield return null; } ((Component)this).transform.position = endPosition; ((Component)base.inSpecialAnimationWithPlayer).transform.rotation = targetRot; ((Component)base.inSpecialAnimationWithPlayer).transform.eulerAngles = new Vector3(0f, ((Component)base.inSpecialAnimationWithPlayer).transform.eulerAngles.y, 0f); yield return (object)new WaitForSeconds(0.3f); SetMaskGlow(enable: true); yield return (object)new WaitForSeconds(1.2f); maskFloodParticle.Play(); base.creatureSFX.PlayOneShot(base.enemyType.audioClips[2]); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, base.enemyType.audioClips[2], 1f); yield return (object)new WaitForSeconds(1.5f); lastPlayerKilled = base.inSpecialAnimationWithPlayer; if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { bool flag = ((Component)base.inSpecialAnimationWithPlayer).transform.position.y < -80f; base.inSpecialAnimationWithPlayer.KillPlayer(Vector3.zero, false, (CauseOfDeath)4, 4, default(Vector3), false); base.inSpecialAnimationWithPlayer.snapToServerPosition = false; if (((NetworkBehaviour)this).IsServer) { playersKilled.Add((int)base.inSpecialAnimationWithPlayer.playerClientId); NetworkObjectReference netObjectRef = RoundManager.Instance.SpawnEnemyGameObject(GetGroundPosition(((Ray)(ref playerRay)).origin), ((Component)base.inSpecialAnimationWithPlayer).transform.eulerAngles.y, -1, base.enemyType); NetworkObject val = default(NetworkObject); if (((NetworkObjectReference)(ref netObjectRef)).TryGet(ref val, (NetworkManager)null)) { MaskedAI component = ((Component)val).GetComponent(); if (copyPlayerAttributes) { component.SetSuit(base.inSpecialAnimationWithPlayer.currentSuitID); } component.mimickingPlayer = base.inSpecialAnimationWithPlayer; ((EnemyAI)component).SetEnemyOutside(!flag); base.inSpecialAnimationWithPlayer.redirectToEnemy = (EnemyAI)(object)component; if ((Object)(object)base.inSpecialAnimationWithPlayer.deadBody != (Object)null) { base.inSpecialAnimationWithPlayer.deadBody.DeactivateBody(false); } } CreateMimicClientRpc(netObjectRef, flag, (int)base.inSpecialAnimationWithPlayer.playerClientId); } FinishKillAnimation(killedPlayer: true); } else { FinishKillAnimation(); } } [ClientRpc] public void CreateMimicClientRpc(NetworkObjectReference netObjectRef, bool inFactory, 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_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_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_00a7: 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_0104: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3987080333u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref netObjectRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref inFactory, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, playerKilled); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3987080333u, val2, (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) { ((MonoBehaviour)this).StartCoroutine(waitForMimicEnemySpawn(netObjectRef, inFactory, playerKilled)); } } } private IEnumerator waitForMimicEnemySpawn(NetworkObjectReference netObjectRef, bool inFactory, int playerKilled) { //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) PlayerControllerB player = StartOfRound.Instance.allPlayerScripts[playerKilled]; NetworkObject netObject = null; float startTime = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => Time.realtimeSinceStartup - startTime > 20f || ((NetworkObjectReference)(ref netObjectRef)).TryGet(ref netObject, (NetworkManager)null))); if ((Object)(object)player.deadBody == (Object)null) { startTime = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => Time.realtimeSinceStartup - startTime > 20f || (Object)(object)player.deadBody != (Object)null)); } if (!((Object)(object)player.deadBody == (Object)null)) { player.deadBody.DeactivateBody(false); if ((Object)(object)netObject != (Object)null) { MaskedAI component = ((Component)netObject).GetComponent(); component.mimickingPlayer = player; component.SetSuit(player.currentSuitID); ((EnemyAI)component).SetEnemyOutside(!inFactory); player.redirectToEnemy = (EnemyAI)(object)component; } } } public override void CancelSpecialAnimationWithPlayer() { FinishKillAnimation(); ((EnemyAI)this).CancelSpecialAnimationWithPlayer(); } public void FinishKillAnimation(bool killedPlayer = false) { //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) if (!killedPlayer) { base.creatureSFX.Stop(); } if (killAnimationCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(killAnimationCoroutine); } base.inSpecialAnimation = false; inKillAnimation = false; base.creatureAnimator.SetBool("killing", false); startingKillAnimationLocalClient = false; if ((Object)(object)base.inSpecialAnimationWithPlayer != (Object)null) { base.inSpecialAnimationWithPlayer.disableSyncInAnimation = false; base.inSpecialAnimationWithPlayer.disableLookInput = false; base.inSpecialAnimationWithPlayer.inSpecialInteractAnimation = false; base.inSpecialAnimationWithPlayer.snapToServerPosition = false; base.inSpecialAnimationWithPlayer.inAnimationWithEnemy = null; } SetMaskGlow(enable: false); maskFloodParticle.Stop(true, (ParticleSystemStopBehavior)1); stopAndStareTimer = 3f; base.movingTowardsTargetPlayer = false; if (((NetworkBehaviour)this).IsOwner) { ((Component)this).transform.position = GetGroundPosition(((Component)this).transform.position); ((Behaviour)base.agent).enabled = true; base.isClientCalculatingAI = true; } if (((NetworkBehaviour)this).NetworkObject.IsSpawned) { ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); if (((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).SwitchToBehaviourState(0); } } } private Vector3 GetGroundPosition(Vector3 startingPos) { //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_0007: 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_0010: 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_001c: 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_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_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_0046: 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_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_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_00bb: 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) Vector3 val = startingPos; val = RoundManager.Instance.GetNavMeshPosition(val, default(NavMeshHit), 3f, -1); if (!RoundManager.Instance.GotNavMeshPositionResult) { RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(startingPos + Vector3.up * 0.15f, -Vector3.up, ref val2, 50f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { val = RoundManager.Instance.GetNavMeshPosition(((RaycastHit)(ref val2)).point, default(NavMeshHit), 10f, -1); } else { int num = Random.Range(0, base.allAINodes.Length); if (base.allAINodes != null && (Object)(object)base.allAINodes[num] != (Object)null) { val = base.allAINodes[num].transform.position; } } } return val; } public void SetSuit(int suitId) { Material suitMaterial = StartOfRound.Instance.unlockablesList.unlockables[suitId].suitMaterial; ((Renderer)rendererLOD0).material = suitMaterial; ((Renderer)rendererLOD1).material = suitMaterial; ((Renderer)rendererLOD2).material = suitMaterial; } public void SetMaskType(int maskType) { switch (maskType) { case 4: maskTypes[0].SetActive(true); maskTypes[1].SetActive(false); maskTypeIndex = 0; break; case 5: maskTypes[1].SetActive(true); maskTypes[0].SetActive(false); maskTypeIndex = 1; break; } } public void GetMaterialStandingOn() { //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_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_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_002b: 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_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) enemyRay = new Ray(((Component)this).transform.position + Vector3.up, -Vector3.up); if (Physics.Raycast(enemyRay, ref enemyRayHit, 6f, StartOfRound.Instance.walkableSurfacesMask, (QueryTriggerInteraction)1)) { if (((Component)((RaycastHit)(ref enemyRayHit)).collider).CompareTag(StartOfRound.Instance.footstepSurfaces[currentFootstepSurfaceIndex].surfaceTag)) { return; } for (int i = 0; i < StartOfRound.Instance.footstepSurfaces.Length; i++) { if (((Component)((RaycastHit)(ref enemyRayHit)).collider).CompareTag(StartOfRound.Instance.footstepSurfaces[i].surfaceTag)) { currentFootstepSurfaceIndex = i; break; } } } else { Debug.DrawRay(((Ray)(ref enemyRay)).origin, ((Ray)(ref enemyRay)).direction, Color.white, 0.3f); } } public void PlayFootstepSound() { GetMaterialStandingOn(); int num = Random.Range(0, StartOfRound.Instance.footstepSurfaces[currentFootstepSurfaceIndex].clips.Length); if (num == previousFootstepClip) { num = (num + 1) % StartOfRound.Instance.footstepSurfaces[currentFootstepSurfaceIndex].clips.Length; } movementAudio.pitch = Random.Range(0.93f, 1.07f); float num2 = 0.95f; if (!sprinting) { num2 = 0.75f; } movementAudio.PlayOneShot(StartOfRound.Instance.footstepSurfaces[currentFootstepSurfaceIndex].clips[num], num2); previousFootstepClip = num; WalkieTalkie.TransmitOneShotAudio(movementAudio, StartOfRound.Instance.footstepSurfaces[currentFootstepSurfaceIndex].clips[num], num2); } public override void AnimationEventA() { ((EnemyAI)this).AnimationEventA(); PlayFootstepSound(); } public void SetMaskGlow(bool enable) { ((Renderer)maskEyesGlow[maskTypeIndex]).enabled = enable; ((Behaviour)maskEyesGlowLight).enabled = enable; if (enable) { base.creatureSFX.PlayOneShot(base.enemyType.audioClips[1]); } } 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(566955271u, new RpcReceiveHandler(__rpc_handler_566955271), "SetEnemyAsHavingNoPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(632198526u, new RpcReceiveHandler(__rpc_handler_632198526), "SetEnemyAsHavingNoPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1932319315u, new RpcReceiveHandler(__rpc_handler_1932319315), "TeleportMaskedEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3086087784u, new RpcReceiveHandler(__rpc_handler_3086087784), "TeleportMaskedEnemyClientRpc"); ((NetworkBehaviour)this).__registerRpc(2663711730u, new RpcReceiveHandler(__rpc_handler_2663711730), "LookAtDirectionServerRpc"); ((NetworkBehaviour)this).__registerRpc(3080554203u, new RpcReceiveHandler(__rpc_handler_3080554203), "LookAtDirectionClientRpc"); ((NetworkBehaviour)this).__registerRpc(445254365u, new RpcReceiveHandler(__rpc_handler_445254365), "LookAtPositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(2638717008u, new RpcReceiveHandler(__rpc_handler_2638717008), "LookAtPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1733499726u, new RpcReceiveHandler(__rpc_handler_1733499726), "LookAtPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(580505662u, new RpcReceiveHandler(__rpc_handler_580505662), "LookAtPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(662471551u, new RpcReceiveHandler(__rpc_handler_662471551), "StopLookingAtTransformServerRpc"); ((NetworkBehaviour)this).__registerRpc(4257254603u, new RpcReceiveHandler(__rpc_handler_4257254603), "StopLookingAtTransformClientRpc"); ((NetworkBehaviour)this).__registerRpc(2276740878u, new RpcReceiveHandler(__rpc_handler_2276740878), "SetHandsOutServerRpc"); ((NetworkBehaviour)this).__registerRpc(2926655268u, new RpcReceiveHandler(__rpc_handler_2926655268), "SetHandsOutClientRpc"); ((NetworkBehaviour)this).__registerRpc(3000285723u, new RpcReceiveHandler(__rpc_handler_3000285723), "SetCrouchingServerRpc"); ((NetworkBehaviour)this).__registerRpc(3619533588u, new RpcReceiveHandler(__rpc_handler_3619533588), "SetCrouchingClientRpc"); ((NetworkBehaviour)this).__registerRpc(3852143648u, new RpcReceiveHandler(__rpc_handler_3852143648), "SetRunningServerRpc"); ((NetworkBehaviour)this).__registerRpc(3615062751u, new RpcReceiveHandler(__rpc_handler_3615062751), "SetRunningClientRpc"); ((NetworkBehaviour)this).__registerRpc(3332348622u, new RpcReceiveHandler(__rpc_handler_3332348622), "KillPlayerAnimationServerRpc"); ((NetworkBehaviour)this).__registerRpc(3911808553u, new RpcReceiveHandler(__rpc_handler_3911808553), "CancelKillAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(1676626956u, new RpcReceiveHandler(__rpc_handler_1676626956), "KillPlayerAnimationClientRpc"); ((NetworkBehaviour)this).__registerRpc(3987080333u, new RpcReceiveHandler(__rpc_handler_3987080333), "CreateMimicClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_566955271(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; ((MaskedAI)(object)target).SetEnemyAsHavingNoPlayerServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_632198526(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; ((MaskedAI)(object)target).SetEnemyAsHavingNoPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1932319315(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).TeleportMaskedEnemyServerRpc(pos, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3086087784(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); bool setOutside = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setOutside, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).TeleportMaskedEnemyClientRpc(pos, setOutside); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2663711730(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_00a4: 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_00b9: 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_00db: 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 dir = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dir); float time = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref time, default(ForPrimitives)); float vertLookAngle = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vertLookAngle, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).LookAtDirectionServerRpc(dir, time, vertLookAngle); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_3080554203(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_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) //IL_006c: 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_008e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 dir = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dir); float time = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref time, default(ForPrimitives)); float vertLookAngle = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vertLookAngle, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).LookAtDirectionClientRpc(dir, time, vertLookAngle); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_445254365(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); float time = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref time, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).LookAtPositionServerRpc(pos, time); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2638717008(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 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); float time = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref time, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).LookAtPositionClientRpc(pos, time); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1733499726(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; ((MaskedAI)(object)target).LookAtPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_580505662(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; ((MaskedAI)(object)target).LookAtPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_662471551(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; ((MaskedAI)(object)target).StopLookingAtTransformServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4257254603(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; ((MaskedAI)(object)target).StopLookingAtTransformClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2276740878(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 handsOutServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref handsOutServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).SetHandsOutServerRpc(handsOutServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2926655268(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 handsOutClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref handsOutClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).SetHandsOutClientRpc(handsOutClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3000285723(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 crouchingServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref crouchingServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).SetCrouchingServerRpc(crouchingServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3619533588(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 crouchingClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref crouchingClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).SetCrouchingClientRpc(crouchingClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3852143648(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 runningServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref runningServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).SetRunningServerRpc(runningServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3615062751(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 runningClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref runningClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).SetRunningClientRpc(runningClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3332348622(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).KillPlayerAnimationServerRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3911808553(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).CancelKillAnimationClientRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1676626956(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).KillPlayerAnimationClientRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3987080333(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_004a: 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_0059: 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_0077: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference netObjectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref netObjectRef, default(ForNetworkSerializable)); bool inFactory = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inFactory, default(ForPrimitives)); int playerKilled = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerKilled); target.__rpc_exec_stage = (__RpcExecStage)1; ((MaskedAI)(object)target).CreateMimicClientRpc(netObjectRef, inFactory, playerKilled); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "MaskedAI"; } } 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 scissorsMaterial; private RaycastHit hit; private bool listeningToMasterSurgeon; private bool choseMasterSurgeon; public override void Awake() { ((EnemyAI)this).Awake(); ((Renderer)scissorBlades[0]).material = scissorsMaterial; ((Renderer)scissorBlades[1]).sharedMaterial = scissorsMaterial; ((Renderer)skin).sharedMaterial = scissorGuyMat; } [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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1961037699u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1961037699u, val2, (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); scissorsMaterial.SetFloat("_AlphaCutoff", (num - minDistance) / (maxDistance - minDistance)); scissorGuyMat.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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1641500199u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1641500199u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1694412884u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1694412884u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4232202318u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4232202318u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3059471934u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3059471934u, val2, (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(1961037699u, new RpcReceiveHandler(__rpc_handler_1961037699), "SyncMasterClaySurgeonClientRpc"); ((NetworkBehaviour)this).__registerRpc(1641500199u, new RpcReceiveHandler(__rpc_handler_1641500199), "KillPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1694412884u, new RpcReceiveHandler(__rpc_handler_1694412884), "KillPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(4232202318u, new RpcReceiveHandler(__rpc_handler_4232202318), "DoBeatServerRpc"); ((NetworkBehaviour)this).__registerRpc(3059471934u, new RpcReceiveHandler(__rpc_handler_3059471934), "DoBeatClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1961037699(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_1641500199(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_1694412884(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_4232202318(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_3059471934(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 SharkyAI : EnemyAI { public AISearchRoutine searchForPlayers; private float checkLineOfSightInterval; public float maxSearchAndRoamRadius = 100f; [Space(5f)] public float noticePlayerTimer; private bool hasEnteredChaseMode; private bool lostPlayerInChase; private bool beginningChasingThisClient; private Collider[] nearPlayerColliders; public AudioClip shortRoar; public AudioClip[] hitWallSFX; public AudioClip bitePlayerSFX; private Vector3 previousPosition; private float previousVelocity; private float averageVelocity; private float velocityInterval; private float velocityAverageCount; private float wallCollisionSFXDebounce; private float timeSinceHittingPlayer; private bool ateTargetPlayerBody; private Coroutine eatPlayerBodyCoroutine; public Transform mouthTarget; public AudioClip eatPlayerSFX; public AudioClip[] hitCrawlerSFX; public AudioClip[] longRoarSFX; public DeadBodyInfo currentlyHeldBody; private bool pullingSecondLimb; private float agentSpeedWithNegative; private Vector3 lastPositionOfSeenPlayer; [Space(5f)] public float BaseAcceleration = 55f; public float SpeedAccelerationEffect = 2f; public float SpeedIncreaseRate = 5f; private float lastTimeHit; [Space(5f)] [Header("Damage Control")] public int playerDamages = 40; public CauseOfDeath causeOfDeath; [Header("Pitch Control")] public float eatPlayerPitchMin = 0.85f; public float eatPlayerPitchMax = 1.1f; public override void Start() { ((EnemyAI)this).Start(); nearPlayerColliders = (Collider[])(object)new Collider[4]; } public override void DoAIInterval() { //IL_0041: 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) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.livingPlayers == 0 || base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: if (!searchForPlayers.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); if (base.debugEnemyAI) { Debug.Log((object)$"Sharky: Started new search; is searching?: {searchForPlayers.inProgress}"); } } break; case 1: CheckForVeryClosePlayer(); if (lostPlayerInChase) { base.movingTowardsTargetPlayer = false; if (!searchForPlayers.inProgress) { searchForPlayers.searchWidth = 30f; ((EnemyAI)this).StartSearch(lastPositionOfSeenPlayer, searchForPlayers); if (base.debugEnemyAI) { Debug.Log((object)"Sharky: Lost player in chase; beginning search where the player was last seen"); } } } else if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); base.movingTowardsTargetPlayer = true; if (base.debugEnemyAI) { Debug.Log((object)"Sharky: Found player during chase; stopping search coroutine and moving after target player"); } } break; } } public override void FinishedCurrentSearchRoutine() { ((EnemyAI)this).FinishedCurrentSearchRoutine(); searchForPlayers.searchWidth = Mathf.Clamp(searchForPlayers.searchWidth + 10f, 1f, maxSearchAndRoamRadius); } public override void Update() { //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_0055: 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_0466: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { return; } if (!((NetworkBehaviour)this).IsOwner) { base.inSpecialAnimation = false; } CalculateAgentSpeed(); timeSinceHittingPlayer += Time.deltaTime; if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.25f, 80f, 25, 5f, -1)) { if (base.currentBehaviourStateIndex == 1) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 1f); } else { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.8f, 0.5f); } } switch (base.currentBehaviourStateIndex) { case 0: { if (hasEnteredChaseMode) { hasEnteredChaseMode = false; searchForPlayers.searchWidth = 25f; beginningChasingThisClient = false; noticePlayerTimer = 0f; base.useSecondaryAudiosOnAnimatedObjects = false; base.openDoorSpeedMultiplier = 0.6f; base.agent.stoppingDistance = 0f; base.agent.speed = 7f; } if (checkLineOfSightInterval <= 0.05f) { checkLineOfSightInterval += Time.deltaTime; break; } checkLineOfSightInterval = 0f; PlayerControllerB val3; if ((Object)(object)base.stunnedByPlayer != (Object)null) { val3 = base.stunnedByPlayer; noticePlayerTimer = 1f; } else { val3 = ((EnemyAI)this).CheckLineOfSightForPlayer(55f, 60, -1); } if ((Object)(object)val3 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { noticePlayerTimer = Mathf.Clamp(noticePlayerTimer + 0.05f, 0f, 10f); if (noticePlayerTimer > 0.2f && !beginningChasingThisClient) { beginningChasingThisClient = true; BeginChasingPlayerServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); ((EnemyAI)this).ChangeOwnershipOfEnemy(val3.actualClientId); } } else { noticePlayerTimer -= Time.deltaTime; } break; } case 1: { if (!hasEnteredChaseMode) { hasEnteredChaseMode = true; lostPlayerInChase = false; checkLineOfSightInterval = 0f; noticePlayerTimer = 0f; beginningChasingThisClient = false; base.useSecondaryAudiosOnAnimatedObjects = true; base.openDoorSpeedMultiplier = 1.5f; base.agent.stoppingDistance = 0.5f; base.agent.speed = 0f; } if (!((NetworkBehaviour)this).IsOwner || base.stunNormalizedTimer > 0f) { break; } if (checkLineOfSightInterval <= 0.075f) { checkLineOfSightInterval += Time.deltaTime; break; } checkLineOfSightInterval = 0f; if (!ateTargetPlayerBody && (Object)(object)base.targetPlayer != (Object)null && (Object)(object)base.targetPlayer.deadBody != (Object)null && (Object)(object)base.targetPlayer.deadBody.grabBodyObject != (Object)null && base.targetPlayer.deadBody.grabBodyObject.grabbableToEnemies && eatPlayerBodyCoroutine == null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer.deadBody.bodyParts[0]).transform.position) < 3.3f) { Debug.Log((object)"Sharky: Eat player body start"); ateTargetPlayerBody = true; base.inSpecialAnimation = true; eatPlayerBodyCoroutine = ((MonoBehaviour)this).StartCoroutine(EatPlayerBodyAnimation((int)base.targetPlayer.playerClientId)); EatPlayerBodyServerRpc((int)base.targetPlayer.playerClientId); } if (base.inSpecialAnimation) { break; } if (lostPlayerInChase) { PlayerControllerB val = ((EnemyAI)this).CheckLineOfSightForPlayer(55f, 60, -1); if (Object.op_Implicit((Object)(object)val)) { noticePlayerTimer = 0f; lostPlayerInChase = false; MakeScreechNoiseServerRpc(); if ((Object)(object)val != (Object)(object)base.targetPlayer) { ((EnemyAI)this).SetMovingTowardsTargetPlayer(val); ateTargetPlayerBody = false; ((EnemyAI)this).ChangeOwnershipOfEnemy(val.actualClientId); } } else { noticePlayerTimer -= 0.075f; if (noticePlayerTimer < -15f) { ((EnemyAI)this).SwitchToBehaviourState(0); } } break; } PlayerControllerB val2 = ((EnemyAI)this).CheckLineOfSightForPlayer(65f, 80, -1); if ((Object)(object)val2 != (Object)null) { noticePlayerTimer = 0f; lastPositionOfSeenPlayer = ((Component)val2).transform.position; if ((Object)(object)val2 != (Object)(object)base.targetPlayer) { base.targetPlayer = val2; ateTargetPlayerBody = false; ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } } else { noticePlayerTimer += 0.075f; if (noticePlayerTimer > 1.8f) { lostPlayerInChase = true; } } break; } } } private void CalculateAgentSpeed() { //IL_0087: 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_0097: 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) if (base.stunNormalizedTimer >= 0f) { base.agent.speed = 0.1f; base.agent.acceleration = 200f; base.creatureAnimator.SetBool("stunned", true); return; } base.creatureAnimator.SetBool("stunned", false); base.creatureAnimator.SetFloat("speedMultiplier", Mathf.Clamp(averageVelocity / 12f * 2.5f, 0.1f, 6f)); Vector3 val = ((Component)this).transform.position - previousPosition; float num = ((Vector3)(ref val)).magnitude / (Time.deltaTime / 1.4f); if (velocityInterval <= 0f) { previousVelocity = averageVelocity; velocityInterval = 0.05f; velocityAverageCount += 1f; if (velocityAverageCount > 5f) { averageVelocity += (num - averageVelocity) / 3f; } else { averageVelocity += num; if (velocityAverageCount == 2f) { averageVelocity /= velocityAverageCount; } } } else { velocityInterval -= Time.deltaTime; } if (((NetworkBehaviour)this).IsOwner && averageVelocity - num > Mathf.Clamp(num * 0.17f, 2f, 100f) && num > 3f && base.currentBehaviourStateIndex == 1) { if (wallCollisionSFXDebounce > 0.5f) { if (((NetworkBehaviour)this).IsServer) { CollideWithWallServerRpc(); } else { CollideWithWallClientRpc(); } } agentSpeedWithNegative *= 0.2f; wallCollisionSFXDebounce = 0f; } wallCollisionSFXDebounce += Time.deltaTime; previousPosition = ((Component)this).transform.position; if (base.currentBehaviourStateIndex == 0) { base.agent.speed = 8f; base.agent.acceleration = 26f; } else if (base.currentBehaviourStateIndex == 1) { float num2 = SpeedIncreaseRate; if (Time.realtimeSinceStartup - lastTimeHit < 1f) { num2 += 4.25f; } agentSpeedWithNegative += Time.deltaTime * num2; base.agent.speed = Mathf.Clamp(agentSpeedWithNegative, -3f, 16f); base.agent.acceleration = Mathf.Clamp(BaseAcceleration - averageVelocity * SpeedAccelerationEffect, 4f, 40f); if (base.agent.acceleration > 22f) { base.agent.angularSpeed = 800f; NavMeshAgent agent = base.agent; agent.acceleration += 20f; } else { base.agent.angularSpeed = 230f; } } } [ServerRpc(RequireOwnership = false)] public void CollideWithWallServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1899735621u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1899735621u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CollideWithWallClientRpc(); } } } [ClientRpc] public void CollideWithWallClientRpc() { //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_00f4: 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_0125: 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1208998892u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1208998892u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; RoundManager.PlayRandomClip(base.creatureSFX, hitWallSFX, true, 1f, 0, 1000); RoundManager.Instance.PlayAudibleNoise(((Component)base.creatureSFX).transform.position, 8f, 0.75f, 0, false, 0); float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position); if (num < 15f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 24f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } } } private void CheckForVeryClosePlayer() { //IL_0006: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //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) if (Physics.OverlapSphereNonAlloc(((Component)this).transform.position, 1.5f, nearPlayerColliders, 8, (QueryTriggerInteraction)1) > 0) { PlayerControllerB component = ((Component)((Component)nearPlayerColliders[0]).transform).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component != (Object)(object)base.targetPlayer && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.3f, ((Component)component).transform.position, StartOfRound.Instance.collidersAndRoomMask)) { base.targetPlayer = component; } } } [ServerRpc(RequireOwnership = false)] public void BeginChasingPlayerServerRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4102893399u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4102893399u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; BeginChasingPlayerClientRpc(playerObjectId); } } } [ClientRpc] public void BeginChasingPlayerClientRpc(int playerObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1700996303u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerObjectId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1700996303u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; MakeScreech(); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); ((EnemyAI)this).SetMovingTowardsTargetPlayer(StartOfRound.Instance.allPlayerScripts[playerObjectId]); } } } [ServerRpc(RequireOwnership = false)] public void MakeScreechNoiseServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2483114119u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2483114119u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; MakeScreechNoiseClientRpc(); } } } [ClientRpc] public void MakeScreechNoiseClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(436870566u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 436870566u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; MakeScreech(); } } } private void MakeScreech() { //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) int num = Random.Range(0, longRoarSFX.Length); base.creatureVoice.PlayOneShot(longRoarSFX[num]); WalkieTalkie.TransmitOneShotAudio(base.creatureVoice, longRoarSFX[num], 1f); if (Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) < 15f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.75f, true); } } public override void OnCollideWithPlayer(Collider other) { //IL_003c: 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_004b: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!(timeSinceHittingPlayer < 0.65f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { timeSinceHittingPlayer = 0f; val.DamagePlayer(playerDamages, true, true, causeOfDeath, 0, false, default(Vector3)); base.agent.speed = 0f; HitPlayerServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(1f, true); } } } [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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(38612824u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 38612824u, val2, (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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3451577069u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3451577069u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!base.inSpecialAnimation) { base.creatureAnimator.SetTrigger("HitPlayer"); } base.creatureVoice.PlayOneShot(bitePlayerSFX); agentSpeedWithNegative = Random.Range(-2f, 0.25f); } } [ServerRpc(RequireOwnership = false)] public void EatPlayerBodyServerRpc(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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1559241746u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1559241746u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; EatPlayerBodyClientRpc(playerId); } } } [ClientRpc] public void EatPlayerBodyClientRpc(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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2553660137u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2553660137u, val2, (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 && eatPlayerBodyCoroutine == null) { ((MonoBehaviour)this).StartCoroutine(EatPlayerBodyAnimation(playerId)); } } } private IEnumerator EatPlayerBodyAnimation(int playerId) { PlayerControllerB playerScript = StartOfRound.Instance.allPlayerScripts[playerId]; float startTime = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => ((Object)(object)playerScript.deadBody != (Object)null && (Object)(object)playerScript.deadBody.grabBodyObject != (Object)null) || Time.realtimeSinceStartup - startTime > 2f)); DeadBodyInfo deadBody = null; if ((Object)(object)StartOfRound.Instance.allPlayerScripts[playerId].deadBody != (Object)null) { if (base.debugEnemyAI) { Debug.Log((object)"Sharky: Body is not null!"); } deadBody = StartOfRound.Instance.allPlayerScripts[playerId].deadBody; } yield return null; if (base.debugEnemyAI) { Debug.Log((object)$"{(Object)(object)deadBody != (Object)null}; {(Object)(object)deadBody.grabBodyObject != (Object)null}; {!deadBody.isInShip}; {!deadBody.grabBodyObject.isHeld}; {Vector3.Distance(((Component)this).transform.position, ((Component)deadBody.bodyParts[0]).transform.position)}"); } if ((Object)(object)deadBody != (Object)null && (Object)(object)deadBody.grabBodyObject != (Object)null && !deadBody.isInShip && !deadBody.grabBodyObject.isHeld && !base.isEnemyDead && Vector3.Distance(((Component)this).transform.position, ((Component)deadBody.bodyParts[0]).transform.position) < 6.7f) { base.creatureAnimator.SetTrigger("EatPlayer"); base.creatureVoice.pitch = Random.Range(eatPlayerPitchMin, eatPlayerPitchMax); base.creatureVoice.PlayOneShot(eatPlayerSFX); deadBody.canBeGrabbedBackByPlayers = false; currentlyHeldBody = deadBody; pullingSecondLimb = (Object)(object)deadBody.attachedTo != (Object)null; if (pullingSecondLimb) { deadBody.secondaryAttachedLimb = deadBody.bodyParts[3]; deadBody.secondaryAttachedTo = mouthTarget; } else { deadBody.attachedLimb = deadBody.bodyParts[0]; deadBody.attachedTo = mouthTarget; } yield return (object)new WaitForSeconds(2.75f); } Debug.Log((object)"Sharky: leaving special animation"); base.inSpecialAnimation = false; DropPlayerBody(); eatPlayerBodyCoroutine = null; } private void DropPlayerBody() { if ((Object)(object)currentlyHeldBody != (Object)null) { if (pullingSecondLimb) { currentlyHeldBody.secondaryAttachedLimb = null; currentlyHeldBody.secondaryAttachedTo = null; } else { currentlyHeldBody.attachedLimb = null; currentlyHeldBody.attachedTo = null; } } } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(false); if (eatPlayerBodyCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(eatPlayerBodyCoroutine); } DropPlayerBody(); } 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.agent.speed = 2f; if (!base.inSpecialAnimation) { base.creatureAnimator.SetTrigger("HurtEnemy"); } base.enemyHP -= force; agentSpeedWithNegative = Random.Range(-2.8f, -2f); lastTimeHit = Time.realtimeSinceStartup; averageVelocity = 0f; RoundManager.PlayRandomClip(base.creatureVoice, hitCrawlerSFX, true, 1f, 0, 1000); if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(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 //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(1899735621u, new RpcReceiveHandler(__rpc_handler_1899735621), "CollideWithWallServerRpc"); ((NetworkBehaviour)this).__registerRpc(1208998892u, new RpcReceiveHandler(__rpc_handler_1208998892), "CollideWithWallClientRpc"); ((NetworkBehaviour)this).__registerRpc(4102893399u, new RpcReceiveHandler(__rpc_handler_4102893399), "BeginChasingPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1700996303u, new RpcReceiveHandler(__rpc_handler_1700996303), "BeginChasingPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2483114119u, new RpcReceiveHandler(__rpc_handler_2483114119), "MakeScreechNoiseServerRpc"); ((NetworkBehaviour)this).__registerRpc(436870566u, new RpcReceiveHandler(__rpc_handler_436870566), "MakeScreechNoiseClientRpc"); ((NetworkBehaviour)this).__registerRpc(38612824u, new RpcReceiveHandler(__rpc_handler_38612824), "HitPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3451577069u, new RpcReceiveHandler(__rpc_handler_3451577069), "HitPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(1559241746u, new RpcReceiveHandler(__rpc_handler_1559241746), "EatPlayerBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2553660137u, new RpcReceiveHandler(__rpc_handler_2553660137), "EatPlayerBodyClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1899735621(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; ((SharkyAI)(object)target).CollideWithWallServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1208998892(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; ((SharkyAI)(object)target).CollideWithWallClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4102893399(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SharkyAI)(object)target).BeginChasingPlayerServerRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1700996303(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 playerObjectId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SharkyAI)(object)target).BeginChasingPlayerClientRpc(playerObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2483114119(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; ((SharkyAI)(object)target).MakeScreechNoiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_436870566(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; ((SharkyAI)(object)target).MakeScreechNoiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_38612824(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; ((SharkyAI)(object)target).HitPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3451577069(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; ((SharkyAI)(object)target).HitPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1559241746(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; ((SharkyAI)(object)target).EatPlayerBodyServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2553660137(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; ((SharkyAI)(object)target).EatPlayerBodyClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SharkyAI"; } } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2580500095u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref forwardRotation); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2580500095u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1786694379u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref forwardRotation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref calledByClient, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1786694379u, val2, (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(2580500095u, new RpcReceiveHandler(__rpc_handler_2580500095), "SetExplosionServerRpc"); ((NetworkBehaviour)this).__registerRpc(1786694379u, new RpcReceiveHandler(__rpc_handler_1786694379), "SetExplosionClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2580500095(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_1786694379(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 { 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(3f)] public float maxShootUptime = 10f; public float cooldownThresholdToBreak = 4.75f; [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; [Space(5f)] [Header("Custom")] public int blowTorchDamages = 20; public int blowTorchFinalDamage = 500; public int heavyStompDamage = 70; public int lowStompDamage = 30; public int rocketDamage = 30; public float rocketKnockbackStrong = 65f; public float rocketKnockbackWeak = 35f; public float rocketKillRange = 1f; public float rocketHurtRange = 7f; [Header("LOS")] public float losFlightWidth = 30f; public int losFlightRange = 120; public float losFlightProxAware = -1f; public float losWidth = 45f; public int losRange = 60; public float losProxAware = -1f; public bool overwriteRoamingLOS; public bool roamingLOSIsNotSphere; public Transform roamingEye; public float sphereRange = 60f; public float roamingEyeWidthOverwrite = 45f; public int roamingEyeRangeOverwrite = 60; public float roamingEyeProxAwareOverwrite = -1f; [Header("Misc")] public bool doesHeadLightFlicker; public Light flickeringLightA; public Light flickeringLightB; public float minLightIntensityAmount; public float maxLightIntensityAmount; private bool isSpotlightActive; public float flickerDelay = 0.01f; public float minRocketFirePitch = 1f; public float maxRocketFirePitch = 1f; [Space(5f)] public ScreenShakeType screenShakingUponFiring; public float screenShakeDistanceUponFiring = 16f; public float missileStartSpeed = 0.2f; [Space(5f)] public float distanceToCharge = 38f; public float maxDistanceToFire = 25f; public float minDistanceToFire = 6f; [Header("Firing Mode")] public SuperMechFireMode firingMode; public int burstRocketAmount = 7; public float burstDelayBetweenRockets = 0.1f; public int burstWaveAmount = 5; public float burstDelay = 0.45f; public float burstMaxTimer = 5f; private int burstMissilesFired; public float burstCoolDown; private float burstWaveCooldown; public float burstCooldownThreshold = 12f; private bool burstIsOnCooldown; private int burstWaveAmountDefinitive; private int totalBurstAmount; private float burstCoolingDown; private float burstRocketShootCooldown; public bool burstShootEffectOnceDuringBurst; [Space(10f)] public float CULShootDelay = 0.42f; private float CULShootCooldown; [Header("Step")] public float lostInChaseTBS = 0.7f; public float alertedTBS = 0.2f; public float alertedNonChaseTBS = 1.1f; public float roamingTBS = 0.7f; 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(); burstWaveAmountDefinitive = burstWaveAmount; CULShootCooldown = 0f; } 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1280695915u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, clipIndex); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1280695915u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(805398347u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref newLandingPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 805398347u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3802779397u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3802779397u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(82524115u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref charging, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 82524115u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1648762432u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref newLandingPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1648762432u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1383655666u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1383655666u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3806750461u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref aiming, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3806750461u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2445347391u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startPos); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2445347391u, val2, (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_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) //IL_0042: 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_0095: 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) float pitch = base.creatureSFX.pitch; if (base.creatureAnimator.GetBool("AimGun")) { base.creatureAnimator.SetTrigger("ShootGun"); } currentMissileSpeed = missileStartSpeed; GameObject val = Object.Instantiate(missilePrefab, startPos, Quaternion.Euler(startRot), RoundManager.Instance.mapPropsContainer.transform); missilesFired++; val.GetComponent().RadMechScript = this; if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position) < screenShakeDistanceUponFiring) { HUDManager.Instance.ShakeCamera(screenShakingUponFiring); } base.creatureSFX.pitch = pitch; } [ServerRpc] public void ShootEffectOnServerRpc() { //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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(357209079u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 357209079u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ShootEffectOnClientRpc(); } } [ClientRpc] public void ShootEffectOnClientRpc() { //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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(234098541u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 234098541u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ShootEffect(); } } } public void ShootEffect() { gunArmParticle.Play(); base.creatureSFX.pitch = Random.Range(minRocketFirePitch, maxRocketFirePitch); RoundManager.PlayRandomClip(base.creatureSFX, shootGunSFX, true, 1f, 0, 1000); } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2211651440u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref forwardRotation); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2211651440u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3114295518u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref explosionPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref forwardRotation); ((FastBufferWriter)(ref val)).WriteValueSafe(ref calledByClient, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3114295518u, val2, (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_0069: 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_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_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_00aa: 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_00b5: 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_00e3: 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_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_00fc: 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_0106: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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) if (Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition - forwardRotation * 0.1f) < 8f) { Landmine.SpawnExplosion(explosionPosition - forwardRotation * 0.1f, true, rocketKillRange, rocketHurtRange, rocketDamage, rocketKnockbackStrong, explosionPrefab, false); } else { Landmine.SpawnExplosion(explosionPosition - forwardRotation * 0.1f, true, rocketKillRange, rocketHurtRange, rocketDamage, rocketKnockbackWeak, 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 > distanceToCharge) { SetChargingForward(setCharging: true); } else if (!chargingForward) { SetAimingGun(setAiming: true); } else if (num < maxDistanceToFire) { SetAimingGun(setAiming: true); } } } break; } } private void LookForPlayersInFlight() { //IL_0019: 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_0096: 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, losFlightWidth, losFlightRange, losFlightProxAware, 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_027e: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_02c0: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: 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_0341: 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_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_01df: 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_0205: 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, losWidth, losRange, losProxAware, base.eye) && 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, losWidth, losRange, losProxAware, base.eye) && 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(291177875u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref hasLineOfSight, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 291177875u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2131435811u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref lostInChase, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2131435811u, val2, (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_028c: Unknown result type (might be due to invalid IL or missing references) //IL_05b2: 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_05c8: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_0645: 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_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (firingMode == SuperMechFireMode.Burst) { burstCoolDown = Mathf.Clamp(burstCoolDown + Time.deltaTime, 0f, burstCooldownThreshold); burstWaveCooldown = Mathf.Clamp(burstWaveCooldown + Time.deltaTime, 0f, burstDelay); burstRocketShootCooldown = Mathf.Clamp(burstRocketShootCooldown + Time.deltaTime, 0f, burstDelayBetweenRockets); } CULShootCooldown = Mathf.Clamp(CULShootCooldown + Time.deltaTime, 0f, CULShootDelay); 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 = roamingTBS; 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) { if (firingMode != SuperMechFireMode.ConstantUponLOS) { shootCooldown = Mathf.Min(shootCooldown + Time.deltaTime * shootUptime, 10f); } if (!base.inSpecialAnimation) { SetAimingGun(setAiming: true); 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 = alertedTBS; } else if (lostCreatureInChase) { timeBetweenSteps = lostInChaseTBS; } else { timeBetweenSteps = alertedNonChaseTBS; } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3489454647u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3489454647u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2026739343u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((FastBufferWriter)(ref val)).WriteValueSafe(ref enemyPosition); BytePacker.WriteValueBitPacked(val, enemyYRot); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2026739343u, val2, (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)); } private IEnumerator TorchPlayerAnimation(Vector3 enemyPosition, int enemyYRot) { base.creatureAnimator.SetBool("AttemptingGrab", true); base.creatureAnimator.SetBool("GrabSuccessful", true); base.creatureAnimator.SetBool("GrabUnsuccessful", false); float startTime = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func)(() => blowtorchActivated || Time.realtimeSinceStartup - startTime > 6f)); startTime = Time.realtimeSinceStartup; while (blowtorchActivated && Time.realtimeSinceStartup - startTime < 6f) { yield return (object)new WaitForSeconds(0.25f); base.inSpecialAnimationWithPlayer.DamagePlayer(blowTorchDamages, true, true, (CauseOfDeath)13, 6, false, default(Vector3)); } if ((Object)(object)base.inSpecialAnimationWithPlayer == (Object)(object)GameNetworkManager.Instance.localPlayerController && !base.inSpecialAnimationWithPlayer.isPlayerDead) { base.inSpecialAnimationWithPlayer.DamagePlayer(blowTorchFinalDamage, true, true, (CauseOfDeath)13, 6, false, default(Vector3)); } yield return (object)new WaitForSeconds(1.5f); CancelTorchPlayerAnimation(); if (((NetworkBehaviour)this).IsServer) { inTorchPlayerAnimation = false; base.inSpecialAnimationWithPlayer = null; base.inSpecialAnimation = false; ((Behaviour)base.agent).enabled = true; } } 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(206808430u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 206808430u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3878818243u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3878818243u, val2, (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_0068: 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_025f: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) float num = burstCoolDown; if (takingStep || !(base.stunNormalizedTimer <= 0f)) { return; } base.creatureAnimator.SetBool("AimGun", true); switch (firingMode) { case SuperMechFireMode.Regular: if (!((NetworkBehaviour)this).IsServer) { break; } if (shootTimer > fireRate) { float num3 = Vector3.Distance(targetedThreat.lastSeenPosition, ((Component)this).transform.position); if (shootCooldown > 4.75f || chargingForward) { SetAimingGun(setAiming: false); break; } if (!hadLOSDuringLastShot && (!hasLOS || num3 < 6f)) { SetAimingGun(setAiming: false); break; } shootTimer = 0f + Random.Range((0f - fireRateVariance) * 0.5f, fireRateVariance * 0.5f); StartShootGun(); ShootEffectOnServerRpc(); hadLOSDuringLastShot = hasLOS && num3 < 40f; } else { shootTimer += Time.deltaTime; } break; case SuperMechFireMode.Burst: if (!((NetworkBehaviour)this).IsServer) { break; } if (totalBurstAmount >= burstWaveAmount) { burstCoolDown = 0f; totalBurstAmount = 0; burstIsOnCooldown = true; SetAimingGun(setAiming: false); } else if (burstCoolDown < burstCooldownThreshold) { burstIsOnCooldown = false; SetAimingGun(setAiming: false); } else { if (!(burstCoolDown >= burstCooldownThreshold)) { break; } SetAimingGun(setAiming: true); float num4 = Vector3.Distance(targetedThreat.lastSeenPosition, ((Component)this).transform.position); if (shootCooldown > 4.75f || chargingForward) { SetAimingGun(setAiming: false); break; } if (!hadLOSDuringLastShot && (!hasLOS || num4 < 6f)) { SetAimingGun(setAiming: false); break; } if (burstWaveCooldown >= burstDelay) { if (!burstShootEffectOnceDuringBurst) { ShootEffectOnServerRpc(); } SetAimingGun(setAiming: true); ((MonoBehaviour)this).StartCoroutine(WaveBurstWait()); burstWaveCooldown = 0f; } hadLOSDuringLastShot = hasLOS && num4 < 40f; } break; case SuperMechFireMode.ConstantUponLOS: { if (!((NetworkBehaviour)this).IsServer || !hasLOS) { break; } SetAimingGun(setAiming: true); float num2 = Vector3.Distance(targetedThreat.lastSeenPosition, ((Component)this).transform.position); if (chargingForward) { SetAimingGun(setAiming: false); break; } if (!hadLOSDuringLastShot && (!hasLOS || num2 < minDistanceToFire)) { SetAimingGun(setAiming: false); break; } if (CULShootCooldown >= CULShootDelay) { StartShootGun(); ShootEffectOnServerRpc(); CULShootCooldown = 0f; } hadLOSDuringLastShot = hasLOS && num2 < 40f; break; } } } public IEnumerator WaveBurstWait() { SetAimingGun(setAiming: true); ((MonoBehaviour)this).StartCoroutine(BurstShootCycle()); totalBurstAmount++; if (burstShootEffectOnceDuringBurst) { ShootEffectOnServerRpc(); } yield break; } public IEnumerator BurstShootCycle() { SetAimingGun(setAiming: true); for (int ib = 0; ib < burstRocketAmount; ib++) { StartShootGun(); yield return (object)new WaitForSeconds(burstDelayBetweenRockets); } } 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_0020: 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_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_0045: 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_030e: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_031d: 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_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: 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_0341: 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_00f8: 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_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_0131: 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_015e: 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_016d: 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_0193: 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_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_01d2: 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_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02db: 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) if (!((NetworkBehaviour)this).IsServer) { return false; } int num = ((overwriteRoamingLOS && roamingLOSIsNotSphere) ? 1 : 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(SuperMechAI))) && ((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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3402344035u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref netObject, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref lastSeenPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3402344035u, val2, (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: SuperMech 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: SuperMech 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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(574497509u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 574497509u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2744241960u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2744241960u, val2, (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()); } private IEnumerator flickerSpotlightAnim() { for (int i = 0; i < 5; i++) { spotlight.SetActive(true); ((Renderer)base.skinnedMeshRenderers[0]).sharedMaterial = spotlightMat; yield return (object)new WaitForSeconds(Random.Range(0.06f, 0.3f)); spotlight.SetActive(false); ((Renderer)base.skinnedMeshRenderers[0]).sharedMaterial = defaultMat; } } public void EnableSpotlight() { isSpotlightActive = true; spotlight.SetActive(true); ((Renderer)base.skinnedMeshRenderers[0]).sharedMaterial = spotlightMat; spotlightOnAudio.Play(); if (doesHeadLightFlicker) { ((MonoBehaviour)this).StartCoroutine(SpotLightFlicker(0f)); } } public IEnumerator SpotLightFlicker(float num) { while (isSpotlightActive) { num = Random.Range(minLightIntensityAmount, maxLightIntensityAmount); flickeringLightA.intensity = num; flickeringLightB.intensity = num / 115f; yield return (object)new WaitForSeconds(flickerDelay * Time.deltaTime); } } public void DisableSpotlight() { isSpotlightActive = false; 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_00ef: 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_011c: 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_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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: 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(heavyStompDamage, true, true, (CauseOfDeath)8, 0, false, Vector3.down * 40f); } else if (num < radius * 0.5f) { localPlayerController.DamagePlayer(lowStompDamage, 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 //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 ((NetworkBehaviour)this).__registerRpc(1280695915u, new RpcReceiveHandler(__rpc_handler_1280695915), "ChangeBroadcastClipClientRpc"); ((NetworkBehaviour)this).__registerRpc(805398347u, new RpcReceiveHandler(__rpc_handler_805398347), "ChangeFlightLandingPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(3802779397u, new RpcReceiveHandler(__rpc_handler_3802779397), "EndFlightClientRpc"); ((NetworkBehaviour)this).__registerRpc(82524115u, new RpcReceiveHandler(__rpc_handler_82524115), "SetChargingForwardClientRpc"); ((NetworkBehaviour)this).__registerRpc(1648762432u, new RpcReceiveHandler(__rpc_handler_1648762432), "EnterFlightClientRpc"); ((NetworkBehaviour)this).__registerRpc(1383655666u, new RpcReceiveHandler(__rpc_handler_1383655666), "SetMechAlertedClientRpc"); ((NetworkBehaviour)this).__registerRpc(3806750461u, new RpcReceiveHandler(__rpc_handler_3806750461), "SetAimingClientRpc"); ((NetworkBehaviour)this).__registerRpc(2445347391u, new RpcReceiveHandler(__rpc_handler_2445347391), "ShootGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(357209079u, new RpcReceiveHandler(__rpc_handler_357209079), "ShootEffectOnServerRpc"); ((NetworkBehaviour)this).__registerRpc(234098541u, new RpcReceiveHandler(__rpc_handler_234098541), "ShootEffectOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(2211651440u, new RpcReceiveHandler(__rpc_handler_2211651440), "SetExplosionServerRpc"); ((NetworkBehaviour)this).__registerRpc(3114295518u, new RpcReceiveHandler(__rpc_handler_3114295518), "SetExplosionClientRpc"); ((NetworkBehaviour)this).__registerRpc(291177875u, new RpcReceiveHandler(__rpc_handler_291177875), "SetHasLineOfSightClientRpc"); ((NetworkBehaviour)this).__registerRpc(2131435811u, new RpcReceiveHandler(__rpc_handler_2131435811), "SetLostCreatureInChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(3489454647u, new RpcReceiveHandler(__rpc_handler_3489454647), "GrabPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2026739343u, new RpcReceiveHandler(__rpc_handler_2026739343), "GrabPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(206808430u, new RpcReceiveHandler(__rpc_handler_206808430), "StartGrabAttemptClientRpc"); ((NetworkBehaviour)this).__registerRpc(3878818243u, new RpcReceiveHandler(__rpc_handler_3878818243), "FinishAttemptingGrabClientRpc"); ((NetworkBehaviour)this).__registerRpc(3402344035u, new RpcReceiveHandler(__rpc_handler_3402344035), "SetTargetToThreatClientRpc"); ((NetworkBehaviour)this).__registerRpc(574497509u, new RpcReceiveHandler(__rpc_handler_574497509), "TakeLeftStepForwardClientRpc"); ((NetworkBehaviour)this).__registerRpc(2744241960u, new RpcReceiveHandler(__rpc_handler_2744241960), "TakeRightStepForwardClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1280695915(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_805398347(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_3802779397(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_82524115(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_1648762432(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_1383655666(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_3806750461(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_2445347391(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_357209079(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; ((SuperMechAI)(object)target).ShootEffectOnServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_234098541(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).ShootEffectOnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2211651440(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_3114295518(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_291177875(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_2131435811(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_3489454647(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_2026739343(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_206808430(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_3878818243(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_3402344035(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_574497509(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_2744241960(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 { 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; } } private IEnumerator turnBodyIntoWeb() { if ((Object)(object)currentlyHeldBody == (Object)null) { Debug.LogError((object)"Sand Spider: Tried to wrap body but it could not be found."); yield break; } spoolingPlayerBody = true; overrideAnimation = 4.05f; base.creatureAnimator.SetTrigger("spool"); base.creatureSFX.PlayOneShot(spoolPlayerSFX); yield return (object)new WaitForSeconds(0.9f); if ((Object)(object)currentlyHeldBody.attachedTo != (Object)(object)mouthTarget) { CancelSpoolingBody(); } currentlyHeldBody.ChangeMesh(playerBodyWebMesh, playerBodyWebMat); yield return (object)new WaitForSeconds(3.105f); spooledPlayerBody = true; spoolingPlayerBody = false; turnBodyIntoWebCoroutine = null; if ((Object)(object)currentlyHeldBody.attachedTo != (Object)(object)mouthTarget) { CancelSpoolingBody(); } } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1893825921u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1893825921u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3672913271u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3672913271u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1250446933u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1250446933u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(107793776u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 107793776u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2954669039u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2954669039u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3055365404u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3055365404u, val2, (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; } private IEnumerator WaitForBodyToGrab(int playerId) { float timeAtStartOfWait = Time.timeSinceLevelLoad; yield return (object)new WaitUntil((Func)(() => (Object)(object)StartOfRound.Instance.allPlayerScripts[playerId].deadBody != (Object)null || Time.timeSinceLevelLoad - timeAtStartOfWait > 10f)); if ((Object)(object)StartOfRound.Instance.allPlayerScripts[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[playerId].deadBody; GrabBody(deadBody); } 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4253433632u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncRotation); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4253433632u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(440196551u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref syncRotation); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 440196551u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(711241580u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref endPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 711241580u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(413307427u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val)).WriteValueSafe(ref endPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 413307427u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2187287412u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2187287412u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3967794818u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3967794818u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1512793556u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerWhoHit); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1512793556u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2151048484u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref webPosition); BytePacker.WriteValueBitPacked(val, trapID); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2151048484u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3816477669u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3816477669u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2003737802u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, trapID); BytePacker.WriteValueBitPacked(val, playerNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2003737802u, val2, (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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1788792655u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1788792655u, val2, (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 val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2988416571u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2988416571u, val2, (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(1893825921u, new RpcReceiveHandler(__rpc_handler_1893825921), "SpiderTurnBodyIntoWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(3672913271u, new RpcReceiveHandler(__rpc_handler_3672913271), "SpiderTurnBodyIntoWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(1250446933u, new RpcReceiveHandler(__rpc_handler_1250446933), "SpiderHangBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(107793776u, new RpcReceiveHandler(__rpc_handler_107793776), "SpiderHangBodyClientRpc"); ((NetworkBehaviour)this).__registerRpc(2954669039u, new RpcReceiveHandler(__rpc_handler_2954669039), "GrabBodyServerRpc"); ((NetworkBehaviour)this).__registerRpc(3055365404u, new RpcReceiveHandler(__rpc_handler_3055365404), "GrabBodyClientRpc"); ((NetworkBehaviour)this).__registerRpc(4253433632u, new RpcReceiveHandler(__rpc_handler_4253433632), "SyncMeshContainerPositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(440196551u, new RpcReceiveHandler(__rpc_handler_440196551), "SyncMeshContainerPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(711241580u, new RpcReceiveHandler(__rpc_handler_711241580), "SpawnWebTrapServerRpc"); ((NetworkBehaviour)this).__registerRpc(413307427u, new RpcReceiveHandler(__rpc_handler_413307427), "SpawnWebTrapClientRpc"); ((NetworkBehaviour)this).__registerRpc(2187287412u, new RpcReceiveHandler(__rpc_handler_2187287412), "PlayerTripWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(3967794818u, new RpcReceiveHandler(__rpc_handler_3967794818), "PlayerTripWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(1512793556u, new RpcReceiveHandler(__rpc_handler_1512793556), "BreakWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(2151048484u, new RpcReceiveHandler(__rpc_handler_2151048484), "BreakWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(3816477669u, new RpcReceiveHandler(__rpc_handler_3816477669), "PlayerLeaveWebServerRpc"); ((NetworkBehaviour)this).__registerRpc(2003737802u, new RpcReceiveHandler(__rpc_handler_2003737802), "PlayerLeaveWebClientRpc"); ((NetworkBehaviour)this).__registerRpc(1788792655u, new RpcReceiveHandler(__rpc_handler_1788792655), "HitPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2988416571u, new RpcReceiveHandler(__rpc_handler_2988416571), "HitPlayerClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1893825921(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_3672913271(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_1250446933(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_107793776(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_2954669039(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_3055365404(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_4253433632(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_440196551(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_711241580(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_413307427(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_2187287412(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_3967794818(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_1512793556(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_2151048484(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_3816477669(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_2003737802(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_1788792655(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_2988416571(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 SuperMechMissile : MonoBehaviour { public float currentMissileSpeed = 0.35f; public SuperMechAI RadMechScript; public SuperMissileTravelMode travelMode; public float despawnTime = 5f; private bool hitWall = true; private float despawnTimer; private Random missileFlyRandom; private float forwardDistance; private float lastRotationDistance; public float missileAcceleration = 0.05f; [Header("Warble Settings")] public float instability = 2f; public float warbleMovementThresholdForTurn = 2f; [Header("Curve Settings")] public float curveStrength = 1f; public float curveMovementThresholdForTurn = 2f; private int curveXPositiveOrNegative; private int curveYPositiveOrNegative; private int curveZPositiveOrNegative; [Header("Hoaming Settings/ Currently broken, can cause issues.")] public float hoamingStrength = 1f; public float hoamingMovementThresholdForTurn = 2f; public float missileFov = 20f; public int missileViewRange = 50; public float missileProxAware = 5f; public Transform missileEye; public bool missileHasEye; [Header("Heavy Settings")] public float weight = 50f; 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; int num = Random.Range(0, 100); if (num > 49) { curveXPositiveOrNegative = 1; } else { curveXPositiveOrNegative = 0; } num = Random.Range(0, 100); if (num > 49) { curveYPositiveOrNegative = 1; } else { curveYPositiveOrNegative = 0; } num = Random.Range(0, 100); if (num > 49) { curveZPositiveOrNegative = 1; } else { curveZPositiveOrNegative = 0; } } private void FixedUpdate() { //IL_006e: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_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_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022e: 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_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0431: 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_05f8: Unknown result type (might be due to invalid IL or missing references) //IL_0603: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: 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) //IL_028a: 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_02a4: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Unknown result type (might be due to invalid IL or missing references) //IL_0689: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_054c: 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_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_0318: 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_0333: 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_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_056e: Unknown result type (might be due to invalid IL or missing references) //IL_0573: 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_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: 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_04ec: Unknown result type (might be due to invalid IL or missing references) //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04fa: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0500: 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_0512: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0394: 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_0361: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Unknown result type (might be due to invalid IL or missing references) if (hitWall) { return; } if ((Object)(object)RadMechScript == (Object)null) { Object.Destroy((Object)(object)((Component)this).gameObject); } if (travelMode == SuperMissileTravelMode.Warble) { if (despawnTimer < despawnTime && (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 > warbleMovementThresholdForTurn) { lastRotationDistance = forwardDistance; Transform transform2 = ((Component)this).transform; transform2.rotation *= Quaternion.Euler(new Vector3(15f * RadMechScript.missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * (double)instability - 1.0), 7f * RadMechScript.missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * (double)instability - 1.0), 15f * RadMechScript.missileWarbleLevel * (float)(missileFlyRandom.NextDouble() * (double)instability - 1.0))); } currentMissileSpeed += missileAcceleration; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (travelMode == SuperMissileTravelMode.Curve) { if (despawnTimer < despawnTime && (Object)(object)RadMechScript != (Object)null) { despawnTimer += Time.deltaTime; CheckCollision(); Transform transform3 = ((Component)this).transform; transform3.position += ((Component)this).transform.forward * RadMechScript.missileSpeed * currentMissileSpeed; forwardDistance += RadMechScript.missileSpeed * currentMissileSpeed; if (forwardDistance - lastRotationDistance > curveMovementThresholdForTurn) { lastRotationDistance = forwardDistance; if (curveXPositiveOrNegative == 0) { Transform transform4 = ((Component)this).transform; transform4.rotation *= Quaternion.Euler(curveStrength, 0f, 0f); } else { Transform transform5 = ((Component)this).transform; transform5.rotation *= Quaternion.Euler(0f - curveStrength, 0f, 0f); } if (curveYPositiveOrNegative == 0) { Transform transform6 = ((Component)this).transform; transform6.rotation *= Quaternion.Euler(0f, curveStrength, 0f); } else { Transform transform7 = ((Component)this).transform; transform7.rotation *= Quaternion.Euler(0f, 0f - curveStrength, 0f); } if (curveZPositiveOrNegative == 0) { Transform transform8 = ((Component)this).transform; transform8.rotation *= Quaternion.Euler(0f, 0f, curveStrength); } else { Transform transform9 = ((Component)this).transform; transform9.rotation *= Quaternion.Euler(0f, 0f, 0f - curveStrength); } } currentMissileSpeed += missileAcceleration; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (travelMode == SuperMissileTravelMode.Hoaming) { if (despawnTimer < despawnTime && (Object)(object)RadMechScript != (Object)null) { despawnTimer += Time.deltaTime; CheckCollision(); Transform transform10 = ((Component)this).transform; transform10.position += ((Component)this).transform.forward * RadMechScript.missileSpeed * currentMissileSpeed; forwardDistance += RadMechScript.missileSpeed * currentMissileSpeed; Transform focusedThreatTransform = RadMechScript.focusedThreatTransform; if ((Object)(object)missileEye != (Object)null && (Object)(object)RadMechScript.focusedThreatTransform != (Object)null) { if (missileHasEye) { if (((EnemyAI)RadMechScript).CheckLineOfSightForPosition(focusedThreatTransform.position, missileFov, missileViewRange, missileProxAware, missileEye)) { Vector3 val = RadMechScript.focusedThreatTransform.position - ((Component)this).transform.position; if (val == Vector3.zero) { return; } Quaternion val2 = Quaternion.LookRotation(val); ((Component)this).transform.rotation = Quaternion.RotateTowards(((Component)this).transform.rotation, val2, hoamingStrength * Time.deltaTime); } } else { Vector3 val3 = RadMechScript.focusedThreatTransform.position - ((Component)this).transform.position; if (val3 == Vector3.zero) { return; } Quaternion val4 = Quaternion.LookRotation(val3); ((Component)this).transform.rotation = Quaternion.RotateTowards(((Component)this).transform.rotation, val4, hoamingStrength * Time.deltaTime); } } currentMissileSpeed += missileAcceleration; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } if (travelMode != SuperMissileTravelMode.Heavy) { return; } if (despawnTimer < despawnTime && (Object)(object)RadMechScript != (Object)null) { despawnTimer += Time.deltaTime; CheckCollision(); Transform transform11 = ((Component)this).transform; transform11.position += ((Component)this).transform.forward * RadMechScript.missileSpeed * currentMissileSpeed; forwardDistance += RadMechScript.missileSpeed * currentMissileSpeed; if (forwardDistance - lastRotationDistance > warbleMovementThresholdForTurn) { lastRotationDistance = forwardDistance; Transform transform12 = ((Component)this).transform; transform12.rotation *= Quaternion.Euler(weight, 0f, 0f); } currentMissileSpeed += missileAcceleration; } 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_0104: 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_0119: 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_0129: 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; if ((Object)(object)RadMechScript != (Object)null) { 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 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 { } }