Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of SpectreLib v1.1.0
BepInEx/plugins/UhhSomething.dll
Decompiled 2 weeks 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.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using Dawn; using DigitalRuby.ThunderAndLightning; using DunGen; using DunGen.Tags; using Dusk; using GameNetcodeStuff; using Microsoft.CodeAnalysis; using Spectre.Enemy; using Spectre.Items; using Spectre.Misc; using Spectre.Scriptable; using UhhSomething.NetcodePatcher; using Unity.Mathematics; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations.Rigging; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Rendering.HighDefinition; using UnityEngine.VFX; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("DunGen")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.ASPP")] [assembly: IgnoresAccessChecksTo("DunGen.Integration.UnityNav")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.XR.CoreUtils")] [assembly: IgnoresAccessChecksTo("Unity.XR.Management")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.ConformanceAutomation")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MetaQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.MockRuntime")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.OculusQuestSupport")] [assembly: IgnoresAccessChecksTo("Unity.XR.OpenXR.Features.RuntimeDebugger")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.SpatialTracking")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: IgnoresAccessChecksTo("UnityEngine.XR.LegacyInputHelpers")] [assembly: AssemblyCompany("UhhSomething")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("UhhSomething")] [assembly: AssemblyTitle("UhhSomething")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public enum SuperMechFireMode { Regular, Burst, ConstantUponLOS } public enum SuperMissileTravelMode { Warble, Curve, Hoaming, Heavy } public class GunShellItem : GrabbableObject { public int ammoType; protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { ((GrabbableObject)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GunShellItem"; } } public class JetWingsItem : GrabbableObject { public bool streamlineJetpack; public Transform backPart; public Vector3 backPartRotationOffset; public Vector3 backPartPositionOffset; private float jetpackPower; private bool jetpackActivated; private Vector3 forces; private bool jetpackActivatedPreviousFrame; public GameObject fireEffect; public AudioSource jetpackAudio; public AudioSource jetpackBeepsAudio; public AudioClip startJetpackSFX; public AudioClip jetpackSustainSFX; public AudioClip jetpackBrokenSFX; public AudioClip jetpackWarningBeepSFX; public AudioClip jetpackLowBatteriesSFX; public ParticleSystem smokeTrailParticle; private PlayerControllerB previousPlayerHeldBy; private bool jetpackBroken; private bool jetpackPlayingWarningBeep; private bool jetpackPlayingLowBatteryBeep; private float noiseInterval; private RaycastHit rayHit; public float jetpackAcceleration = 25f; public float jetpackDeaccelleration = 30f; public float jetpackForceChangeSpeed = 50f; public float verticalMultiplier = 0.35f; public AudioClip applause; public ChainIKConstraint cordRig; public CauseOfDeath causeOfdeath = (CauseOfDeath)2; public float jetpackMaxAccel = 500f; public float jetpackMaxDeaccel = 1000f; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { ActivateJetpack(); } else { DeactivateJetpack(); } } private void DeactivateJetpack() { if (previousPlayerHeldBy.jetpackControls) { previousPlayerHeldBy.disablingJetpackControls = true; } jetpackActivated = false; jetpackActivatedPreviousFrame = false; jetpackPlayingLowBatteryBeep = false; jetpackPlayingWarningBeep = false; jetpackBeepsAudio.Stop(); jetpackAudio.Stop(); smokeTrailParticle.Stop(true, (ParticleSystemStopBehavior)1); if (!jetpackBroken) { JetpackEffect(enable: false); } } private void ActivateJetpack() { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (streamlineJetpack) { if (Vector3.Distance(((Component)base.playerHeldBy).transform.position, StartOfRound.Instance.elevatorTransform.position) < 40f) { EntranceTeleport[] array = Object.FindObjectsOfType<EntranceTeleport>(); for (int i = 0; i < array.Length; i++) { if (array[i].entranceId == 0 && array[i].isEntranceToBuilding) { base.playerHeldBy.TeleportPlayer(array[i].entrancePoint.position, false, 0f, false, true); base.playerHeldBy.SetAllItemsInElevator(false, false); base.playerHeldBy.isInElevator = false; base.playerHeldBy.isInHangarShipRoom = false; AudioReverbPresets val = Object.FindObjectOfType<AudioReverbPresets>(); if ((Object)(object)val != (Object)null) { val.audioPresets[2].ChangeAudioReverbForPlayer(base.playerHeldBy); } } } } else { base.playerHeldBy.TeleportPlayer(StartOfRound.Instance.outsideShipSpawnPosition.position, false, 0f, false, true); base.playerHeldBy.SetAllItemsInElevator(false, true); base.playerHeldBy.isInElevator = true; base.playerHeldBy.isInsideFactory = false; AudioReverbPresets val2 = Object.FindObjectOfType<AudioReverbPresets>(); if ((Object)(object)val2 != (Object)null) { val2.audioPresets[3].ChangeAudioReverbForPlayer(base.playerHeldBy); } } if ((Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { SoundManager.Instance.misc2DAudio.volume = 1f; SoundManager.Instance.misc2DAudio.PlayOneShot(applause); } } if (jetpackBroken) { jetpackAudio.PlayOneShot(jetpackBrokenSFX); return; } if (!jetpackActivatedPreviousFrame) { base.playerHeldBy.jetpackTurnCompass.rotation = ((Component)base.playerHeldBy).transform.rotation; JetpackEffect(enable: true); jetpackActivatedPreviousFrame = true; } base.playerHeldBy.disablingJetpackControls = false; base.playerHeldBy.jetpackControls = true; jetpackActivated = true; base.playerHeldBy.syncFullRotation = ((Component)base.playerHeldBy).transform.eulerAngles; } private void JetpackEffect(bool enable) { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) if (streamlineJetpack) { return; } fireEffect.SetActive(enable); if (enable) { if (!jetpackActivatedPreviousFrame) { jetpackAudio.PlayOneShot(startJetpackSFX); } smokeTrailParticle.Play(); jetpackAudio.clip = jetpackSustainSFX; jetpackAudio.Play(); Debug.Log((object)$"Is jetpack audio playing?: {jetpackAudio.isPlaying}"); } else { smokeTrailParticle.Stop(true, (ParticleSystemStopBehavior)1); jetpackAudio.Stop(); } if (Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) < 10f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } } public override void UseUpBatteries() { DeactivateJetpack(); } public override void DiscardItem() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)$"Owner of jetpack?: {((NetworkBehaviour)this).IsOwner}"); Debug.Log((object)$"Is dead?: {base.playerHeldBy.isPlayerDead}"); if (((NetworkBehaviour)this).IsOwner && base.playerHeldBy.isPlayerDead && !jetpackBroken && base.playerHeldBy.jetpackControls) { ExplodeJetpackServerRpc(); } JetpackEffect(enable: false); DeactivateJetpack(); jetpackPower = 0f; backPart.localPosition = Vector3.zero; backPart.localEulerAngles = Vector3.zero; ((RigConstraint<ChainIKConstraintJob, ChainIKConstraintData, ChainIKConstraintJobBinder<ChainIKConstraintData>>)(object)cordRig).weight = 0f; ((GrabbableObject)this).DiscardItem(); } [ServerRpc(RequireOwnership = false)] public void ExplodeJetpackServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3107096448u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3107096448u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ExplodeJetpackClientRpc(); } } } [ClientRpc] public void ExplodeJetpackClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(97138363u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 97138363u, val2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!jetpackBroken) { jetpackBroken = true; base.itemUsedUp = true; Debug.Log((object)"Spawning explosion"); Landmine.SpawnExplosion(((Component)this).transform.position, true, 5f, 6f, 50, 0f, (GameObject)null, false); } } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); previousPlayerHeldBy = base.playerHeldBy; ((RigConstraint<ChainIKConstraintJob, ChainIKConstraintData, ChainIKConstraintJobBinder<ChainIKConstraintData>>)(object)cordRig).weight = 1f; } public override void Update() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Update(); if ((Object)(object)GameNetworkManager.Instance == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || streamlineJetpack) { return; } SetJetpackAudios(); if ((Object)(object)base.playerHeldBy == (Object)null || !((NetworkBehaviour)this).IsOwner || (Object)(object)base.playerHeldBy != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } if (jetpackActivated) { jetpackPower = Mathf.Clamp(jetpackPower + Time.deltaTime * jetpackAcceleration, 0f, 500f); } else { jetpackPower = Mathf.Clamp(jetpackPower - Time.deltaTime * jetpackDeaccelleration, 0f, 1000f); if (base.playerHeldBy.thisController.isGrounded) { jetpackPower = 0f; } } forces = Vector3.Lerp(forces, Vector3.ClampMagnitude(((Component)base.playerHeldBy).transform.up * jetpackPower, 400f), Time.deltaTime * 50f); if (!base.playerHeldBy.jetpackControls || (jetpackPower > 10f && base.playerHeldBy.thisController.isGrounded)) { forces = Vector3.zero; } if (!base.playerHeldBy.isPlayerDead && Physics.Raycast(((Component)base.playerHeldBy).transform.position, forces, ref rayHit, 25f, 1073744193, (QueryTriggerInteraction)1) && ((Vector3)(ref forces)).magnitude - ((RaycastHit)(ref rayHit)).distance > 50f && ((RaycastHit)(ref rayHit)).distance < 4f) { base.playerHeldBy.KillPlayer(forces, true, causeOfdeath, 0, default(Vector3), false); } if ((Object)(object)base.playerHeldBy != (Object)null && !base.playerHeldBy.isPlayerDead) { PlayerControllerB playerHeldBy = base.playerHeldBy; playerHeldBy.externalForces += forces; } } private void SetJetpackAudios() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) if (jetpackActivated) { if (noiseInterval >= 0.5f) { noiseInterval = 0f; RoundManager.Instance.PlayAudibleNoise(((Component)this).transform.position, 25f, 0.85f, 0, base.playerHeldBy.isInHangarShipRoom && StartOfRound.Instance.hangarDoorsClosed, 41); } else { noiseInterval += Time.deltaTime; } if (base.insertedBattery.charge < 0.15f) { if (!jetpackPlayingLowBatteryBeep) { jetpackPlayingLowBatteryBeep = true; jetpackBeepsAudio.clip = jetpackLowBatteriesSFX; jetpackBeepsAudio.Play(); } } else if (Physics.CheckSphere(((Component)this).transform.position, 6f, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { if (!jetpackPlayingWarningBeep && !jetpackPlayingLowBatteryBeep) { jetpackPlayingWarningBeep = true; jetpackBeepsAudio.clip = jetpackWarningBeepSFX; jetpackBeepsAudio.Play(); } } else { jetpackBeepsAudio.Stop(); } } else { jetpackPlayingWarningBeep = false; jetpackPlayingLowBatteryBeep = false; jetpackBeepsAudio.Stop(); } } public override void LateUpdate() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).LateUpdate(); if ((Object)(object)base.playerHeldBy != (Object)null && base.isHeld) { backPart.position = base.playerHeldBy.lowerSpine.position; backPart.rotation = base.playerHeldBy.lowerSpine.rotation; ((Component)this).transform.Rotate(backPartRotationOffset); backPart.position = base.playerHeldBy.lowerSpine.position; Vector3 val = backPartPositionOffset; val = base.playerHeldBy.lowerSpine.rotation * val; Transform obj = backPart; obj.position += val; } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3107096448u, new RpcReceiveHandler(__rpc_handler_3107096448), "ExplodeJetpackServerRpc"); ((NetworkBehaviour)this).__registerRpc(97138363u, new RpcReceiveHandler(__rpc_handler_97138363), "ExplodeJetpackClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3107096448(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((JetWingsItem)(object)target).ExplodeJetpackServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_97138363(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((JetWingsItem)(object)target).ExplodeJetpackClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "JetWingsItem"; } } public class ExplosionCreator : NetworkBehaviour, IHittable, IIndoorMapHazard { private bool mineActivated = true; public bool hasExploded; public ParticleSystem explosionParticle; public Animator mineAnimator; public AudioSource mineAudio; public AudioSource mineFarAudio; public AudioClip mineDetonate; public AudioClip mineTrigger; public AudioClip mineDetonateFar; public AudioClip mineDeactivate; public AudioClip minePress; private bool sendingExplosionRPC; private RaycastHit hit; private RoundManager roundManager; private float pressMineDebounceTimer; private bool localPlayerOnMine; public IndoorMapHazardType mapHazardType; private static int landminesAmount; bool IIndoorMapHazard.IsActivated() { return !hasExploded; } IndoorMapHazardType IIndoorMapHazard.GetMapHazardType() { return mapHazardType; } bool IIndoorMapHazard.IsExtremelyHazardous() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) if (landminesAmount > 14) { return true; } for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (StartOfRound.Instance.allPlayerScripts[i].isPlayerControlled && StartOfRound.Instance.allPlayerScripts[i].isInsideFactory) { Vector3 val = ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position - ((Component)this).transform.position; if (((Vector3)(ref val)).sqrMagnitude < 20f) { return true; } } } return false; } public override void OnDestroy() { ((NetworkBehaviour)this).OnDestroy(); landminesAmount = 0; } private void Start() { ((MonoBehaviour)this).StartCoroutine(StartIdleAnimation()); landminesAmount++; } private void Update() { if (pressMineDebounceTimer > 0f) { pressMineDebounceTimer -= Time.deltaTime; } if (localPlayerOnMine && GameNetworkManager.Instance.localPlayerController.teleportedLastFrame) { localPlayerOnMine = false; TriggerMineOnLocalClientByExiting(); } } public void ToggleMine(bool enabled) { if (mineActivated != enabled) { mineActivated = enabled; if (!enabled) { mineAudio.PlayOneShot(mineDeactivate); WalkieTalkie.TransmitOneShotAudio(mineAudio, mineDeactivate, 1f); } ToggleMineServerRpc(enabled); } } [ServerRpc(RequireOwnership = false)] public void ToggleMineServerRpc(bool enable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3925455125u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3925455125u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleMineClientRpc(enable); } } } [ClientRpc] public void ToggleMineClientRpc(bool enable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(71250643u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 71250643u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleMineEnabledLocalClient(enable); } } } public void ToggleMineEnabledLocalClient(bool enabled) { if (mineActivated != enabled) { mineActivated = enabled; if (!enabled) { mineAudio.PlayOneShot(mineDeactivate); WalkieTalkie.TransmitOneShotAudio(mineAudio, mineDeactivate, 1f); } } } private IEnumerator StartIdleAnimation() { roundManager = Object.FindObjectOfType<RoundManager>(); if (!((Object)(object)roundManager == (Object)null)) { if (roundManager.BreakerBoxRandom != null) { yield return (object)new WaitForSeconds((float)roundManager.BreakerBoxRandom.NextDouble() + 0.5f); } mineAnimator.SetTrigger("startIdle"); mineAudio.pitch = Random.Range(0.9f, 1.1f); } } private void OnTriggerEnter(Collider other) { if (hasExploded || pressMineDebounceTimer > 0f) { return; } if (((Component)other).CompareTag("Player")) { PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>(); if (!((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController) && (Object)(object)component != (Object)null && !component.isPlayerDead) { localPlayerOnMine = true; pressMineDebounceTimer = 0.5f; PressMineServerRpc(); } } else { if (!((Component)other).CompareTag("PhysicsProp") && !((Component)other).tag.StartsWith("PlayerRagdoll")) { return; } if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<DeadBodyInfo>())) { if ((Object)(object)((Component)other).GetComponent<DeadBodyInfo>().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } } else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<GrabbableObject>()) && !((NetworkBehaviour)((Component)other).GetComponent<GrabbableObject>()).NetworkObject.IsOwner) { return; } pressMineDebounceTimer = 0.5f; PressMineServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void PressMineServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1051937912u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1051937912u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PressMineClientRpc(); } } } [ClientRpc] public void PressMineClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(453212270u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 453212270u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; pressMineDebounceTimer = 0.5f; mineAudio.PlayOneShot(minePress); WalkieTalkie.TransmitOneShotAudio(mineAudio, minePress, 1f); } } } private void OnTriggerExit(Collider other) { if (hasExploded || !mineActivated) { return; } if (((Component)other).CompareTag("Player")) { PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>(); if ((Object)(object)component != (Object)null && !component.isPlayerDead && !((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { localPlayerOnMine = false; TriggerMineOnLocalClientByExiting(); } } else { if (!((Component)other).tag.StartsWith("PlayerRagdoll") && !((Component)other).CompareTag("PhysicsProp")) { return; } if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<DeadBodyInfo>())) { if ((Object)(object)((Component)other).GetComponent<DeadBodyInfo>().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } } else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent<GrabbableObject>()) && !((NetworkBehaviour)((Component)other).GetComponent<GrabbableObject>()).NetworkObject.IsOwner) { return; } TriggerMineOnLocalClientByExiting(); } } private void TriggerMineOnLocalClientByExiting() { if (!hasExploded) { SetOffMineAnimation(); sendingExplosionRPC = true; ExplodeMineServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void ExplodeMineServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1591424050u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1591424050u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ExplodeMineClientRpc(); } } } [ClientRpc] public void ExplodeMineClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3177064841u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3177064841u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (sendingExplosionRPC) { sendingExplosionRPC = false; } else { SetOffMineAnimation(); } } } public void SetOffMineAnimation() { hasExploded = true; mineAnimator.SetTrigger("detonate"); mineAudio.PlayOneShot(mineTrigger, 1f); } private IEnumerator TriggerOtherMineDelayed(Landmine mine) { if (!mine.hasExploded) { mine.mineAudio.pitch = Random.Range(0.75f, 1.07f); mine.hasExploded = true; yield return (object)new WaitForSeconds(0.2f); mine.SetOffMineAnimation(); } } public void Detonate() { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) mineAudio.pitch = Random.Range(0.93f, 1.07f); mineAudio.PlayOneShot(mineDetonate, 1f); SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6f, 50, 0f, null, goThroughCar: false, 14f, 25f, (CauseOfDeath)3); } public static void SpawnExplosion(Vector3 explosionPosition, bool spawnExplosionEffect = false, float killRange = 1f, float damageRange = 1f, int nonLethalDamage = 50, float physicsForce = 0f, GameObject overridePrefab = null, bool goThroughCar = false, float bigCamShakeDistance = 14f, float smallCamShakeDistance = 25f, CauseOfDeath causeOfDeath = (CauseOfDeath)3) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0352: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03ab: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_043d: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_0402: Unknown result type (might be due to invalid IL or missing references) //IL_0407: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03eb: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) if (spawnExplosionEffect) { GameObject val = ((!((Object)(object)overridePrefab != (Object)null)) ? Object.Instantiate<GameObject>(StartOfRound.Instance.explosionPrefab, explosionPosition, Quaternion.Euler(-90f, 0f, 0f), RoundManager.Instance.mapPropsContainer.transform) : Object.Instantiate<GameObject>(overridePrefab, explosionPosition, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform)); val.SetActive(true); } float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition); if (num < bigCamShakeDistance) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < smallCamShakeDistance) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } bool flag = false; Collider[] array = Physics.OverlapSphere(explosionPosition, damageRange, 2621448, (QueryTriggerInteraction)2); PlayerControllerB val2 = null; RaycastHit val3 = default(RaycastHit); Vector3 val5; for (int i = 0; i < array.Length; i++) { float num2 = Vector3.Distance(explosionPosition, ((Component)array[i]).transform.position); if (Physics.Linecast(explosionPosition, ((Component)array[i]).transform.position + Vector3.up * 0.3f, ref val3, 1073742080, (QueryTriggerInteraction)1) && ((!goThroughCar && ((Component)((RaycastHit)(ref val3)).collider).gameObject.layer == 30) || num2 > 4f)) { continue; } if (((Component)array[i]).gameObject.layer == 3 && !flag) { val2 = ((Component)array[i]).gameObject.GetComponent<PlayerControllerB>(); if ((Object)(object)val2 != (Object)null && ((NetworkBehaviour)val2).IsOwner) { flag = true; if (num2 < killRange) { Vector3 val4 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition); PlayerControllerB obj = val2; val5 = default(Vector3); obj.KillPlayer(val4, true, causeOfDeath, 0, val5, false); } else if (num2 < damageRange) { Vector3 val6 = Vector3.Normalize(((Component)val2.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val2.gameplayCamera).transform.position, explosionPosition); val2.DamagePlayer(nonLethalDamage, true, true, causeOfDeath, 0, false, val6); } } } else if (((Component)array[i]).gameObject.layer == 21) { Landmine componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren<Landmine>(); if ((Object)(object)componentInChildren != (Object)null && !componentInChildren.hasExploded && num2 < 6f) { ((MonoBehaviour)componentInChildren).StartCoroutine(componentInChildren.TriggerOtherMineDelayed(componentInChildren)); } } else if (((Component)array[i]).gameObject.layer == 19) { EnemyAICollisionDetect componentInChildren2 = ((Component)array[i]).gameObject.GetComponentInChildren<EnemyAICollisionDetect>(); if ((Object)(object)componentInChildren2 != (Object)null && ((NetworkBehaviour)componentInChildren2.mainScript).IsOwner && num2 < 4.5f) { EnemyAI mainScript = componentInChildren2.mainScript; val5 = default(Vector3); mainScript.HitEnemyOnLocalClient(6, val5, (PlayerControllerB)null, false, -1); componentInChildren2.mainScript.HitFromExplosion(num2); } } } val2 = GameNetworkManager.Instance.localPlayerController; if (physicsForce > 0f && Vector3.Distance(((Component)val2).transform.position, explosionPosition) < 35f && !Physics.Linecast(explosionPosition, ((Component)val2).transform.position + Vector3.up * 0.3f, ref val3, 256, (QueryTriggerInteraction)1)) { float num3 = Vector3.Distance(((Component)val2).transform.position, explosionPosition); Vector3 val7 = Vector3.Normalize(((Component)val2).transform.position + Vector3.up * num3 - explosionPosition) / (num3 * 0.35f) * physicsForce; if (((Vector3)(ref val7)).magnitude > 2f) { if (((Vector3)(ref val7)).magnitude > 10f) { val2.CancelSpecialTriggerAnimations(); } if (val2.inVehicleAnimation) { val5 = val2.externalForceAutoFade + val7; if (!(((Vector3)(ref val5)).magnitude > 50f)) { goto IL_0413; } } PlayerControllerB obj2 = val2; obj2.externalForceAutoFade += val7; } } goto IL_0413; IL_0413: VehicleController val8 = Object.FindObjectOfType<VehicleController>(); if ((Object)(object)val8 != (Object)null && !val8.magnetedToShip && physicsForce > 0f && Vector3.Distance(((Component)val8).transform.position, explosionPosition) < 35f) { val8.mainRigidbody.AddExplosionForce(physicsForce * 50f, explosionPosition, 12f, 3f, (ForceMode)1); } int num4 = ~LayerMask.GetMask(new string[1] { "Room" }); num4 = ~LayerMask.GetMask(new string[1] { "Colliders" }); array = Physics.OverlapSphere(explosionPosition, 10f, num4); for (int j = 0; j < array.Length; j++) { Rigidbody component = ((Component)array[j]).GetComponent<Rigidbody>(); if ((Object)(object)component != (Object)null) { component.AddExplosionForce(70f, explosionPosition, 10f); } } } public bool MineHasLineOfSight(Vector3 pos) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return !Physics.Linecast(((Component)this).transform.position, pos, ref hit, 256); } bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { SetOffMineAnimation(); sendingExplosionRPC = true; ExplodeMineServerRpc(); return true; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3925455125u, new RpcReceiveHandler(__rpc_handler_3925455125), "ToggleMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(71250643u, new RpcReceiveHandler(__rpc_handler_71250643), "ToggleMineClientRpc"); ((NetworkBehaviour)this).__registerRpc(1051937912u, new RpcReceiveHandler(__rpc_handler_1051937912), "PressMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(453212270u, new RpcReceiveHandler(__rpc_handler_453212270), "PressMineClientRpc"); ((NetworkBehaviour)this).__registerRpc(1591424050u, new RpcReceiveHandler(__rpc_handler_1591424050), "ExplodeMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(3177064841u, new RpcReceiveHandler(__rpc_handler_3177064841), "ExplodeMineClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3925455125(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).ToggleMineServerRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_71250643(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).ToggleMineClientRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1051937912(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).PressMineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_453212270(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).PressMineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1591424050(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).ExplodeMineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3177064841(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((ExplosionCreator)(object)target).ExplodeMineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ExplosionCreator"; } } public class RandomScrapSpawn : MonoBehaviour { public ItemGroup spawnableItems; public float itemSpawnRange; [Space(5f)] public bool spawnedItemsCopyPosition; public bool spawnUsed; [Space(5f)] public Transform spawnWithParent; } public class SuperMechAnimationEvent : MonoBehaviour { public SuperMechAI mainScript; public void FlickerFace() { mainScript.FlickerFace(); } public void EnableSpotlight() { mainScript.EnableSpotlight(); } public void DisableSpotlight() { mainScript.DisableSpotlight(); } public void StompLeftFoot() { mainScript.StompLeftFoot(); } public void StompRightFoot() { mainScript.StompRightFoot(); } public void StompBothFeet() { mainScript.StompBothFeet(); } public void HasEnteredSky() { mainScript.HasEnteredSky(); } public void DisableSmoke() { mainScript.DisableThrusterSmoke(); } public void EnableSmoke() { mainScript.EnableThrusterSmoke(); } public void EnableBlowtorch() { mainScript.EnableBlowtorch(); } public void DisableBlowtorch() { mainScript.DisableBlowtorch(); } public void FinishFlying() { mainScript.FinishFlyingAnimation(); } } public class VController : NetworkBehaviour { public int vehicleID; [Header("Vehicle Physics")] public WheelCollider FrontLeftWheel; public WheelCollider FrontRightWheel; public WheelCollider BackLeftWheel; public WheelCollider BackRightWheel; public WheelCollider[] otherWheels; public Rigidbody mainRigidbody; public Transform[] driverSideExitPoints; public Transform[] passengerSideExitPoints; public InteractTrigger driverSeatTrigger; public InteractTrigger passengerSeatTrigger; public float stability = 0.3f; public float speed = 2f; public float EngineTorque = 230f; public float MaxEngineRPM = 3000f; public float MinEngineRPM = 1000f; public float EngineRPM; [Header("Vehicle Control")] public bool ignitionStarted; public Vector2 moveInputVector; public float steeringInput; public float steeringWheelTurnSpeed = 5f; public float carAcceleration = 5f; public float carMaxSpeed = 7f; public float brakeSpeed = 5f; public float idleSpeed = 2f; [Space(5f)] [Header("Car Damage")] public float carFragility = 1f; public float minimalBumpForce = 10f; public float mediumBumpForce = 40f; public float maximumBumpForce = 80f; public int baseCarHP; public int carHP = 12; private float timeAtLastDamage; public bool carDestroyed; [Space(5f)] [Header("Effects")] public MeshRenderer leftWheelMesh; public MeshRenderer rightWheelMesh; public MeshRenderer backLeftWheelMesh; public MeshRenderer backRightWheelMesh; public Animator steeringWheelAnimator; public Animator gearStickAnimator; public AudioSource engineAudio1; public AudioSource engineAudio2; public AudioSource rollingAudio; public AudioSource turbulenceAudio; private float turbulenceAmount; public bool carEngine1AudioActive; public bool carEngine2AudioActive; public bool carRollingAudioActive; public AudioClip revEngineStart; public AudioClip engineStartSuccessful; public AudioClip engineRun; public AudioClip engineRev; public AudioClip engineRun2; public AudioClip insertKey; public AudioClip twistKey; public AudioClip removeKey; public AudioClip sitDown; public AudioSource tireAudio; public AudioSource vehicleEngineAudio; public AudioSource steeringWheelAudio; public AudioSource skiddingAudio; public AudioSource gearStickAudio; public AudioClip[] gearStickAudios; public AnimatedObjectTrigger driverSideDoor; public AnimatedObjectTrigger passengerSideDoor; public InteractTrigger driverSideDoorTrigger; public InteractTrigger passengerSideDoorTrigger; public PlayerInput input; public bool localPlayerInControl; public bool localPlayerInPassengerSeat; public bool drivePedalPressed; public bool brakePedalPressed; public CarGearShift gear; public float gearStickAnimValue; public float steeringAnimValue; private float steeringWheelAnimFloat; public float carStress; public float carStressChange; public PlayerControllerB currentDriver; public PlayerControllerB currentPassenger; public bool testingVehicleInEditor; public float engineIntensityPercentage = 350f; public Vector3 syncedPosition; public Quaternion syncedRotation; public float syncSpeedMultiplier = 2f; public float syncRotationSpeed = 1f; public float syncCarPositionInterval; private bool enabledCollisionForAllPlayers = true; public ContactPoint[] contacts; public PlayerPhysicsRegion physicsRegion; private int exitCarLayerMask = 2305; private Coroutine keyIgnitionCoroutine; public MeshRenderer keyObject; public Transform ignitionTurnedPosition; public Transform ignitionNotTurnedPosition; private bool keyIsInDriverHand; private bool keyIsInIgnition; public Vector3 positionOffset; public Vector3 rotationOffset; public GameObject startKeyIgnitionTrigger; public GameObject removeKeyIgnitionTrigger; private float chanceToStartIgnition = 1f; private float timeAtLastGearShift; private RaycastHit hit; public AudioSource hoodAudio; public AudioSource pushAudio; public AudioSource collisionAudio1; public AudioSource collisionAudio2; public AudioClip[] maxCollisions; public AudioClip[] medCollisions; public AudioClip[] minCollisions; public AudioClip[] obstacleCollisions; public AudioClip windshieldBreak; public AudioSource miscAudio; private float audio1Time; private float audio2Time; private int audio1Type; private int audio2Type; public MeshRenderer mainBodyMesh; public MeshRenderer lod1Mesh; public MeshRenderer lod2Mesh; public Material windshieldBrokenMat; public ParticleSystem glassParticle; private bool windshieldBroken; private Vector3 truckVelocityLastFrame; public bool useVel; [Header("Radio")] public AudioClip[] radioClips; public AudioSource radioAudio; public AudioSource radioInterference; private float radioSignalQuality = 3f; private float radioSignalDecreaseThreshold = 50f; public float radioSignalTurbulence = 4f; private float changeRadioSignalTime; private bool radioOn; private int currentRadioClip; private float currentSongTime; private bool radioTurnedOnBefore; public float carHitPlayerForceFraction = 30f; public float carReactToPlayerHitMultiplier; public ParticleSystem carExhaustParticle; public Vector3 averageVelocity; public int movingAverageLength = 20; public int averageCount; private DecalProjector[] decals; private int decalIndex; public ParticleSystem hoodFireParticle; public AudioSource hoodFireAudio; private bool isHoodOnFire; private bool carHoodOpen; public Animator carHoodAnimator; private AudioClip carHoodOpenSFX; private AudioClip carHoodCloseSFX; public GameObject backDoorContainer; public GameObject destroyedTruckMesh; public GameObject truckDestroyedExplosion; private bool hoodPoppedUp; public float pushForceMultiplier; public float pushVerticalOffsetAmount; public GameObject headlightsContainer; public Material headlightsOnMat; public Material headlightsOffMat; public AudioClip headlightsToggleSFX; public bool magnetedToShip; private Vector3 magnetTargetPosition; private Quaternion magnetTargetRotation; private Quaternion magnetStartRotation; private Vector3 magnetStartPosition; public float magnetTime; private bool finishedMagneting; private bool loadedVehicleFromSave; private float magnetRotationTime; public BoxCollider boundsCollider; private Vector3 averageVelocityAtMagnetStart; public AnimationCurve magnetPositionCurve; public AnimationCurve magnetRotationCurve; private bool destroyNextFrame; private string lastStressType; private string lastDamageType; private float stressPerSecond; public Rigidbody ragdollPhysicsBody; public Rigidbody windwiperPhysicsBody1; public Rigidbody windwiperPhysicsBody2; public Transform windwiper1; public Transform windwiper2; public BoxCollider windshieldPhysicsCollider; public Animator driverSeatSpringAnimator; public float timeSinceSpringingDriverSeat; public AudioSource springAudio; public float springForce = 70f; public GameObject backLightsContainer; public GameObject frontCabinLightContainer; public MeshRenderer backLightsMesh; public MeshRenderer frontCabinLightMesh; public Material backLightOnMat; public bool backLightsOn; public AudioSource hornAudio; public bool honkingHorn; private float timeAtLastHornPing; private float timeAtLastEngineAudioPing; public float torqueForce; public bool backDoorOpen; public bool hasBeenSpawned; public bool inDropshipAnimation; private ItemDropship itemShip; public ParticleSystem tireSparks; public AudioSource extremeStressAudio; private bool underExtremeStress; private bool syncedExtremeStress; public Transform healthMeter; public Transform turboMeter; public Transform clipboardPosition; private float limitTruckVelocityTimer; [Header("Boost ability")] private bool switchGearsBoostEnabled; private int turboBoosts; private bool pressedTurbo; public float turboBoostForce; public float turboBoostUpwardForce; public ParticleSystem turboBoostParticle; public AudioSource turboBoostAudio; public AudioClip turboBoostSFX; public AudioClip turboBoostSFX2; public Transform oilPipePoint; private bool jumpingInCar; public float jumpForce = 4000f; public AudioClip jumpInCarSFX; private string[] carTooltips = new string[3] { "Gas pedal: [W]", "Brake pedal: [S]", "Boost: [Space]" }; public AudioClip pourOil; public AudioClip pourTurbo; private bool setControlTips; public Collider ontopOfTruckCollider; public void SetBackDoorOpen(bool open) { backDoorOpen = open; } private void SetFrontCabinLightOn(bool setOn) { frontCabinLightContainer.SetActive(setOn); if (setOn) { ((Renderer)frontCabinLightMesh).material = headlightsOnMat; } else { ((Renderer)frontCabinLightMesh).material = headlightsOffMat; } } private void SetWheelFriction() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) WheelFrictionCurve val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 0.2f; ((WheelFrictionCurve)(ref val)).extremumValue = 1f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 1f; ((WheelFrictionCurve)(ref val)).stiffness = 2f; WheelFrictionCurve val2 = val; FrontRightWheel.forwardFriction = val2; FrontLeftWheel.forwardFriction = val2; ((WheelFrictionCurve)(ref val2)).stiffness = 0.75f; BackRightWheel.forwardFriction = val2; BackLeftWheel.forwardFriction = val2; ((WheelFrictionCurve)(ref val2)).stiffness = 2f; ((WheelFrictionCurve)(ref val2)).asymptoteValue = 1f; ((WheelFrictionCurve)(ref val2)).extremumSlip = 0.7f; FrontRightWheel.sidewaysFriction = val2; FrontLeftWheel.sidewaysFriction = val2; BackRightWheel.sidewaysFriction = val2; BackLeftWheel.sidewaysFriction = val2; } private void Awake() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) contacts = (ContactPoint[])(object)new ContactPoint[24]; ((Component)ragdollPhysicsBody).transform.SetParent(RoundManager.Instance.VehiclesContainer); ((Component)windwiperPhysicsBody1).transform.SetParent(RoundManager.Instance.VehiclesContainer); ((Component)windwiperPhysicsBody2).transform.SetParent(RoundManager.Instance.VehiclesContainer); mainRigidbody.maxLinearVelocity = 50f; mainRigidbody.maxAngularVelocity = 4f; syncedPosition = ((Component)this).transform.position; syncedRotation = ((Component)this).transform.rotation; } private void Start() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) carHP = baseCarHP; SetWheelFriction(); FrontLeftWheel.brakeTorque = 1000f; FrontRightWheel.brakeTorque = 1000f; BackLeftWheel.brakeTorque = 1000f; BackRightWheel.brakeTorque = 1000f; if (testingVehicleInEditor) { ActivateControl(); } Debug.Log((object)$"Max linear velocity: {mainRigidbody.maxLinearVelocity}; dep: {mainRigidbody.maxDepenetrationVelocity}"); mainRigidbody.automaticCenterOfMass = false; Rigidbody obj = mainRigidbody; obj.centerOfMass += new Vector3(0f, -1f, 0.25f); mainRigidbody.automaticInertiaTensor = false; mainRigidbody.maxDepenetrationVelocity = 1f; currentRadioClip = new Random(StartOfRound.Instance.randomMapSeed).Next(0, radioClips.Length); decals = (DecalProjector[])(object)new DecalProjector[24]; if (StartOfRound.Instance.inShipPhase) { hasBeenSpawned = true; magnetedToShip = true; loadedVehicleFromSave = true; ((Component)this).transform.position = StartOfRound.Instance.magnetPoint.position + StartOfRound.Instance.magnetPoint.forward * 7f; StartMagneting(); } } public void RemoveKeyFromIgnition() { if (localPlayerInControl) { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 6); RemoveKeyFromIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } [ServerRpc(RequireOwnership = false)] public void RemoveKeyFromIgnitionServerRpc(int driverId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2379619604u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2379619604u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RemoveKeyFromIgnitionClientRpc(driverId); } } } [ClientRpc] public void RemoveKeyFromIgnitionClientRpc(int driverId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3778510610u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3778510610u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); } } private IEnumerator RemoveKey() { yield return (object)new WaitForSeconds(0.26f); if ((Object)(object)currentDriver != (Object)null) { currentDriver.movementAudio.PlayOneShot(removeKey); } keyIsInDriverHand = true; SetIgnition(started: false); SetFrontCabinLightOn(setOn: false); yield return (object)new WaitForSeconds(0.73f); keyIsInDriverHand = false; keyIgnitionCoroutine = null; } public void CancelTryCarIgnition() { if (localPlayerInControl && !ignitionStarted) { if (keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } carEngine1AudioActive = false; CancelIgnitionAnimation(); CancelTryIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, keyIsInIgnition); } } public void StartTryCarIgnition() { if (localPlayerInControl && !ignitionStarted) { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: true)); TryIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, keyIsInIgnition); } } private IEnumerator TryIgnition(bool isLocalDriver) { Debug.Log((object)"Starting ignition!!!"); if (keyIsInIgnition) { if (isLocalDriver) { if (GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim") == 3) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 2); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 12); } } yield return (object)new WaitForSeconds(0.035f); keyIsInDriverHand = true; currentDriver.movementAudio.PlayOneShot(twistKey); if (!isLocalDriver) { keyIgnitionCoroutine = null; yield break; } yield return (object)new WaitForSeconds(0.1467f); } else { if (isLocalDriver) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 2); } keyIsInDriverHand = true; yield return (object)new WaitForSeconds(0.66f); currentDriver.movementAudio.PlayOneShot(insertKey); if (!isLocalDriver) { keyIgnitionCoroutine = null; yield break; } yield return (object)new WaitForSeconds(0.3f); } keyIsInIgnition = true; SetFrontCabinLightOn(keyIsInIgnition); RevCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); engineAudio1.clip = revEngineStart; engineAudio1.volume = 0.7f; engineAudio1.PlayOneShot(engineRev); carEngine1AudioActive = true; yield return (object)new WaitForSeconds(Random.Range(0.4f, 1.1f)); if ((float)Random.Range(0, 100) < chanceToStartIgnition) { SetIgnition(started: true); keyIsInDriverHand = false; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 1); StartIgnitionServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } else { chanceToStartIgnition += 24f; } keyIgnitionCoroutine = null; } [ServerRpc(RequireOwnership = false)] public void RevCarServerRpc(int driverId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1024272216u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1024272216u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RevCarClientRpc(driverId); } } } [ClientRpc] public void RevCarClientRpc(int driverId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(532109531u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 532109531u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { engineAudio1.clip = revEngineStart; engineAudio1.volume = 0.7f; engineAudio1.PlayOneShot(engineRev); carEngine1AudioActive = true; } } } [ServerRpc(RequireOwnership = false)] public void StartIgnitionServerRpc(int driverId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3141029793u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3141029793u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StartIgnitionClientRpc(driverId); } } } [ClientRpc] public void StartIgnitionClientRpc(int driverId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1434007931u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1434007931u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { SetIgnition(started: true); CancelIgnitionAnimation(); } } } [ServerRpc(RequireOwnership = false)] public void TryIgnitionServerRpc(int driverId, bool keyIsIn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1576302371u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref keyIsIn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1576302371u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TryIgnitionClientRpc(driverId, keyIsIn); } } } [ClientRpc] public void TryIgnitionClientRpc(int driverId, bool keyIsIn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3683253228u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref keyIsIn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3683253228u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId && !ignitionStarted) { keyIsInIgnition = keyIsIn; if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: false)); if (!keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } } } [ServerRpc(RequireOwnership = false)] public void CancelTryIgnitionServerRpc(int driverId, bool setKeyInSlot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3939365593u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3939365593u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CancelTryIgnitionClientRpc(driverId, setKeyInSlot); } } } [ClientRpc] public void CancelTryIgnitionClientRpc(int driverId, bool setKeyInSlot) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1886249329u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, driverId); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1886249329u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId != driverId) { if (ignitionStarted) { SetIgnition(started: false); } if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); } carEngine1AudioActive = false; keyIsInIgnition = setKeyInSlot; SetFrontCabinLightOn(keyIsInIgnition); } } public void CancelIgnitionAnimation() { if (keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(keyIgnitionCoroutine); keyIgnitionCoroutine = null; } keyIsInDriverHand = false; } public void SetIgnition(bool started) { keyIsInIgnition = started; SetFrontCabinLightOn(keyIsInIgnition); if (started) { startKeyIgnitionTrigger.SetActive(false); removeKeyIgnitionTrigger.SetActive(true); } else { startKeyIgnitionTrigger.SetActive(true); removeKeyIgnitionTrigger.SetActive(false); } if (started != ignitionStarted) { ignitionStarted = started; carEngine1AudioActive = started; if (started) { carExhaustParticle.Play(); engineAudio1.PlayOneShot(engineStartSuccessful); engineAudio1.clip = engineRun; } else { carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } } } public void ExitDriverSideSeat() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)$"local player in control? : {localPlayerInControl}"); if (!localPlayerInControl) { return; } GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); int num = CanExitCar(passengerSide: true); if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(driverSideExitPoints[num].position, false, 0f, false, true); return; } if (!driverSideDoor.boolValue) { driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } GameNetworkManager.Instance.localPlayerController.TeleportPlayer(driverSideExitPoints[1].position, false, 0f, false, true); } public void OnPassengerExit() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) passengerSeatTrigger.interactable = true; localPlayerInPassengerSeat = false; currentPassenger = null; SetVehicleCollisionForPlayer(setEnabled: true, GameNetworkManager.Instance.localPlayerController); PassengerLeaveVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } public void ExitPassengerSideSeat() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) if (localPlayerInPassengerSeat) { int num = CanExitCar(passengerSide: true); if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(passengerSideExitPoints[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(passengerSideExitPoints[1].position, false, 0f, false, true); } } } [ServerRpc(RequireOwnership = false)] public void PassengerLeaveVehicleServerRpc(int playerId, Vector3 exitPoint) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((Netwo