Decompiled source of LCPlanAssassin v2.4.2
plugins/LCPlanAssassin/LCPlanAssassin.dll
Decompiled 5 days 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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Dissonance; using GameNetcodeStuff; using HarmonyLib; using JetBrains.Annotations; using LCPlanAssassin.AssetLoader; using LCPlanAssassin.Components; using LCPlanAssassin.Items; using LCPlanAssassin.NetcodePatcher; using LCPlanAssassin.Patchers; using LCPlanAssassin.TarotCard; using LCPlanAssassin.UI; using LCPlanAssassin.Utils; using LCTarrotCard; using LCTarrotCard.Cards; using LCTarrotCard.Ressource; using ModMain; using ModMain.TarotCard; using Unity.Netcode; using UnityEngine; using UnityEngine.Video; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("LCPlanAssassin")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LCPlanAssassin")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("b3079720-2fee-4d62-88bc-c5cdf3ec47a6")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace ModMain { [BepInPlugin("LCPlanAssassin", "Plan d'assassin", "2.4.2")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ModBase : BaseUnityPlugin { public static ModBase Instance; public ManualLogSource logger; internal Harmony harmony; internal static bool hasError; public static KeyboardShortcut testKey; private void Awake() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if ((Object)(object)Instance == (Object)null) { Instance = this; harmony = new Harmony("LCPlanAssassin"); logger = Logger.CreateLogSource("LCPlanAssassin"); RPC_Init(); Assets.LoadBundles(); if (!hasError) { bool flag = false; harmony.PatchAll(); logger.LogInfo((object)"LCPlanAssassin correctly loaded"); bool flag2 = false; } } } private static void RPC_Init() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } [HarmonyPatch(typeof(TVScript))] internal class PatchTV { private static bool _hasPatched; [HarmonyPatch("Update")] [HarmonyPrefix] public static void PatchUpdate(TVScript __instance) { if (!_hasPatched) { _hasPatched = true; AudioClip[] array = (AudioClip[])(object)new AudioClip[__instance.tvAudioClips.Length + 1]; VideoClip[] array2 = (VideoClip[])(object)new VideoClip[__instance.tvClips.Length + 1]; for (int i = 0; i < __instance.tvAudioClips.Length; i++) { array[i] = __instance.tvAudioClips[i]; } for (int j = 0; j < __instance.tvClips.Length; j++) { array2[j] = __instance.tvClips[j]; } array[^1] = Assets.TintinAudio; array2[^1] = Assets.TintinClip; __instance.tvAudioClips = array; __instance.tvClips = array2; } } } [HarmonyPatch(typeof(PlayerControllerB))] internal class Test { [HarmonyPatch("Update")] [HarmonyPostfix] private static void TestPatch(PlayerControllerB __instance) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) if (!((KeyboardShortcut)(ref ModBase.testKey)).IsDown() || ((NetworkBehaviour)__instance).IsOwner) { } if (1 == 0) { GrabbableObject val = InstantiateAndReturnGrabbableObject(Assets.MicroKaquite.spawnPrefab, ((Component)__instance).transform.position); val.FallToGround(true); GrabbableObject val2 = InstantiateAndReturnGrabbableObject(Assets.VacuumItem.spawnPrefab, ((Component)__instance).transform.position); val2.FallToGround(true); } } private static GrabbableObject InstantiateAndReturnGrabbableObject(GameObject prefab, Vector3 position) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(prefab, position, Quaternion.identity); GrabbableObject component = val.GetComponent<GrabbableObject>(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; NetworkObject component2 = val.GetComponent<NetworkObject>(); component2.Spawn(false); return component; } } public static class ModConstants { public const string MOD_GUID = "LCPlanAssassin"; public const string MOD_NAME = "Plan d'assassin"; public const string MOD_VERSION = "2.4.2"; public const bool TEST_MODE = false; } } namespace ModMain.TarotCard { public class JsuisouCard : Card { public JsuisouCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.JsuiouMat; } public override Material GetCardBurn() { return Materials.BurnRed; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_0033: 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 (playerWhoDrew.isPlayerDead || !playerWhoDrew.isPlayerControlled) { return ""; } Networker.Instance.TeleportPlayerServerRpc((int)playerWhoDrew.playerClientId, GetFarthestNodeFromLocation(((Component)playerWhoDrew).transform.position, playerWhoDrew.isInsideFactory).transform.position, playerWhoDrew.isInsideFactory, false); base.cardAudio.PlayOneShot(Assets.JeSuisOuClip); return "Ah j'suis où ?"; } public override string GetCardName() { return "Je suis où"; } public static GameObject GetFarthestNodeFromLocation(Vector3 location, bool inside) { //IL_005b: 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) if (StartOfRound.Instance.currentLevel.levelID == 3) { return ((Component)StartOfRound.Instance.playerSpawnPositions[0]).gameObject; } GameObject[] array = GameObject.FindGameObjectsWithTag(inside ? "AINode" : "OutsideAINode"); GameObject result = null; float num = 0f; GameObject[] array2 = array; foreach (GameObject val in array2) { float num2 = Vector3.Distance(location, val.transform.position); if (num2 > num) { num = num2; result = val; } } return result; } } public class TheMoolCard : Card { public TheMoolCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.TheMoolMat; } public override Material GetCardBurn() { return Materials.BurnAqua; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) Networker.Instance.SpawnOysterServerRpc(((Component)playerWhoDrew).transform.position); return "J'ai eu : The Mool"; } public override string GetCardName() { return "The Mool"; } public override IEnumerator CardPullingCoroutine() { base.cardAudio.PlayOneShot(Assets.PullCardClips[Random.Range(0, Assets.PullCardClips.Count)]); yield return (object)new WaitForSeconds(1.5f); base.cardAudio.Stop(); yield return (object)new WaitForSeconds(0.7f); base.cardAudio.PlayOneShot(Assets.TheMoolClip); Renderer cardRenderer = base.cardPrefab.GetComponent<Renderer>(); Material initMat0 = cardRenderer.materials[0]; Material initMat1 = cardRenderer.materials[1]; Material initMat2 = cardRenderer.materials[2]; float delta = 0f; while (delta < 0.3f) { cardRenderer.materials[0].Lerp(initMat0, ((Card)this).GetCardBurn(), delta / 0.3f); cardRenderer.materials[1].Lerp(initMat1, ((Card)this).GetCardBurn(), delta / 0.3f); cardRenderer.materials[2].Lerp(initMat2, ((Card)this).GetCardBurn(), delta / 0.3f); delta += Time.deltaTime; yield return null; } yield return (object)new WaitForSeconds(0.2f); Vector3 initScale = base.cardPrefab.transform.localScale; float delta2 = 0f; while (delta2 < 0.3f) { base.cardPrefab.transform.localScale = initScale * (1f - Card.ControlCurve.Evaluate(delta2 / 0.3f)); delta2 += Time.deltaTime; yield return null; } base.cardPrefab.transform.localScale = Vector3.zero; } } } namespace LCPlanAssassin.Utils { [HarmonyPatch] public class Networker : NetworkBehaviour { private static GameObject _networkPrefab; public static Networker Instance { get; private set; } public override void OnNetworkSpawn() { if ((Object)(object)NetworkManager.Singleton != (Object)null && (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer)) { Networker instance = Instance; if (instance != null) { ((Component)instance).gameObject.GetComponent<NetworkObject>().Despawn(true); } } Instance = this; ((NetworkBehaviour)this).OnNetworkSpawn(); } [ServerRpc(RequireOwnership = false)] public void NScareServerRpc(int playerToScare) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1378493341u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerToScare); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1378493341u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { NScareClientRpc(playerToScare); } } } [ClientRpc] public void NScareClientRpc(int playerToScare) { //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(2896976942u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerToScare); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2896976942u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerToScare]; if (((NetworkBehaviour)val3).IsOwner && val3.isPlayerControlled && !val3.isPlayerDead) { ((MonoBehaviour)this).StartCoroutine(WaitAndScare()); } } } [ServerRpc(RequireOwnership = false)] public void SpawnOysterServerRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1766371394u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1766371394u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { GameObject val3 = Object.Instantiate<GameObject>(Assets.OysterItem.spawnPrefab, pos, Quaternion.identity); GrabbableObject component = val3.GetComponent<GrabbableObject>(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.scrapValue = 1; NetworkObject component2 = val3.GetComponent<NetworkObject>(); component2.Spawn(false); component.FallToGround(true); } } } [ServerRpc(RequireOwnership = false)] public void SpectrumServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1751953266u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1751953266u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SpectrumClientRpc(playerId, Random.Range(0, Assets.SpectrumMusics.Count)); } } } [ClientRpc] public void SpectrumClientRpc(int playerId, int clip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) 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(4180565523u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, clip); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4180565523u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (val3.isPlayerControlled && !val3.isPlayerDead) { SpectrumComponent component = ((Component)val3).GetComponent<SpectrumComponent>(); if ((Object)(object)component == (Object)null) { ((Component)val3).gameObject.AddComponent<SpectrumComponent>(); component = ((Component)val3).GetComponent<SpectrumComponent>(); } if (!component.IsPlaying()) { ((MonoBehaviour)val3).StartCoroutine(PlayingCoroutine(component, clip)); } } } private static IEnumerator PlayingCoroutine(SpectrumComponent spec, int clip) { yield return (object)new WaitForFixedUpdate(); spec.PlayMusic(clip); } private static IEnumerator WaitAndScare() { yield return (object)new WaitForSeconds(Random.Range(1f, 120f)); Assets.JumpscareObj.GetComponent<Jumpscare>()?.PlayOnScreen(); } [HarmonyPatch(typeof(StartOfRound), "Awake")] [HarmonyPostfix] private static void SpawnNetHandler() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { GameObject val = Object.Instantiate<GameObject>(_networkPrefab, Vector3.zero, Quaternion.identity); val.GetComponent<NetworkObject>().Spawn(false); } } [HarmonyPatch(typeof(GameNetworkManager), "Start")] [HarmonyPostfix] private static void Init() { if (!((Object)(object)_networkPrefab != (Object)null)) { _networkPrefab = Assets.planBundle.LoadAsset<GameObject>("Assets/PlanNetwork.prefab"); _networkPrefab.AddComponent<Networker>(); NetworkManager.Singleton.AddNetworkPrefab(_networkPrefab); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_Networker() { //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 NetworkManager.__rpc_func_table.Add(1378493341u, new RpcReceiveHandler(__rpc_handler_1378493341)); NetworkManager.__rpc_func_table.Add(2896976942u, new RpcReceiveHandler(__rpc_handler_2896976942)); NetworkManager.__rpc_func_table.Add(1766371394u, new RpcReceiveHandler(__rpc_handler_1766371394)); NetworkManager.__rpc_func_table.Add(1751953266u, new RpcReceiveHandler(__rpc_handler_1751953266)); NetworkManager.__rpc_func_table.Add(4180565523u, new RpcReceiveHandler(__rpc_handler_4180565523)); } private static void __rpc_handler_1378493341(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 playerToScare = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerToScare); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).NScareServerRpc(playerToScare); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2896976942(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 playerToScare = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerToScare); target.__rpc_exec_stage = (__RpcExecStage)2; ((Networker)(object)target).NScareClientRpc(playerToScare); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1766371394(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SpawnOysterServerRpc(pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1751953266(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((Networker)(object)target).SpectrumServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4180565523(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int clip = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clip); target.__rpc_exec_stage = (__RpcExecStage)2; ((Networker)(object)target).SpectrumClientRpc(playerId, clip); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Networker"; } } public enum Planet { EXPERIMENTATION, ASSURANCE, VOW, GORDION, MARCH, ADAMANCE, REND, DINE, OFFENSE, TITAN, ARTIFICE, LIQUIDATION, EMBRION } public class SpawnRarity { private readonly Dictionary<Planet, int> rarities = new Dictionary<Planet, int>(); private readonly Item item; private int defaultValue; public SpawnRarity(int baseValue, Item itemIn) { item = itemIn; defaultValue = baseValue; foreach (Planet value in Enum.GetValues(typeof(Planet))) { rarities.Add(value, baseValue); } } public int GetRarityFor(Planet planet) { return rarities[planet]; } public int GetRarityFor(int planet) { return rarities.Values.ToList()[planet]; } public void SetValues(int experimentation = -1, int assurance = -1, int vow = -1, int march = -1, int offense = -1, int adamance = -1, int rend = -1, int dine = -1, int titan = -1, int artifice = -1, int embrion = -1) { rarities[Planet.EXPERIMENTATION] = experimentation; rarities[Planet.ASSURANCE] = assurance; rarities[Planet.VOW] = vow; rarities[Planet.MARCH] = march; rarities[Planet.OFFENSE] = offense; rarities[Planet.ADAMANCE] = adamance; rarities[Planet.REND] = rend; rarities[Planet.DINE] = dine; rarities[Planet.TITAN] = titan; rarities[Planet.ARTIFICE] = artifice; rarities[Planet.EMBRION] = embrion; } public void CopyRaritiesFrom(SpawnRarity other) { rarities[Planet.EXPERIMENTATION] = other.rarities[Planet.EXPERIMENTATION]; rarities[Planet.ASSURANCE] = other.rarities[Planet.ASSURANCE]; rarities[Planet.VOW] = other.rarities[Planet.VOW]; rarities[Planet.MARCH] = other.rarities[Planet.MARCH]; rarities[Planet.OFFENSE] = other.rarities[Planet.OFFENSE]; rarities[Planet.ADAMANCE] = other.rarities[Planet.ADAMANCE]; rarities[Planet.REND] = other.rarities[Planet.REND]; rarities[Planet.DINE] = other.rarities[Planet.DINE]; rarities[Planet.TITAN] = other.rarities[Planet.TITAN]; rarities[Planet.ARTIFICE] = other.rarities[Planet.ARTIFICE]; rarities[Planet.EMBRION] = other.rarities[Planet.EMBRION]; } public SpawnableItemWithRarity GetSpawnableItemForPlanet(Planet planet) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown return new SpawnableItemWithRarity { spawnableItem = item, rarity = AccessRaritySafe((int)planet) }; } public SpawnableItemWithRarity GetSpawnableItemForPlanet(int planet) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown return new SpawnableItemWithRarity { spawnableItem = item, rarity = AccessRaritySafe(planet) }; } private int AccessRaritySafe(int planet) { try { return rarities.Values.ToList()[planet]; } catch (Exception) { } return defaultValue; } public void ApplySpawnRarity(SelectableLevel level) { level.spawnableScrap.Add(GetSpawnableItemForPlanet(level.levelID)); } } public static class PlayerDistortionManager { [CanBeNull] public static AudioDistortionFilter GetFilterForPlayer(PlayerControllerB player) { if (!Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource) && !RefreshDistortionFilter(player)) { return null; } if ((Object)(object)player.currentVoiceChatAudioSource == (Object)null) { return null; } AudioDistortionFilter component = ((Component)player.currentVoiceChatAudioSource).GetComponent<AudioDistortionFilter>(); if (Object.op_Implicit((Object)(object)component)) { return component; } if (!RefreshDistortionFilter(player)) { return null; } return ((Component)player.currentVoiceChatAudioSource).GetComponent<AudioDistortionFilter>(); } private static bool RefreshDistortionFilter(PlayerControllerB player) { if (!Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource)) { StartOfRound.Instance.RefreshPlayerVoicePlaybackObjects(); } if (!Object.op_Implicit((Object)(object)player.currentVoiceChatAudioSource)) { return false; } AudioDistortionFilter val = ((Component)player.currentVoiceChatAudioSource).GetComponent<AudioDistortionFilter>(); if (!Object.op_Implicit((Object)(object)val)) { val = ((Component)player.currentVoiceChatAudioSource).gameObject.AddComponent<AudioDistortionFilter>(); if (Object.op_Implicit((Object)(object)val)) { val.distortionLevel = 0f; } } return Object.op_Implicit((Object)(object)val); } } } namespace LCPlanAssassin.UI { public class Jumpscare : MonoBehaviour { private bool isCurrentlyActive; private GameObject videoElement; private VideoPlayer player; private void Start() { videoElement = ((Component)((Component)this).transform.GetChild(0)).gameObject; videoElement.SetActive(false); player = ((Component)this).gameObject.GetComponent<VideoPlayer>(); player.SetTargetAudioSource((ushort)0, ((Component)this).gameObject.GetComponent<AudioSource>()); } public void PlayOnScreen() { if (!isCurrentlyActive) { ((MonoBehaviour)this).StartCoroutine(Scare()); } } private IEnumerator Scare() { isCurrentlyActive = true; VideoClip clip = Assets.NClips[Random.Range(0, Assets.NClips.Count)]; float clipTime = (float)clip.length; player.clip = clip; player.Play(); videoElement.SetActive(true); yield return (object)new WaitForSeconds(clipTime); videoElement.SetActive(false); player.Stop(); isCurrentlyActive = false; } } } namespace LCPlanAssassin.TarotCard { public class NWordCard : Card { public NWordCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.NWordMat; } public override Material GetCardBurn() { return Assets.OrangeBurn; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { List<int> list = new List<int>(); for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; if (!val.isPlayerDead && val.isPlayerControlled) { list.Add(i); } } if (list.Count == 0) { ModBase.Instance.logger.LogDebug((object)"No players to scare"); return ""; } PlayerControllerB val2 = StartOfRound.Instance.allPlayerScripts[list[Random.Range(0, list.Count)]]; ModBase.Instance.logger.LogDebug((object)("Chose player : " + val2.playerUsername)); Networker.Instance.NScareServerRpc((int)val2.playerClientId); return "What can I say except..."; } public override string GetCardName() { return "The N Word"; } } public class SpectrumCard : Card { public SpectrumCard(GameObject cardPrefab, AudioSource audioSource) : base(cardPrefab, audioSource) { } public override Material GetCardMaterial() { return Assets.SpectrumMat; } public override Material GetCardBurn() { return Materials.BurnPurple; } public override string ExecuteEffect(PlayerControllerB playerWhoDrew) { if (!playerWhoDrew.isPlayerControlled || playerWhoDrew.isPlayerDead) { return ""; } SpectrumComponent component = ((Component)playerWhoDrew).GetComponent<SpectrumComponent>(); if ((Object)(object)component != (Object)null && component.IsPlaying()) { return "C'est pas assez pour toi ?"; } Networker.Instance.SpectrumServerRpc((int)playerWhoDrew.playerClientId); return "Tududu du tududu du"; } public override string GetCardName() { return "Spectrum"; } } } namespace LCPlanAssassin.Patchers { [HarmonyPatch(typeof(ItemDropship))] public class ItemDropshipPatch { private static readonly List<Item> itemToDeliver = new List<Item>(); private static readonly List<Item> itemInDelivery = new List<Item>(); [HarmonyPatch("OpenShipDoorsOnServer")] [HarmonyPrefix] private static void OpenDoorPatch(ItemDropship __instance) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < itemInDelivery.Count; i++) { GameObject val = Object.Instantiate<GameObject>(itemInDelivery[i].spawnPrefab, __instance.itemSpawnPositions[i % 4].position, Quaternion.identity); val.GetComponent<GrabbableObject>().fallTime = 0f; val.GetComponent<NetworkObject>().Spawn(true); } itemInDelivery.Clear(); } [HarmonyPatch("Update")] [HarmonyPrefix] private static void UpdatePatch(ItemDropship __instance, ref Terminal ___terminalScript, ref StartOfRound ___playersManager) { if (((NetworkBehaviour)__instance).IsServer && !__instance.deliveringOrder && ___terminalScript.orderedItemsFromTerminal.Count <= 0 && ___playersManager.shipHasLanded && itemToDeliver.Count > 0) { if (__instance.shipTimer > 40f) { prv_LandShipOnServer(__instance); } __instance.shipTimer += Time.deltaTime; } } private static void prv_LandShipOnServer(ItemDropship drop) { drop.shipTimer = 0f; itemInDelivery.Clear(); itemInDelivery.AddRange(itemToDeliver); itemToDeliver.Clear(); drop.playersFirstOrder = false; drop.deliveringOrder = true; drop.LandShipClientRpc(); } public static void DeliverItemServer(Item item) { itemToDeliver.Add(item); } } [HarmonyPatch(typeof(PlayerControllerB))] public class PlayerControllerBPatch { public static readonly Dictionary<ulong, float> SausageDict = new Dictionary<ulong, float>(); public static readonly Dictionary<ulong, float> CamUpDict = new Dictionary<ulong, float>(); [HarmonyPatch("Update")] [HarmonyPrefix] internal static void ModifySpeed(PlayerControllerB __instance, ref float ___cameraUp) { if (CamUpDict.ContainsKey(__instance.playerClientId)) { float num = CamUpDict[__instance.playerClientId]; if (Mathf.Abs(num) > 0.1f) { ___cameraUp += num; CamUpDict.Remove(__instance.playerClientId); } } if (SausageDict.TryGetValue(__instance.playerClientId, out var value)) { float num2 = Time.time - value; if (num2 >= 40f) { SausageDict.Remove(__instance.playerClientId); __instance.movementSpeed = 4.6f; } else { __instance.movementSpeed = 6.3f; } } } } [HarmonyPatch(typeof(Terminal))] public class TerminalPatch { [HarmonyPatch("Update")] [HarmonyPostfix] private static void UpdatePatch(Terminal __instance) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController != (Object)null) || !((Object)(object)((Component)localPlayerController).GetComponent<LowQComponent>() == (Object)null)) { LowQComponent component = ((Component)localPlayerController).GetComponent<LowQComponent>(); if (!((Object)(object)component.lowQTexture == (Object)null) && component.IsLowQ() && !((Object)(object)HUDManager.Instance == (Object)null) && !((Object)(object)HUDManager.Instance.playerScreenTexture == (Object)null) && !((Object)(object)HUDManager.Instance.playerScreenTexture.texture == (Object)null) && !((Object)(object)localPlayerController.gameplayCamera == (Object)null) && !((Object)(object)localPlayerController.gameplayCamera.targetTexture == (Object)null)) { HUDManager.Instance.playerScreenTexture.texture = (Texture)(object)component.lowQTexture; localPlayerController.gameplayCamera.targetTexture = component.lowQTexture; } } } } } namespace LCPlanAssassin.Items { public class AspiBehaviour : NoisemakerProp { private AudioSource itemAudio; private AudioSource loopSource; private Transform suckPoint; private bool isOn; private float lastUse; private float suckForce = 6f; private float suckRange = 5f; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); AudioDistortionFilter val = ((Component)itemAudio).gameObject.AddComponent<AudioDistortionFilter>(); val.distortionLevel = 0.6f; loopSource = ((Component)this).gameObject.AddComponent<AudioSource>(); loopSource.volume = 1f; loopSource.spatialBlend = 1f; loopSource.dopplerLevel = 0.45f; loopSource.spread = 45f; loopSource.rolloffMode = (AudioRolloffMode)1; loopSource.minDistance = 3f; loopSource.maxDistance = 60f; loopSource.loop = true; loopSource.clip = Assets.VacuumLoopClip; suckPoint = ((Component)this).gameObject.transform.GetChild(2); } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && !(Time.time - lastUse < 5f)) { lastUse = Time.time; UseItemServerRpc(); } } public override void Update() { //IL_0094: 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_00c3: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = ((!(Time.time - lastUse >= 5f)) ? 10 : 0); if (!((NetworkBehaviour)this).IsOwner || !isOn) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (Object.op_Implicit((Object)(object)val) && !val.isPlayerDead && val.isPlayerControlled && !((Object)(object)val == (Object)(object)((GrabbableObject)this).playerHeldBy)) { float num = Vector3.Distance(((Component)val).transform.position, suckPoint.position); if (!(num > suckRange)) { Vector3 val2 = suckPoint.position - ((Component)val).transform.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; normalized *= suckForce * (1f - num / suckRange); val.externalForces += normalized; } } } } private IEnumerator StartVacuumCoroutine() { if (!isOn) { isOn = true; itemAudio.PlayOneShot(Assets.VacuumStartClip); yield return (object)new WaitForSeconds(Assets.VacuumStartClip.length - 0.2f); loopSource.Play(); loopSource.volume = 0f; float deltaTime = 0f; while (deltaTime < 0.2f) { loopSource.volume = deltaTime / 0.2f; deltaTime += Time.deltaTime; yield return null; } loopSource.volume = 1f; } } private IEnumerator StopVacuumCoroutine() { if (isOn) { isOn = false; itemAudio.volume = 0.5f; itemAudio.PlayOneShot(Assets.VacuumEndClip); loopSource.volume = 1f; float deltaTime = 0f; while (deltaTime < 0.25f) { loopSource.volume = 1f - deltaTime / 0.25f; itemAudio.volume = Mathf.Lerp(0.5f, 1f, deltaTime / 0.25f); deltaTime += Time.deltaTime; yield return null; } loopSource.Stop(); loopSource.volume = 1f; itemAudio.volume = 1f; } } [ServerRpc(RequireOwnership = false)] private void UseItemServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2950870372u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2950870372u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SetStateClientRpc(!isOn); } } } [ClientRpc] private void SetStateClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3699694096u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3699694096u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { if (state) { ((MonoBehaviour)this).StartCoroutine(StartVacuumCoroutine()); } else { ((MonoBehaviour)this).StartCoroutine(StopVacuumCoroutine()); } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_AspiBehaviour() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(2950870372u, new RpcReceiveHandler(__rpc_handler_2950870372)); NetworkManager.__rpc_func_table.Add(3699694096u, new RpcReceiveHandler(__rpc_handler_3699694096)); } private static void __rpc_handler_2950870372(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; ((AspiBehaviour)(object)target).UseItemServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3699694096(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 stateClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref stateClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)2; ((AspiBehaviour)(object)target).SetStateClientRpc(stateClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AspiBehaviour"; } } public class CasqueBehaviour : NoisemakerProp { private AudioSource itemAudio; private float lastTimeUsed; private AudioDistortionFilter distortionFilter; private float breakChance = 5f; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); distortionFilter = ((Component)this).gameObject.AddComponent<AudioDistortionFilter>(); distortionFilter.distortionLevel = 0.8f; } public override void ItemActivate(bool used, bool buttonDown = true) { if (!buttonDown || !((NetworkBehaviour)this).IsOwner || !(Time.time - lastTimeUsed >= 3f) || ((GrabbableObject)this).deactivated) { return; } float num = Random.Range(0f, 100f); if (num <= breakChance && StartOfRound.Instance.shipHasLanded) { BreakServerRpc(); if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null) { ItemDropServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } } else { lastTimeUsed = Time.time; PlayRandomSoundServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = ((!(Time.time - lastTimeUsed >= 3f)) ? 10 : 0); } public override void GrabItem() { if (!((GrabbableObject)this).deactivated && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { ItemGrabServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } ((GrabbableObject)this).GrabItem(); } public override void DiscardItem() { if (!((GrabbableObject)this).deactivated && ((NetworkBehaviour)this).IsOwner && Object.op_Implicit((Object)(object)((GrabbableObject)this).playerHeldBy)) { ItemDropServerRpc(((GrabbableObject)this).playerHeldBy.playerClientId); } ((GrabbableObject)this).DiscardItem(); } public void PlaySoundLocal(int soundId) { itemAudio.PlayOneShot(Assets.KaquiteClips[soundId]); } private bool IsAnyCasqueInInventory(PlayerControllerB player, bool grab) { return player.ItemSlots.Any((GrabbableObject item) => item is CasqueBehaviour && ((Object)(object)item != (Object)(object)this || grab)); } public void ItemGrabLocal(ulong playerWhoGrabbed) { if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerWhoGrabbed) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerClientId == playerWhoGrabbed) { if (IsAnyCasqueInInventory(val, grab: true)) { SetPlayerDistortion(val, 0.96f); } else { SetPlayerDistortion(val, 0f); } } } } public void ItemDropLocal(ulong playerWhoDropped) { if (GameNetworkManager.Instance.localPlayerController.playerClientId == playerWhoDropped) { return; } PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerClientId == playerWhoDropped) { if (IsAnyCasqueInInventory(val, grab: false)) { SetPlayerDistortion(val, 0.96f); } else { SetPlayerDistortion(val, 0f); } } } } private void SetPlayerDistortion(PlayerControllerB player, float distortionLevel) { AudioDistortionFilter filterForPlayer = PlayerDistortionManager.GetFilterForPlayer(player); if (Object.op_Implicit((Object)(object)filterForPlayer)) { filterForPlayer.distortionLevel = distortionLevel; } } [ServerRpc(RequireOwnership = false)] public void PlayRandomSoundServerRpc() { //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_00c7: 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(3032412797u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3032412797u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 25f, 0.9f, 0, false, 0); int soundId = Random.Range(0, Assets.KaquiteClips.Count); if (!((NetworkBehaviour)this).IsHost) { PlaySoundLocal(soundId); } PlaySoundClientRpc(soundId); } } [ClientRpc] public void PlaySoundClientRpc(int soundId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1612812337u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, soundId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1612812337u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { PlaySoundLocal(soundId); } } } [ServerRpc(RequireOwnership = false)] public void ItemGrabServerRpc(ulong playerWhoGrabbed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3726082168u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoGrabbed); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3726082168u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (!((NetworkBehaviour)this).IsHost) { ItemGrabLocal(playerWhoGrabbed); } ItemGrabClientRpc(playerWhoGrabbed); } } [ClientRpc] public void ItemGrabClientRpc(ulong playerWhoGrabbed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1583903099u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoGrabbed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1583903099u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ItemGrabLocal(playerWhoGrabbed); } } } [ServerRpc(RequireOwnership = false)] public void ItemDropServerRpc(ulong playerWhoDropped) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1507338783u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoDropped); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1507338783u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (!((NetworkBehaviour)this).IsHost) { ItemDropLocal(playerWhoDropped); } ItemDropClientRpc(playerWhoDropped); } } [ClientRpc] public void ItemDropClientRpc(ulong playerWhoDropped) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3140763079u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerWhoDropped); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3140763079u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ItemDropLocal(playerWhoDropped); } } } private void SpawnItem(Item item, Vector3 deltaPos) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(item.spawnPrefab, ((Component)this).transform.position + deltaPos, Quaternion.identity); GrabbableObject component = val.GetComponent<GrabbableObject>(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; NetworkObject component2 = val.GetComponent<NetworkObject>(); component2.Spawn(false); component.FallToGround(true); component.SetScrapValue(((GrabbableObject)this).scrapValue / 2); } [ServerRpc(RequireOwnership = false)] public void BreakServerRpc() { //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_0131: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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(1848940189u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1848940189u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { Vector3 val3 = default(Vector3); ((Vector3)(ref val3))..ctor(0.25f, 0f, 0f); if ((Object)(object)((GrabbableObject)this).playerHeldBy != (Object)null && !((GrabbableObject)this).playerHeldBy.isPlayerDead && ((GrabbableObject)this).playerHeldBy.isPlayerControlled) { val3 = ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.right; ((Vector3)(ref val3)).Normalize(); val3 *= 0.25f; } SpawnItem(Assets.LeftHeadsetItem, val3); SpawnItem(Assets.RightHeadsetItem, -val3); BreakClientRpc(); } } [ClientRpc] public void BreakClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(301355523u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 301355523u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { ((GrabbableObject)this).deactivated = true; itemAudio.Stop(); ((GrabbableObject)this).DestroyObjectInHand(((GrabbableObject)this).playerHeldBy); } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_CasqueBehaviour() { //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 NetworkManager.__rpc_func_table.Add(3032412797u, new RpcReceiveHandler(__rpc_handler_3032412797)); NetworkManager.__rpc_func_table.Add(1612812337u, new RpcReceiveHandler(__rpc_handler_1612812337)); NetworkManager.__rpc_func_table.Add(3726082168u, new RpcReceiveHandler(__rpc_handler_3726082168)); NetworkManager.__rpc_func_table.Add(1583903099u, new RpcReceiveHandler(__rpc_handler_1583903099)); NetworkManager.__rpc_func_table.Add(1507338783u, new RpcReceiveHandler(__rpc_handler_1507338783)); NetworkManager.__rpc_func_table.Add(3140763079u, new RpcReceiveHandler(__rpc_handler_3140763079)); NetworkManager.__rpc_func_table.Add(1848940189u, new RpcReceiveHandler(__rpc_handler_1848940189)); NetworkManager.__rpc_func_table.Add(301355523u, new RpcReceiveHandler(__rpc_handler_301355523)); } private static void __rpc_handler_3032412797(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; ((CasqueBehaviour)(object)target).PlayRandomSoundServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1612812337(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 soundId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref soundId); target.__rpc_exec_stage = (__RpcExecStage)2; ((CasqueBehaviour)(object)target).PlaySoundClientRpc(soundId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3726082168(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) { ulong playerWhoGrabbed = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemGrabServerRpc(playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1583903099(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) { ulong playerWhoGrabbed = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)2; ((CasqueBehaviour)(object)target).ItemGrabClientRpc(playerWhoGrabbed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1507338783(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) { ulong playerWhoDropped = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)1; ((CasqueBehaviour)(object)target).ItemDropServerRpc(playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3140763079(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) { ulong playerWhoDropped = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)2; ((CasqueBehaviour)(object)target).ItemDropClientRpc(playerWhoDropped); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1848940189(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; ((CasqueBehaviour)(object)target).BreakServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_301355523(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; ((CasqueBehaviour)(object)target).BreakClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "CasqueBehaviour"; } } public class HandBehaviour : NoisemakerProp { public static AudioClip RiseSfx; public static AudioClip FunnySfx; public static AudioClip DownSfx; private AudioSource itemAudio; private Animator animator; private bool raised; private bool doFunny; private float activationTime; private static readonly int IsGoingUp = Animator.StringToHash("isGoingUp"); private static readonly int DoFunny = Animator.StringToHash("doFunny"); public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); animator = ((Component)this).gameObject.GetComponentInChildren<Animator>(); activationTime = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (!((NetworkBehaviour)this).IsOwner || !buttonDown || !(Time.time - activationTime >= 3f)) { return; } activationTime = Time.time; if (!raised) { raised = true; RaiseServerRpc(); } else if (Random.Range(0, 2) == 0) { if (!doFunny) { doFunny = true; FunnyServerRpc(); } } else { raised = false; DownServerRpc(); } } public override void Update() { ((GrabbableObject)this).Update(); ((GrabbableObject)this).useCooldown = ((!(Time.time - activationTime >= 3f)) ? 10 : 0); } public void RaiseLocal() { raised = true; itemAudio.PlayOneShot(RiseSfx, 0.5f); animator.SetBool(IsGoingUp, true); } public void DoFunnyLocal() { doFunny = true; itemAudio.PlayOneShot(FunnySfx, 0.5f); animator.SetBool(DoFunny, true); ((MonoBehaviour)this).StartCoroutine(FunnyCoroutine()); } private IEnumerator FunnyCoroutine() { yield return null; yield return (object)new WaitForSeconds(1f); doFunny = false; animator.SetBool(DoFunny, false); } public void DownLocal() { if (doFunny) { doFunny = false; animator.SetBool(DoFunny, false); } raised = false; itemAudio.PlayOneShot(DownSfx, 0.5f); animator.SetBool(IsGoingUp, false); } [ServerRpc(RequireOwnership = false)] public void RaiseServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3596734070u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3596734070u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RaiseClientRpc(); } } } [ClientRpc] public void RaiseClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3694110718u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3694110718u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { RaiseLocal(); } } } [ServerRpc(RequireOwnership = false)] public void FunnyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2903330174u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2903330174u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { FunnyClientRpc(); } } } [ClientRpc] public void FunnyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1174699336u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1174699336u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { DoFunnyLocal(); } } } [ServerRpc(RequireOwnership = false)] public void DownServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(472768968u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 472768968u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { DownClientRpc(); } } } [ClientRpc] public void DownClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2512040063u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2512040063u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { DownLocal(); } } } protected override void __initializeVariables() { ((NoisemakerProp)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_HandBehaviour() { //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 NetworkManager.__rpc_func_table.Add(3596734070u, new RpcReceiveHandler(__rpc_handler_3596734070)); NetworkManager.__rpc_func_table.Add(3694110718u, new RpcReceiveHandler(__rpc_handler_3694110718)); NetworkManager.__rpc_func_table.Add(2903330174u, new RpcReceiveHandler(__rpc_handler_2903330174)); NetworkManager.__rpc_func_table.Add(1174699336u, new RpcReceiveHandler(__rpc_handler_1174699336)); NetworkManager.__rpc_func_table.Add(472768968u, new RpcReceiveHandler(__rpc_handler_472768968)); NetworkManager.__rpc_func_table.Add(2512040063u, new RpcReceiveHandler(__rpc_handler_2512040063)); } private static void __rpc_handler_3596734070(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; ((HandBehaviour)(object)target).RaiseServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3694110718(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; ((HandBehaviour)(object)target).RaiseClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2903330174(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; ((HandBehaviour)(object)target).FunnyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1174699336(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; ((HandBehaviour)(object)target).FunnyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_472768968(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; ((HandBehaviour)(object)target).DownServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2512040063(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; ((HandBehaviour)(object)target).DownClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "HandBehaviour"; } } public class KakahuetBehaviour : PhysicsProp { private AnimationCurve fallCurve; private AnimationCurve verticalFallCurveNoBounce; private AnimationCurve verticalFallCurve; public void Awake() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Expected O, but got Unknown fallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.5f), new Keyframe(1f, 1f, 0f, 0f, 0.5f, 0f) }); verticalFallCurveNoBounce = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, 0f, 0.2f, 1f), new Keyframe(1f, 1f) }); verticalFallCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[4] { new Keyframe(0f, 0f, 2f, 2f, 0f, 0.3f), new Keyframe(0.5f, 1f, 2f, -2f, 0.3f, 0.3f), new Keyframe(0.75f, 1f, 2f, -2f, 0.1f, 0.1f), new Keyframe(1f, 1f, 2f, 0f, 0.05f, 0f) }); } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (((NetworkBehaviour)this).IsOwner) { ((GrabbableObject)this).playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetThrowDestination(), true); } } public override void FallWithCurve() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((GrabbableObject)this).startFallingPosition - ((GrabbableObject)this).targetFloorPosition; float magnitude = ((Vector3)(ref val)).magnitude; ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, Quaternion.Euler(((GrabbableObject)this).itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, ((GrabbableObject)this).itemProperties.restingRotation.z), 14f * Time.deltaTime / magnitude); ((Component)this).transform.localPosition = Vector3.Lerp(((GrabbableObject)this).startFallingPosition, ((GrabbableObject)this).targetFloorPosition, fallCurve.Evaluate(((GrabbableObject)this).fallTime)); if (magnitude > 5f) { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).targetFloorPosition.y, ((Component)this).transform.localPosition.z), verticalFallCurveNoBounce.Evaluate(((GrabbableObject)this).fallTime)); } else { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).targetFloorPosition.y, ((Component)this).transform.localPosition.z), verticalFallCurve.Evaluate(((GrabbableObject)this).fallTime)); } ((GrabbableObject)this).fallTime = ((GrabbableObject)this).fallTime + Mathf.Abs(Time.deltaTime * 12f / magnitude); } private Vector3 GetThrowDestination() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.position, ((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform.forward); RaycastHit val2 = default(RaycastHit); Vector3 val3 = ((!Physics.Raycast(val, ref val2, 12f, 268437761, (QueryTriggerInteraction)1)) ? ((Ray)(ref val)).GetPoint(10f) : ((Ray)(ref val)).GetPoint(((RaycastHit)(ref val2)).distance - 0.05f)); Debug.DrawRay(val3, Vector3.down, Color.blue, 15f); ((Ray)(ref val))..ctor(val3, Vector3.down); if (Physics.Raycast(val, ref val2, 30f, 268437761, (QueryTriggerInteraction)1)) { return ((RaycastHit)(ref val2)).point + Vector3.up * 0.05f; } return ((Ray)(ref val)).GetPoint(30f); } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected internal override string __getTypeName() { return "KakahuetBehaviour"; } } public class KeyboardBehaviour : NoisemakerProp { private AudioSource itemAudio; private float lastUse; private float lastEmit; public override void Start() { ((NoisemakerProp)this).Start(); itemAudio = ((Component)this).gameObject.GetComponent<AudioSource>(); lastUse = Time.time; lastEmit = Time.time; } public override void ItemActivate(bool used, bool buttonDown = true) { if (((NetworkBehaviour)this).IsOwner && buttonDown && Time.time - lastUse > 5f) { lastUse = Time.time; UseServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void UseServerRpc() { //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_00c7: 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(1881184228u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1881184228u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 40f, 0.85f, 0, false, 0); int indexClip = Random.Range(0