Decompiled source of CharlottesLabyrinth v1.0.2
plugins/CharlottesLabyrinth.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
#define DEBUG using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using CharlottesLabyrinth; using CharlottesLabyrinth.NetcodePatcher; using ExampleEnemy; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("CharlottesLabyrinth")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("CharlottesLabyrinth")] [assembly: AssemblyTitle("CharlottesLabyrinth")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class KyokosSpear : GrabbableObject { public int shovelHitForce = 1; public bool attacking; public bool isHoldingButton; private RaycastHit rayHit; private Coroutine reelingUpCoroutine; private RaycastHit[] objectsHitByShovel; private List<RaycastHit> objectsHitByShovelList = new List<RaycastHit>(); public AudioClip reelUp; public AudioClip swing; public AudioClip[] hitSFX; public AudioSource shovelAudio; private PlayerControllerB previousPlayerHeldBy; public Animator spearAnimator; private int shovelMask = 1084754248; public override void ItemActivate(bool used, bool buttonDown = true) { if ((Object)(object)base.playerHeldBy == (Object)null) { return; } isHoldingButton = buttonDown; if (!attacking && buttonDown) { attacking = true; previousPlayerHeldBy = base.playerHeldBy; if (reelingUpCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(reelingUpCoroutine); } reelingUpCoroutine = ((MonoBehaviour)this).StartCoroutine(reelUpShovel()); } } private IEnumerator reelUpShovel() { spearAnimator.SetTrigger("AttackNormal"); base.playerHeldBy.playerBodyAnimator.SetBool("crouching", false); base.playerHeldBy.playerBodyAnimator.SetTrigger("SwitchHoldAnimationTwoHanded"); base.playerHeldBy.playerBodyAnimator.SetBool("HoldPatcherTool", true); base.playerHeldBy.playerBodyAnimator.SetBool("PullingCameraRight", true); base.playerHeldBy.activatingItem = true; base.playerHeldBy.twoHanded = true; base.playerHeldBy.playerBodyAnimator.SetBool("HoldPatcherTool", false); base.playerHeldBy.playerBodyAnimator.SetBool("PullingCameraRight", false); SwingShovel(!base.isHeld); yield return (object)new WaitForSeconds(0.5f); yield return (object)new WaitForEndOfFrame(); HitShovel(!base.isHeld); yield return (object)new WaitForSeconds(0.5f); attacking = 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2393832603u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2393832603u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2174232780u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2174232780u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((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_002e: Unknown result type (might be due to invalid IL or missing references) if (!cancel) { shovelAudio.PlayOneShot(swing); previousPlayerHeldBy.UpdateSpecialAnimationValue(true, (short)((Component)previousPlayerHeldBy).transform.localEulerAngles.y, 0.4f, false); } } public void HitShovel(bool cancel = false) { //IL_0063: 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_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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_0430: 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_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_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_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_0219: 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_0186: 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_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024a: 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_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_026b: 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_0281: 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_0329: 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_0368: 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, 0.8f, ((Component)previousPlayerHeldBy.gameplayCamera).transform.forward, 1.5f, shovelMask, (QueryTriggerInteraction)2); objectsHitByShovelList = objectsHitByShovel.OrderBy((RaycastHit x) => ((RaycastHit)(ref x)).distance).ToList(); List<EnemyAI> list = new List<EnemyAI>(); IHittable val2 = default(IHittable); for (int i = 0; i < objectsHitByShovelList.Count; i++) { RaycastHit val = objectsHitByShovelList[i]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 8) { val = objectsHitByShovelList[i]; if (((Component)((RaycastHit)(ref val)).transform).gameObject.layer != 11) { val = objectsHitByShovelList[i]; if (!((Component)((RaycastHit)(ref val)).transform).TryGetComponent<IHittable>(ref val2)) { continue; } val = objectsHitByShovelList[i]; if ((Object)(object)((RaycastHit)(ref val)).transform == (Object)(object)((Component)previousPlayerHeldBy).transform) { continue; } val = objectsHitByShovelList[i]; if (!(((RaycastHit)(ref val)).point == Vector3.zero)) { Vector3 position = ((Component)previousPlayerHeldBy.gameplayCamera).transform.position; RaycastHit val3 = objectsHitByShovelList[i]; 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; try { val = objectsHitByShovelList[i]; EnemyAICollisionDetect component = ((Component)((RaycastHit)(ref val)).transform).GetComponent<EnemyAICollisionDetect>(); if ((Object)(object)component != (Object)null) { if (!((Object)(object)component.mainScript == (Object)null) && !list.Contains(component.mainScript)) { goto IL_035f; } continue; } val = objectsHitByShovelList[i]; if (!((Object)(object)((Component)((RaycastHit)(ref val)).transform).GetComponent<PlayerControllerB>() != (Object)null)) { goto IL_035f; } if (!flag3) { flag3 = true; goto IL_035f; } goto end_IL_02c3; IL_035f: 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_02c3:; } catch (Exception arg) { Debug.Log((object)$"Exception caught when hitting object with shovel from player #{previousPlayerHeldBy.playerClientId}: {arg}"); } continue; } } val = objectsHitByShovelList[i]; if (((RaycastHit)(ref val)).collider.isTrigger) { continue; } flag = true; val = objectsHitByShovelList[i]; string tag = ((Component)((RaycastHit)(ref val)).collider).gameObject.tag; for (int j = 0; j < StartOfRound.Instance.footstepSurfaces.Length; j++) { if (StartOfRound.Instance.footstepSurfaces[j].surfaceTag == tag) { num = j; break; } } } } if (flag) { RoundManager.PlayRandomClip(shovelAudio, hitSFX, true, 1f, 0, 1000); Object.FindObjectOfType<RoundManager>().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); } 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(963831900u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, hitSurfaceID); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 963831900u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(54649613u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, hitSurfaceID); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 54649613u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !((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(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_KyokosSpear() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(2393832603u, new RpcReceiveHandler(__rpc_handler_2393832603)); NetworkManager.__rpc_func_table.Add(2174232780u, new RpcReceiveHandler(__rpc_handler_2174232780)); NetworkManager.__rpc_func_table.Add(963831900u, new RpcReceiveHandler(__rpc_handler_963831900)); NetworkManager.__rpc_func_table.Add(54649613u, new RpcReceiveHandler(__rpc_handler_54649613)); } private static void __rpc_handler_2393832603(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; ((KyokosSpear)(object)target).ReelUpSFXServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2174232780(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((KyokosSpear)(object)target).ReelUpSFXClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_963831900(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; ((KyokosSpear)(object)target).HitShovelServerRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_54649613(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)2; ((KyokosSpear)(object)target).HitShovelClientRpc(hitSurfaceID); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "KyokosSpear"; } } public class LabyrinthController : NetworkBehaviour { public Transform qbSpawnPosition; public EnemyType qbEnemyType; private void Start() { //IL_0016: 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) if (((NetworkBehaviour)this).IsOwner) { RoundManager.Instance.SpawnEnemyGameObject(qbSpawnPosition.position, 0f, 1, qbEnemyType); } } private void Update() { } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LabyrinthController"; } } public class MoveBackAndForth : MonoBehaviour { [SerializeField] private Vector3 frequency; [SerializeField] private Vector3 magnitude; [SerializeField] private Vector3 offset; private void Update() { //IL_009e: 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) float num = Mathf.Sin(Time.time * frequency.x + offset.x) * magnitude.x; float num2 = Mathf.Sin(Time.time * frequency.y + offset.y) * magnitude.y; float num3 = Mathf.Sin(Time.time * frequency.z + offset.z) * magnitude.z; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(num, num2, num3); ((Component)this).transform.Translate(val * Time.deltaTime); } } public class QBHittable : MonoBehaviour, IHittable { public QBController qbController; bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit, bool playHitSFX, int hitID = -1) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) qbController.HitFromTurret(hitDirection); return true; } } public class QBPhysicsProp : GrabbableObject { public Animator animator = null; public QBController qbController = null; public PlayerControllerB? previousPlayerHeldBy = null; [HideInInspector] public static readonly int RunSpeedFloat = Animator.StringToHash("RunSpeed"); public override void EquipItem() { ((GrabbableObject)this).EquipItem(); qbController.PickUpQBLocalClient(); previousPlayerHeldBy = base.playerHeldBy; } public override void FallWithCurve() { if (((EnemyAI)qbController).inSpecialAnimation) { ((GrabbableObject)this).FallWithCurve(); } } public override void Start() { //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_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_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_00e5: 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_00d0: 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_0055: Unknown result type (might be due to invalid IL or missing references) base.propColliders = ((Component)this).gameObject.GetComponentsInChildren<Collider>(); 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<GameObject>(StartOfRound.Instance.itemRadarIconPrefab, RoundManager.Instance.mapPropsContainer.transform).transform; } if (!base.itemProperties.isScrap) { HoarderBugAI.grabbableObjectsInMap.Add(((Component)this).gameObject); } MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>(); for (int j = 0; j < componentsInChildren.Length; j++) { ((Renderer)componentsInChildren[j]).renderingLayerMask = 1u; } SkinnedMeshRenderer[] componentsInChildren2 = ((Component)this).gameObject.GetComponentsInChildren<SkinnedMeshRenderer>(); for (int k = 0; k < componentsInChildren2.Length; k++) { ((Renderer)componentsInChildren2[k]).renderingLayerMask = 1u; } } public override void Update() { //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_00b0: 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_01c7: 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_0179: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner) { Animator obj = animator; int runSpeedFloat = RunSpeedFloat; Vector3 velocity = ((EnemyAI)qbController).agent.velocity; obj.SetFloat(runSpeedFloat, ((Vector3)(ref velocity)).magnitude / 3f); 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)qbController).inSpecialAnimation) { ((Component)this).transform.localPosition = base.targetFloorPosition; } } else if (base.isHeld || base.isHeldByEnemy) { base.reachedFloorTarget = false; } } public override void LateUpdate() { //IL_002e: 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_005c: Unknown result type (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_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_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_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_0092: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)qbController).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; } } public override void EnableItemMeshes(bool enable) { MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>(); 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<SkinnedMeshRenderer>(); for (int j = 0; j < componentsInChildren2.Length; j++) { ((Renderer)componentsInChildren2[j]).enabled = enable; } } public override void DiscardItem() { qbController.DropQbLocalClient(); DropBabyServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); previousPlayerHeldBy = base.playerHeldBy; ((GrabbableObject)this).DiscardItem(); } [ServerRpc(RequireOwnership = false)] public void DropBabyServerRpc(int playerClientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1798048404u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerClientId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1798048404u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { animator.SetTrigger("drop"); DropBabyClientRpc(playerClientId); } } } [ClientRpc] public void DropBabyClientRpc(int playerClientId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3995923262u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerClientId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3995923262u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && playerClientId != (int)GameNetworkManager.Instance.localPlayerController.playerClientId) { qbController.DropQbLocalClient(); } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_QBPhysicsProp() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(1798048404u, new RpcReceiveHandler(__rpc_handler_1798048404)); NetworkManager.__rpc_func_table.Add(3995923262u, new RpcReceiveHandler(__rpc_handler_3995923262)); } private static void __rpc_handler_1798048404(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 playerClientId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerClientId); target.__rpc_exec_stage = (__RpcExecStage)1; ((QBPhysicsProp)(object)target).DropBabyServerRpc(playerClientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3995923262(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 playerClientId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerClientId); target.__rpc_exec_stage = (__RpcExecStage)2; ((QBPhysicsProp)(object)target).DropBabyClientRpc(playerClientId); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "QBPhysicsProp"; } } public class QBSpikeTrapDetect : NetworkBehaviour { public QBController qbController; private Transform spikeRoofTrapCurrTransform; public void OnTriggerEnter(Collider other) { SpikeRoofTrap val = default(SpikeRoofTrap); if (((Component)other).TryGetComponent<SpikeRoofTrap>(ref val)) { spikeRoofTrapCurrTransform = ((Component)val.stickingPointsContainer).transform; AddStickPointServerRpc(); qbController.SpikeTrapDeathServerRpc(); } } [ServerRpc] public void AddStickPointServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)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 val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1736775760u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1736775760u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { AddStickPointClientRpc(); } } [ClientRpc] public void AddStickPointClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(91649286u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 91649286u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { qbController.qbRagdollAttachPoints.Add(spikeRoofTrapCurrTransform); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_QBSpikeTrapDetect() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(1736775760u, new RpcReceiveHandler(__rpc_handler_1736775760)); NetworkManager.__rpc_func_table.Add(91649286u, new RpcReceiveHandler(__rpc_handler_91649286)); } private static void __rpc_handler_1736775760(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; ((QBSpikeTrapDetect)(object)target).AddStickPointServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_91649286(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((QBSpikeTrapDetect)(object)target).AddStickPointClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "QBSpikeTrapDetect"; } } namespace CodeRebirth.src.MiscScripts { public class ShipAnimator : MonoBehaviour { public AnimationClip shipLandAnimation = null; public AnimationClip shipNormalLeaveAnimation = null; private Animator hangarShipAnimator = null; public AnimationClip originalShipLandClip = null; public AnimationClip originalShipLeaveClip = null; private RuntimeAnimatorController animatorController = null; public AnimatorOverrideController overrideController = null; private void Start() { hangarShipAnimator = StartOfRound.Instance.shipAnimator; animatorController = hangarShipAnimator.runtimeAnimatorController; AnimationClip[] animationClips = animatorController.animationClips; foreach (AnimationClip val in animationClips) { if (((Object)val).name == "HangarShipLandB") { originalShipLandClip = val; } else if (((Object)val).name == "ShipLeave") { originalShipLeaveClip = val; } } ((MonoBehaviour)this).StartCoroutine(WaitToReplaceClip()); } private IEnumerator WaitToReplaceClip() { while (true) { Plugin.Logger.LogError((object)"REPLACING??"); yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.currentLevel.sceneName == "CharlottesLabyrinth" && !StartOfRound.Instance.inShipPhase)); ReplaceAnimationClip(); Plugin.Logger.LogError((object)"REPLACED!!!"); yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.currentLevel.sceneName != "CharlottesLabyrinth" || StartOfRound.Instance.inShipPhase)); UnReplaceAnimationClip(); } } private void ReplaceAnimationClip() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown overrideController = new AnimatorOverrideController(animatorController); overrideController[originalShipLandClip] = shipLandAnimation; overrideController[originalShipLeaveClip] = shipNormalLeaveAnimation; hangarShipAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)overrideController; } public void KillAllPlayersAnimEvent() { PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!val.isPlayerControlled || val.isPlayerDead) { } } } private void UnReplaceAnimationClip() { hangarShipAnimator.runtimeAnimatorController = animatorController; } } } namespace ExampleEnemy { public class QBController : EnemyAI { public enum State { Wander, Sit, Held } public BoxCollider collisionThing; public BoxCollider interactCollider; public BoxCollider scanNode; public GameObject qbRagdollPrefab; public PlayerControllerB playerHolding; public QBPhysicsProp propScript; public List<AudioClip> audioClips = new List<AudioClip>(); public Transform turnCompass = null; public Transform attackArea = null; public ParticleSystem deathParticles; public float wanderMoveSpeed; public float chaseMoveSpeed; public float trySitInterval; public float tryGetUpInterval; private Coroutine dropQbCoroutine; private Coroutine dropBabyCoroutine; public List<Transform> qbRagdolls = new List<Transform>(); public List<Transform> qbRagdollAttachPoints = new List<Transform>(); private bool holdingQb = false; private float timeSinceSatDown; private float timeSinceLastSat; private float timeSinceNewRandPos; private float timeSinceAttacking; private float timeSinceAlerted; private float timeSinceDropped; private Vector3 StalkPos; private Random enemyRandom = null; private bool isDeadAnimationDone; [Header("State")] public State stateType; [Conditional("DEBUG")] private void LogIfDebugBuild(string text) { } public override void Start() { //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_005e: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); ((GrabbableObject)propScript).originalScale = ((Component)this).transform.localScale; timeSinceNewRandPos = 0f; timeSinceAlerted = 0f; enemyRandom = new Random(StartOfRound.Instance.randomMapSeed + base.thisEnemyIndex); isDeadAnimationDone = false; ((EnemyAI)this).StartSearch(((Component)this).transform.position, (AISearchRoutine)null); base.isOutside = false; } public override void Update() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (qbRagdolls.Count > 0 && qbRagdolls.Count == qbRagdollAttachPoints.Count) { int num = 0; foreach (Transform qbRagdoll in qbRagdolls) { qbRagdoll.position = qbRagdollAttachPoints[num].position; num++; } } if (base.isEnemyDead) { if (!isDeadAnimationDone) { LogIfDebugBuild("Stopping enemy voice with janky code."); isDeadAnimationDone = true; StopSfxClientRpc(); } } else { timeSinceAttacking += Time.deltaTime; timeSinceNewRandPos += Time.deltaTime; timeSinceAlerted += Time.deltaTime; timeSinceLastSat += Time.deltaTime; timeSinceSatDown += Time.deltaTime; timeSinceDropped += Time.deltaTime; ((EnemyAI)this).DoAIInterval(); } } public override void DoAIInterval() { if (stateType == State.Held) { return; } if (((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).DoAIInterval(); } if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead || !((NetworkBehaviour)this).IsOwner) { return; } switch (stateType) { case State.Wander: ChangeSpeedClientRpc(wanderMoveSpeed); if (timeSinceLastSat > trySitInterval && timeSinceDropped > 2f) { float num2 = Random.Range(0, 100); if (num2 < 25f) { PlaySoundClientRpc(0); ChangeStateClientRpc(State.Sit); DoAnimationClientRpc("sitDown"); timeSinceSatDown = 0f; } else { timeSinceLastSat = 0f; } } break; case State.Sit: ChangeSpeedClientRpc(0f); if (timeSinceSatDown > tryGetUpInterval) { float num = Random.Range(0, 100); if (num < 25f) { PlaySoundClientRpc(1); ChangeStateClientRpc(State.Wander); DoAnimationClientRpc("getUp"); timeSinceLastSat = 0f; } else { timeSinceSatDown = 0f; } } break; default: LogIfDebugBuild("This Behavior State doesn't exist!"); break; } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void ChangeSpeedClientRpc(float speed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(828867089u, val, (RpcDelivery)1); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 828867089u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { base.agent.speed = speed; } } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void StopSfxClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2844141494u, val, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2844141494u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { base.creatureVoice.Stop(); } } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void ChangeSfxClipClientRpc(int clipNum) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(794199885u, val, (RpcDelivery)1); BytePacker.WriteValueBitPacked(val2, clipNum); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 794199885u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { base.creatureSFX.clip = audioClips[clipNum]; base.creatureSFX.Play(); } } } private bool FoundClosestPlayerInRange(float range, float senseRange) { //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) ((EnemyAI)this).TargetClosestPlayer(1.5f, true, 70f); return (Object)(object)base.targetPlayer != (Object)null && Vector3.Distance(((Component)this).transform.position, ((Component)base.targetPlayer).transform.position) < range; } private bool TargetClosestPlayerInAnyCase() { //IL_001f: 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) base.mostOptimalDistance = 2000f; base.targetPlayer = null; for (int i = 0; i < StartOfRound.Instance.connectedPlayersAmount + 1; i++) { base.tempDist = Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position); if (base.tempDist < base.mostOptimalDistance) { base.mostOptimalDistance = base.tempDist; base.targetPlayer = StartOfRound.Instance.allPlayerScripts[i]; } } if ((Object)(object)base.targetPlayer == (Object)null) { return false; } return true; } public void HitFromTurret(Vector3 hitDirection) { //IL_0042: 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_004d: 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) if (!base.isEnemyDead) { base.enemyHP--; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(hitDirection * 10f + hitDirection * 10f); } } } public override void HitFromExplosion(float distance) { //IL_0050: 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_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) ((EnemyAI)this).HitFromExplosion(distance); if (!base.isEnemyDead) { base.enemyHP--; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(((Component)this).transform.forward * 50f + ((Component)this).transform.up * 50f); } } } public override void HitEnemy(int force = 1, PlayerControllerB? playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, hitID); if (!base.isEnemyDead) { base.enemyHP -= force; if (((NetworkBehaviour)this).IsOwner && base.enemyHP <= 0 && !base.isEnemyDead) { DeathServerRpc(Vector3.down); } } } [ServerRpc] public void DeathServerRpc(Vector3 bodyVelocity) { //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_0123: 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_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 //IL_0155: 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)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1205418331u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref bodyVelocity); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1205418331u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ChangeStateClientRpc(State.Held); GameObject val3 = Object.Instantiate<GameObject>(qbRagdollPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); val3.GetComponent<NetworkObject>().Spawn(false); Rigidbody[] componentsInChildren = val3.GetComponentsInChildren<Rigidbody>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].velocity = bodyVelocity; } ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); DeathClientRpc(); } } [ServerRpc] public void SpikeTrapDeathServerRpc() { //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_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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1973894588u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1973894588u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ChangeStateClientRpc(State.Held); GameObject val3 = Object.Instantiate<GameObject>(qbRagdollPrefab, ((Component)this).transform.position, ((Component)this).transform.rotation); val3.GetComponent<NetworkObject>().Spawn(false); qbRagdolls.Add(val3.transform); ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); DeathClientRpc(); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DeathClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(400727888u, val, (RpcDelivery)1); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 400727888u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((Collider)interactCollider).enabled = false; ((Collider)collisionThing).enabled = false; ((Collider)scanNode).enabled = false; SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers; foreach (SkinnedMeshRenderer val3 in skinnedMeshRenderers) { ((Renderer)val3).enabled = false; } base.enemyHP = 1; } } public IEnumerator DeathCoroutine(float delayTime) { yield return (object)new WaitForSeconds(delayTime); if (RoundManager.Instance.allEnemyVents.Length != 0) { bool foundValidVent = false; EnemyVent[] allEnemyVents = RoundManager.Instance.allEnemyVents; foreach (EnemyVent enemyVent in allEnemyVents) { bool hasNearbyPlayer = false; GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects; foreach (GameObject player in allPlayerObjects) { if (Vector3.Distance(player.transform.position, ((Component)enemyVent).transform.position) < 15f) { hasNearbyPlayer = true; } } if (!hasNearbyPlayer) { foundValidVent = true; ((Collider)interactCollider).enabled = true; ((Collider)collisionThing).enabled = true; ((Collider)scanNode).enabled = true; SkinnedMeshRenderer[] skinnedMeshRenderers = base.skinnedMeshRenderers; foreach (SkinnedMeshRenderer skinnedMeshRenderer in skinnedMeshRenderers) { ((Renderer)skinnedMeshRenderer).enabled = true; } ((Behaviour)base.agent).enabled = false; ((Component)this).transform.position = ((Component)enemyVent.floorNode).transform.position; ((Behaviour)base.agent).enabled = true; ChangeStateClientRpc(State.Wander); break; } } if (!foundValidVent) { ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); } } else { ((MonoBehaviour)this).StartCoroutine(DeathCoroutine(3f)); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void DoAnimationClientRpc(string animationName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(491036845u, val, (RpcDelivery)1); bool flag = animationName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(animationName, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 491036845u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { LogIfDebugBuild("Animation: " + animationName); base.creatureAnimator.SetTrigger(animationName); } } [ClientRpc(/*Could not decode attribute arguments.*/)] public void PlaySoundClientRpc(int index) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1813149629u, val, (RpcDelivery)1); BytePacker.WriteValueBitPacked(val2, index); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1813149629u, val, (RpcDelivery)1); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { base.creatureVoice.PlayOneShot(audioClips[index]); } } } [ClientRpc] public void ChangeStateClientRpc(State state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(5798017u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<State>(ref state, default(ForEnums)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 5798017u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { stateType = state; } } } public void PickUpQBLocalClient() { base.currentOwnershipOnThisClient = (int)((GrabbableObject)propScript).playerHeldBy.playerClientId; base.inSpecialAnimation = true; ((Behaviour)base.agent).enabled = false; holdingQb = true; if (dropQbCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dropQbCoroutine); } if (((NetworkBehaviour)this).IsServer && stateType != State.Held) { ChangeStateClientRpc(State.Held); DoAnimationClientRpc("pickUp"); } playerHolding = ((GrabbableObject)propScript).playerHeldBy; } public void DropQbLocalClient() { //IL_005a: 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_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_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_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_00a0: 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_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_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_0194: 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_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_0121: 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_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_014a: 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_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_011e: 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_01c9: Unknown result type (might be due to invalid IL or missing references) holdingQb = false; playerHolding = null; timeSinceDropped = 0f; 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); 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); } if ((Object)(object)((Component)propScript).transform.parent == (Object)null) { ((GrabbableObject)propScript).targetFloorPosition = navMeshPosition; } else { ((GrabbableObject)propScript).targetFloorPosition = ((Component)propScript).transform.parent.InverseTransformPoint(navMeshPosition); } if (flag) { if (dropQbCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dropQbCoroutine); } dropQbCoroutine = ((MonoBehaviour)this).StartCoroutine(DropQbAnimation(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) base.nodesTempArray = base.allAINodes.OrderBy((GameObject x) => Vector3.Distance(pos, x.transform.position)).ToArray(); return base.nodesTempArray[0].transform; } private IEnumerator DropQbAnimation(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) DoAnimationClientRpc("drop"); float time = Time.realtimeSinceStartup; yield return (object)new WaitUntil((Func<bool>)(() => ((GrabbableObject)propScript).reachedFloorTarget || Time.realtimeSinceStartup - time > 2f)); if (base.currentBehaviourStateIndex == 0) { ((Component)this).transform.position = dropOnPosition; base.inSpecialAnimation = false; ChangeStateClientRpc(State.Wander); } dropQbCoroutine = null; } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_QBController() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(828867089u, new RpcReceiveHandler(__rpc_handler_828867089)); NetworkManager.__rpc_func_table.Add(2844141494u, new RpcReceiveHandler(__rpc_handler_2844141494)); NetworkManager.__rpc_func_table.Add(794199885u, new RpcReceiveHandler(__rpc_handler_794199885)); NetworkManager.__rpc_func_table.Add(1205418331u, new RpcReceiveHandler(__rpc_handler_1205418331)); NetworkManager.__rpc_func_table.Add(1973894588u, new RpcReceiveHandler(__rpc_handler_1973894588)); NetworkManager.__rpc_func_table.Add(400727888u, new RpcReceiveHandler(__rpc_handler_400727888)); NetworkManager.__rpc_func_table.Add(491036845u, new RpcReceiveHandler(__rpc_handler_491036845)); NetworkManager.__rpc_func_table.Add(1813149629u, new RpcReceiveHandler(__rpc_handler_1813149629)); NetworkManager.__rpc_func_table.Add(5798017u, new RpcReceiveHandler(__rpc_handler_5798017)); } private static void __rpc_handler_828867089(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 speed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref speed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((QBController)(object)target).ChangeSpeedClientRpc(speed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2844141494(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((QBController)(object)target).StopSfxClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_794199885(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 clipNum = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clipNum); target.__rpc_exec_stage = (__RpcExecStage)2; ((QBController)(object)target).ChangeSfxClipClientRpc(clipNum); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1205418331(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 bodyVelocity = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref bodyVelocity); target.__rpc_exec_stage = (__RpcExecStage)1; ((QBController)(object)target).DeathServerRpc(bodyVelocity); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1973894588(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; ((QBController)(object)target).SpikeTrapDeathServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_400727888(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((QBController)(object)target).DeathClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_491036845(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_0061: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives)); string animationName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref animationName, false); } target.__rpc_exec_stage = (__RpcExecStage)2; ((QBController)(object)target).DoAnimationClientRpc(animationName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1813149629(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int index = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref index); target.__rpc_exec_stage = (__RpcExecStage)2; ((QBController)(object)target).PlaySoundClientRpc(index); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_5798017(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) { State state = default(State); ((FastBufferReader)(ref reader)).ReadValueSafe<State>(ref state, default(ForEnums)); target.__rpc_exec_stage = (__RpcExecStage)2; ((QBController)(object)target).ChangeStateClientRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "QBController"; } } } namespace CharlottesLabyrinth { internal class CharlotteController : NetworkBehaviour { public Animator animator; public AudioSource audioSource; public Transform killDetectArea; public List<Transform> charlotteTeeth; private Transform lockedPlayer; private Vector3 lockedPlayerPosition; private void LateUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)lockedPlayer != (Object)null) { lockedPlayer.position = lockedPlayerPosition; } } public void TriggerCharlotteInitially() { //IL_001d: 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) lockedPlayer = ((Component)GameNetworkManager.Instance.localPlayerController).transform; lockedPlayerPosition = lockedPlayer.position; TriggerCharlotteServerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController)); } [ServerRpc(RequireOwnership = false)] public void TriggerCharlotteServerRpc(NetworkBehaviourReference playerRef) { //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_00d8: 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 val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1046585246u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1046585246u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { TriggerCharlotteClientRpc(playerRef); } } } [ClientRpc] public void TriggerCharlotteClientRpc(NetworkBehaviourReference playerRef) { //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_00ea: 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_011f: 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 != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1561612640u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1561612640u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB val3 = default(PlayerControllerB); ((NetworkBehaviourReference)(ref playerRef)).TryGet<PlayerControllerB>(ref val3, (NetworkManager)null); Vector3 val4 = default(Vector3); ((Vector3)(ref val4))..ctor(((Component)val3).transform.position.x, ((Component)this).transform.position.y, ((Component)val3).transform.position.z); ((Component)this).transform.LookAt(val4); animator.SetTrigger("CharlotteInteract"); } } } public void KillDetect() { //IL_0012: 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_0022: 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) lockedPlayer = null; int num = 8; int num2 = 0; Collider[] array = Physics.OverlapBox(killDetectArea.position, killDetectArea.localScale, Quaternion.identity, num); if (array.Length == 0) { return; } Collider[] array2 = array; foreach (Collider val in array2) { if (((Component)val).CompareTag("Player")) { num2++; CheckAnimationGrabPlayerServerRpc(new NetworkBehaviourReference((NetworkBehaviour)(object)((Component)val).GetComponent<PlayerControllerB>()), num2); if (num2 > 7) { num2 = 0; } } } } [ServerRpc(RequireOwnership = false)] public void CheckAnimationGrabPlayerServerRpc(NetworkBehaviourReference playerRef, int currPlayerKilled) { //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_00e5: 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 val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(836578551u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, currPlayerKilled); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 836578551u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ConfirmAnimationGrabPlayerClientRpc(playerRef, currPlayerKilled); } } } [ClientRpc] public void ConfirmAnimationGrabPlayerClientRpc(NetworkBehaviourReference playerRef, int currPlayerKilled) { //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_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)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(450243815u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerRef, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, currPlayerKilled); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 450243815u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((MonoBehaviour)this).StartCoroutine(AnimationGrabPlayer(playerRef, currPlayerKilled)); } } } private IEnumerator AnimationGrabPlayer(NetworkBehaviourReference playerRef, int currPlayerKilled) { //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) PlayerControllerB playerDying = default(PlayerControllerB); ((NetworkBehaviourReference)(ref playerRef)).TryGet<PlayerControllerB>(ref playerDying, (NetworkManager)null); if (((NetworkBehaviour)playerDying).IsOwner) { playerDying.KillPlayer(Vector3.zero, true, (CauseOfDeath)8, 8, default(Vector3)); } float startTime = Time.timeSinceLevelLoad; yield return (object)new WaitUntil((Func<bool>)(() => (Object)(obje