Decompiled source of TooManyExplosions v1.1.0
plugins/TooManyExplosions/TooManyExplosions.dll
Decompiled 6 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Modules; using Microsoft.CodeAnalysis; using TMPro; using TooManyExplosions.Helpers; using TooManyExplosions.Managers; using TooManyExplosions.MonoBehaviours; using TooManyExplosions.MonoBehaviours.Extensions; using TooManyExplosions.NetcodePatcher; using TooManyExplosions.Patchers; using TooManyExplosions.Patchers.Enemies; using TooManyExplosions.Patchers.Objects; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; using UnityEngine.SceneManagement; [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("TooManyExplosions")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("TooManyExplosions")] [assembly: AssemblyTitle("TooManyExplosions")] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<Vector3>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<Vector3>(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<float>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<float>(); } } 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; } } } namespace TooManyExplosions { [BepInPlugin("lc.zapajax.TooManyExplosions", "Too Many Explosions", "1.0.3")] public class Plugin : BaseUnityPlugin { private const string GUID = "lc.zapajax.TooManyExplosions"; private const string NAME = "Too Many Explosions"; private const string VERSION = "1.0.3"; private readonly Harmony harmony = new Harmony("lc.zapajax.TooManyExplosions"); public static Plugin Instance; private void Awake() { Instance = this; LogHandler.Init("lc.zapajax.TooManyExplosions"); Content.AssemblySetup(); ConfigSettings.BindConfigSettings(); Content.InitializeObjects(); LogHandler.Log("Explosives are primed."); _Patcher.ApplyPatches(harmony); LogHandler.Log("Fire in the hole!"); } } } namespace TooManyExplosions.Patchers { [HarmonyPatch(typeof(GameNetworkManager))] internal class GameNetworkManagerPatcher { [HarmonyPatch("Start")] [HarmonyPostfix] private static void AddToPrefabs(GameNetworkManager __instance) { ((Component)__instance).GetComponent<NetworkManager>().AddNetworkPrefab(Content.tmeNetcodeObject); } } [HarmonyPatch(typeof(NetworkObject))] internal class NetworkObjectPatcher { [HarmonyPatch("Awake")] [HarmonyPrefix] public static void appendScriptToNetworkObject(NetworkObject __instance) { //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Expected O, but got Unknown //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Expected O, but got Unknown if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("NetworkObject.Awake: " + ((Object)((Component)__instance).gameObject).name); } if (!(((Object)((Component)__instance).gameObject).name == "Landmine(Clone)")) { return; } LandmineExtension le = ((Component)((Component)__instance).transform.GetChild(0)).gameObject.AddComponent<LandmineExtension>(); if (NetConfigVariables.canDisarmLandmineNet.Value) { InteractTrigger val = ((Component)__instance).gameObject.AddComponent<InteractTrigger>(); val.hoverTip = "Deactivate Landmine : [E]"; val.interactable = true; val.holdInteraction = true; val.oneHandedItemAllowed = true; val.timeToHold = NetConfigVariables.disarmTimerLengthNet.Value; val.timeToHoldSpeedMultiplier = 1f; val.animationWaitTime = NetConfigVariables.disarmTimerLengthNet.Value; val.triggerOnce = true; val.onInteractEarly = new InteractEvent(); UnityAction<PlayerControllerB> val2 = delegate { }; ((UnityEvent<PlayerControllerB>)(object)val.onInteractEarly).AddListener(val2); val.onStopInteract = new InteractEvent(); UnityAction<PlayerControllerB> val3 = delegate { }; ((UnityEvent<PlayerControllerB>)(object)val.onStopInteract).AddListener(val3); val.holdingInteractEvent = new InteractEventFloat(); UnityAction<float> val4 = delegate { }; ((UnityEvent<float>)(object)val.holdingInteractEvent).AddListener(val4); val.onCancelAnimation = new InteractEvent(); UnityAction<PlayerControllerB> val5 = delegate { }; ((UnityEvent<PlayerControllerB>)(object)val.onStopInteract).AddListener(val5); val.onInteract = new InteractEvent(); UnityAction<PlayerControllerB> val6 = delegate { le.destroyLandmineServerRpc(); }; ((UnityEvent<PlayerControllerB>)(object)val.onInteract).AddListener(val6); } } } [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatcher { [HarmonyPatch("Start")] [HarmonyPrefix] public static void preStart(PlayerControllerB __instance) { PlayerControllerBExtension playerControllerBExtension = ((Component)__instance).gameObject.AddComponent<PlayerControllerBExtension>(); if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ADDING PlayerExtension"); } } [HarmonyPatch("SetHoverTipAndCurrentInteractTrigger")] [HarmonyPostfix] public static void includeLandmine(PlayerControllerB __instance) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) if (__instance.isGrabbingObjectAnimation) { return; } Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)__instance.gameplayCamera).transform.position, ((Component)__instance.gameplayCamera).transform.forward); RaycastHit[] array = Physics.RaycastAll(val, __instance.grabDistance, 2097152); RaycastHit val2 = default(RaycastHit); bool flag = false; if (array.Length != 0) { RaycastHit[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit val3 = array2[i]; GameObject gameObject = ((Component)((RaycastHit)(ref val3)).collider).gameObject; if ((Object)(object)gameObject == (Object)null) { continue; } GameObject gameObject2 = ((Component)gameObject.transform.parent).gameObject; if (!((Object)(object)gameObject2 == (Object)null) && !(((Object)gameObject2).name != "Landmine(Clone)")) { Landmine componentInChildren = gameObject2.GetComponentInChildren<Landmine>(); if (!componentInChildren.hasExploded && NetConfigVariables.canDisarmLandmineNet.Value) { flag = true; val2 = val3; break; } } } } if (!flag) { return; } InteractTrigger component = ((Component)((RaycastHit)(ref val2)).transform.parent).gameObject.GetComponent<InteractTrigger>(); if ((Object)(object)component != (Object)(object)__instance.previousHoveringOverTrigger && (Object)(object)__instance.previousHoveringOverTrigger != (Object)null) { __instance.previousHoveringOverTrigger.isBeingHeldByPlayer = false; } if ((Object)(object)component == (Object)null) { return; } __instance.hoveringOverTrigger = component; if (__instance.isHoldingInteract) { if (__instance.twoHanded) { ((TMP_Text)__instance.cursorTip).text = "[Hands Full]"; } else if (!string.IsNullOrEmpty(component.holdTip)) { ((TMP_Text)__instance.cursorTip).text = component.holdTip; } } else { ((Behaviour)__instance.cursorIcon).enabled = true; __instance.cursorIcon.sprite = __instance.grabItemIcon; if (!((Object)(object)__instance.cursorTip == (Object)null) && ((TMP_Text)__instance.cursorTip).text != null && !((Object)(object)component == (Object)null) && component.hoverTip != null) { ((TMP_Text)__instance.cursorTip).text = component.hoverTip; } } } [HarmonyPatch("KillPlayer")] [HarmonyPostfix] public static void onPlayerDeathExplosiveEvent(PlayerControllerB __instance) { //IL_007d: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)__instance).IsOwner || !__instance.isPlayerDead || !__instance.AllowPlayerDeath() || !NetConfigVariables.playerExplodesOnDeathNet.Value) { return; } PlayerControllerBExtension component = ((Component)((Component)__instance).transform).gameObject.GetComponent<PlayerControllerBExtension>(); if (!((Object)(object)component == (Object)null) && !component.triggeredAfterDeathExplosiveEvent) { component.triggeredAfterDeathExplosiveEvent = true; if (TMEUtils.doesEventTrigger(NetConfigVariables.chanceForPlayerToExplodeOnDeathNet.Value)) { NetcodeManager.Instance.spawnExplosionServerRpc(((Component)__instance).transform.position, spawnExplosionEffect: true, 1f, 5f); } } } [HarmonyPatch("BeginGrabObject")] [HarmonyPostfix] public static void handleDestroyedLM(PlayerControllerB __instance, GrabbableObject ___currentlyGrabbingObject) { if ((Object)(object)___currentlyGrabbingObject == (Object)null) { __instance.isGrabbingObjectAnimation = false; } } [HarmonyPatch("Update")] [HarmonyPostfix] public static void updatePatcher(PlayerControllerB __instance) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) PlayerControllerBExtension component = ((Component)__instance).gameObject.GetComponent<PlayerControllerBExtension>(); if ((Object)(object)component == (Object)null) { return; } component.worldVelocity = (((Component)__instance).transform.position - component.prevPos) / Time.deltaTime; component.prevPos = ((Component)__instance).transform.position; if (!NetConfigVariables.playerExplodesOnLandNet.Value || __instance.thisController.isGrounded == component.prevGroundedState) { return; } component.prevGroundedState = __instance.thisController.isGrounded; if (TMEUtils.shipState != "LANDED") { return; } if (__instance.thisController.isGrounded) { if (!(component.startedFallingHeight - ((Component)__instance).transform.position.y < NetConfigVariables.distanceToCauseExplosionNet.Value) && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForPlayerToExplodeOnLandNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Player landed causing explosive event."); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f, 25); } } else { component.startedFallingHeight = ((Component)__instance).transform.position.y; } } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatcher { [HarmonyPatch("Start")] [HarmonyPrefix] private static void spawnNetManagers(StartOfRound __instance) { if (((NetworkBehaviour)__instance).IsHost) { GameObject val = Object.Instantiate<GameObject>(Content.tmeNetcodeObject); val.GetComponent<NetworkObject>().Spawn(false); } } [HarmonyPatch("Start")] [HarmonyPostfix] private static void getMonsters(StartOfRound __instance) { TMEUtils.landmineRef = TMEUtils.findMapItem("Landmine"); } [HarmonyPatch("Update")] [HarmonyPrefix] public static void updateShipState(StartOfRound __instance) { TMEUtils.shipState = TMEUtils.determineShipState(__instance); } [HarmonyPatch("ShipLeave")] [HarmonyPostfix] public static void replaceLandminesOnShipLeave() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown Scene sceneByName = SceneManager.GetSceneByName("SampleSceneRelay"); Scene val = sceneByName; GameObject[] rootGameObjects = ((Scene)(ref val)).GetRootGameObjects(); for (int i = 0; i < rootGameObjects.Length; i++) { if (!(((Object)rootGameObjects[i]).name == "Landmine(Clone)")) { continue; } if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Found a Landmine"); } Landmine componentInChildren = rootGameObjects[i].GetComponentInChildren<Landmine>(); if (!((Object)componentInChildren != (Object)null) || componentInChildren.hasExploded) { continue; } if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Found a Landmine 2"); } LandmineExtension componentInChildren2 = rootGameObjects[i].GetComponentInChildren<LandmineExtension>(); if ((Object)componentInChildren2 != (Object)null) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Found a Landmine 3"); } componentInChildren2.destroyLandmineServerRpc(); if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Switching A Landmine"); } } } } } internal class _Patcher { public static void ApplyPatches(Harmony harmony) { harmony.PatchAll(typeof(Plugin)); harmony.PatchAll(typeof(GameNetworkManagerPatcher)); harmony.PatchAll(typeof(NetworkObjectPatcher)); harmony.PatchAll(typeof(PlayerControllerBPatcher)); harmony.PatchAll(typeof(StartOfRoundPatcher)); _EnemyAIPatcher.ApplyObjectPatches(harmony); _ObjectPatcher.ApplyObjectPatches(harmony); } } } namespace TooManyExplosions.Patchers.Objects { [HarmonyPatch(typeof(GiftBoxItem))] internal class GiftBoxItemPatcher { [HarmonyPatch("ItemActivate")] [HarmonyPrefix] public static bool explodeOnUse(GiftBoxItem __instance, ref bool ___hasUsedGift) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)((GrabbableObject)__instance).playerHeldBy == (Object)null) && !___hasUsedGift) { if (!((NetworkBehaviour)__instance).IsOwner) { return true; } if (!NetConfigVariables.explosionOnItemUseNet.Value) { return true; } if (TMEUtils.doesEventTrigger(NetConfigVariables.chanceForExplosionOnItemUseNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Item use caused explosive event."); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f, 25); } } return true; } } [HarmonyPatch(typeof(Landmine))] internal class LandminePatcher : NetworkBehaviour { [HarmonyPatch("SetOffMineAnimation")] [HarmonyPostfix] public static void disableCollider(Landmine __instance) { GameObject gameObject = ((Component)((Component)__instance).transform.parent).gameObject; SphereCollider componentInChildren = gameObject.GetComponentInChildren<SphereCollider>(); ((Collider)componentInChildren).enabled = false; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected internal override string __getTypeName() { return "LandminePatcher"; } } [HarmonyPatch(typeof(NoisemakerProp))] internal class NoisemakerPropPatcher { [HarmonyPatch("ItemActivate")] [HarmonyPrefix] public static bool explodeOnUse(NoisemakerProp __instance, object[] __args) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)__instance).IsOwner) { return true; } if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)) { if (!NetConfigVariables.explosionOnItemUseNet.Value) { return true; } if (TMEUtils.doesEventTrigger(NetConfigVariables.chanceForExplosionOnItemUseNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Item use caused explosive event."); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f, 25); } } return true; } } internal class _ObjectPatcher { public static void ApplyObjectPatches(Harmony harmony) { harmony.PatchAll(typeof(LandminePatcher)); harmony.PatchAll(typeof(GiftBoxItemPatcher)); harmony.PatchAll(typeof(NoisemakerPropPatcher)); } } } namespace TooManyExplosions.Patchers.Enemies { [HarmonyPatch(typeof(BaboonBirdAI))] internal class BaboonBirdAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(BaboonBirdAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f); } } } [HarmonyPatch(typeof(ButlerEnemyAI))] internal class ButlerEnemyAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(ButlerEnemyAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 3f); } } } [HarmonyPatch(typeof(CentipedeAI))] internal class CentipedeAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(CentipedeAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f, 25); } } } [HarmonyPatch(typeof(CrawlerAI))] internal class CrawlerAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(CrawlerAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 3f); } } } [HarmonyPatch(typeof(DoublewingAI))] internal class DoublewingAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(DoublewingAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f, 25); } } } [HarmonyPatch(typeof(FlowermanAI))] internal class FlowermanAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(FlowermanAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f); } } } [HarmonyPatch(typeof(FlowerSnakeEnemy))] internal class FlowerSnakeEnemyPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(FlowerSnakeEnemy __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 1f, 25); } } } [HarmonyPatch(typeof(ForestGiantAI))] internal class ForestGiantAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(ForestGiantAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 1f, 5f); } } } [HarmonyPatch(typeof(HoarderBugAI))] internal class HoarderBugAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(HoarderBugAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 1f, 25); } } } [HarmonyPatch(typeof(MaskedPlayerEnemy))] internal class MaskedPlayerEnemyPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(MaskedPlayerEnemy __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f, 25); } } } [HarmonyPatch(typeof(MouthDogAI))] internal class MouthDogAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(MouthDogAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 3f); } } } [HarmonyPatch(typeof(NutcrackerEnemyAI))] internal class NutcrackerEnemyAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(NutcrackerEnemyAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 2.5f); } } } [HarmonyPatch(typeof(PufferAI))] internal class PufferAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(PufferAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 3f); } } } [HarmonyPatch(typeof(SandSpiderAI))] internal class SandSpiderAIPatcher { [HarmonyPatch("KillEnemy")] [HarmonyPostfix] public static void explosiveEventOnKillEnemy(SandSpiderAI __instance) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (GameNetworkManager.Instance.isHostingGame && NetConfigVariables.enemyExplodesOnDeathNet.Value && TMEUtils.doesEventTrigger(NetConfigVariables.chanceForEnemyToExplodeOnDeathNet.Value)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Enemy Death caused explosive event"); } TMEUtils.spawnExplosion(((Component)__instance).transform.position, spawnExplosionEffect: true, 0f, 3f); } } } internal class _EnemyAIPatcher { public static void ApplyObjectPatches(Harmony harmony) { harmony.PatchAll(typeof(BaboonBirdAIPatcher)); harmony.PatchAll(typeof(ButlerEnemyAIPatcher)); harmony.PatchAll(typeof(CentipedeAIPatcher)); harmony.PatchAll(typeof(CrawlerAIPatcher)); harmony.PatchAll(typeof(DoublewingAIPatcher)); harmony.PatchAll(typeof(FlowermanAIPatcher)); harmony.PatchAll(typeof(FlowerSnakeEnemyPatcher)); harmony.PatchAll(typeof(ForestGiantAIPatcher)); harmony.PatchAll(typeof(HoarderBugAIPatcher)); harmony.PatchAll(typeof(MaskedPlayerEnemyPatcher)); harmony.PatchAll(typeof(MouthDogAIPatcher)); harmony.PatchAll(typeof(NutcrackerEnemyAIPatcher)); harmony.PatchAll(typeof(PufferAIPatcher)); harmony.PatchAll(typeof(SandSpiderAIPatcher)); } } } namespace TooManyExplosions.MonoBehaviours { [RequireComponent(typeof(Rigidbody))] public class GrabbableRigidbody : PhysicsProp { internal Rigidbody rb; public PlayerControllerB playerLastHeldBy; public bool overrideLCPhysics = false; protected NetworkVariable<bool> overrideLCPhysicsNet = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); protected NetworkVariable<bool> isKinematicNet = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public float gravity = NetConfigVariables.gravityNet.Value; public int velocityIsZeroCounter = 0; public int velocityCounterBuffer = 10; public Vector3 prevPos = Vector3.zero; public float velocityCounterTolerance = 1000f; public override void Start() { rb = ((Component)this).GetComponent<Rigidbody>(); rb.useGravity = false; ((GrabbableObject)this).itemProperties.itemSpawnsOnGround = false; ((GrabbableObject)this).Start(); EnablePhysics(enable: true); if (overrideLCPhysics) { rb.isKinematic = true; } rb.collisionDetectionMode = (CollisionDetectionMode)2; } public void EnablePhysics(bool enable) { for (int i = 0; i < ((GrabbableObject)this).propColliders.Length; i++) { if (!((Object)(object)((GrabbableObject)this).propColliders[i] == (Object)null) && !((Component)((GrabbableObject)this).propColliders[i]).gameObject.CompareTag("InteractTrigger") && !((Component)((GrabbableObject)this).propColliders[i]).gameObject.CompareTag("DoNotSet")) { ((GrabbableObject)this).propColliders[i].enabled = enable; } } rb.isKinematic = !enable; } public bool isMoving() { if (velocityIsZeroCounter > velocityCounterBuffer) { return false; } return true; } public void determineRelativeVelocity() { //IL_0007: 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_008f: Unknown result type (might be due to invalid IL or missing references) bool flag = Mathf.Round(((Component)this).transform.position.x * velocityCounterTolerance) / velocityCounterTolerance == Mathf.Round(prevPos.x * velocityCounterTolerance) / velocityCounterTolerance; bool flag2 = Mathf.Round(((Component)this).transform.position.y * velocityCounterTolerance) / velocityCounterTolerance == Mathf.Round(prevPos.y * velocityCounterTolerance) / velocityCounterTolerance; bool flag3 = Mathf.Round(((Component)this).transform.position.z * velocityCounterTolerance) / velocityCounterTolerance == Mathf.Round(prevPos.z * velocityCounterTolerance) / velocityCounterTolerance; if (flag && flag2 && flag3 && velocityIsZeroCounter <= velocityCounterBuffer) { velocityIsZeroCounter++; } else { velocityIsZeroCounter = 0; } } public override void Update() { determineRelativeVelocity(); if (!((NetworkBehaviour)this).IsHost && overrideLCPhysics != overrideLCPhysicsNet.Value) { overrideLCPhysics = overrideLCPhysicsNet.Value; } else if (((NetworkBehaviour)this).IsHost && overrideLCPhysics != overrideLCPhysicsNet.Value) { overrideLCPhysicsNet.Value = overrideLCPhysics; } if (!((NetworkBehaviour)this).IsHost && rb.isKinematic != isKinematicNet.Value) { rb.isKinematic = isKinematicNet.Value; } else if (((NetworkBehaviour)this).IsHost && rb.isKinematic != isKinematicNet.Value) { isKinematicNet.Value = rb.isKinematic; } bool isHeld = ((GrabbableObject)this).isHeld; ((GrabbableObject)this).fallTime = 1f; ((GrabbableObject)this).reachedFloorTarget = true; ((GrabbableObject)this).isHeld = true; ((GrabbableObject)this).Update(); ((GrabbableObject)this).isHeld = isHeld; } public void FixedUpdate() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) if (overrideLCPhysics) { if (!rb.isKinematic && !((GrabbableObject)this).isHeld) { rb.useGravity = false; rb.AddForce(Vector3.down * gravity, (ForceMode)5); } else { rb.AddForce(Vector3.zero, (ForceMode)2); } } if (overrideLCPhysics && rb.isKinematic) { rb.isKinematic = false; } if (!overrideLCPhysics && !rb.isKinematic) { rb.isKinematic = true; } } public override void LateUpdate() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((GrabbableObject)this).parentObject != (Object)null && ((GrabbableObject)this).isHeld) { ((Component)this).transform.rotation = ((GrabbableObject)this).parentObject.rotation; ((Component)this).transform.Rotate(((GrabbableObject)this).itemProperties.rotationOffset); ((Component)this).transform.position = ((GrabbableObject)this).parentObject.position; Vector3 positionOffset = ((GrabbableObject)this).itemProperties.positionOffset; positionOffset = ((GrabbableObject)this).parentObject.rotation * positionOffset; Transform transform = ((Component)this).transform; transform.position += positionOffset; } if ((Object)(object)((GrabbableObject)this).radarIcon != (Object)null) { ((GrabbableObject)this).radarIcon.position = ((Component)this).transform.position; } prevPos = ((Component)this).transform.position; } public override void FallWithCurve() { } public void FallToGround(bool randomizePosition = false) { } public override void EquipItem() { ((PhysicsProp)this).EquipItem(); playerLastHeldBy = ((GrabbableObject)this).playerHeldBy; ((Component)this).transform.SetParent((Transform)null, true); } protected override void __initializeVariables() { if (overrideLCPhysicsNet == null) { throw new Exception("GrabbableRigidbody.overrideLCPhysicsNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)overrideLCPhysicsNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)overrideLCPhysicsNet, "overrideLCPhysicsNet"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)overrideLCPhysicsNet); if (isKinematicNet == null) { throw new Exception("GrabbableRigidbody.isKinematicNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)isKinematicNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)isKinematicNet, "isKinematicNet"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)isKinematicNet); ((PhysicsProp)this).__initializeVariables(); } protected internal override string __getTypeName() { return "GrabbableRigidbody"; } } [ExecuteAlways] internal class ThrowableLandmine : GrabbableRigidbody { private new PlayerControllerB playerLastHeldBy; public bool isThrown = false; public float throwForce = NetConfigVariables.throwForceNet.Value; public Vector3 raisedAngle = new Vector3(0f, 0.15f, 0f); public bool isHoldingButton; public bool readyingItem = false; private Coroutine readyItemCoroutine; public bool allowConversion = false; private NetworkVariable<bool> allowConversionNet = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public bool hasSpawnedMine = false; private float t = 0f; public bool updatedPos = false; private NetworkVariable<Vector3> throwDirNet = new NetworkVariable<Vector3>(Vector3.zero, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)1); public BoxCollider collider; public override void Start() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) base.Start(); if (((NetworkBehaviour)this).IsHost) { rb.isKinematic = isKinematicNet.Value; rb.velocity = Vector3.zero; t = 0f; if (!overrideLCPhysics) { overrideLCPhysics = true; } if (TMEUtils.shipState == "LEAVING" || StartOfRound.Instance.shipIsLeaving) { overrideLCPhysics = false; } } } public override void ItemActivate(bool used, bool buttonDown = true) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowableLandmine.ItemActivate"); } playerLastHeldBy = ((GrabbableObject)this).playerHeldBy; isThrown = true; allowConversion = true; isHoldingButton = buttonDown; if (!readyingItem && buttonDown && ((NetworkBehaviour)this).IsOwner) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Activating Item"); } if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Kinematic: " + isKinematicNet.Value); } readyingItem = true; if (readyItemCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(readyItemCoroutine); } readyItemCoroutine = ((MonoBehaviour)this).StartCoroutine(readyActivatedItem()); } } private IEnumerator readyActivatedItem() { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowableLandmine.readyAimArm"); } ((GrabbableObject)this).playerHeldBy.activatingItem = true; yield return (object)new WaitForSeconds(0.35f); if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowableLandmine.readyAimArm.t1"); } yield return (object)new WaitUntil((Func<bool>)(() => !isHoldingButton || !((GrabbableObject)this).isHeld)); if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowableLandmine.readyAimArm.t2"); } ThrowObject(!((GrabbableObject)this).isHeld); readyingItem = false; readyItemCoroutine = null; if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowableLandmine.readyAimArm.End"); } } public void ThrowObject(bool cancel = false) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowableLandmine.ThrowObject"); } if ((Object)(object)playerLastHeldBy == (Object)null) { return; } playerLastHeldBy.activatingItem = false; if (!cancel) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowableLandmine.ThrowObject.t1"); } ((Component)this).transform.localScale = new Vector3(1f, 1f, 1f); ((GrabbableObject)this).grabbable = false; ((GrabbableObject)this).playerHeldBy.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true); Vector3 forward = ((Component)playerLastHeldBy.gameplayCamera).transform.forward; forward += raisedAngle; PlayerControllerBExtension component = ((Component)playerLastHeldBy).gameObject.GetComponent<PlayerControllerBExtension>(); if (!((Object)(object)component == (Object)null)) { Vector3 throwVel = forward * throwForce + component.worldVelocity; ThrowObjectServerRpc(throwVel, ((Component)this).transform.position, Quaternion.identity); } } } public override void EquipItem() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) isThrown = false; updatedPos = false; base.EquipItem(); if (!overrideLCPhysics) { overrideLCPhysics = true; } ((Component)this).transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); playerLastHeldBy = ((GrabbableObject)this).playerHeldBy; hasSpawnedMine = false; allowConversion = false; if ((Object)(object)rb != (Object)null && overrideLCPhysics) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Found Rigidbody"); } rb.isKinematic = false; rb.velocity = Vector3.zero; } t = 0f; } [ServerRpc(RequireOwnership = false)] public void ThrowObjectServerRpc(Vector3 throwVel, Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2942029642u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref throwVel); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2942029642u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("Throwing on server"); } ThrowObjectClientRpc(throwVel, pos, rot); } } [ClientRpc] public void ThrowObjectClientRpc(Vector3 throwVel, Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_0121: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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_017a: 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(1032247209u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref throwVel); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1032247209u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("ThrowDir: " + ((object)(Vector3)(ref throwVel)).ToString()); } ((Component)this).transform.position = pos; ((Component)this).transform.rotation = rot; ((Component)this).transform.localScale = new Vector3(1f, 1f, 1f); ((GrabbableObject)this).grabbable = false; t = 0f; allowConversion = true; if (ConfigSettings.enableDebugging.Value) { LogHandler.Log($"Throwing dart with velocity: {throwVel} - Pos: {pos}"); } rb.AddForce(throwVel, (ForceMode)1); } } public override void DiscardItem() { //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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).playerHeldBy.activatingItem = false; Vector3 val = ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.forward; val.y = 0f; val = ((Vector3)(ref val)).normalized; Vector3 position = ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.position; ((GrabbableObject)this).DiscardItem(); allowConversion = false; Transform transform = ((Component)this).transform; transform.position += val; ((Component)this).transform.rotation = Quaternion.identity; t = 0f; } [ServerRpc(RequireOwnership = false)] public void activateServerRpc(bool enabled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2666571464u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2666571464u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { activateClientRpc(enabled); } } } [ClientRpc] public void activateClientRpc(bool enabled) { //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(1573592809u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref enabled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1573592809u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { allowConversion = enabled; } } } [ServerRpc] public void repositionServerRpc(Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(542901878u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 542901878u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((Component)this).transform.position = pos; ((Component)this).transform.rotation = rot; } } [ServerRpc] public void updateGrabbableServerRpc(bool grabbableFlag) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2497715406u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref grabbableFlag, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2497715406u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { updateGrabbableClientRpc(grabbableFlag); } } [ClientRpc] public void updateGrabbableClientRpc(bool grabbableFlag) { //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(1886816061u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref grabbableFlag, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1886816061u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((GrabbableObject)this).grabbable = grabbableFlag; } } } [ServerRpc] public void forciblyUpdateTransformServerRpc(Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Invalid comparison between Unknown and I4 //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2271369316u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2271369316u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { forciblyUpdateTransformClientRpc(pos, rot); } } [ClientRpc] public void forciblyUpdateTransformClientRpc(Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(279720723u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 279720723u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((Component)this).transform.position = pos; ((Component)this).transform.rotation = rot; } } } [ServerRpc(RequireOwnership = false)] public void replaceThrowableLandmineToLandmineServerRpc(Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2012805193u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2012805193u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("TL => L Server"); } replaceThrowableLandmineToLandmineClientRpc(pos, rot); } } [ClientRpc] public void replaceThrowableLandmineToLandmineClientRpc(Vector3 pos, Quaternion rot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) 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(384742661u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref rot); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 384742661u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("TL => L Client"); } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; FieldInfo fieldInfo = AccessTools.Field(typeof(PlayerControllerB), "currentlyGrabbingObject"); GrabbableObject val3 = (GrabbableObject)fieldInfo.GetValue(localPlayerController); if ((Object)(object)val3 != (Object)null && ((Object)val3).name == "ThrowableLandmine(Clone)" && ((Object)val3).GetInstanceID() == ((Object)this).GetInstanceID()) { localPlayerController.isGrabbingObjectAnimation = false; } if (GameNetworkManager.Instance.isHostingGame) { GameObject landmineRef = TMEUtils.landmineRef; if (!((Object)(object)landmineRef == (Object)null)) { GameObject val4 = Object.Instantiate<GameObject>(landmineRef, pos, rot); val4.GetComponent<NetworkObject>().Spawn(true); LandmineExtension componentInChildren = val4.GetComponentInChildren<LandmineExtension>(); componentInChildren.AssignCodeServerRpc(); hasSpawnedMine = true; Object.Destroy((Object)(object)((Component)((Component)this).transform).gameObject); } } } public override void Update() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: 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_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).grabbable = true; if (t < 1f) { t += Time.deltaTime; } if (((GrabbableObject)this).isHeld) { if (!overrideLCPhysics) { overrideLCPhysics = true; } } else if (t > 0.1f && !isMoving()) { if (((NetworkBehaviour)this).IsOwner && !((GrabbableObject)this).isHeld && !updatedPos) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("IsOwner: " + ((NetworkBehaviour)this).IsOwner); } updatedPos = true; forciblyUpdateTransformServerRpc(((Component)this).transform.position, ((Component)this).transform.rotation); } if (((NetworkBehaviour)this).IsOwner && isThrown && (Object)(object)playerLastHeldBy != (Object)null && playerLastHeldBy.actualClientId == GameNetworkManager.Instance.localPlayerController.actualClientId && allowConversion) { if (TMEUtils.shipState == "LANDED") { if (!hasSpawnedMine) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("create thing"); } if (ConfigSettings.enableDebugging.Value) { Vector3 position = ((Component)this).transform.position; string? text = ((object)(Vector3)(ref position)).ToString(); Quaternion rotation = ((Component)this).transform.rotation; LogHandler.Log(text + " - " + ((object)(Quaternion)(ref rotation)).ToString()); } replaceThrowableLandmineToLandmineServerRpc(((Component)this).transform.position, ((Component)this).transform.rotation); } } else { allowConversion = false; isThrown = false; } } if (((NetworkBehaviour)this).IsHost && overrideLCPhysics) { overrideLCPhysics = false; } } base.Update(); } protected override void __initializeVariables() { if (allowConversionNet == null) { throw new Exception("ThrowableLandmine.allowConversionNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)allowConversionNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)allowConversionNet, "allowConversionNet"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)allowConversionNet); if (throwDirNet == null) { throw new Exception("ThrowableLandmine.throwDirNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)throwDirNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)throwDirNet, "throwDirNet"); ((NetworkBehaviour)this).NetworkVariableFields.Add((NetworkVariableBase)(object)throwDirNet); base.__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_ThrowableLandmine() { //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 //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(2942029642u, new RpcReceiveHandler(__rpc_handler_2942029642)); NetworkManager.__rpc_func_table.Add(1032247209u, new RpcReceiveHandler(__rpc_handler_1032247209)); NetworkManager.__rpc_func_table.Add(2666571464u, new RpcReceiveHandler(__rpc_handler_2666571464)); NetworkManager.__rpc_func_table.Add(1573592809u, new RpcReceiveHandler(__rpc_handler_1573592809)); NetworkManager.__rpc_func_table.Add(542901878u, new RpcReceiveHandler(__rpc_handler_542901878)); NetworkManager.__rpc_func_table.Add(2497715406u, new RpcReceiveHandler(__rpc_handler_2497715406)); NetworkManager.__rpc_func_table.Add(1886816061u, new RpcReceiveHandler(__rpc_handler_1886816061)); NetworkManager.__rpc_func_table.Add(2271369316u, new RpcReceiveHandler(__rpc_handler_2271369316)); NetworkManager.__rpc_func_table.Add(279720723u, new RpcReceiveHandler(__rpc_handler_279720723)); NetworkManager.__rpc_func_table.Add(2012805193u, new RpcReceiveHandler(__rpc_handler_2012805193)); NetworkManager.__rpc_func_table.Add(384742661u, new RpcReceiveHandler(__rpc_handler_384742661)); } private static void __rpc_handler_2942029642(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 throwVel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref throwVel); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)1; ((ThrowableLandmine)(object)target).ThrowObjectServerRpc(throwVel, pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1032247209(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 throwVel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref throwVel); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)2; ((ThrowableLandmine)(object)target).ThrowObjectClientRpc(throwVel, pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2666571464(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enabled = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref enabled, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ThrowableLandmine)(object)target).activateServerRpc(enabled); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1573592809(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enabled = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref enabled, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((ThrowableLandmine)(object)target).activateClientRpc(enabled); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_542901878(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)1; ((ThrowableLandmine)(object)target).repositionServerRpc(pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2497715406(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { bool grabbableFlag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref grabbableFlag, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ThrowableLandmine)(object)target).updateGrabbableServerRpc(grabbableFlag); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1886816061(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool grabbableFlag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref grabbableFlag, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((ThrowableLandmine)(object)target).updateGrabbableClientRpc(grabbableFlag); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2271369316(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)1; ((ThrowableLandmine)(object)target).forciblyUpdateTransformServerRpc(pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_279720723(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)2; ((ThrowableLandmine)(object)target).forciblyUpdateTransformClientRpc(pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2012805193(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)1; ((ThrowableLandmine)(object)target).replaceThrowableLandmineToLandmineServerRpc(pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_384742661(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); Quaternion rot = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref rot); target.__rpc_exec_stage = (__RpcExecStage)2; ((ThrowableLandmine)(object)target).replaceThrowableLandmineToLandmineClientRpc(pos, rot); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "ThrowableLandmine"; } } } namespace TooManyExplosions.MonoBehaviours.Extensions { internal class LandmineExtension : NetworkBehaviour { [ServerRpc(RequireOwnership = false)] public void destroyLandmineServerRpc() { //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)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2954119581u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2954119581u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } Landmine component = ((Component)this).gameObject.GetComponent<Landmine>(); if ((Object)(object)component == (Object)null) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("LANDMINE DOES NOT EXIST"); } return; } if ((Object)(object)((NetworkBehaviour)this).NetworkObject == (Object)null) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("NetworkObject DOES NOT EXIST"); } return; } if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("LE: Destroying Landmine : SERVER"); } destroyLandmineClientRpc(); } [ClientRpc] public void destroyLandmineClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2688244454u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2688244454u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("LE: Destroying Landmine : CLIENT"); } Landmine component = ((Component)this).gameObject.GetComponent<Landmine>(); FieldInfo fieldInfo = AccessTools.Field(typeof(Landmine), "mineActivated"); fieldInfo.SetValue(component, false); if (GameNetworkManager.Instance.isHostingGame) { Vector3 position = ((Component)this).transform.parent.position; Quaternion rotation = ((Component)this).transform.parent.rotation; ((NetworkBehaviour)this).NetworkObject.Despawn(true); position.y += 0.25f; NetcodeManager.Instance.spawnLandminePropServerRpc(position, rotation); } } } [ServerRpc] public void AssignCodeServerRpc() { //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(2096302549u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2096302549u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { int idx = TMEUtils.rand.Next(RoundManager.Instance.possibleCodesForBigDoors.Length); if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("TAO: " + idx + " - " + RoundManager.Instance.possibleCodesForBigDoors.Length); } AssignCodeClientRpc(idx); } } [ClientRpc] public void AssignCodeClientRpc(int idx) { //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)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1445944106u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, idx); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1445944106u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { TerminalAccessibleObject componentInParent = ((Component)this).gameObject.GetComponentInParent<TerminalAccessibleObject>(); if (ConfigSettings.enableDebugging.Value) { LogHandler.Log("SETTING TAO"); } componentInParent.SetCodeTo(idx); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_LandmineExtension() { //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(2954119581u, new RpcReceiveHandler(__rpc_handler_2954119581)); NetworkManager.__rpc_func_table.Add(2688244454u, new RpcReceiveHandler(__rpc_handler_2688244454)); NetworkManager.__rpc_func_table.Add(2096302549u, new RpcReceiveHandler(__rpc_handler_2096302549)); NetworkManager.__rpc_func_table.Add(1445944106u, new RpcReceiveHandler(__rpc_handler_1445944106)); } private static void __rpc_handler_2954119581(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((LandmineExtension)(object)target).destroyLandmineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2688244454(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; ((LandmineExtension)(object)target).destroyLandmineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2096302549(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; ((LandmineExtension)(object)target).AssignCodeServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1445944106(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 idx = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref idx); target.__rpc_exec_stage = (__RpcExecStage)2; ((LandmineExtension)(object)target).AssignCodeClientRpc(idx); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "LandmineExtension"; } } internal class PlayerControllerBExtension : NetworkBehaviour { public bool triggeredAfterDeathExplosiveEvent = false; public bool prevGroundedState = true; public float startedFallingHeight = 0f; public Vector3 prevPos = default(Vector3); public Vector3 worldVelocity = default(Vector3); protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVaria