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.Cryptography; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using CompanyHauler.Compatibility; using CompanyHauler.Networking; using CompanyHauler.Patches; using CompanyHauler.Patches.Enemies; using CompanyHauler.Patches.InternalUtils; using CompanyHauler.Scripts; using CompanyHauler.Utils; using FirstPersonView; using GameNetcodeStuff; using HarmonyLib; using LethalCompanyInputUtils.Api; using LethalMin; using Microsoft.CodeAnalysis; using ScandalLib.Patches; using ScandalLib.Scripts; using ScandalsTweaks.Compatibility; using ScandalsTweaks.Patches; using ScandalsTweaks.Patches.Enemies; using ScandalsTweaks.Utils; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.Rendering.HighDefinition; using UnityEngine.UI; using VoxxWeatherPlugin.Patches; using VoxxWeatherPlugin.Utils; using VoxxWeatherPlugin.Weathers; using Woecust.ImmersiveVisor; using glojam.CompanyHauler.NetcodePatcher; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("FirstPersonView")] [assembly: IgnoresAccessChecksTo("ImmersiveVisor")] [assembly: IgnoresAccessChecksTo("NoteBoxz.LethalMin")] [assembly: IgnoresAccessChecksTo("scandal.scandallib")] [assembly: IgnoresAccessChecksTo("scandal.scandalstweaks")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("voxx.LethalElementsPlugin")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("glojam.CompanyHauler")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("2.2.14.0")] [assembly: AssemblyInformationalVersion("2.2.14+57aec18cdfc839339c2c3037585e9d289b0c403e")] [assembly: AssemblyProduct("CompanyHauler")] [assembly: AssemblyTitle("glojam.CompanyHauler")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.2.14.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 class HaulerCollisionTrigger : MonoBehaviour { public HaulerController mainScript = null; public BoxCollider insideTruckNavMeshBounds = null; public EnemyAI[] enemiesLastHit = null; private float timeSinceHittingPlayer; private float timeSinceHittingEnemy; private int enemyIndex; public void Start() { enemiesLastHit = (EnemyAI[])(object)new EnemyAI[3]; } public void OnTriggerEnter(Collider other) { //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0469: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04f5: Unknown result type (might be due to invalid IL or missing references) //IL_0500: Unknown result type (might be due to invalid IL or missing references) //IL_0505: 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_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_0538: Unknown result type (might be due to invalid IL or missing references) //IL_0549: 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_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_056c: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0360: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Invalid comparison between Unknown and I4 //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_067e: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Unknown result type (might be due to invalid IL or missing references) //IL_0694: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06ad: Expected I4, but got Unknown //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c3: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_072a: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) if (!((VehicleController)mainScript).hasBeenSpawned || (((VehicleController)mainScript).magnetedToShip && ((VehicleController)mainScript).magnetTime > 0.8f)) { return; } if (((Component)other).CompareTag("Player")) { PlayerControllerB val = default(PlayerControllerB); if (!((Component)other).TryGetComponent(ref val) || Time.realtimeSinceStartup - timeSinceHittingPlayer < 0.25f) { return; } Transform physicsTransform = ((VehicleController)mainScript).physicsRegion.physicsTransform; if ((Object)(object)val.overridePhysicsParent == (Object)(object)physicsTransform || (Object)(object)val.physicsParent == (Object)(object)physicsTransform) { return; } float num = Mathf.Abs(((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude); if (num < 2f) { return; } Vector3 val2 = ((Component)val).transform.position - ((VehicleController)mainScript).mainRigidbody.position; float num2 = Vector3.Angle(Vector3.Normalize(((VehicleController)mainScript).averageVelocity * 1000f), Vector3.Normalize(val2 * 1000f)); if (num2 > 70f) { return; } if (num2 < 30f && mainScript.wheelRPM > 400f) { num += 6f; } if ((((Component)val.gameplayCamera).transform.position - ((VehicleController)mainScript).mainRigidbody.position).y < -0.1f) { num *= 2f; } timeSinceHittingPlayer = Time.realtimeSinceStartup; Vector3 val3 = Vector3.ClampMagnitude(((VehicleController)mainScript).averageVelocity, 40f); if ((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { if ((Object)(object)physicsTransform == (Object)(object)GameNetworkManager.Instance.localPlayerController.physicsParent) { return; } if (num > 20f) { GameNetworkManager.Instance.localPlayerController.KillPlayer(val3, true, (CauseOfDeath)8, 0, default(Vector3), false); } else { int num3 = 0; if (num > 15f) { num3 = 80; } else if (num > 12f) { num3 = 60; } else if (num > 8f) { num3 = 40; } if (num3 > 0) { GameNetworkManager.Instance.localPlayerController.DamagePlayer(num3, true, true, (CauseOfDeath)8, 0, false, val3); } } if (!GameNetworkManager.Instance.localPlayerController.isPlayerDead && ((Vector3)(ref GameNetworkManager.Instance.localPlayerController.externalForceAutoFade)).sqrMagnitude < ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).sqrMagnitude) { GameNetworkManager.Instance.localPlayerController.externalForceAutoFade = ((VehicleController)mainScript).averageVelocity; } } else if (((NetworkBehaviour)mainScript).IsOwner && ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude > 1.8f) { mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, ((Component)val).transform.position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)0); } } else { EnemyAICollisionDetect val4 = default(EnemyAICollisionDetect); if (!((Component)other).gameObject.CompareTag("Enemy") || Time.realtimeSinceStartup - timeSinceHittingEnemy < 0.25f || !((Component)other).TryGetComponent(ref val4) || (Object)(object)val4.mainScript == (Object)null || val4.mainScript.isEnemyDead) { return; } if (val4.mainScript is SandWormAI) { timeSinceHittingEnemy = Time.realtimeSinceStartup; ((VehicleController)mainScript).mainRigidbody.AddExplosionForce(((VehicleController)mainScript).mainRigidbody.mass * 100f, ((Component)mainScript).transform.position + ((Component)mainScript).transform.forward + Vector3.up * 1.5f, 12f, 3f, (ForceMode)1); } else { if (val4.mainScript is BushWolfEnemy) { return; } EnemyAI obj = val4.mainScript; FlowerSnakeEnemy val5 = (FlowerSnakeEnemy)(object)((obj is FlowerSnakeEnemy) ? obj : null); if ((val5 != null && Object.op_Implicit((Object)(object)val5.clingingToPlayer)) || Vector3.Angle(((VehicleController)mainScript).averageVelocity, ((Component)val4.mainScript).transform.position - ((Component)this).transform.position) > 130f || ((Collider)insideTruckNavMeshBounds).ClosestPoint(((Component)val4.mainScript).transform.position) == ((Component)val4.mainScript).transform.position || ((Collider)insideTruckNavMeshBounds).ClosestPoint(val4.mainScript.agent.destination) == val4.mainScript.agent.destination) { return; } bool dealDamage = false; for (int i = 0; i < enemiesLastHit.Length; i++) { if ((Object)(object)enemiesLastHit[i] == (Object)(object)val4.mainScript && (Time.realtimeSinceStartup - timeSinceHittingEnemy < 0.6f || ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude < 4f)) { dealDamage = true; } } if (((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude < 6f && (!((VehicleController)mainScript).ignitionStarted || (int)((VehicleController)mainScript).gear == 3 || Mathf.Abs(mainScript.wheelRPM) < 40f)) { dealDamage = false; } timeSinceHittingEnemy = Time.realtimeSinceStartup; Vector3 position = ((Component)val4).transform.position; bool flag = false; EnemySize enemySize = val4.mainScript.enemyType.EnemySize; EnemySize val6 = enemySize; switch ((int)val6) { case 0: flag = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 1f, val4.mainScript, dealDamage); break; case 1: flag = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 3f, val4.mainScript, dealDamage); break; case 2: flag = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 2f, val4.mainScript, dealDamage); break; } if (flag) { enemyIndex = (enemyIndex + 1) % 3; enemiesLastHit[enemyIndex] = val4.mainScript; return; } for (int j = 0; j < enemiesLastHit.Length; j++) { if ((Object)(object)enemiesLastHit[j] == (Object)(object)val4.mainScript) { enemiesLastHit[j] = null; } } } } } } namespace CompanyHauler { [BepInPlugin("glojam.CompanyHauler", "CompanyHauler", "2.2.14")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { internal static VehicleControls VehicleControlsInstance; internal static bool initialized; public static Plugin Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } public void Awake() { if (!initialized) { initialized = true; Logger = ((BaseUnityPlugin)this).Logger; Instance = this; VehicleControlsInstance = new VehicleControls(); UserConfig.InitConfig(); Patch(); LogInfo("glojam.CompanyHauler v2.2.14 has loaded!"); } } internal static void Patch() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("glojam.CompanyHauler"); } LogDebug("Patching..."); CompatibilityUtils.Init(Harmony); Harmony.PatchAll(typeof(ScandalsTweaksPatches)); Harmony.PatchAll(typeof(BaboonBirdAIPatches)); Harmony.PatchAll(typeof(ForestGiantAIPatches)); Harmony.PatchAll(typeof(GiantKiwiAIPatches)); Harmony.PatchAll(typeof(MaskedPlayerEnemyPatches)); Harmony.PatchAll(typeof(MouthDogAIPatches)); Harmony.PatchAll(typeof(PumaAIPatches)); Harmony.PatchAll(typeof(RadMechAIPatches)); Harmony.PatchAll(typeof(RedLocustBeesPatches)); Harmony.PatchAll(typeof(SandWormAIPatches)); Harmony.PatchAll(typeof(ElevatorAnimationEventsPatches)); Harmony.PatchAll(typeof(GameNetworkManagerPatches)); Harmony.PatchAll(typeof(HUDManagerPatches)); Harmony.PatchAll(typeof(LandminePatches)); Harmony.PatchAll(typeof(PlayerControllerBPatches)); Harmony.PatchAll(typeof(StartOfRoundPatches)); Harmony.PatchAll(typeof(VehicleControllerPatches)); LogDebug("Finished patching!"); } internal static void Unpatch() { LogDebug("Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } LogDebug("Finished unpatching!"); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogMessage(string messageLog) { Logger.LogMessage((object)messageLog); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogDebug(string debugLog) { Logger.LogDebug((object)debugLog); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogInfo(string infoLog) { Logger.LogInfo((object)infoLog); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogWarning(string warningLog) { Logger.LogWarning((object)warningLog); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogError(string errorLog) { Logger.LogError((object)errorLog); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "glojam.CompanyHauler"; public const string PLUGIN_NAME = "CompanyHauler"; public const string PLUGIN_VERSION = "2.2.14"; } } namespace CompanyHauler.Utils { public static class CameraUtils { private static readonly Plane[] frustumPlanes = (Plane[])(object)new Plane[6]; public static bool IsVisibleToPlayersLocalCamera(this Renderer renderer, Camera playersCamera) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) Bounds bounds = renderer.bounds; GeometryUtility.CalculateFrustumPlanes(playersCamera, frustumPlanes); if (GeometryUtility.TestPlanesAABB(frustumPlanes, bounds)) { return true; } return false; } } internal static class CompatibilityUtils { internal const string GUID_LETHAL_LEVEL_LOADER = "imabatby.lethallevelloader"; internal const string GUID_SCANDALLIB = "scandal.scandallib"; internal const string GUID_SCANDALS_TWEAKS = "scandal.scandalstweaks"; internal const string GUID_INPUT_UTILS = "com.rune580.LethalCompanyInputUtils"; internal const string GUID_LETHALELEMENTS = "voxx.LethalElementsPlugin"; internal const string GUID_LETHALMIN = "NoteBoxz.LethalMin"; internal const string GUID_IMMERSIVE_VISOR = "ImmersiveVisor"; internal const string GUID_FIRST_PERSON_VIEW = "com.seeya.firstpersonview"; internal static bool INSTALLED_LETHALELEMENTS; internal static bool INSTALLED_LETHALMIN; internal static bool INSTALLED_IMMERSIVE_VISOR; internal static bool INSTALLED_FIRST_PERSON_VIEW; internal static void Init(Harmony harmony) { if (Chainloader.PluginInfos.ContainsKey("voxx.LethalElementsPlugin")) { INSTALLED_LETHALELEMENTS = true; harmony.PatchAll(typeof(LethalElementsCompatibility)); Plugin.LogDebug("CROSS-COMPATIBILITY - LethalElements detected"); } if (Chainloader.PluginInfos.ContainsKey("NoteBoxz.LethalMin")) { INSTALLED_LETHALMIN = true; harmony.PatchAll(typeof(LethalMinCompatibility)); Plugin.LogDebug("CROSS-COMPATIBILITY - LethalMin detected"); } if (Chainloader.PluginInfos.ContainsKey("ImmersiveVisor")) { INSTALLED_IMMERSIVE_VISOR = true; harmony.PatchAll(typeof(ImmersiveVisorCompatibility)); Plugin.LogDebug("CROSS-COMPATIBILITY - ImmersiveVisor detected"); } if (Chainloader.PluginInfos.ContainsKey("com.seeya.firstpersonview")) { INSTALLED_FIRST_PERSON_VIEW = true; harmony.PatchAll(typeof(FirstPersonViewCompatibility)); Plugin.LogDebug("CROSS-COMPATIBILITY - FirstPersonView detected"); } } } internal class UserConfig { internal static ConfigEntry haulerMirror; internal static ConfigEntry RecenterWheel; internal static void InitConfig() { ConfigFile config = ((BaseUnityPlugin)Plugin.Instance).Config; config.SaveOnConfigSet = false; haulerMirror = config.Bind("General", "Enable Mirrors", true, "Enable rendering for the side mirrors? (may impact performance for low end hardware)"); RecenterWheel = config.Bind("Quality Of Life", "Automatically Center Wheel", false, "Should the wheel be automatically re-centered?"); ClearOrphanedEntries(config); config.Save(); config.SaveOnConfigSet = true; } private static void ClearOrphanedEntries(ConfigFile cfg) { PropertyInfo propertyInfo = AccessTools.Property(typeof(ConfigFile), "OrphanedEntries"); Dictionary dictionary = (Dictionary)propertyInfo.GetValue(cfg); dictionary.Clear(); } } internal class VehicleControls : LcInputActions { [InputAction(/*Could not decode attribute arguments.*/)] public InputAction GasPedalKey { get; set; } = null; [InputAction(/*Could not decode attribute arguments.*/)] public InputAction BrakePedalKey { get; set; } = null; [InputAction(/*Could not decode attribute arguments.*/)] public InputAction JumpKey { get; set; } = null; [InputAction(/*Could not decode attribute arguments.*/)] public InputAction ToggleMagnetKey { get; set; } = null; } public static class VehicleUtils { internal static HaulerController pickupController; public static bool IsEnemyInPickup(EnemyAI enemyScript, BoxCollider navMeshBounds) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) return ((Collider)navMeshBounds).ClosestPoint(((Component)enemyScript).transform.position) == ((Component)enemyScript).transform.position || ((Collider)navMeshBounds).ClosestPoint(enemyScript.agent.destination) == enemyScript.agent.destination; } public static bool IsPlayerSeatedInPickup(PlayerControllerB playerScript, HaulerController pickupScript) { return (Object)(object)playerScript != (Object)null && (Object)(object)playerScript?.overridePhysicsParent == (Object)(object)((pickupScript != null) ? ((Component)pickupScript).transform : null); } public static bool IsPlayerInPickupBounds(PlayerControllerB playerScript, HaulerController pickupScript, bool usePlayerData = false) { return usePlayerData ? PlayerControllerBPatches.playerData[playerScript].playerRidingOnPickup : pickupScript.vehicleZone.playerInZone; } public static bool IsPlayerInPickupCab(PlayerControllerB playerScript, HaulerController pickupScript, bool usePlayerData = false) { return usePlayerData ? PlayerControllerBPatches.playerData[playerScript].playerRidingInPickupCab : pickupScript.vehicleCabZone.playerInZone; } public static bool IsPlayerOnOutsideOfPickup(PlayerControllerB playerScript, HaulerController pickupScript, bool usePlayerData = false) { return IsPlayerInPickupBounds(playerScript, pickupScript, usePlayerData) && !IsPlayerInPickupCab(playerScript, pickupScript, usePlayerData) && !IsPlayerSeatedInPickup(playerScript, pickupScript); } public static bool IsPickupCabEnclosed(HaulerController pickupScript) { return !((VehicleController)pickupScript).windshieldBroken && !((VehicleController)pickupScript).driverSideDoor.boolValue && !((VehicleController)pickupScript).passengerSideDoor.boolValue && !pickupScript.backLeftDoor.boolValue && !pickupScript.backRightDoor.boolValue && !pickupScript.frontLeftWindow.isWindowOpen && !pickupScript.frontRightWindow.isWindowOpen && !pickupScript.backLeftWindow.isWindowOpen && !pickupScript.backRightWindow.isWindowOpen && !pickupScript.sunroofOpen; } public static bool IsPickupMovingFastEnough(HaulerController pickupScript, float threshold) { return ((Vector3)(ref ((VehicleController)pickupScript).averageVelocity)).magnitude > threshold; } public static bool IsSeatedPlayerProtected(PlayerControllerB playerScript, HaulerController pickupScript, bool checkSunroof = false, bool checkWindows = false, bool windshieldCheck = false, bool velocityCheck = false, float velocityMagnitude = 0f) { if (velocityCheck && IsPickupMovingFastEnough(pickupScript, velocityMagnitude)) { return true; } bool flag = (Object)(object)playerScript == (Object)(object)((VehicleController)pickupScript).currentDriver; bool flag2 = (Object)(object)playerScript == (Object)(object)((VehicleController)pickupScript).currentPassenger; bool flag3 = (Object)(object)playerScript == (Object)(object)pickupScript.currentBackLeftPassenger; bool flag4 = (Object)(object)playerScript == (Object)(object)pickupScript.currentBackMiddlePassenger; bool flag5 = (Object)(object)playerScript == (Object)(object)pickupScript.currentBackRightPassenger; bool flag6 = flag || flag2; bool windshieldBroken = ((VehicleController)pickupScript).windshieldBroken; bool sunroofOpen = pickupScript.sunroofOpen; if ((checkSunroof && sunroofOpen) || (flag6 && windshieldCheck && windshieldBroken)) { return false; } bool flag7 = ((VehicleController)pickupScript).driverSideDoor.boolValue || (checkWindows && pickupScript.frontLeftWindow.isWindowOpen); bool flag8 = ((VehicleController)pickupScript).passengerSideDoor.boolValue || (checkWindows && pickupScript.frontRightWindow.isWindowOpen); bool flag9 = pickupScript.backLeftDoor.boolValue || (checkWindows && pickupScript.backLeftWindow.isWindowOpen); bool flag10 = pickupScript.backRightDoor.boolValue || (checkWindows && pickupScript.backRightWindow.isWindowOpen); if (flag && flag7) { return false; } if (flag2 && flag8) { return false; } if (flag3 && flag9) { return false; } if (flag4 && (flag9 || flag10)) { return false; } if (flag5 && flag10) { return false; } return true; } public static bool IsPlayerProtectedByPickup(PlayerControllerB playerScript, HaulerController pickupScript, bool checkSunroof = false, bool checkWindows = false, bool windshieldCheck = false, bool velocityCheck = false, float velocityMagnitude = 0f) { if (((VehicleController)pickupScript).carDestroyed) { return false; } if (velocityCheck && IsPickupMovingFastEnough(pickupScript, velocityMagnitude)) { return true; } bool flag = IsPlayerInPickupCab(playerScript, pickupScript); bool windshieldBroken = ((VehicleController)pickupScript).windshieldBroken; bool sunroofOpen = pickupScript.sunroofOpen; bool flag2 = ((VehicleController)pickupScript).driverSideDoor.boolValue || ((VehicleController)pickupScript).passengerSideDoor.boolValue || pickupScript.backLeftDoor.boolValue || pickupScript.backRightDoor.boolValue; bool flag3 = pickupScript.frontLeftWindow.isWindowOpen || pickupScript.frontRightWindow.isWindowOpen || pickupScript.backLeftWindow.isWindowOpen || pickupScript.backRightWindow.isWindowOpen; if (flag && (flag2 || (checkSunroof && sunroofOpen) || (checkWindows && flag3) || (windshieldCheck && windshieldBroken))) { return false; } if (IsPlayerInPickupBounds(playerScript, pickupScript) && !flag) { return false; } return true; } public static bool IsPlayerNearPickup(PlayerControllerB playerScript, HaulerController pickupScript) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((VehicleController)pickupScript).mainRigidbody.position; Vector3 position2 = ((Component)playerScript).transform.position; return Vector3.Distance(position2, position) <= 10f; } } } namespace CompanyHauler.Behaviour { public class HaulerCameraManager : MonoBehaviour { public HaulerController mainController = null; public MeshRenderer leftMirrorMesh = null; public MeshRenderer rightMirrorMesh = null; public MeshRenderer[] meshMirrors = null; public Camera[] cameraMirrors = null; public float cameraFramerate; public int camerasToRenderPerFrame = 1; private float elapsed; private int nextCameraToRender = 0; private float cameraRenderCountRemainder = 0f; public void LateUpdate() { if ((Object)(object)mainController == (Object)null || !((NetworkBehaviour)mainController).IsSpawned || ((VehicleController)mainController).carDestroyed) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return; } for (int i = 0; i < cameraMirrors.Length; i++) { if (!((Object)(object)cameraMirrors[i] == (Object)null)) { ((Behaviour)cameraMirrors[i]).enabled = false; } } if (!UserConfig.haulerMirror.Value || !VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, mainController)) { ((Renderer)leftMirrorMesh).enabled = false; ((Renderer)rightMirrorMesh).enabled = false; return; } elapsed += Time.deltaTime; if (elapsed < 1f / cameraFramerate) { return; } elapsed = 0f; ((Renderer)leftMirrorMesh).enabled = true; ((Renderer)rightMirrorMesh).enabled = true; int num = 0; for (int j = 0; j < cameraMirrors.Length; j++) { if (((Renderer)(object)meshMirrors[j]).IsVisibleToPlayersLocalCamera(localPlayerController.gameplayCamera)) { num++; } } float num2 = (float)camerasToRenderPerFrame * (float)num / (float)cameraMirrors.Length; cameraRenderCountRemainder += num2; int num3 = (nextCameraToRender + cameraMirrors.Length - 1) % cameraMirrors.Length; while (cameraRenderCountRemainder >= 0f) { if (((Renderer)(object)meshMirrors[nextCameraToRender]).IsVisibleToPlayersLocalCamera(localPlayerController.gameplayCamera)) { ((Behaviour)cameraMirrors[nextCameraToRender]).enabled = true; cameraRenderCountRemainder -= 1f; } nextCameraToRender = (nextCameraToRender + 1) % cameraMirrors.Length; if (nextCameraToRender == num3) { break; } } } } } namespace CompanyHauler.Scripts { public class HaulerAnimationEvents : MonoBehaviour { public HaulerController haulerController = null; public void OnSunroofOpen() { haulerController.sunroofOpen = true; } public void OnSunroofClose() { haulerController.sunroofOpen = false; } } public class HaulerController : VehicleController { [Header("DEBUG")] public bool isInTestMode = false; public float debugMotorTorque; public float debugBrakeTorque; public float debugSteeringAngle; [Header("Networking")] private bool receivedSyncData; public Vector2 syncedMoveInputVector; public bool syncedDrivePedalPressed; public bool syncedBrakePedalPressed; internal bool syncedTyreSlipping; internal float syncedTyreStress; internal float syncedEngineRPM; internal float syncedFrontWheelRPM; internal float syncedBackWheelRPM; internal float syncedWheelRPM; internal int syncedCarHP; internal float syncEffectsInterval; internal float syncTorqueInterval; internal float syncDrivetrainInterval; internal float syncedSteeringWheelRotation; internal float syncedCurrentMotorTorque; internal float syncedCurrentBrakeTorque; private float syncedSongTime; [Header("Player")] public HaulerPhysicsRegion vehicleZone = null; public HaulerPlayerZone vehicleCabZone = null; public PlayerControllerB lastDriver = null; public PlayerControllerB playerWhoShifted = null; public PlayerControllerB? currentBackLeftPassenger = null; public PlayerControllerB? currentBackMiddlePassenger = null; public PlayerControllerB? currentBackRightPassenger = null; public HaulerSeatAnimator frontLeftSeat = null; public HaulerSeatAnimator frontRightSeat = null; public HaulerSeatAnimator backLeftSeat = null; public HaulerSeatAnimator backSeat = null; public HaulerSeatAnimator backRightSeat = null; public Transform[] backLeftExitPoints = null; public Transform[] backRightExitPoints = null; public AnimatedObjectTrigger backLeftDoor = null; public AnimatedObjectTrigger backRightDoor = null; public InteractTrigger backLeftDoorTrigger = null; public InteractTrigger backRightDoorTrigger = null; public InteractTrigger backLeftPassengerSeatTrigger = null; public InteractTrigger backPassengerSeatTrigger = null; public InteractTrigger backRightPassengerSeatTrigger = null; public bool localPlayerInBackLeftPassengerSeat; public bool localPlayerInMiddlePassengerSeat; public bool localPlayerInBackRightPassengerSeat; [Header("Physics")] public HaulerWheelCollider frontLeftWheel = null; public HaulerWheelCollider frontRightWheel = null; public HaulerWheelCollider backLeftWheel = null; public HaulerWheelCollider backRightWheel = null; public HaulerCollisionTrigger collisionTrigger = null; public float timeSinceLastCollision; public List allWheels = null; public WheelHit[] wheelHits = (WheelHit[])(object)new WheelHit[4]; public Rigidbody playerPhysicsBody = null; public AnimationCurve steeringCurve = null; public Vector3 previousVehiclePosition; public Quaternion previousVehicleRotation; public AnimationCurve engineCurve = null; public AnimationCurve enginePowerCurve = null; public float torqueBoost = 1.25f; public float enginePower; public float engineReversePower; public bool forwardSlipping; public bool sidewaySlipping; public Coroutine shiftGearCoroutine = null; public float[] gearRatios = null; public float diffRatio; public int currentGear; public float upShiftThreshold; public float downShiftThreshold; public float lastShiftTime; public float shiftCooldown; public float shiftTime; public float steeringWheelAnimValue; public float normalisedCarHP; public float currentSteeringWheelAnimValue; public float steeringReturnSpeed; public float steeringSpeed; public float carDeacceleration; public float minTorque; public float maxReverseTorque; public float maxForwardTorque; public float inclineBoost; public float minInclineBoost; public float maxInclineBoost; public float maxInclineBoostAngle = 32f; public bool allowBoostTorque; public float forwardBoostSpeed; public float reverseBoostSpeed; public float boostReturnSpeed; public float boostMultiplierLimit; public float forwardBoostThreshold; public float reverseBoostThreshold; public float boostMultiplier; public float reverseCarAcceleration; public float brakeAcceleration; public float maxBrakeTorque; public float maxParkingBrakeTorque; public float currentMotorTorque; public float currentBrakeTorque; public float steeringAngle; public float maxSteeringAngle; public float forwardWheelSpeed; public float reverseWheelSpeed; public float fRpmDiff; public float bRpmDiff; public float frontWheelsRPM; public float backWheelsRPM; public float wheelRPM; public float frontWheelRPM; public float backWheelRPM; public bool backWheelsGrounded; public bool allWheelsGrounded; public bool allWheelsAirborne; public float forwardsSlip; public float sidewaysSlip; public bool hasDeliveredVehicle; [Header("VFX")] public TextMeshPro radioScreen = null; private Coroutine radioOnCoroutine = null; public Collider[] weatherEffectBlockers = null; public InteractTrigger startIgnitionTrigger = null; public InteractTrigger stopIgnitionTrigger = null; public Animator ignitionAnimator = null; public GameObject carKeyContainer = null; public GameObject keyItemHolder = null; public Transform ignitionKeyPosition = null; private Vector3 ignitionKeyScale = new Vector3(1f, 1f, 1f); private Vector3 keyPosLocal = new Vector3(0.05029682f, 0.1181492f, -0.09794867f); private Vector3 keyPosServer = new Vector3(0.0414306f, 0.09218378f, -0.09290992f); private Vector3 keyRotLocal = new Vector3(29.962f, -2.063f, -3.106f); private Vector3 keyRotServer = new Vector3(29.427f, -5.158f, -53.66f); public HaulerWindow frontLeftWindow = null; public HaulerWindow frontRightWindow = null; public HaulerWindow backLeftWindow = null; public HaulerWindow backRightWindow = null; public Material needleOnMaterial = null; public Material needleOffMaterial = null; public Material tachometerOnMaterial = null; public Material tachometerOffMaterial = null; public Material speedometerOnMaterial = null; public Material speedometerOffMaterial = null; public GameObject gaugeLightContainer = null; public Image speedometerImage = null; public Image tachometerImage = null; public MeshRenderer speedometerMesh = null; public MeshRenderer tachometerMesh = null; public Transform speedometerTransform = null; public Transform tachometerTransform = null; public float speedometerFloat; public float tachometerFloat; private Coroutine dashboardSweepCoroutine = null; private int currentSweepStage; private bool hasSweepedDashboard; public SpriteRenderer tractionControlSymbol = null; private bool tractionControlLightActive; public SpriteRenderer checkEngineSymbol = null; private bool hasPlayedCheckEngineWarning; private bool checkEngineLightActive; public SpriteRenderer coolantLevelSymbol = null; private bool coolantLevelLightActive; public SpriteRenderer immobiliserSymbol = null; public SpriteRenderer leftSignalSymbol = null; public SpriteRenderer hazardSignalSymbol = null; public SpriteRenderer rightSignalSymbol = null; public SpriteRenderer dippedBeamSymbol = null; private bool dippedBeamLightActive; public SpriteRenderer mainBeamSymbol = null; private bool mainBeamLightActive; public SpriteRenderer oilLevelSymbol = null; private bool oilLevelLightActive; public SpriteRenderer parkingBrakeSymbol = null; private bool parkingBrakeLightActive; public SpriteRenderer batteryLowSymbol = null; private bool batteryLowLightActive; public bool brakeLightsOn; public GameObject centerMountedLightContainer = null; public MeshRenderer centerMountedLight = null; public Material backLightOffMat = null; public Transform tempPushTransform = null; public MeshRenderer windshieldMesh = null; public AnimatedObjectTrigger windowWipers = null; public bool automaticWipersOn; public bool tailgateOpen; public bool sunroofOpen; public bool isCabinLightToggled; public float playerSteeringWheelAnimFloat; public float syncedPlayerSteeringAnim; public float shiftSpeed = 25f; public bool gaugesOn; public bool headlampsOn; public bool disableAnimations; public bool inIgnitionAnimation; public bool ignitionOn; public bool twistingKey; internal const string STEERING_WHEEL_SPEED = "steeringWheelTurnSpeed"; internal const string ANIMATION_SPEED = "animationSpeed"; internal const string IGNITION_ANIM = "SAIgnition_Anim"; internal const string CAR_ANIM = "SA_CarAnim"; internal const string JUMP_WHILE_IN_CAR = "SA_JumpInCar"; internal const string CAR_MOTION_TIME = "SA_CarMotionTime"; private readonly string DOOR_ENTER_HOVERTIP = "Use door : [LMB]"; private readonly string DOOR_EXIT_HOVERTIP = "Exit : [LMB]"; private readonly string PLAYER_MOVEMENT = "Move"; [Header("Destruction")] public GameObject[] disableOnDestroy = null; public GameObject mainBodyContainer = null; public GameObject sunroofContainer = null; public GameObject hoodDoorContainer = null; public GameObject frontLeftDoorContainer = null; public GameObject frontRightDoorContainer = null; public GameObject backLeftDoorContainer = null; public GameObject backRightDoorContainer = null; [Header("Audio")] public AudioSource roofRainAudio = null; public AudioSource cabinAudio = null; public AudioClip ignitionChime = null; public AudioClip chimeSoundWarning = null; public AudioSource carKeyAudio = null; public AudioClip dashButtonPress = null; public AudioSource windshieldAudio = null; public AudioSource roofInteractionAudio = null; public AudioSource leftDashboardAudio = null; public AudioSource centerDashboardAudio = null; public AudioSource rightDashboardAudio = null; public bool roofRainAudioActive; public bool hasPlayedIgnitionChime; public float timeLastSyncedRadio; public float radioPingTimestamp; public void OnEnable() { VehicleUtils.pickupController = this; } public void Awake() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) base.ragdollPhysicsBody.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody1.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody2.interpolation = (RigidbodyInterpolation)1; playerPhysicsBody.interpolation = (RigidbodyInterpolation)0; playerPhysicsBody.freezeRotation = true; base.backDoorOpen = true; ((VehicleController)this).Awake(); ((PlayerPhysicsRegion)vehicleZone).priority = 1; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; InitializePickup(); } public void SetBackDoorOpen(bool open) { tailgateOpen = open; } public void Start() { //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StartCoroutine(SetRainCollision()); if (maxBrakeTorque > maxParkingBrakeTorque) { maxBrakeTorque = maxParkingBrakeTorque - 100f; } base.carHP = base.baseCarHP; base.FrontLeftWheel.brakeTorque = maxParkingBrakeTorque; base.FrontRightWheel.brakeTorque = maxParkingBrakeTorque; base.BackLeftWheel.brakeTorque = maxParkingBrakeTorque; base.BackRightWheel.brakeTorque = maxParkingBrakeTorque; base.currentRadioClip = new Random(StartOfRound.Instance.randomMapSeed).Next(0, base.radioClips.Length); base.radioAudio.clip = base.radioClips[base.currentRadioClip]; base.decals = (DecalProjector[])(object)new DecalProjector[24]; if (StartOfRound.Instance.inShipPhase) { base.magnetedToShip = true; base.loadedVehicleFromSave = true; hasDeliveredVehicle = true; base.inDropshipAnimation = false; base.hasBeenSpawned = true; SetVehicleKinematic(setKinematic: true); ((Component)this).transform.position = StartOfRound.Instance.magnetPoint.position + StartOfRound.Instance.magnetPoint.forward * 7f; StartMagneting(); } } public void SendClientSyncData() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (base.magnetedToShip) { Vector3 eulerAngles = ((Quaternion)(ref base.magnetTargetRotation)).eulerAngles; MagnetCarRpc(base.magnetTargetPosition, eulerAngles, base.magnetStartPosition, base.magnetStartRotation, RoundManager.Instance.tempTransform.eulerAngles, base.averageVelocityAtMagnetStart); } } public IEnumerator SetRainCollision() { yield return (object)new WaitForSeconds(4f); ParticleSystem[] particleTriggers = (ParticleSystem[])(object)new ParticleSystem[13] { References.rainParticles, References.rainHitParticles, References.stormyRainParticles, References.stormyRainHitParticles, References.wesleyHurricaneRainParticles, References.wesleyHurricaneRainHitParticles, References.wesleyHurricaneSandParticles, References.wesleyForsakenRainParticles, References.wesleyForsakenRainHitParticles, References.kenjiAcidRainParticles, References.kenjiAcidRainHitParticles, References.kenjiAcidStormyRainParticles, References.kenjiAcidStormyRainHitParticles }; for (int i = 0; i < particleTriggers.Length; i++) { if ((Object)(object)particleTriggers[i] == (Object)null) { Plugin.LogDebug("Weather particle or Trigger is null!"); continue; } TriggerModule trigger = particleTriggers[i].trigger; for (int j = 0; j < weatherEffectBlockers.Length; j++) { int index = ((TriggerModule)(ref trigger)).colliderCount + j; ((TriggerModule)(ref trigger)).SetCollider(index, (Component)(object)weatherEffectBlockers[j]); } trigger = default(TriggerModule); } } public void ChangeGear_Forward(CallbackContext context) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected I4, but got Unknown if (((CallbackContext)(ref context)).performed && base.localPlayerInControl) { int num = (int)base.gear; if (num < 3) { ShiftToGearAndSync(num + 1); } } } public void ChangeGear_Backward(CallbackContext context) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected I4, but got Unknown if (((CallbackContext)(ref context)).performed && base.localPlayerInControl) { int num = (int)base.gear; if (num > 1) { ShiftToGearAndSync(num - 1); } } } public void ShiftToGearAndSync(int setGear) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_004a: 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: Invalid comparison between I4 and Unknown if ((int)base.gear != setGear) { base.timeAtLastGearShift = Time.realtimeSinceStartup; playerWhoShifted = GameNetworkManager.Instance.localPlayerController; int num = 0; if (setGear != 3) { num = ((setGear > (int)base.gear) ? 1 : 2); } base.gear = (CarGearShift)setGear; base.gearStickAudio.PlayOneShot(base.gearStickAudios[num]); ShiftToGearRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, setGear, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void ShiftToGearRpc(int playerId, int setGear, int gearIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3646988633u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); BytePacker.WriteValueBitPacked(val2, setGear); BytePacker.WriteValueBitPacked(val2, gearIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3646988633u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.timeAtLastGearShift = Time.realtimeSinceStartup; playerWhoShifted = StartOfRound.Instance.allPlayerScripts[playerId]; base.gear = (CarGearShift)setGear; base.gearStickAudio.PlayOneShot(base.gearStickAudios[gearIndex]); } } } public void SetFrontCabinLightOn(bool setOn) { if (!setOn || !isCabinLightToggled) { base.frontCabinLightContainer.SetActive(setOn); ((Renderer)base.frontCabinLightMesh).material = (setOn ? base.headlightsOnMat : base.headlightsOffMat); } } public void ToggleCabinLights() { ToggleCabinLightsOwnerRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] public void ToggleCabinLightsOwnerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1606966662u, val3, val, (SendTo)0, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1606966662u, val3, val, (SendTo)0, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isCabinLightToggled = !isCabinLightToggled; ToggleCabinLightsLocalClient(isCabinLightToggled, ignitionOn); ToggleCabinLightsRpc(isCabinLightToggled, ignitionOn); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void ToggleCabinLightsRpc(bool setToggle, bool isIgnitionOn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(559298925u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setToggle, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isIgnitionOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 559298925u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isCabinLightToggled = setToggle; ToggleCabinLightsLocalClient(isCabinLightToggled, isIgnitionOn); } } } public void ToggleCabinLightsLocalClient(bool setToggle, bool isIgnitionOn) { if (setToggle) { SetFrontCabinLightOn(setOn: false); } else { SetFrontCabinLightOn(isIgnitionOn); } } public void StartTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted && !inIgnitionAnimation && (!inIgnitionAnimation || !startIgnitionTrigger.isBeingHeldByPlayer)) { CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: true)); TryIgnitionRpc(base.keyIsInIgnition, ignitionOn); } } private IEnumerator TryIgnition(bool isLocalDriver) { if ((Object)(object)base.currentDriver == (Object)null) { base.keyIgnitionCoroutine = null; yield break; } if (base.keyIsInIgnition) { SetIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: true); base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 12); ignitionAnimator.SetInteger("SAIgnition_Anim", 12); yield return (object)new WaitForSeconds(0.02f); carKeyAudio.PlayOneShot(base.twistKey); SetIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.1467f); } else { SetIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: false); base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 2); ignitionAnimator.SetInteger("SAIgnition_Anim", 2); yield return (object)new WaitForSeconds(0.6f); carKeyAudio.PlayOneShot(base.insertKey); SetIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.2f); carKeyAudio.PlayOneShot(base.twistKey); SetIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.18f); } SetIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); if (!isLocalDriver) { yield break; } bool shiftInterlock = (int)base.gear == 3; if (shiftInterlock) { PlayIgnitionAudio(); } ignitionOn = true; if (dashboardSweepCoroutine == null && !hasSweepedDashboard) { dashboardSweepCoroutine = ((MonoBehaviour)this).StartCoroutine(DashboardSweepCoroutine()); } SetIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); SetFrontCabinLightOn(ignitionOn); SetDashboardGaugesOn(on: true); TryStartIgnitionRpc(shiftInterlock); if (!shiftInterlock) { yield break; } yield return (object)new WaitForSeconds(Random.Range(0.7f, 1.4f)); if ((float)Random.Range(0, 100) < base.chanceToStartIgnition) { inIgnitionAnimation = false; ignitionOn = true; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } SetIgnitionValues(keyTwisting: false, keyInHand: false, keyInSlot: true); SetIgnition(setStarted: true, setCabinLight: true); SetFrontCabinLightOn(ignitionOn); SetDashboardGaugesOn(on: true); CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); StartIgnitionRpc(); } else { base.chanceToStartIgnition += 14f; base.chanceToStartIgnition = Mathf.Clamp(base.chanceToStartIgnition, 0f, 101f); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryIgnitionRpc(bool setKeyInSlot, bool isIgnitionOn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1565903847u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isIgnitionOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1565903847u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!base.ignitionStarted) { CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; SetIgnitionValues(keyTwisting: false, keyInHand: false, setKeyInSlot); if (ignitionOn != isIgnitionOn) { ignitionOn = isIgnitionOn; SetFrontCabinLightOn(ignitionOn); } base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: false)); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryStartIgnitionRpc(bool shiftInterlock) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1377561967u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shiftInterlock, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1377561967u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (shiftInterlock) { PlayIgnitionAudio(); } ignitionOn = true; if (dashboardSweepCoroutine == null && !hasSweepedDashboard) { dashboardSweepCoroutine = ((MonoBehaviour)this).StartCoroutine(DashboardSweepCoroutine()); } SetIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); SetFrontCabinLightOn(ignitionOn); SetDashboardGaugesOn(on: true); } } private void PlayIgnitionAudio() { if (!hasPlayedIgnitionChime) { hasPlayedIgnitionChime = true; cabinAudio.Play(); } base.engineAudio1.Stop(); base.engineAudio1.clip = base.revEngineStart; base.engineAudio1.volume = 0.7f; base.engineAudio1.PlayOneShot(base.engineRev); base.carEngine1AudioActive = true; base.engineAudio1.pitch = 1f; } public void CancelTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted && inIgnitionAnimation && (inIgnitionAnimation || !startIgnitionTrigger.isBeingHeldByPlayer)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; int integer = localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim"); if (integer == 0 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 13); } else if ((integer == 2 || integer == 12) && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } else { localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } int integer2 = localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim"); CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; int num = integer2; if (integer == 13) { num = 3; } ignitionAnimator.SetInteger("SAIgnition_Anim", num); CancelTryIgnitionRpc(base.keyIsInIgnition, ignitionOn, integer2, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelTryIgnitionRpc(bool setKeyInSlot, bool isIgnitionOn, int playerAnimIndex, int ignitionAnimIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4062380867u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isIgnitionOn, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerAnimIndex); BytePacker.WriteValueBitPacked(val2, ignitionAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4062380867u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", playerAnimIndex); } ignitionAnimator.SetInteger("SAIgnition_Anim", ignitionAnimIndex); if (setKeyInSlot && !base.keyIsInIgnition) { carKeyAudio.PlayOneShot(base.insertKey); } SetIgnitionValues(keyTwisting: false, keyInHand: false, setKeyInSlot); SetDashboardGaugesOn(isIgnitionOn); if (ignitionOn != isIgnitionOn) { ignitionOn = isIgnitionOn; SetFrontCabinLightOn(ignitionOn); if (dashboardSweepCoroutine == null && !hasSweepedDashboard) { dashboardSweepCoroutine = ((MonoBehaviour)this).StartCoroutine(DashboardSweepCoroutine()); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void StartIgnitionRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2218070621u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2218070621u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; disableAnimations = false; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } SetIgnitionValues(keyTwisting: false, keyInHand: false, keyInSlot: true); SetIgnition(setStarted: true, setCabinLight: true); SetFrontCabinLightOn(ignitionOn); SetDashboardGaugesOn(on: true); CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); } } public void SetIgnition(bool setStarted, bool setCabinLight) { SetFrontCabinLightOn(setCabinLight); base.carEngine1AudioActive = setStarted; if (setStarted) { disableAnimations = false; inIgnitionAnimation = false; base.startKeyIgnitionTrigger.SetActive(false); base.removeKeyIgnitionTrigger.SetActive(true); if (setStarted != base.ignitionStarted) { base.ignitionStarted = true; base.carExhaustParticle.Play(); base.engineAudio1.Stop(); base.engineAudio1.PlayOneShot(base.engineStartSuccessful); base.engineAudio1.clip = base.engineRun; } } else { base.startKeyIgnitionTrigger.SetActive(true); base.removeKeyIgnitionTrigger.SetActive(false); base.ignitionStarted = false; base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } } public void RemoveKeyFromIgnition() { if (base.localPlayerInControl && base.ignitionStarted && !inIgnitionAnimation) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); base.chanceToStartIgnition = 10f; RemoveKeyFromIgnitionRpc(); } } private IEnumerator RemoveKey() { disableAnimations = true; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 6); } ignitionAnimator.SetInteger("SAIgnition_Anim", 6); yield return (object)new WaitForSeconds(0.28f); SetIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: false); carKeyAudio.PlayOneShot(base.removeKey); SetIgnition(setStarted: false, setCabinLight: false); ignitionOn = false; hasPlayedIgnitionChime = false; CancelDashboardSweep(); SetDashboardGaugesOn(on: false); yield return (object)new WaitForSeconds(0.73f); SetIgnitionValues(keyTwisting: false, keyInHand: false, keyInSlot: false); base.keyIgnitionCoroutine = null; } [Rpc(/*Could not decode attribute arguments.*/)] public void RemoveKeyFromIgnitionRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2004876350u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2004876350u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.ignitionStarted) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); } } } public void CancelIgnitionAnimation(bool ignitionOn, bool setIgnitionAnim) { CancelIgnitionCoroutine(); base.carEngine1AudioActive = ignitionOn; twistingKey = false; base.keyIsInDriverHand = false; if (setIgnitionAnim) { ignitionAnimator.SetInteger("SAIgnition_Anim", ignitionOn ? 1 : 0); } } internal void CancelIgnitionCoroutine() { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } } public void SetIgnitionValues(bool keyTwisting, bool keyInHand, bool keyInSlot) { twistingKey = keyTwisting; base.keyIsInDriverHand = keyInHand; base.keyIsInIgnition = keyInSlot; } public void SetTriggerHoverTip(InteractTrigger trigger, string tip) { trigger.hoverTip = tip; } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelSetPlayerInVehicleRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2486552702u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2486552702u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)(object)val4)) { InteractTriggerPatches.CancelVehicleSeatInteraction(); } } } public void SetDriverInVehicle() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) SetDriverInVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetDriverInVehicleServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2635849284u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2635849284u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled || (Object)(object)base.currentDriver != (Object)null) { CancelSetPlayerInVehicleRpc(playerId); return; } base.currentDriver = val3; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(rpcParams.Receive.SenderClientId); SetDriverInVehicleOwnerRpc(); } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetDriverInVehicleOwnerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3992045072u, val3, val, (SendTo)0, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3992045072u, val3, val, (SendTo)0, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((VehicleSeatAnimator)frontLeftSeat).SetLocalPlayerIntoSeat(); disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; ActivateControl(); SetTriggerHoverTip(base.driverSideDoorTrigger, DOOR_EXIT_HOVERTIP); startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionCoroutine(); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); playerSteeringWheelAnimFloat = 0.5f; syncedPlayerSteeringAnim = 0.5f; if (base.ignitionStarted) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } int integer = GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim"); if (base.driverSideDoor.boolValue) { base.driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (!base.setControlTips) { base.setControlTips = true; HUDManager.Instance.ChangeControlTipMultiple(base.carTooltips, false, (Item)null); } SetDriverInVehicleNotOwnerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ignitionOn, base.keyIsInIgnition, base.ignitionStarted, integer); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInVehicleNotOwnerRpc(int playerId, bool isIgnitionOn, bool setKeyInSlot, bool setStarted, int playerAnimIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1813739882u, val3, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isIgnitionOn, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setStarted, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1813739882u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val4 == (Object)null) { Plugin.LogError("SetDriverInVehicleNotOwnerRpc failed to find player object reference from player client id!"); return; } base.currentDriver = val4; disableAnimations = !setStarted; inIgnitionAnimation = false; ((VehicleSeatAnimator)frontLeftSeat).SetPlayerAnimations(val4, false); startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionCoroutine(); val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); playerSteeringWheelAnimFloat = 0.5f; syncedPlayerSteeringAnim = 0.5f; SetDashboardGaugesOn(gaugesOn); ignitionOn = isIgnitionOn; SetFrontCabinLightOn(isIgnitionOn); base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = setStarted; val4.playerBodyAnimator.SetInteger("SA_CarAnim", playerAnimIndex); } } public void OnDriverExitVehicle() { //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_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening && !((Object)(object)base.currentDriver != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { base.localPlayerInControl = false; SetTriggerHoverTip(base.driverSideDoorTrigger, DOOR_ENTER_HOVERTIP); disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); DisableControl(); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, ignitionOn); base.chanceToStartIgnition = 10f; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; OnDriverExitVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, base.syncedPosition, base.syncedRotation, base.keyIsInIgnition, base.ignitionStarted, ignitionOn); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitVehicleServerRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setKeyInSlot, bool engineStarted, bool isIgnitionOn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3156768623u, val3, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref engineStarted, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isIgnitionOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3156768623u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OnDriverExitVehicleRpc(playerId, carLocation, carRotation, setKeyInSlot, engineStarted, isIgnitionOn); ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(0uL); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitVehicleRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setKeyInSlot, bool setStarted, bool isIgnitionOn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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_0188: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2002477769u, val3, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setStarted, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isIgnitionOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2002477769u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val4 == (Object)null) { Plugin.LogError("OnDriverExitVehicleRpc failed to find player object reference from player client id!"); return; } if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)val4) { Plugin.LogDebug("OnDriverExitVehicleRpc player argument was the previous occupant!"); return; } base.syncedPosition = carLocation; base.syncedRotation = carRotation; base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = null; ((VehicleSeatAnimator)frontLeftSeat).ReturnPlayerAnimations(val4, false); base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = setStarted; if (setStarted && !base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Play(); } else if (!setStarted && base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } disableAnimations = !setStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionAnimation(setStarted, setIgnitionAnim: true); SetIgnition(setStarted, isIgnitionOn); SetDashboardGaugesOn(isIgnitionOn); base.chanceToStartIgnition = 10f; } public void ExitDriverSideSeat() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (base.localPlayerInControl) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); int num = CanExitVehicle(base.driverSideExitPoints); if (num == 0 && !base.driverSideDoor.boolValue) { base.driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(base.driverSideExitPoints[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(base.driverSideExitPoints[1].position, false, 0f, false, true); } } } public void SetPassengerInVehicle() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) SetPassengerInVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInVehicleServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2639261388u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2639261388u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled || (Object)(object)base.currentPassenger != (Object)null) { CancelSetPlayerInVehicleRpc(playerId); return; } base.currentPassenger = val3; SetPassengerInVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInVehicleRpc(NetworkBehaviourReference playerNetObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3911999087u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3911999087u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("SetPassengerInVehicleRpc failed to find player object reference from network behaviour!"); return; } val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((VehicleSeatAnimator)frontRightSeat).SetLocalPlayerIntoSeat(); base.localPlayerInPassengerSeat = true; SetTriggerHoverTip(base.passengerSideDoorTrigger, DOOR_EXIT_HOVERTIP); if (base.passengerSideDoor.boolValue) { base.passengerSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)frontRightSeat).SetPlayerAnimations(val4, false); } base.currentPassenger = val4; val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } public void OnPassengerExitVehicle() { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening && !((Object)(object)base.currentPassenger != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { base.localPlayerInPassengerSeat = false; SetTriggerHoverTip(base.passengerSideDoorTrigger, DOOR_ENTER_HOVERTIP); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); base.currentPassenger = null; OnPassengerExitVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnPassengerExitVehicleRpc(NetworkBehaviourReference playerNetObjRef, 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2064211234u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2064211234u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("OnPassengerExitVehicleRpc failed to find player object reference from network behaviour!"); return; } ((VehicleSeatAnimator)frontRightSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(exitPoint, false, 0f, false, true); base.currentPassenger = null; } } public void ExitPassengerSideSeat() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (base.localPlayerInPassengerSeat) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); int num = CanExitVehicle(base.passengerSideExitPoints); if (num == 0 && !base.passengerSideDoor.boolValue) { base.passengerSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(base.passengerSideExitPoints[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(base.passengerSideExitPoints[1].position, false, 0f, false, true); } } } public void SetBackLeftPassengerInVehicle() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) SetBackLeftPassengerInVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackLeftPassengerInVehicleServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1821892825u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1821892825u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled || (Object)(object)currentBackLeftPassenger != (Object)null) { CancelSetPlayerInVehicleRpc(playerId); return; } currentBackLeftPassenger = val3; SetBackLeftPassengerInVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackLeftPassengerInVehicleRpc(NetworkBehaviourReference playerNetObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(627394285u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 627394285u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("SetBackLeftPassengerInVehicleRpc failed to find player object reference from network behaviour!"); return; } val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((VehicleSeatAnimator)backLeftSeat).SetLocalPlayerIntoSeat(); localPlayerInBackLeftPassengerSeat = true; SetTriggerHoverTip(backLeftDoorTrigger, DOOR_EXIT_HOVERTIP); if (backLeftDoor.boolValue) { backLeftDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)backLeftSeat).SetPlayerAnimations(val4, false); } currentBackLeftPassenger = val4; val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } public void OnBackLeftPassengerExitVehicle() { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening && !((Object)(object)currentBackLeftPassenger != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { localPlayerInBackLeftPassengerSeat = false; SetTriggerHoverTip(backLeftDoorTrigger, DOOR_ENTER_HOVERTIP); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); currentBackLeftPassenger = null; OnBackLeftPassengerExitVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackLeftPassengerExitVehicleRpc(NetworkBehaviourReference playerNetObjRef, 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3310941490u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3310941490u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("OnBackLeftPassengerExitVehicleRpc failed to find player object reference from network behaviour!"); return; } ((VehicleSeatAnimator)backLeftSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(exitPoint, false, 0f, false, true); currentBackLeftPassenger = null; } } public void ExitBackLeftPassengerSideSeat() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (localPlayerInBackLeftPassengerSeat) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); int num = CanExitVehicle(backLeftExitPoints); if (num == 0 && !backLeftDoor.boolValue) { backLeftDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(backLeftExitPoints[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(backLeftExitPoints[1].position, false, 0f, false, true); } } } public void SetBackMiddlePassengerInVehicle() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) SetBackMiddlePassengerInVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackMiddlePassengerInVehicleServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1686437049u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1686437049u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled || (Object)(object)currentBackMiddlePassenger != (Object)null) { CancelSetPlayerInVehicleRpc(playerId); return; } currentBackMiddlePassenger = val3; SetBackMiddlePassengerInVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackMiddlePassengerInVehicleRpc(NetworkBehaviourReference playerNetObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3301448698u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3301448698u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("SetBackMiddlePassengerInVehicleRpc failed to find player object reference from network behaviour!"); return; } val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((VehicleSeatAnimator)backSeat).SetLocalPlayerIntoSeat(); localPlayerInMiddlePassengerSeat = true; SetTriggerHoverTip(backLeftDoorTrigger, DOOR_EXIT_HOVERTIP); SetTriggerHoverTip(backRightDoorTrigger, DOOR_EXIT_HOVERTIP); if (backLeftDoor.boolValue) { backLeftDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (backRightDoor.boolValue) { backRightDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)backSeat).SetPlayerAnimations(val4, false); } currentBackMiddlePassenger = val4; val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } public void OnBackMiddlePassengerExitVehicle() { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening && !((Object)(object)currentBackMiddlePassenger != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { localPlayerInMiddlePassengerSeat = false; SetTriggerHoverTip(backLeftDoorTrigger, DOOR_ENTER_HOVERTIP); SetTriggerHoverTip(backRightDoorTrigger, DOOR_ENTER_HOVERTIP); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); currentBackMiddlePassenger = null; OnBackMiddlePassengerExitVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackMiddlePassengerExitVehicleRpc(NetworkBehaviourReference playerNetObjRef, 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2939451655u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2939451655u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("OnBackMiddlePassengerExitVehicleRpc failed to find player object reference from network behaviour!"); return; } ((VehicleSeatAnimator)backSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(exitPoint, false, 0f, false, true); currentBackMiddlePassenger = null; } } public void ExitMiddlePassengerSideSeat(bool offSide) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (localPlayerInMiddlePassengerSeat) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); Transform[] array = (offSide ? backRightExitPoints : backLeftExitPoints); int num = CanExitVehicle(array); AnimatedObjectTrigger val = (offSide ? backRightDoor : backLeftDoor); if (num == 0 && !val.boolValue) { val.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(array[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(array[1].position, false, 0f, false, true); } } } public void SetBackRightPassengerInVehicle() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) SetBackRightPassengerInVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackRightPassengerInVehicleServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3953312235u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3953312235u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled || (Object)(object)currentBackRightPassenger != (Object)null) { CancelSetPlayerInVehicleRpc(playerId); return; } currentBackRightPassenger = val3; SetBackRightPassengerInVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackRightPassengerInVehicleRpc(NetworkBehaviourReference playerNetObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(145869324u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 145869324u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("SetBackRightPassengerInVehicleRpc failed to find player object reference from network behaviour!"); return; } val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((VehicleSeatAnimator)backRightSeat).SetLocalPlayerIntoSeat(); localPlayerInBackRightPassengerSeat = true; SetTriggerHoverTip(backRightDoorTrigger, DOOR_EXIT_HOVERTIP); if (backRightDoor.boolValue) { backRightDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)backRightSeat).SetPlayerAnimations(val4, false); } currentBackRightPassenger = val4; val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } public void OnBackRightPassengerExitVehicle() { //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening && !((Object)(object)currentBackRightPassenger != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { localPlayerInBackRightPassengerSeat = false; SetTriggerHoverTip(backRightDoorTrigger, DOOR_ENTER_HOVERTIP); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); currentBackRightPassenger = null; OnBackRightPassengerExitVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackRightPassengerExitVehicleRpc(NetworkBehaviourReference playerNetObjRef, 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_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2597747102u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2597747102u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.LogError("OnBackRightPassengerExitVehicleRpc failed to find player object reference from network behaviour!"); return; } ((VehicleSeatAnimator)backRightSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(exitPoint, false, 0f, false, true); currentBackRightPassenger = null; } } public void ExitBackRightPassengerSideSeat() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (localPlayerInBackRightPassengerSeat) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); int num = CanExitVehicle(backRightExitPoints); if (num == 0 && !backRightDoor.boolValue) { backRightDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(backRightExitPoints[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(backRightExitPoints[1].position, false, 0f, false, true); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverLeaveGameServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2623378010u, val3, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2623378010u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(0uL); OnDriverLeave(val4, base.ignitionStarted, base.keyIsInIgnition, ignitionOn); OnDriverLeaveGameRpc(playerId, base.syncedPosition, base.syncedRotation, base.ignitionStarted, base.keyIsInIgnition, ignitionOn); } } } public void OnDriverLeave(PlayerControllerB playerController, bool setIgnitionState, bool setKeyInSlot, bool isIgnitionOn) { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = null; ignitionOn = isIgnitionOn; SetDashboardGaugesOn(ignitionOn); base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = setIgnitionState; if (base.ignitionStarted && !base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Play(); } else if (!base.ignitionStarted && base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; ((VehicleSeatAnimator)frontLeftSeat).ReturnPlayerAnimations(playerController, false); playerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); playerController.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, ignitionOn); } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverLeaveGameRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setIgnitionState, bool setKeyInSlot, bool isIgnitionOn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1758630016u, val3, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setIgnitionState, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isIgnitionOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1758630016u, val3, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { base.syncedPosition = carLocation; base.syncedRotation = carRotation; OnDriverLeave(val4, setIgnitionState, setKeyInSlot, isIgnitionOn); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnPassengerLeaveGameRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2694304376u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2694304376u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { ((VehicleSeatAnimator)frontRightSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); base.currentPassenger = null; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackLeftPassengerLeaveGameRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(202486398u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 202486398u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { ((VehicleSeatAnimator)backLeftSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); currentBackLeftPassenger = null; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackMiddlePassengerLeaveGameRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(483350378u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 483350378u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { ((VehicleSeatAnimator)backSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); currentBackMiddlePassenger = null; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackRightPassengerLeaveGameRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2819610473u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2819610473u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { ((VehicleSeatAnimator)backRightSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger("SA_CarAnim", 0); val4.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); currentBackRightPassenger = null; } } } private int CanExitVehicle(Transform[] exitPoints) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < exitPoints.Length; i++) { if (!CheckExitPointInvalid(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, exitPoints[i].position, base.exitCarLayerMask, (QueryTriggerInteraction)1)) { return i; } } return -1; } public bool CheckExitPointInvalid(Vector3 playerPos, Vector3 exitPoint, int layerMask, QueryTriggerInteraction interaction) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0050: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (Physics.Linecast(playerPos, exitPoint, layerMask, interaction)) { return true; } if (Physics.CheckCapsule(exitPoint, exitPoint + Vector3.up, 0.5f, layerMask, interaction)) { return true; } LayerMask val = LayerMask.op_Implicit(layerMask | LayerMask.GetMask(new string[1] { "Vehicle" })); if (!Physics.Linecast(exitPoint, exitPoint + Vector3.down * 4f, LayerMask.op_Implicit(val), interaction)) { return true; } return false; } public void ActivateControl() { Plugin.VehicleControlsInstance.JumpKey.performed += DoTurboBoost; Plugin.VehicleControlsInstance.ToggleMagnetKey.performed += ActivateMagnet; if (isInTestMode) { InputSystem.actions.FindAction("Emote2", false).performed += ChangeGear_Forward; InputSystem.actions.FindAction("Emote1", false).performed += ChangeGear_Backward; } base.currentDriver = GameNetworkManager.Instance.localPlayerController; base.localPlayerInControl = true; base.steeringAnimValue = 0f; steeringWheelAnimValue = 0f; base.drivePedalPressed = false; base.brakePedalPressed = false; } private void DisableControl() { Plugin.VehicleControlsInstance.JumpKey.performed -= DoTurboBoost; Plugin.VehicleControlsInstance.ToggleMagnetKey.performed -= ActivateMagnet; if (isInTestMode) { InputSystem.actions.FindAction("Emote2", false).performed -= ChangeGear_Forward; InputSystem.actions.FindAction("Emote1", false).performed -= ChangeGear_Backward; } base.currentDriver = null; base.localPlayerInControl = false; base.steeringAnimValue = 0f; steeringWheelAnimValue = 0f; base.drivePedalPressed = false; base.brakePedalPressed = false; } public void ActivateMagnet(CallbackContext context) { //IL_0017: 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 (((CallbackContext)(ref context)).performed) { float num = Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position); if (num >= 30f) { Plugin.LogDebug($"Pickup is too far away from the magnet to toggle it. Distance: {num}"); } else { References.magnetTrigger.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } } public void GetVehicleInput() { //IL_0060: 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) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null) && !localPlayerController.isTypingChat && !localPlayerController.quickMenuManager.isMenuOpen) { SyncVehicleInput(); base.moveInputVector = IngamePlayerSettings.Instance.playerInput.actions.FindAction(PLAYER_MOVEMENT, false).ReadValue(); base.moveInputVector.x = (StartOfRound.Instance.localPlayerUsingController ? base.moveInputVector.x : Mathf.Round(base.moveInputVector.x)); base.moveInputVector.y = Mathf.Round(base.moveInputVector.y); base.steeringAnimValue = base.moveInputVector.x; if (base.steeringAnimValue == 0f) { steeringWheelAnimValue = NormaliseFloat(Mathf.Lerp(steeringWheelAnimValue, 0f, steeringReturnSpeed * Time.deltaTime)); } else { steeringWheelAnimValue = NormaliseFloat(Mathf.Lerp(steeringWheelAnimValue, base.steeringAnimValue, steeringSpeed * Time.deltaTime)); } float num = Plugin.VehicleControlsInstance.GasPedalKey.ReadValue(); float num2 = Plugin.VehicleControlsInstance.BrakePedalKey.ReadValue(); base.drivePedalPressed = num > 0.1f && shiftGearCoroutine == null; base.brakePedalPressed = num2 > 0.1f; if (UserConfig.RecenterWheel.Value && base.moveInputVector.x == 0f) { base.steeringWheelAnimFloat = NormaliseFloat(Mathf.MoveTowards(base.steeringWheelAnimFloat, 0f, base.steeringWheelTurnSpeed * Time.deltaTime / 6f)); } } } private void SyncVehicleInput() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) if (syncedMoveInputVector != base.moveInputVector || syncedDrivePedalPressed != base.drivePedalPressed || syncedBrakePedalPressed != base.brakePedalPressed) { syncedMoveInputVector = base.moveInputVector; syncedDrivePedalPressed = base.drivePedalPressed; syncedBrakePedalPressed = base.brakePedalPressed; SyncPlayerInputsRpc(base.moveInputVector, base.drivePedalPressed, base.brakePedalPressed); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncPlayerInputsRpc(Vector2 playerInput, bool gasPressed, bool brakePressed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3210169668u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerInput); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref gasPressed, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref brakePressed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3210169668u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncedMoveInputVector = playerInput; syncedDrivePedalPressed = gasPressed; syncedBrakePedalPressed = brakePressed; } } } public void EnableVehicleCollisionForAllPlayers() { Plugin.LogDebug("Attempted to enable collision, but this is unnecessary!"); } public void DisableVehicleCollisionForAllPlayers() { Plugin.LogDebug("Attempted to disable collision, but this is unnecessary!"); } public void SetVehicleCollisionForPlayer(bool setEnabled, PlayerControllerB player) { Plugin.LogDebug("Attempted to set collision, but this is unnecessary!"); } private void InitializePickup() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Unknown result type (might be due to invalid IL or missing references) //IL_0327: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) base.gear = (CarGearShift)3; base.MaxEngineRPM = 4500f; base.MinEngineRPM = 900f; base.engineIntensityPercentage = 180f; base.EngineTorque = 2800f; engineReversePower = -6000f; base.carAcceleration = 470f; carDeacceleration = 3900f; reverseCarAcceleration = 3000f; base.idleSpeed = 60f; base.minimalBumpForce = 10000f; base.mediumBumpForce = 38000f; base.maximumBumpForce = 89000f; gearRatios = new float[6]; gearRatios[0] = -4.8f; gearRatios[1] = 5.8f; gearRatios[2] = 3.2f; gearRatios[3] = 2.3f; gearRatios[4] = 1.7f; gearRatios[5] = 1.3f; diffRatio = 4.4f; upShiftThreshold = 3800f; downShiftThreshold = 1400f; shiftCooldown = 0.5f; shiftTime = 0.25f; maxBrakeTorque = 4100f; maxParkingBrakeTorque = 4400f; minInclineBoost = 1.6f; maxInclineBoost = 2.15f; maxInclineBoostAngle = 32f; base.carMaxSpeed = 50f; base.mainRigidbody.maxLinearVelocity = base.carMaxSpeed; base.mainRigidbody.maxAngularVelocity = 4f; base.mainRigidbody.automaticCenterOfMass = false; base.mainRigidbody.centerOfMass = new Vector3(0f, -0.6f, 0.7f); base.mainRigidbody.automaticInertiaTensor = false; base.speed = 55f; base.stability = 0.55f; base.carTooltips = new string[3] { "Gas pedal : [W]", "Brake pedal : [S]", "Boost : [Space]" }; base.FrontLeftWheel.sprungMass = 220f; base.FrontRightWheel.sprungMass = 220f; base.BackLeftWheel.sprungMass = 210f; base.BackRightWheel.sprungMass = 210f; forwardWheelSpeed = 5000f; reverseWheelSpeed = -5000f; base.syncSpeedMultiplier = 10f; base.syncRotationSpeed = 0.2f; base.movingAverageLength = 20; base.carHitPlayerForceFraction = 30f; base.carReactToPlayerHitMultiplier = 2850f; base.turboBoostForce = 12000f; base.turboBoostUpwardForce = 28800f; base.jumpForce = 4900f; base.pushForceMultiplier = 80f; base.pushVerticalOffsetAmount = 1.1f; base.steeringWheelTurnSpeed = 4.65f; base.torqueForce = 1.85f; SetWheelFriction(); JointSpring suspensionSpring = new JointSpring { spring = 20000f, damper = 3600f, targetPosition = 0.5f }; base.FrontRightWheel.suspensionSpring = suspensionSpring; base.FrontLeftWheel.suspensionSpring = suspensionSpring; base.BackRightWheel.suspensionSpring = suspensionSpring; base.BackLeftWheel.suspensionSpring = suspensionSpring; float wheelDampingRate = 0.1f; base.FrontLeftWheel.wheelDampingRate = wheelDampingRate; base.FrontRightWheel.wheelDampingRate = wheelDampingRate; base.BackRightWheel.wheelDampingRate = wheelDampingRate; base.BackLeftWheel.wheelDampingRate = wheelDampingRate; float mass = 120f; base.FrontLeftWheel.mass = mass; base.FrontRightWheel.mass = mass; base.BackLeftWheel.mass = mass; base.BackRightWheel.mass = mass; float forceAppPointDistance = 0.05f; base.FrontLeftWheel.forceAppPointDistance = forceAppPointDistance; base.FrontRightWheel.forceAppPointDistance = forceAppPointDistance; base.BackLeftWheel.forceAppPointDistance = forceAppPointDistance; base.BackRightWheel.forceAppPointDistance = forceAppPointDistance; base.backDoorOpen = true; steeringReturnSpeed = 10f; steeringSpeed = 8f; base.gearStickAudio.volume = 0.7f; } public void SetWheelFriction() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) WheelFrictionCurve val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 0.6f; ((WheelFrictionCurve)(ref val)).extremumValue = 0.9f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.78f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 0.66f; ((WheelFrictionCurve)(ref val)).stiffness = 1.05f; WheelFrictionCurve forwardFriction = val; base.FrontRightWheel.forwardFriction = forwardFriction; base.FrontLeftWheel.forwardFriction = forwardFriction; base.BackRightWheel.forwardFriction = forwardFriction; base.BackLeftWheel.forwardFriction = forwardFriction; val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 0.6f; ((WheelFrictionCurve)(ref val)).extremumValue = 1f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.75f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 0.82f; ((WheelFrictionCurve)(ref val)).stiffness = 0.75f; WheelFrictionCurve sidewaysFriction = val; base.FrontRightWheel.sidewaysFriction = sidewaysFriction; base.FrontLeftWheel.sidewaysFriction = sidewaysFriction; base.BackRightWheel.sidewaysFriction = sidewaysFriction; base.BackLeftWheel.sidewaysFriction = sidewaysFriction; } private void SetCarEffects(float setSteering) { setSteering = (((NetworkBehaviour)this).IsOwner ? setSteering : 0f); base.steeringWheelAnimFloat = Mathf.Clamp(base.steeringWheelAnimFloat + setSteering * base.steeringWheelTurnSpeed * Time.deltaTime / 6f, -1f, 1f); float num = Mathf.Clamp((base.steeringWheelAnimFloat + 1f) / 2f, 0f, 1f) - base.steeringWheelAnimator.GetFloat("steeringWheelTurnSpeed"); base.steeringWheelAnimator.SetFloat("steeringWheelTurnSpeed", Mathf.Clamp((base.steeringWheelAnimFloat + 1f) / 2f, 0f, 1f)); if (((NetworkBehaviour)this).IsOwner && base.localPlayerInControl && (Object)(object)base.currentDriver != (Object)null) { playerSteeringWheelAnimFloat = base.currentDriver.playerBodyAnimator.GetFloat("animationSpeed") + num * -2f; } SetCarTyreSlipEffects(); SetCarDashboard(); SetCarLighting(); SetCarAutomaticShifter(); SetCarAudioEffects(); SetCarKeyEffects(); if (((NetworkBehaviour)this).IsOwner) { SyncCarEffects(); return; } base.steeringWheelAnimFloat = Mathf.Lerp(base.steeringWheelAnimFloat, syncedSteeringWheelRotation, 6f * Time.deltaTime); playerSteeringWheelAnimFloat = Mathf.MoveTowards(playerSteeringWheelAnimFloat, syncedPlayerSteeringAnim, base.steeringWheelTurnSpeed * Time.deltaTime / 6f); } public void SetCarTyreSlipEffects() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner) { float num = Vector3.Dot(Vector3.Normalize(base.mainRigidbody.velocity * 1000f), ((Component)this).transform.forward); float num2 = Mathf.Abs(backWheelRPM); bool flag = false; if (backWheelsGrounded) { if ((forwardSlipping || sidewaySlipping) && num2 >= 350f) { num = Mathf.Max(num, 0.8f); flag = true; if (((Vector3)(ref base.averageVelocity)).magnitude > 8f && !base.tireSparks.isPlaying) { base.tireSparks.Play(true); } } else { flag = false; if (base.tireSparks.isEmitting) { base.tireSparks.Stop(true, (ParticleSystemStopBehavior)1); } } } else { flag = false; if (base.tireSparks.isEmitting) { base.tireSparks.Stop(true, (ParticleSystemStopBehavior)1); } } SetVehicleAudioProperties(base.skiddingAudio, flag, 0f, num, 3f, useVolumeInsteadOfPitch: true); if (Mathf.Abs(syncedTyreStress - num) > 0.02f || syncedTyreSlipping != flag) { syncedTyreStress = num; syncedTyreSlipping = flag; SetCarTyreStressRpc(num, flag); } } else { if (syncedTyreSlipping && ((Vector3)(ref base.averageVelocity)).magnitude > 8f && !base.tireSparks.isPlaying) { base.tireSparks.Play(true); } else if (!syncedTyreSlipping && base.tireSparks.isEmitting) { base.tireSparks.Stop(true, (ParticleSystemStopBehavior)1); } SetVehicleAudioProperties(base.skiddingAudio, syncedTyreSlipping, 0f, syncedTyreStress, 3f, useVolumeInsteadOfPitch: true); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetCarTyreStressRpc(float stress, bool wheelSkidding) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(91946280u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref stress, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref wheelSkidding, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 91946280u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncedTyreStress = stress; syncedTyreSlipping = wheelSkidding; } } } public void SetCarKeyEffects(bool localUseBodyHands = false) { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: 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_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.currentDriver == (Object)null || base.keyIsInIgnition) { if (((Renderer)base.keyObject).enabled != base.keyIsInIgnition) { ((Renderer)base.keyObject).enabled = base.keyIsInIgnition; } if ((Object)(object)((Component)base.keyObject).transform.parent != (Object)(object)ignitionKeyPosition) { ((Component)base.keyObject).transform.SetParent(ignitionKeyPosition); } ((Component)base.keyObject).transform.localScale = ignitionKeyScale; if ((Object)(object)keyItemHolder.transform.parent != (Object)(object)carKeyContainer.transform) { keyItemHolder.transform.SetParent(carKeyContainer.transform, false); } keyItemHolder.transform.localScale = Vector3.one; keyItemHolder.transform.localPosition = Vector3.zero; keyItemHolder.transform.localRotation = Quaternion.identity; ((Component)base.keyObject).transform.localPosition = Vector3.zero; ((Component)base.keyObject).transform.localRotation = Quaternion.identity; } else if (base.keyIsInDriverHand) { if (!((Renderer)base.keyObject).enabled) { ((Renderer)base.keyObject).enabled = true; } bool flag = base.localPlayerInControl && !localUseBodyHands; Transform val = (flag ? base.currentDriver.localItemHolder : base.currentDriver.serverItemHolder); Vector3 localPosition = (flag ? keyPosLocal : keyPosServer); Vector3 val2 = (flag ? keyRotLocal : keyRotServer); if ((Object)(object)keyItemHolder.transform.parent != (Object)(object)val.parent) { keyItemHolder.transform.SetParent(val.parent, false); } keyItemHolder.transform.localScale = Vector3.one; keyItemHolder.transform.localPosition = Vector3.zero; keyItemHolder.transform.localRotation = Quaternion.identity; if ((Object)(object)((Component)base.keyObject).transform.parent != (Object)(object)keyItemHolder.transform) { ((Component)base.keyObject).transform.SetParent(keyItemHolder.transform); } ((Component)base.keyObject).transform.localPosition = localPosition; ((Component)base.keyObject).transform.localRotation = Quaternion.Euler(val2); } else { if (((Renderer)base.keyObject).enabled) { ((Renderer)base.keyObject).enabled = false; } if ((Object)(object)((Component)base.keyObject).transform.parent != (Object)(object)ignitionKeyPosition) { ((Component)base.keyObject).transform.SetParent(ignitionKeyPosition); } ((Component)base.keyObject).transform.localScale = ignitionKeyScale; if ((Object)(object)keyItemHolder.transform.parent != (Object)(object)carKeyContainer.transform) { keyItemHolder.transform.SetParent(carKeyContainer.transform, false); } keyItemHolder.transform.localScale = Vector3.one; keyItemHolder.transform.localPosition = Vector3.zero; keyItemHolder.transform.localRotation = Quaternion.identity; ((Component)base.keyObject).transform.localPosition = Vector3.zero; ((Component)base.keyObject).transform.localRotation = Quaternion.identity; } } private void SetDashboardSymbols() { SetSymbolActive(checkEngineSymbol, checkEngineLightActive); SetSymbolActive(tractionControlSymbol, tractionControlLightActive); SetSymbolActive(coolantLevelSymbol, coolantLevelLightActive); SetSymbolActive(dippedBeamSymbol, dippedBeamLightActive); SetSymbolActive(mainBeamSymbol, mainBeamLightActive); SetSymbolActive(oilLevelSymbol, oilLevelLightActive); SetSymbolActive(parkingBrakeSymbol, parkingBrakeLightActive); SetSymbolActive(batteryLowSymbol, batteryLowLightActive); } private void SetSymbolActive(SpriteRenderer symbolSprite, bool spriteActive) { if (((Renderer)symbolSprite).enabled != spriteActive) { ((Renderer)symbolSprite).enabled = spriteActive; } } private IEnumerator DashboardSweepCoroutine() { SetSymbolActive(leftSignalSymbol, spriteActive: true); SetSymbolActive(hazardSignalSymbol, spriteActive: true); SetSymbolActive(rightSignalSymbol, spriteActive: true); currentSweepStage = 0; yield return (object)new WaitForSeconds(0.48f); SetSymbolActive(immobiliserSymbol, spriteActive: false); currentSweepStage = 1; yield return (object)new WaitForSeconds(0.35f); SetSymbolActive(leftSignalSymbol, spriteActive: false); SetSymbolActive(hazardSignalSymbol, spriteActive: false); SetSymbolActive(rightSignalSymbol, spriteActive: false); currentSweepStage = 2; hasSweepedDashboard = true; dashboardSweepCoroutine = null; } private void CancelDashboardSweep() { if (dashboardSweepCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dashboardSweepCoroutine); dashboardSweepCoroutine = null; } SetSymbolActive(leftSignalSymbol, spriteActive: false); SetSymbolActive(hazardSignalSymbol, spriteActive: false); SetSymbolActive(rightSignalSymbol, spriteActive: false); SetSymbolActive(immobiliserSymbol, spriteActive: false); currentSweepStage = -1; hasSweepedDashboard = false; } private void SetWarningLampsOff() { checkEngineLightActive = false; tractionControlLightActive = false; coolantLevelLightActive = false; oilLevelLightActive = false; parkingBrakeLightActive = false; batteryLowLightActive = false; dippedBeamLightActive = false; mainBeamLightActive = false; } private void SetCarDashboard() { //IL_001d: 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) speedometerTransform.localRotation = Quaternion.Euler(0f, 155f * speedometerFloat, 0f); tachometerTransform.localRotation = Quaternion.Euler(0f, 154.5f * tachometerFloat, 0f); if (base.ignitionStarted) { float num = Mathf.Abs(wheelRPM) / 900f; float num2 = base.EngineRPM / base.MaxEngineRPM; speedometerFloat = Mathf.Lerp(speedometerFloat, num, 4f * Time.deltaTime); tachometerFloat = Mathf.Lerp(tachometerFloat, num2, 5f * Time.deltaTime); } else { bool flag = base.engineAudio1.volume > 0.1f && twistingKey; speedometerFloat = Mathf.Lerp(speedometerFloat, 0f, 6f * Time.deltaTime); tachometerFloat = Mathf.Lerp(tachometerFloat, flag ? 0.075f : 0f, 4.5f * Time.deltaTime); } SetDashboardSymbols(); SetRadioScreen(); if (!ignitionOn) { SetWarningLampsOff(); hasPlayedCheckEngineWarning = false; } else { SetWarningLamps(); } } private void SetRadioScreen() { if (!ignitionOn && !base.radioOn) { ((TMP_Text)radioScreen).text = null; } else if ((Object)(object)RoundManager.Instance.currentLevel != (Object)null && !RoundManager.Instance.currentLevel.planetHasTime) { ((TMP_Text)radioScreen).text = DateTime.Now.ToString("h:mm tt"); } else { ((TMP_Text)radioScreen).text = ((TMP_Text)HUDManager.Instance.clockNumber).text.Trim().Replace("\n", " "); } } private void SetWarningLamps() { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Invalid comparison between Unknown and I4 //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Invalid comparison between Unknown and I4 if (currentSweepStage < 2) { checkEngineLightActive = true; } else if (normalisedCarHP <= 0.5f) { if (!checkEngineLightActive) { checkEngineLightActive = true; } if (hasPlayedIgnitionChime && !hasPlayedCheckEngineWarning && !cabinAudio.isPlaying) { hasPlayedCheckEngineWarning = true; cabinAudio.PlayOneShot(chimeSoundWarning); } } else if (normalisedCarHP > 0.5f && checkEngineLightActive) { checkEngineLightActive = false; hasPlayedCheckEngineWarning = false; } tractionControlLightActive = (base.tireSparks.isEmitting && base.ignitionStarted && (int)base.gear == 1) || (!base.ignitionStarted && currentSweepStage < 2); coolantLevelLightActive = !base.ignitionStarted || (base.ignitionStarted && normalisedCarHP <= 0.72f); oilLevelLightActive = !base.ignitionStarted || (base.ignitionStarted && normalisedCarHP <= 0.36f); parkingBrakeLightActive = (int)base.gear == 3; batteryLowLightActive = !base.ignitionStarted; dippedBeamLightActive = headlampsOn; mainBeamLightActive = headlampsOn; } private void SetCarLighting() { SetBackLights(); } private void SetBackLights() { bool flag = base.brakePedalPressed && base.ignitionStarted; bool flag2 = headlampsOn || flag; if (base.backLightsOn != flag2) { base.backLightsOn = flag2; ((Renderer)base.backLightsMesh).material = (Material)(base.backLightsOn ? ((object)base.backLightOnMat) : ((object)backLightOffMat)); base.backLightsContainer.SetActive(base.backLightsOn); } if (brakeLightsOn != flag) { brakeLightsOn = flag; ((Renderer)centerMountedLight).material = (Material)(brakeLightsOn ? ((object)base.backLightOnMat) : ((object)backLightOffMat)); centerMountedLightContainer.SetActive(brakeLightsOn); } } private void SetCarAutomaticShifter() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected I4, but got Unknown CarGearShift gear = base.gear; CarGearShift val = gear; switch (val - 1) { case 2: base.gearStickAnimValue = Mathf.MoveTowards(base.gearStickAnimValue, 0f, shiftSpeed * Time.deltaTime * (Time.realtimeSinceStartup - base.timeAtLastGearShift)); break; case 1: base.gearStickAnimValue = Mathf.MoveTowards(base.gearStickAnimValue, 0.5f, shiftSpeed * Time.deltaTime * (Time.realtimeSinceStartup - base.timeAtLastGearShift)); break; case 0: base.gearStickAnimValue = Mathf.MoveTowards(base.gearStickAnimValue, 1f, shiftSpeed * Time.deltaTime * (Time.realtimeSinceStartup - base.timeAtLastGearShift)); break; } base.gearStickAnimator.SetFloat("currentGear", Mathf.Clamp(base.gearStickAnimValue, 0f, 1f)); } public void SyncCarEffects() { if (syncEffectsInterval > 0.045f) { if (syncedSteeringWheelRotation != base.steeringWheelAnimFloat) { syncEffectsInterval = 0f; syncedSteeringWheelRotation = base.steeringWheelAnimFloat; syncedPlayerSteeringAnim = playerSteeringWheelAnimFloat; SyncCarEffectsRpc(base.steeringWheelAnimFloat, playerSteeringWheelAnimFloat); } } else { syncEffectsInterval += Time.deltaTime; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncCarEffectsRpc(float wheelRotation, float playerSteering) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2267252635u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref wheelRotation, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerSteering, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2267252635u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncedSteeringWheelRotation = wheelRotation; syncedPlayerSteeringAnim = playerSteering; } } } private void SetVehicleAudioProperties(AudioSource audio, bool audioActive, float lowest, float highest, float lerpSpeed, bool useVolumeInsteadOfPitch = false, float onVolume = 1f) { if (audioActive && ((Object)(object)audio == (Object)(object)base.rollingAudio || (Object)(object)audio == (Object)(object)base.skiddingAudio) && (base.magnetedToShip || allWheelsAirborne)) { audioActive = false; } if (!audioActive) { if (useVolumeInsteadOfPitch) { audio.volume = Mathf.Lerp(audio.volume, 0f, lerpSpeed * Time.deltaTime); } else { audio.volume = Mathf.Lerp(audio.volume, 0f, 4f * Time.deltaTime); audio.pitch = Mathf.Lerp(audio.pitch, lowest, 4f * Time.deltaTime); } if (audio.isPlaying && audio.volume <= 0.001f) { audio.Stop(); } } else { if (!audio.isPlaying) { audio.Play(); } if (useVolumeInsteadOfPitch) { audio.volume = Mathf.Max(Mathf.Lerp(audio.volume, highest, lerpSpeed * Time.deltaTime), lowest); return; } audio.volume = Mathf.Lerp(audio.volume, onVolume, 20f * Time.deltaTime); audio.pitch = Mathf.Lerp(audio.pitch, highest, lerpSpeed * Time.deltaTime); } } public void SetCarAudioEffects() { //IL_01b5: 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_0265: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) float num = engineCurve.Evaluate(base.EngineRPM / base.MaxEngineRPM); float highest = (base.ignitionStarted ? Mathf.Clamp(num, 0.65f, 1.15f) : 1f); float highest2 = Mathf.Clamp(num, 0.7f, 1.5f); float num2 = Mathf.Abs(wheelRPM); float highest3 = Mathf.Clamp(num2 / 63f, 0f, 1f); base.carEngine2AudioActive = base.ignitionStarted; base.carRollingAudioActive = !allWheelsAirborne && num2 > 10f; if (!base.ignitionStarted) { highest = 1f; } SetVehicleAudioProperties(base.engineAudio1, base.carEngine1AudioActive, 0.7f, highest, 2f, useVolumeInsteadOfPitch: false, 0.7f); SetVehicleAudioProperties(base.engineAudio2, base.carEngine2AudioActive, 0.7f, highest2, 3f, useVolumeInsteadOfPitch: false, 0.5f); SetVehicleAudioProperties(base.rollingAudio, base.carRollingAudioActive, 0f, highest3, 5f, useVolumeInsteadOfPitch: true); SetVehicleAudioProperties(base.extremeStressAudio, base.underExtremeStress, 0.2f, 1f, 3f, useVolumeInsteadOfPitch: true); SetRadioValues(); if (base.engineAudio1.volume > 0.3f && base.engineAudio1.isPlaying && Time.realtimeSinceStartup - base.timeAtLastEngineAudioPing > 2f) { base.timeAtLastEngineAudioPing = Time.realtimeSinceStartup; if (base.EngineRPM > 2800f) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 32f, 0.75f, 0, false, 2692); } if (base.EngineRPM > 1200f) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 25f, 0.6f, 0, false, 2692); } else if (!base.ignitionStarted) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 15f, 0.6f, 0, false, 2692); } else { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 11f, 0.5f, 0, false, 2692); } } SetVehicleAudioProperties(roofRainAudio, roofRainAudioActive, 0f, 1f, 3f, useVolumeInsteadOfPitch: true); roofRainAudio.spatialBlend = Mathf.MoveTowards(roofRainAudio.spatialBlend, roofRainAudioActive ? 0f : 1f, 4f * Time.deltaTime); base.turbulenceAudio.volume = Mathf.Lerp(base.turbulenceAudio.volume, Mathf.Min(1f, base.turbulenceAmount), 10f * Time.deltaTime); base.turbulenceAmount = Mathf.Max(base.turbulenceAmount - Time.deltaTime, 0f); if (base.turbulenceAudio.volume > 0.02f) { if (!base.turbulenceAudio.isPlaying) { base.turbulenceAudio.Play(); } } else if (base.turbulenceAudio.isPlaying) { base.turbulenceAudio.Stop(); } if (base.honkingHorn) { base.hornAudio.pitch = 1f; if (!base.hornAudio.isPlaying) { base.hornAudio.Play(); } if (Time.realtimeSinceStartup - base.timeAtLastHornPing > 2f) { base.timeAtLastHornPing = Time.realtimeSinceStartup; RoundManager.Instance.PlayAudibleNoise(((Component)base.hornAudio).transform.position, 28f, 0.85f, 0, false, 106217); } } else { base.hornAudio.pitch = Mathf.Max(base.hornAudio.pitch - Time.deltaTime * 6f, 0.01f); if (base.hornAudio.pitch < 0.02f && base.hornAudio.isPlaying) { base.hornAudio.Stop(); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncRadioTimeRpc(float songTime, float syncedTime, float staticTime) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(728965984u, val3, val, (SendTo)3, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref songTime, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref syncedTime, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref staticTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 728965984u, val3, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.currentSongTime = songTime; syncedSongTime = syncedTime; timeLastSyncedRadio = Time.realtimeSinceStartup; SetRadioTime(); SetRadioStaticTime(staticTime); } } } public void SetRadioTime() { if (!((Object)(object)base.radioAudio.clip == (Object)null) && base.radioOn) { float num = (syncedSongTime + (Time.realtimeSinceStartup - timeLastSyncedRadio)) % base.radioAudio.clip.length; if (Mathf.Abs(num - base.radioAudio.time) > 1f) { base.radioAudio.time = num; } } } public void SetRadioStaticTime(float staticTime) { float num = (staticTime + (Time.realtimeSinceStartup - timeLastSyncedRadio)) % base.radioInterference.clip.length; if (Mathf.Abs(num - base.radioInterference.time) > 1f) { base.radioInterference.time = num; } } public void ChangeRadioStation() { if (base.radioClips.Length == 0) { Plugin.LogWarning("No music found! are you using CruiserTunes to remove the original tracks?"); return; } base.currentRadioClip = (base.currentRadioClip + 1) % base.radioClips.Length; switch ((int)Mathf.Round(base.radioSignalQuality)) { case 0: base.radioSignalQuality = 3f; base.radioSignalDecreaseThreshold = 90f; break; case 1: base.radioSignalQuality = 2f; base.radioSignalDecreaseThreshold = 70f; break; case 2: base.radioSignalQuality = 1f; base.radioSignalDecreaseThreshold = 30f; break; case 3: base.radioSignalQuality = 1f; base.radioSignalDecreaseThreshold = 10f; break; } SetRadioOnLocalClient(on: true); float num = Mathf.Clamp(base.currentSongTime % base.radioAudio.clip.length, 0.01f, base.radioAudio.clip.length - 0.1f); timeLastSyncedRadio = Time.realtimeSinceStartup; base.radioAudio.time = num; SetRadioStationRpc(base.currentRadioClip, num, base.radioSignalQuality, base.radioSignalDecreaseThreshold); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetRadioStationRpc(int radioStation, float setTime, float signalQuality, float signalDecrease) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2641975322u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, radioStation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setTime, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalQuality, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2641975322u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.radioClips.Length == 0) { Plugin.LogWarning("No music found! are you using CruiserTunes to remove the original tracks?"); return; } base.currentRadioClip = radioStation; base.radioSignalQuality = signalQuality; base.radioSignalDecreaseThreshold = signalDecrease; SetRadioOnLocalClient(on: true); timeLastSyncedRadio = Time.realtimeSinceStartup; base.radioAudio.time = setTime; } } public void SwitchRadio() { if (base.radioClips.Length == 0) { Plugin.LogWarning("No music found! are you using CruiserTunes to remove the original tracks?"); return; } SetRadioOnLocalClient(!base.radioOn, setClip: false); float num = Mathf.Clamp(base.currentSongTime % base.radioAudio.clip.length, 0.01f, base.radioAudio.clip.length - 0.1f); timeLastSyncedRadio = Time.realtimeSinceStartup; base.radioAudio.time = num; SetRadioRpc(base.radioOn, base.currentRadioClip, num, base.radioSignalQuality, base.radioSignalDecreaseThreshold); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetRadioRpc(bool setRadioOn, int radioStation, float setTime, float signalQuality, float signalDecrease) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2528730006u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setRadioOn, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, radioStation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setTime, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalQuality, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2528730006u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.radioClips.Length == 0) { Plugin.LogWarning("No music found! are you using CruiserTunes to remove the original tracks?"); return; } base.currentRadioClip = radioStation; base.radioSignalQuality = signalQuality; base.radioSignalDecreaseThreshold = signalDecrease; SetRadioOnLocalClient(setRadioOn, setClip: false); timeLastSyncedRadio = Time.realtimeSinceStartup; base.radioAudio.time = setTime; } } public void SetRadioValues() { //IL_0136: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsServer && base.radioTurnedOnBefore) { base.currentSongTime += Time.deltaTime; if (Time.realtimeSinceStartup - timeLastSyncedRadio > 1f) { timeLastSyncedRadio = Time.realtimeSinceStartup; syncedSongTime = base.radioAudio.time; SyncRadioTimeRpc(base.currentSongTime, syncedSongTime, base.radioInterference.time); } } if (!base.radioOn || (Object)(object)base.radioAudio.clip == (Object)null) { if (base.radioAudio.isPlaying) { base.radioAudio.Stop(); } if (base.radioInterference.isPlaying) { base.radioInterference.Stop(); } return; } if (!base.radioTurnedOnBefore) { base.radioTurnedOnBefore = true; } if (base.radioAudio.isPlaying && Time.realtimeSinceStartup > radioPingTimestamp) { radioPingTimestamp = Time.realtimeSinceStartup + 1f; RoundManager.Instance.PlayAudibleNoise(((Component)base.radioAudio).transform.position, 16f, Mathf.Min((base.radioAudio.volume + base.radioInterference.volume) * 0.5f, 0.9f), 0, false, 106217); } if (((NetworkBehaviour)this).IsOwner) { float num = Random.Range(0, 100); float num2 = (3f - base.radioSignalQuality - 1.5f) * base.radioSignalTurbulence; base.radioSignalDecreaseThreshold = Mathf.Clamp(base.radioSignalDecreaseThreshold + Time.deltaTime * num2, 0f, 100f); if (num > base.radioSignalDecreaseThreshold) { base.radioSignalQuality = Mathf.Clamp(base.radioSignalQuality - Time.deltaTime, 0f, 3f); } else { base.radioSignalQuality = Mathf.Clamp(base.radioSignalQuality + Time.deltaTime, 0f, 3f); } if (Time.realtimeSinceStartup - base.changeRadioSignalTime > 0.3f) { base.changeRadioSignalTime = Time.realtimeSinceStartup; if (base.radioSignalQuality < 1.2f && Random.Range(0, 100) < 6) { base.radioSignalQuality = Mathf.Min(base.radioSignalQuality + 1.5f, 3f); base.radioSignalDecreaseThreshold = Mathf.Min(base.radioSignalDecreaseThreshold + 30f, 100f); } SetRadioSignalQualityRpc((int)Mathf.Round(base.radioSignalQuality), base.radioSignalDecreaseThreshold); } } switch ((int)Mathf.Round(base.radioSignalQuality)) { case 3: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 1f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 0f, 2f * Time.deltaTime); break; case 2: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 0.85f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 0.4f, 2f * Time.deltaTime); break; case 1: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 0.6f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 0.8f, 2f * Time.deltaTime); break; case 0: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 0.4f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 1f, 2f * Time.deltaTime); break; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetRadioSignalQualityRpc(int signalQuality, float signalDecrease) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2525560865u, val3, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, signalQuality); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2525560865u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.radioSignalQuality = signalQuality; base.radioSignalDecreaseThreshold = signalDecrease; } } } public void SetRadioOnLocalClient(bool on, bool setClip = true) { Plugin.LogDebug($"Radio called with setRadioOn? {on}, setClip? {setClip}"); base.radioOn = on; if (on) { if (setClip || (Object)(object)base.radioAudio.clip == (Object)null) { if ((Object)(object)base.radioAudio.clip == (Object)null) { Plugin.LogDebug("Setting station, was null!"); } base.radioAudio.clip = base.radioClips[base.currentRadioClip]; Plugin.LogDebug($"Set radio clip to {base.currentRadioClip}, station? {((Object)base.radioAudio.clip).name}"); } base.radioAudio.Play(); base.radioInterference.Play(); } else { base.radioAudio.Stop(); base.radioInterference.Stop(); Plugin.LogDebug("Stop radio playback!"); } } public bool CarReactToObstacle(Vector3 vel, Vector3 position, Vector3 impulse, CarObstacleType type, float obstacleSize = 1f, EnemyAI enemyScript = null, bool dealDamage = true) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected I4, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_034b: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) switch ((int)type) { case 2: if (base.carHP < 10) { base.mainRigidbody.AddForceAtPosition(Vector3.up * base.torqueForce + vel, position, (ForceMode)1); } else { base.mainRigidbody.AddForceAtPosition((Vector3.up * base.torqueForce + vel) * 0.5f, position, (ForceMode)1); } CarBump(base.averageVelocity * 0.7f); if (dealDamage) { DealPermanentDamage(1, position); } return true; case 0: PlayCollisionAudio(position, 5, Mathf.Clamp(((Vector3)(ref vel)).magnitude / 7f, 0.65f, 1f)); if (((Vector3)(ref vel)).magnitude < 4.25f) { base.mainRigidbody.velocity = Vector3.Normalize(-impulse * 100000000f) * 9f; DealPermanentDamage(1); return true; } base.mainRigidbody.AddForceAtPosition(Vector3.up * base.torqueForce, position, (ForceMode)2); return false; case 1: { float num; if (obstacleSize <= 1f) { num = 2f; _ = base.carReactToPlayerHitMultiplier; } else if (obstacleSize <= 2f) { num = 9f; _ = base.carReactToPlayerHitMultiplier; } else { num = 15f; _ = base.carReactToPlayerHitMultiplier; } vel = Vector3.Scale(vel, new Vector3(1f, 0f, 1f)); base.mainRigidbody.AddForceAtPosition(Vector3.up * base.torqueForce, position, (ForceMode)2); bool result = false; if (((Vector3)(ref vel)).magnitude < num) { if (obstacleSize <= 1f) { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * 4f, (ForceMode)1); if (((Vector3)(ref vel)).magnitude > 1f) { enemyScript.KillEnemyOnOwnerClient(false); } } else { CarBump(base.averageVelocity); base.mainRigidbody.velocity = Vector3.Normalize(-impulse * 100000000f) * 9f; PlayerControllerB val = (((Object)(object)base.currentDriver != (Object)null) ? base.currentDriver : base.currentPassenger); if (((Vector3)(ref vel)).magnitude > 2f && dealDamage) { enemyScript.HitEnemyOnLocalClient(2, Vector3.zero, val, true, 331); } result = true; if (obstacleSize > 2f) { DealPermanentDamage(3, position); } } } else { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * (base.carReactToPlayerHitMultiplier - 220f), (ForceMode)1); if (dealDamage) { DealPermanentDamage(5, position); } PlayerControllerB val2 = (((Object)(object)base.currentDriver != (Object)null) ? base.currentDriver : base.currentPassenger); enemyScript.HitEnemyOnLocalClient(22, Vector3.zero, val2, false, -1); } PlayCollisionAudio(position, 5, 1f); return result; } default: return false; } } public void OnCollisionEnter(Collision collision) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Unknown result type (might be due to invalid IL or missing references) //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_0240: 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_048e: Unknown result type (might be due to invalid IL or missing references) //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0448: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || base.magnetedToShip || !base.hasBeenSpawned || ((Component)collision.collider).gameObject.layer != 8 || Time.realtimeSinceStartup - timeSinceLastCollision < 0.1f) { return; } float num = 0f; int contacts = collision.GetContacts(base.contacts); Vector3 val = Vector3.zero; Vector3 damagePosition; for (int i = 0; i < contacts; i++) { damagePosition = ((ContactPoint)(ref base.contacts[i])).impulse; if (((Vector3)(ref damagePosition)).magnitude > num) { damagePosition = ((ContactPoint)(ref base.contacts[i])).impulse; num = ((Vector3)(ref damagePosition)).magnitude; } val += ((ContactPoint)(ref base.contacts[i])).point; } val /= (float)contacts; num /= Time.fixedDeltaTime; if (num < base.minimalBumpForce || ((Vector3)(ref base.averageVelocity)).magnitude < 4f) { if (contacts > 3 && ((Vector3)(ref base.averageVelocity)).magnitude > 2.5f) { SetInternalStress(0.25f); base.lastStressType = "Scraping"; } timeSinceLastCollision = Time.realtimeSinceStartup; return; } float setVolume = 0.5f; int num2 = -1; if (((Vector3)(ref base.averageVelocity)).magnitude > 27f) { if (base.carHP < 3) { DestroyCarRpc(); DestroyCar(); timeSinceLastCollision = Time.realtimeSinceStartup; return; } num2 = 2; setVolume = Mathf.Clamp((num - base.maximumBumpForce) / 20000f, 0.8f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.7f, 1f); PlayCollisionAudio(val, num2, setVolume); damagePosition = default(Vector3); DealPermanentDamage(6, damagePosition); CarCollisionRpc(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f)); BreakWindshield(); timeSinceLastCollision = Time.realtimeSinceStartup + 0.25f; return; } if (num >= base.minimalBumpForce && num < base.mediumBumpForce && ((Vector3)(ref base.averageVelocity)).magnitude > 3f) { num2 = 0; setVolume = Mathf.Clamp((num - base.minimalBumpForce) / (base.mediumBumpForce - base.minimalBumpForce), 0.25f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.25f, 1f); } else if (num >= base.mediumBumpForce && num < base.maximumBumpForce && ((Vector3)(ref base.averageVelocity)).magnitude > 6f) { num2 = 1; setVolume = Mathf.Clamp((num - base.mediumBumpForce) / (base.maximumBumpForce - base.mediumBumpForce), 0.67f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.5f, 1f); } else if (num >= base.maximumBumpForce && ((Vector3)(ref base.averageVelocity)).magnitude > 12f) { num2 = 2; setVolume = Mathf.Clamp((num - base.maximumBumpForce) / 20000f, 0.8f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.7f, 1f); damagePosition = default(Vector3); DealPermanentDamage(1, damagePosition); timeSinceLastCollision = Time.realtimeSinceStartup + 0.2f; } if (num2 != -1) { PlayCollisionAudio(val, num2, setVolume); if (num > base.maximumBumpForce + 15000f && ((Vector3)(ref base.averageVelocity)).magnitude > 22f) { CarCollisionRpc(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f)); DamagePlayerInVehicle(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f)); BreakWindshield(); damagePosition = default(Vector3); DealPermanentDamage(2, damagePosition); } else { CarBump(Vector3.ClampMagnitude(-collision.relativeVelocity, 40f)); } timeSinceLastCollision = Time.realtimeSinceStartup + 0.33f; } } public bool IsPlayerSeatedInCar() { return base.localPlayerInControl || base.localPlayerInPassengerSeat || localPlayerInBackLeftPassengerSeat || localPlayerInMiddlePassengerSeat || localPlayerInBackRightPassengerSeat; } public void CarBump(Vector3 vel) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) CarBumpRpc(vel); CarBumpLocalClient(vel); } public void CarBumpLocalClient(Vector3 vel) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (IsPlayerSeatedInCar() && ((Vector3)(ref vel)).magnitude > 40f) { localPlayerController.externalForceAutoFade += vel; } else if (VehicleUtils.IsPlayerInPickupBounds(localPlayerController, this)) { vel = Vector3.ClampMagnitude(vel, 30f); localPlayerController.externalForceAutoFade += vel; } } [Rpc(/*Could not decode attribute arguments.*/)] public void CarBumpRpc(Vector3 vel) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3748484443u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref vel); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3748484443u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CarBumpLocalClient(vel); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void CarCollisionRpc(Vector3 vel) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4114752875u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref vel); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4114752875u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DamagePlayerInVehicle(vel); BreakWindshield(); } } } public void DamagePlayerInVehicle(Vector3 vel) { //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (IsPlayerSeatedInCar()) { if (((Vector3)(ref vel)).magnitude > 30f) { if (localPlayerController.health < 48) { localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); } else { localPlayerController.DamagePlayer(40, true, true, (CauseOfDeath)16, 0, false, vel); } return; } if (((Vector3)(ref vel)).magnitude <= 24f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); localPlayerController.DamagePlayer(30, true, true, (CauseOfDeath)16, 0, false, vel); return; } HUDManager.Instance.ShakeCamera((ScreenShakeType)3); if (localPlayerController.health < 20) { localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); } else { localPlayerController.DamagePlayer(20, true, true, (CauseOfDeath)16, 0, false, vel); } } else if (VehicleUtils.IsPlayerInPickupBounds(localPlayerController, this)) { if (localPlayerController.health <= 40) { localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); return; } localPlayerController.DamagePlayer(30, true, true, (CauseOfDeath)16, 0, false, vel); localPlayerController.externalForceAutoFade += vel; } } private void BreakWindshield() { if (!base.windshieldBroken) { base.glassParticle.Play(); base.windshieldBroken = true; ((Renderer)windshieldMesh).enabled = false; windshieldAudio.PlayOneShot(base.windshieldBreak); } } private void RegenerateWindshield() { if (base.windshieldBroken) { base.windshieldBroken = false; ((Renderer)windshieldMesh).enabled = true; } } public void PlayCollisionAudio(Vector3 setPosition, int audioType, float setVolume) { //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) if (Time.realtimeSinceStartup - base.audio1Time > Time.realtimeSinceStartup - base.audio2Time) { bool flag = Time.realtimeSinceStartup - base.audio1Time >= base.collisionAudio1.clip.length * 0.8f; if (base.audio1Type <= audioType || flag) { base.audio1Time = Time.realtimeSinceStartup; base.audio1Type = audioType; ((Component)base.collisionAudio1).transform.position = setPosition; CarCollisionSFXRpc(((Component)base.collisionAudio1).transform.localPosition, 0, audioType, setVolume); PlayRandomClipAndPropertiesFromAudio(base.collisionAudio1, setVolume, flag, audioType); } } else { bool flag2 = Time.realtimeSinceStartup - base.audio2Time >= base.collisionAudio2.clip.length * 0.8f; if (base.audio1Type <= audioType || flag2) { base.audio2Time = Time.realtimeSinceStartup; base.audio2Type = audioType; ((Component)base.collisionAudio2).transform.position = setPosition; CarCollisionSFXRpc(((Component)base.collisionAudio2).transform.localPosition, 1, audioType, setVolume); PlayRandomClipAndPropertiesFromAudio(base.collisionAudio2, setVolume, flag2, audioType); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void CarCollisionSFXRpc(Vector3 audioPosition, int audio, int audioType, float vol) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2328715077u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref audioPosition); BytePacker.WriteValueBitPacked(val2, audio); BytePacker.WriteValueBitPacked(val2, audioType); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref vol, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2328715077u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; AudioSource val4 = ((audio != 0) ? base.collisionAudio2 : base.collisionAudio1); bool isAudioFinished = val4.clip.length - val4.time < 0.2f; ((Component)val4).transform.localPosition = audioPosition; PlayRandomClipAndPropertiesFromAudio(val4, vol, isAudioFinished, audioType); } } } private void PlayRandomClipAndPropertiesFromAudio(AudioSource source, float volume, bool isAudioFinished, int collisionType) { //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) if (!isAudioFinished) { source.Stop(); } AudioClip[] array; switch (collisionType) { case 0: array = base.minCollisions; base.turbulenceAmount = Mathf.Min(base.turbulenceAmount + 0.4f, 2f); break; case 1: array = base.medCollisions; base.turbulenceAmount = Mathf.Min(base.turbulenceAmount + 0.75f, 2f); break; case 2: array = base.maxCollisions; base.turbulenceAmount = Mathf.Min(base.turbulenceAmount + 1.4f, 2f); break; default: array = base.obstacleCollisions; base.turbulenceAmount = Mathf.Min(base.turbulenceAmount + 0.75f, 2f); break; } AudioClip val = array[Random.Range(0, array.Length)]; if ((Object)(object)val == (Object)(object)source.clip && Random.Range(0, 10) <= 5) { val = array[Random.Range(0, array.Length)]; } if (isAudioFinished) { source.pitch = Random.Range(0.8f, 1.2f); } source.clip = val; source.PlayOneShot(val, volume); if (collisionType >= 2) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 18f + volume * 7f, 0.6f, 0, false, 106217); } else if (collisionType >= 1) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 12f + volume * 7f, 0.6f, 0, false, 106217); } if (collisionType == -1) { array = base.minCollisions; val = array[Random.Range(0, array.Length)]; source.PlayOneShot(val); } } public void SetInternalStress(float carStressIncrease = 0f) { //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner && !base.carDestroyed) { if (carStressIncrease <= 0f) { base.carStressChange = Mathf.Clamp(base.carStressChange - Time.fixedDeltaTime, -0.25f, 0.5f); } else { base.carStressChange = Mathf.Clamp(base.carStressChange + Time.fixedDeltaTime * carStressIncrease, 0f, 10f); } base.underExtremeStress = carStressIncrease >= 1f; base.carStress = Mathf.Clamp(base.carStress + base.carStressChange, 0f, 100f); if (base.carStress > 7f) { base.carStress = 0f; DealPermanentDamage(2); base.lastDamageType = "Stress"; } } } public void DealPermanentDamage(int damageAmount, Vector3 damagePosition = default(Vector3)) { if (((NetworkBehaviour)this).IsOwner && !base.carDestroyed) { base.timeAtLastDamage = Time.realtimeSinceStartup; base.carHP -= damageAmount; syncedCarHP = base.carHP; if (base.carHP <= 0) { SyncCarHealthRpc(base.carHP); DestroyCarRpc(); DestroyCar(); } else { DealDamageRpc(base.carHP); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void DealDamageRpc(int carHealth) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1707397339u, val3, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, carHealth); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1707397339u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.timeAtLastDamage = Time.realtimeSinceStartup; base.carHP = carHealth; syncedCarHP = base.carHP; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void DestroyCarRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(678708753u, val3, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 678708753u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DestroyCar(); timeSinceLastCollision = Time.realtimeSinceStartup; } } } public void DestroyCar() { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) if (!base.carDestroyed) { base.carDestroyed = true; UnMagnetCar(); RemoveRainCollision(); StopAudiosPlayback(); StopParticleVFX(); BreakWindshield(); RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 20f, 0.8f, 0, false, 106217); DisableWheelCollider(base.FrontLeftWheel, base.leftWheelMesh); DisableWheelCollider(base.FrontRightWheel, base.rightWheelMesh); DisableWheelCollider(base.BackLeftWheel, base.backLeftWheelMesh); DisableWheelCollider(base.BackRightWheel, base.backRightWheelMesh); DisableObjectsOnDestroy(); base.destroyedTruckMesh.SetActive(true); SetExplosionForce(1560f, ((Component)base.hoodFireAudio).transform.position); DisableIgnition(); DisableDrivetrain(); ResetControl(); KillOccupants(); DisableInteractions(); ResetOccupants(); Landmine.SpawnExplosion(((Component)this).transform.position + ((Component)this).transform.forward + Vector3.up * 1.5f, true, 10f, 13f, 40, 400f, base.truckDestroyedExplosion, true); } } private void UnMagnetCar() { if (base.magnetedToShip && !((Object)(object)StartOfRound.Instance.attachedVehicle != (Object)(object)this)) { base.magnetedToShip = false; StartOfRound.Instance.attachedVehicle = null; StartOfRound.Instance.isObjectAttachedToMagnet = false; CollectItemsInTruck(); } } private void StopAudiosPlayback() { base.carEngine1AudioActive = false; base.engineAudio1.Stop(); base.carEngine2AudioActive = false; base.engineAudio2.Stop(); base.turbulenceAmount = 0f; base.turbulenceAudio.Stop(); base.pushAudio.Stop(); base.miscAudio.Stop(); base.steeringWheelAudio.Stop(); base.gearStickAudio.Stop(); base.rollingAudio.Stop(); base.carRollingAudioActive = false; base.radioOn = false; base.radioTurnedOnBefore = false; base.radioAudio.Stop(); base.radioInterference.Stop(); base.underExtremeStress = false; base.extremeStressAudio.Stop(); carKeyAudio.Stop(); base.honkingHorn = false; base.hornAudio.Stop(); base.skiddingAudio.Stop(); cabinAudio.Stop(); roofRainAudioActive = false; roofRainAudio.Stop(); } private void StopParticleVFX() { base.tireSparks.Stop(); } private void DisableWheelCollider(WheelCollider wheelCollider, MeshRenderer wheelMesh) { if (!((Object)(object)wheelCollider == (Object)null) && ((Collider)wheelCollider).enabled) { wheelCollider.motorTorque = 0f; wheelCollider.brakeTorque = 0f; ((Collider)wheelCollider).enabled = false; ((Renderer)wheelMesh).enabled = false; } } private void DisableObjectsOnDestroy() { for (int i = 0; i < disableOnDestroy.Length; i++) { if (disableOnDestroy[i].activeSelf) { disableOnDestroy[i].SetActive(false); } } mainBodyContainer.SetActive(false); sunroofContainer.SetActive(false); hoodDoorContainer.SetActive(false); frontLeftDoorContainer.SetActive(false); frontRightDoorContainer.SetActive(false); backLeftDoorContainer.SetActive(false); backRightDoorContainer.SetActive(false); base.backDoorContainer.SetActive(false); base.frontCabinLightContainer.SetActive(false); base.headlightsContainer.SetActive(false); centerMountedLightContainer.SetActive(false); base.backLightsContainer.SetActive(false); } private void SetExplosionForce(float forceMultiplier, Vector3 explosionPos) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) base.mainRigidbody.ResetCenterOfMass(); base.mainRigidbody.AddForceAtPosition(Vector3.up * forceMultiplier, explosionPos - Vector3.up, (ForceMode)1); } private void DisableIgnition() { CancelIgnitionCoroutine(); base.ignitionStarted = false; ignitionOn = false; ((TMP_Text)radioScreen).text = null; if (base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } base.keyIsInIgnition = false; base.keyIsInDriverHand = false; twistingKey = false; } private void DisableDrivetrain() { base.EngineRPM = 0f; frontWheelRPM = 0f; frontWheelsRPM = 0f; backWheelRPM = 0f; backWheelsRPM = 0f; wheelRPM = 0f; } private void ResetControl() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) base.steeringAnimValue = 0f; steeringWheelAnimValue = 0f; base.drivePedalPressed = false; base.brakePedalPressed = false; base.moveInputVector = Vector2.zero; } private void KillOccupants() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (IsPlayerSeatedInCar()) { GameNetworkManager.Instance.localPlayerController.KillPlayer(Vector3.up * 27f + 20f * Random.insideUnitSphere, true, (CauseOfDeath)3, 6, Vector3.up * 1.5f, false); } } private void DisableInteractions() { InteractTrigger[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].interactable = false; componentsInChildren[i].CancelAnimationExternally(); } } private void ResetOccupants() { base.currentDriver = null; base.currentPassenger = null; currentBackLeftPassenger = null; currentBackMiddlePassenger = null; currentBackRightPassenger = null; } public void RemoveRainCollision() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Expected O, but got Unknown ParticleSystem[] array = (ParticleSystem[])(object)new ParticleSystem[13] { References.rainParticles, References.rainHitParticles, References.stormyRainParticles, References.stormyRainHitParticles, References.wesleyHurricaneRainParticles, References.wesleyHurricaneRainHitParticles, References.wesleyHurricaneSandParticles, References.wesleyForsakenRainParticles, References.wesleyForsakenRainHitParticles, References.kenjiAcidRainParticles, References.kenjiAcidRainHitParticles, References.kenjiAcidStormyRainParticles, References.kenjiAcidStormyRainHitParticles }; ParticleSystem[] array2 = array; foreach (ParticleSystem val in array2) { if ((Object)(object)val == (Object)null) { Plugin.LogDebug("Weather particle or Trigger is null!"); continue; } TriggerModule trigger = val.trigger; for (int num = ((TriggerModule)(ref trigger)).colliderCount - 1; num >= 0; num--) { Collider value = (Collider)((TriggerModule)(ref trigger)).GetCollider(num); if (weatherEffectBlockers.Contains(value)) { ((TriggerModule)(ref trigger)).RemoveCollider(num); } } } } public void FixedUpdate() { SetVehicleToDropship(); ApplyCorrectionForce(); SetVehicleToFixedPosition(); TryAttachToShipMagnet(); MovePhysicsBodies(); CalculateVehicleVelocity(); SyncCarPhysicsToOtherClients(); if (base.carDestroyed) { SetPreviousVehiclePosition(); return; } ApplySteering(); ApplyWheelForces(); SetVFXWheelSpeed(); MatchWheelMeshToCollider(base.leftWheelMesh, base.FrontLeftWheel, frontWheelsRPM, steeringAngle); MatchWheelMeshToCollider(base.rightWheelMesh, base.FrontRightWheel, frontWheelsRPM, steeringAngle); MatchWheelMeshToCollider(base.backLeftWheelMesh, base.BackLeftWheel, backWheelsRPM); MatchWheelMeshToCollider(base.backRightWheelMesh, base.BackRightWheel, backWheelsRPM); allWheelsAirborne = !base.FrontLeftWheel.isGrounded && !base.FrontRightWheel.isGrounded && !base.BackLeftWheel.isGrounded && !base.BackRightWheel.isGrounded; allWheelsGrounded = base.FrontLeftWheel.isGrounded && base.FrontRightWheel.isGrounded && base.BackLeftWheel.isGrounded && base.BackRightWheel.isGrounded; backWheelsGrounded = base.BackLeftWheel.isGrounded && base.BackRightWheel.isGrounded; if (!((NetworkBehaviour)this).IsOwner) { SetCarPhysicsValuesOnClient(); SetTorqueForces(); CalculateWheelSlip(); SetPreviousVehiclePosition(); return; } UpdateCarStress(); UpdateTransmission(); UpdateEngineRPMFromWheels(); SetTorqueForces(useSynced: false); UpdateInclineCompensation(); SyncDrivetrain(); SyncWheelTorque(); if (base.mainRigidbody.IsSleeping() || base.magnetedToShip || allWheelsAirborne) { CalculateWheelSlip(); SetPreviousVehiclePosition(); } else { ApplyAntiSlipForce(); CalculateWheelSlip(calculatePhysics: true); SetPreviousVehiclePosition(); } } private void SetCarPhysicsValuesOnClient() { float num = (base.ignitionStarted ? syncedEngineRPM : 0f); base.EngineRPM = Mathf.Lerp(base.EngineRPM, num, 3f * Time.fixedDeltaTime); enginePower = 0f; inclineBoost = 1f; currentGear = 1; frontWheelRPM = syncedFrontWheelRPM; backWheelRPM = syncedBackWheelRPM; wheelRPM = syncedWheelRPM; forwardWheelSpeed = 8000f; reverseWheelSpeed = -8000f; } private void SetPreviousVehiclePosition() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) previousVehiclePosition = base.mainRigidbody.position; previousVehicleRotation = base.mainRigidbody.rotation; } private void SetVehicleToDropship() { //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_0091: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) if (!StartOfRound.Instance.inShipPhase && !base.loadedVehicleFromSave && !hasDeliveredVehicle) { if ((Object)(object)base.itemShip == (Object)null && (Object)(object)References.itemShip != (Object)null) { base.itemShip = References.itemShip; } if ((Object)(object)base.itemShip == (Object)null) { base.inDropshipAnimation = false; SetVehicleKinematic(setKinematic: true); base.mainRigidbody.MovePosition(StartOfRound.Instance.notSpawnedPosition.position + Vector3.forward * 30f); base.syncedPosition = base.mainRigidbody.position; base.syncedRotation = base.mainRigidbody.rotation; } else if (base.itemShip.untetheredVehicle) { base.inDropshipAnimation = false; base.mainRigidbody.MovePosition(base.itemShip.deliverVehiclePoint.position); base.mainRigidbody.MoveRotation(base.itemShip.deliverVehiclePoint.rotation); base.syncedPosition = base.mainRigidbody.position; base.syncedRotation = base.mainRigidbody.rotation; base.hasBeenSpawned = true; hasDeliveredVehicle = true; } else if (base.itemShip.deliveringVehicle) { base.inDropshipAnimation = true; SetVehicleKinematic(setKinematic: true); base.mainRigidbody.MovePosition(base.itemShip.deliverVehiclePoint.position); base.mainRigidbody.MoveRotation(base.itemShip.deliverVehiclePoint.rotation); base.syncedPosition = base.mainRigidbody.position; base.syncedRotation = base.mainRigidbody.rotation; } } } private void SetVehicleKinematic(bool setKinematic) { if (base.mainRigidbody.isKinematic != setKinematic) { base.mainRigidbody.isKinematic = setKinematic; Plugin.LogDebug($"Set 'mainRigidbody' kinematic to: {setKinematic}"); } } private void SetVehicleToFixedPosition() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) if (base.magnetedToShip) { SetVehicleKinematic(setKinematic: true); base.syncedPosition = base.mainRigidbody.position; base.syncedRotation = base.mainRigidbody.rotation; base.mainRigidbody.MovePosition(Vector3.Lerp(base.magnetStartPosition, StartOfRound.Instance.elevatorTransform.position + base.magnetTargetPosition, base.magnetPositionCurve.Evaluate(base.magnetTime))); base.mainRigidbody.MoveRotation(Quaternion.Lerp(base.magnetStartRotation, base.magnetTargetRotation, base.magnetRotationCurve.Evaluate(base.magnetRotationTime))); base.averageVelocityAtMagnetStart = Vector3.Lerp(base.averageVelocityAtMagnetStart, Vector3.ClampMagnitude(base.averageVelocityAtMagnetStart, 4f), 4f * Time.fixedDeltaTime); if (!base.finishedMagneting) { base.magnetStartPosition += Vector3.ClampMagnitude(base.averageVelocityAtMagnetStart, 5f) * Time.fixedDeltaTime; } } else if (!((NetworkBehaviour)this).IsOwner && !base.inDropshipAnimation) { SetVehicleKinematic(setKinematic: true); Vector3 val = base.syncedPosition + base.averageVelocity * Time.fixedDeltaTime; Vector3 val2 = Vector3.Lerp(base.mainRigidbody.position, val, Time.fixedDeltaTime * base.syncSpeedMultiplier); base.mainRigidbody.MovePosition(val2); base.mainRigidbody.MoveRotation(Quaternion.Lerp(base.mainRigidbody.rotation, base.syncedRotation, base.syncRotationSpeed)); base.truckVelocityLastFrame = base.mainRigidbody.velocity; } } private void TryAttachToShipMagnet() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (!base.magnetedToShip && ((NetworkBehaviour)this).IsOwner && !base.carDestroyed && !StartOfRound.Instance.isObjectAttachedToMagnet && !((Object)(object)StartOfRound.Instance.attachedVehicle != (Object)null) && StartOfRound.Instance.magnetOn && !(Vector3.Distance(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position) >= 10f) && !Physics.Linecast(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position, 256, (QueryTriggerInteraction)1)) { StartMagneting(); } } public void StartMagneting() { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner) { SetVehicleKinematic(setKinematic: true); base.magnetedToShip = true; base.magnetTime = 0f; base.magnetRotationTime = 0f; StartOfRound.Instance.isObjectAttachedToMagnet = true; StartOfRound.Instance.attachedVehicle = (VehicleController)(object)this; base.averageVelocityAtMagnetStart = base.averageVelocity; Transform tempTransform = RoundManager.Instance.tempTransform; Quaternion rotation = base.mainRigidbody.rotation; tempTransform.eulerAngles = new Vector3(0f, ((Quaternion)(ref rotation)).eulerAngles.y, 0f); Vector3 eulerAngles = RoundManager.Instance.tempTransform.eulerAngles; Vector3 eulerAngles2 = ((Component)this).transform.eulerAngles; eulerAngles2.y = Mathf.Round((eulerAngles2.y + 90f) / 180f) * 180f - 90f; eulerAngles2.z = Mathf.Round(eulerAngles2.z / 90f) * 90f; float num = Mathf.Repeat(eulerAngles2.x + Random.Range(-5f, 5f) + 180f, 360f) - 180f; eulerAngles2.x = Mathf.Clamp(num, -20f, 20f); base.magnetTargetRotation = Quaternion.Euler(eulerAngles2); Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, -0.5f, (0f - base.boundsCollider.size.x) * 0.5f * ((Component)base.boundsCollider).transform.lossyScale.x); Vector3 val2 = StartOfRound.Instance.magnetPoint.position + val; base.magnetTargetPosition = StartOfRound.Instance.elevatorTransform.InverseTransformPoint(val2); base.magnetStartPosition = ((Component)this).transform.position; base.magnetStartRotation = ((Component)this).transform.rotation; Quaternion magnetTargetRotation = base.magnetTargetRotation; ((Component)this).transform.rotation = magnetTargetRotation; CollectItemsInTruck(); if (!StartOfRound.Instance.inShipPhase && !((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null)) { MagnetCarRpc(base.magnetTargetPosition, eulerAngles2, base.magnetStartPosition, base.magnetStartRotation, eulerAngles, base.averageVelocityAtMagnetStart); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void MagnetCarRpc(Vector3 targetPosition, Vector3 targetRotation, Vector3 startPosition, Quaternion startRotation, Vector3 tempRotation, Vector3 avgVel) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2625370616u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref targetPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref targetRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref startRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref tempRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref avgVel); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2625370616u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetVehicleKinematic(setKinematic: true); base.magnetedToShip = true; base.magnetTime = 0f; base.magnetRotationTime = 0f; base.averageVelocityAtMagnetStart = avgVel; RoundManager.Instance.tempTransform.eulerAngles = tempRotation; StartOfRound.Instance.isObjectAttachedToMagnet = true; StartOfRound.Instance.attachedVehicle = (VehicleController)(object)this; base.magnetStartPosition = startPosition; base.magnetStartRotation = startRotation; base.magnetTargetPosition = targetPosition; base.magnetTargetRotation = Quaternion.Euler(targetRotation); CollectItemsInTruck(); } } } private void ApplyCorrectionForce() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) Vector3 angularVelocity = base.mainRigidbody.angularVelocity; Vector3 val = Vector3.Cross(Quaternion.AngleAxis(((Vector3)(ref angularVelocity)).magnitude * 57.29578f * base.stability / base.speed, base.mainRigidbody.angularVelocity) * ((Component)this).transform.up, Vector3.up); base.mainRigidbody.AddTorque(val * base.speed * base.speed); } private void MovePhysicsBodies() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) base.ragdollPhysicsBody.Move(((Component)this).transform.position, ((Component)this).transform.rotation); base.windwiperPhysicsBody1.Move(base.windwiper1.position, base.windwiper1.rotation); base.windwiperPhysicsBody2.Move(base.windwiper2.position, base.windwiper2.rotation); ((Component)playerPhysicsBody).transform.localPosition = Vector3.zero; ((Component)playerPhysicsBody).transform.localRotation = Quaternion.identity; } private void CalculateVehicleVelocity() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) if (base.averageCount > base.movingAverageLength) { base.averageVelocity += (base.mainRigidbody.velocity - base.averageVelocity) / (float)(base.movingAverageLength + 1); return; } base.averageCount++; base.averageVelocity += base.mainRigidbody.velocity; if (base.averageCount == base.movingAverageLength) { base.averageVelocity /= (float)base.averageCount; } } public void SyncWheelTorque() { if (syncTorqueInterval >= 0.14f) { float num = Mathf.Round(currentMotorTorque); float num2 = Mathf.Round(currentBrakeTorque); if (syncedCurrentMotorTorque != num || syncedCurrentBrakeTorque != num2) { syncTorqueInterval = 0f; syncedCurrentMotorTorque = currentMotorTorque; syncedCurrentBrakeTorque = currentBrakeTorque; SyncWheelTorqueRpc(currentMotorTorque, currentBrakeTorque); } } else { syncTorqueInterval += Time.fixedDeltaTime; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncWheelTorqueRpc(float motorTorque, float brakeTorque) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1880307780u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref motorTorque, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref brakeTorque, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1880307780u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncedCurrentMotorTorque = motorTorque; syncedCurrentBrakeTorque = brakeTorque; } } } public void SyncDrivetrain() { float num = 0.15f * ((Vector3)(ref base.averageVelocity)).magnitude; num = Mathf.Clamp(num, 0.15f, 0.21f); if (syncDrivetrainInterval >= num) { float num2 = NormaliseFloat(Mathf.Round(base.EngineRPM)); float num3 = NormaliseFloat(Mathf.Round(wheelRPM)); float num4 = NormaliseFloat(Mathf.Round(frontWheelRPM)); float num5 = NormaliseFloat(Mathf.Round(backWheelRPM)); if (syncedWheelRPM != num3 || syncedEngineRPM != num2) { syncDrivetrainInterval = 0f; syncedFrontWheelRPM = num4; syncedBackWheelRPM = num5; syncedWheelRPM = num3; syncedEngineRPM = num2; SyncDrivetrainRpc(frontWheelRPM, backWheelRPM, wheelRPM, syncedEngineRPM); } } else { syncDrivetrainInterval += Time.fixedDeltaTime; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncDrivetrainRpc(float frontWheelSpeed, float backWheelSpeed, float wheelSpeed, float engineSpeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1755331995u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref frontWheelSpeed, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref backWheelSpeed, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref wheelSpeed, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref engineSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1755331995u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncedFrontWheelRPM = frontWheelSpeed; syncedBackWheelRPM = backWheelSpeed; syncedWheelRPM = wheelSpeed; syncedEngineRPM = engineSpeed; } } } public void SyncCarPhysicsToOtherClients() { //IL_0041: 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_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || base.magnetedToShip || base.inDropshipAnimation) { return; } SetVehicleKinematic(setKinematic: false); if (base.syncCarPositionInterval > 0.12f) { if (Vector3.Distance(base.syncedPosition, ((Component)this).transform.position) > 0.02f) { base.syncCarPositionInterval = 0f; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; SyncCarPositionRpc(((Component)this).transform.position, ((Component)this).transform.eulerAngles); } else if (Vector3.Angle(((Component)this).transform.forward, base.syncedRotation * Vector3.forward) > 2f) { base.syncCarPositionInterval = 0f; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; SyncCarPositionRpc(((Component)this).transform.position, ((Component)this).transform.eulerAngles); } } else { base.syncCarPositionInterval += Time.fixedDeltaTime; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncCarPositionRpc(Vector3 carPosition, Vector3 carRotation) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(663166843u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carRotation); ((NetworkBehaviour)this).__endSendRpc(ref val2, 663166843u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.syncCarPositionInterval = 0f; base.syncedPosition = carPosition; base.syncedRotation = Quaternion.Euler(carRotation); } } } private void ApplySteering() { steeringAngle = steeringCurve.Evaluate(Mathf.Abs(base.steeringWheelAnimFloat)) * (maxSteeringAngle * Mathf.Sign(base.steeringWheelAnimFloat)); base.FrontLeftWheel.steerAngle = steeringAngle; base.FrontRightWheel.steerAngle = steeringAngle; } private void ApplyWheelForces() { if (!((NetworkBehaviour)this).IsOwner) { SetTorqueToWheelCollider(base.FrontLeftWheel, currentMotorTorque, currentBrakeTorque); SetTorqueToWheelCollider(base.FrontRightWheel, currentMotorTorque, currentBrakeTorque); SetTorqueToWheelCollider(base.BackLeftWheel, currentMotorTorque, currentBrakeTorque); SetTorqueToWheelCollider(base.BackRightWheel, currentMotorTorque, currentBrakeTorque); SetWheelRotationVelocity(); } else { SetTorqueToWheelCollider(base.FrontLeftWheel, currentMotorTorque, currentBrakeTorque); SetTorqueToWheelCollider(base.FrontRightWheel, currentMotorTorque, currentBrakeTorque); fRpmDiff = base.FrontRightWheel.rpm - base.FrontLeftWheel.rpm; SetTorqueToWheelCollider(base.BackLeftWheel, currentMotorTorque, currentBrakeTorque); SetTorqueToWheelCollider(base.BackRightWheel, currentMotorTorque, currentBrakeTorque); bRpmDiff = base.BackLeftWheel.rpm - base.BackRightWheel.rpm; ApplyTorqueDifference(); SetWheelRotationVelocity(); } } private void SetTorqueToWheelCollider(WheelCollider wheelCollider, float motorForce, float brakeForce) { wheelCollider.motorTorque = motorForce; wheelCollider.brakeTorque = brakeForce; } private void SetWheelRotationVelocity() { base.FrontLeftWheel.rotationSpeed = Mathf.Clamp(base.FrontLeftWheel.rotationSpeed, reverseWheelSpeed, forwardWheelSpeed); base.FrontRightWheel.rotationSpeed = Mathf.Clamp(base.FrontRightWheel.rotationSpeed, reverseWheelSpeed, forwardWheelSpeed); base.BackLeftWheel.rotationSpeed = Mathf.Clamp(base.BackLeftWheel.rotationSpeed, reverseWheelSpeed, forwardWheelSpeed); base.BackRightWheel.rotationSpeed = Mathf.Clamp(base.BackRightWheel.rotationSpeed, reverseWheelSpeed, forwardWheelSpeed); } private void SetVFXWheelSpeed() { float num = Mathf.Round(frontWheelRPM / 2f) * 2f; float num2 = Mathf.Round(backWheelRPM / 2f) * 2f; frontWheelsRPM = Mathf.Repeat(frontWheelsRPM + num * 0.15f * 57.29578f * Time.fixedDeltaTime, 360f); backWheelsRPM = Mathf.Repeat(backWheelsRPM + num2 * 0.25f * 57.29578f * Time.fixedDeltaTime, 360f); } private void CalculateWheelSlip(bool calculatePhysics = false) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (!calculatePhysics) { forwardsSlip = 0f; sidewaysSlip = 0f; return; } WheelHit val = default(WheelHit); for (int i = 0; i < allWheels.Count; i++) { if (allWheels[i].GetGroundHit(ref val)) { wheelHits[i] = val; } else { wheelHits[i] = default(WheelHit); } } forwardsSlip = (((WheelHit)(ref wheelHits[2])).forwardSlip + ((WheelHit)(ref wheelHits[3])).forwardSlip) * 0.5f; sidewaysSlip = (((WheelHit)(ref wheelHits[2])).sidewaysSlip + ((WheelHit)(ref wheelHits[3])).sidewaysSlip) * 0.5f; forwardSlipping = currentMotorTorque > 800f && Mathf.Abs(forwardsSlip) > 0.35f; sidewaySlipping = currentMotorTorque > 800f && Mathf.Abs(sidewaysSlip) > 0.2f; } private void UpdateInclineCompensation() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner || !base.ignitionStarted || (int)base.gear != 1) { inclineBoost = 1f; return; } float num = Mathf.Abs(gearRatios[currentGear]); float num2 = Mathf.Abs(wheelRPM); float num3 = num2 * num * diffRatio; float num4 = Vector3.Angle(((Component)this).transform.forward, Vector3.ProjectOnPlane(((Component)this).transform.forward, Vector3.up)); float num5 = Vector3.Dot(((Component)this).transform.forward, Vector3.up); float num6 = Mathf.Clamp01(Mathf.Abs(base.EngineRPM - num3) / 800f); float num7 = Mathf.InverseLerp(110f, 0f, num2); float num8 = Mathf.Clamp01(num5) * num7 * num6; float num9 = 0f; if (num5 > 0f) { num9 = Mathf.Clamp01(num4 / maxInclineBoostAngle); } inclineBoost = Mathf.Lerp(minInclineBoost, maxInclineBoost, num9 * num7); } private void UpdateTransmission() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected I4, but got Unknown CarGearShift gear = base.gear; CarGearShift val = gear; switch (val - 1) { case 2: currentGear = 1; forwardWheelSpeed = 5000f; reverseWheelSpeed = -5000f; break; case 1: currentGear = 0; forwardWheelSpeed = base.MaxEngineRPM / (gearRatios[Mathf.Clamp(currentGear, gearRatios.Length - 1, 1)] * diffRatio) * 6f; reverseWheelSpeed = base.MaxEngineRPM / (gearRatios[0] * diffRatio) * 6f; break; case 0: if (currentGear < 1) { currentGear = 1; } forwardWheelSpeed = base.MaxEngineRPM / (gearRatios[Mathf.Clamp(currentGear, 1, gearRatios.Length - 1)] * diffRatio) * 6f; reverseWheelSpeed = base.MaxEngineRPM / (gearRatios[0] * diffRatio) * 6f; if (shiftGearCoroutine == null && Time.realtimeSinceStartup - lastShiftTime > shiftCooldown) { if (base.EngineRPM >= upShiftThreshold && currentGear < gearRatios.Length - 1) { lastShiftTime = Time.realtimeSinceStartup; shiftGearCoroutine = ((MonoBehaviour)this).StartCoroutine(ChangeGear(shiftUp: true)); } else if (base.EngineRPM <= downShiftThreshold && currentGear > 1) { lastShiftTime = Time.realtimeSinceStartup; shiftGearCoroutine = ((MonoBehaviour)this).StartCoroutine(ChangeGear(shiftUp: false)); } } break; } } private IEnumerator ChangeGear(bool shiftUp) { yield return (object)new WaitForSeconds(shiftTime); if (shiftUp) { currentGear++; } else { currentGear--; } shiftGearCoroutine = null; } private void UpdateCarStress() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 if (!base.ignitionStarted) { return; } float num = 0f; CarGearShift gear = base.gear; CarGearShift val = gear; if ((int)val == 3) { if (base.drivePedalPressed) { num += 1.2f; base.lastStressType += "; Accelerating while in park"; } else if (!allWheelsAirborne && Mathf.Abs(wheelRPM) > 150f) { num += Mathf.Clamp((Mathf.Abs(wheelRPM) - 100f) / 350f, 0f, 1.3f); base.lastStressType += "; In park while at high speed"; } } SetInternalStress(num); base.stressPerSecond = num; } private void UpdateEngineRPMFromWheels() { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected I4, but got Unknown frontWheelRPM = (NormaliseFloat(base.FrontLeftWheel.rpm) + NormaliseFloat(base.FrontRightWheel.rpm)) / 2f; backWheelRPM = (NormaliseFloat(base.BackLeftWheel.rpm) + NormaliseFloat(base.BackRightWheel.rpm)) / 2f; wheelRPM = (frontWheelRPM + backWheelRPM) / 2f; float num = Mathf.Abs(wheelRPM); if (!base.ignitionStarted) { base.EngineRPM = Mathf.Lerp(base.EngineRPM, 0f, 3f * Time.fixedDeltaTime); return; } float num2 = Mathf.Abs(gearRatios[currentGear]); enginePower = enginePowerCurve.Evaluate(base.EngineRPM / base.MaxEngineRPM) * base.EngineTorque * diffRatio * 5252f / base.EngineRPM; CarGearShift gear = base.gear; CarGearShift val = gear; switch (val - 1) { case 2: base.EngineRPM = Mathf.Lerp(base.EngineRPM, base.drivePedalPressed ? (base.MinEngineRPM + 2500f) : base.MinEngineRPM, base.drivePedalPressed ? (0.45f * Time.fixedDeltaTime) : (5f * Time.fixedDeltaTime)); break; case 1: base.EngineRPM = Mathf.Clamp(num * num2 * diffRatio, base.MinEngineRPM, base.MaxEngineRPM); break; case 0: base.EngineRPM = Mathf.Clamp(num * num2 * diffRatio, base.MinEngineRPM, base.MaxEngineRPM); break; } } private void SetTorqueForces(bool useSynced = true) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Invalid comparison between Unknown and I4 //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Expected I4, but got Unknown if (!base.ignitionStarted) { currentMotorTorque = 0f; currentBrakeTorque = (((int)base.gear == 3) ? maxParkingBrakeTorque : maxBrakeTorque); return; } if (useSynced) { currentMotorTorque = syncedCurrentMotorTorque; currentBrakeTorque = syncedCurrentBrakeTorque; return; } CarGearShift gear = base.gear; CarGearShift val = gear; switch (val - 1) { case 2: boostMultiplier = 0f; maxForwardTorque = 0f; currentMotorTorque = 0f; currentBrakeTorque = Mathf.MoveTowards(currentBrakeTorque, maxParkingBrakeTorque, brakeAcceleration * Time.fixedDeltaTime); break; case 1: if (allowBoostTorque) { if (wheelRPM > reverseBoostThreshold) { boostMultiplier = Mathf.MoveTowards(boostMultiplier, boostMultiplierLimit, reverseBoostSpeed * Time.fixedDeltaTime); } else { boostMultiplier = Mathf.MoveTowards(boostMultiplier, 1f, boostReturnSpeed * Time.fixedDeltaTime); } } else { boostMultiplier = 1f; } maxForwardTorque = 0f; currentMotorTorque = (base.drivePedalPressed ? engineReversePower : (0f - base.idleSpeed)); currentBrakeTorque = Mathf.MoveTowards(currentBrakeTorque, base.brakePedalPressed ? maxBrakeTorque : 0f, brakeAcceleration * Time.fixedDeltaTime); break; case 0: if (allowBoostTorque) { if (wheelRPM < forwardBoostThreshold) { boostMultiplier = Mathf.MoveTowards(boostMultiplier, boostMultiplierLimit, forwardBoostSpeed * Time.fixedDeltaTime); } else { boostMultiplier = Mathf.MoveTowards(boostMultiplier, 1f, boostReturnSpeed * Time.fixedDeltaTime); } } else { boostMultiplier = 1f; } maxForwardTorque = enginePower * torqueBoost * inclineBoost; if (base.drivePedalPressed) { currentMotorTorque = Mathf.Clamp(Mathf.MoveTowards(currentMotorTorque, maxForwardTorque, base.carAcceleration * inclineBoost * Time.fixedDeltaTime), minTorque * inclineBoost, maxForwardTorque); } else { currentMotorTorque = Mathf.MoveTowards(currentMotorTorque, base.idleSpeed, carDeacceleration / inclineBoost * Time.fixedDeltaTime); } currentBrakeTorque = Mathf.MoveTowards(currentBrakeTorque, base.brakePedalPressed ? maxBrakeTorque : 0f, brakeAcceleration * Time.fixedDeltaTime); break; } } private void ApplyTorqueDifference() { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 if (base.ignitionStarted && (int)base.gear != 3 && !(((Vector3)(ref base.averageVelocity)).magnitude > 10f)) { WheelCollider obj = base.FrontRightWheel; obj.motorTorque -= fRpmDiff * 0.5f; WheelCollider obj2 = base.FrontLeftWheel; obj2.motorTorque += fRpmDiff * 0.5f; WheelCollider obj3 = base.BackLeftWheel; obj3.motorTorque -= bRpmDiff * 0.5f; WheelCollider obj4 = base.BackRightWheel; obj4.motorTorque += bRpmDiff * 0.5f; } } private void ApplyAntiSlipForce() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Invalid comparison between Unknown and I4 //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; for (int i = 0; i < wheelHits.Length; i++) { val += ((WheelHit)(ref wheelHits[i])).normal; } val = ((Vector3)(ref val)).normalized; if (allWheelsGrounded && !(Vector3.Angle(-val, Physics.gravity) > 30f)) { Vector3 val2 = Vector3.ProjectOnPlane(((Component)this).transform.forward, val); Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = -val; val2 = Physics.gravity; Vector3 val4 = val3 * ((Vector3)(ref val2)).magnitude; Vector3 val5 = val4 - Physics.gravity; if ((int)base.gear != 3) { val5 = Vector3.ProjectOnPlane(val5, normalized); } base.mainRigidbody.AddForce(val5, (ForceMode)5); } } public float NormaliseFloat(float num) { if (float.IsNaN(num) || float.IsInfinity(num) || float.IsNegativeInfinity(num) || float.IsPositiveInfinity(num)) { return 0f; } return num; } private void MatchWheelMeshToCollider(MeshRenderer wheelMesh, WheelCollider wheelCollider, float wheelSpeed, float steeringInput = 0f) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)wheelCollider).transform.position; if (Physics.Raycast(position, -((Component)wheelCollider).transform.up, ref base.hit, wheelCollider.suspensionDistance + wheelCollider.radius, 2305)) { ((Component)wheelMesh).transform.position = ((RaycastHit)(ref base.hit)).point + ((Component)wheelCollider).transform.up * wheelCollider.radius; } else { ((Component)wheelMesh).transform.position = position - ((Component)wheelCollider).transform.up * wheelCollider.suspensionDistance; } ((Component)wheelMesh).transform.localRotation = Quaternion.Euler(wheelSpeed, steeringInput, 0f); } public void Update() { //IL_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) if (base.destroyNextFrame) { if (((NetworkBehaviour)this).IsOwner) { Object.Destroy((Object)(object)((Component)base.windwiperPhysicsBody1).gameObject); Object.Destroy((Object)(object)((Component)base.windwiperPhysicsBody2).gameObject); Object.Destroy((Object)(object)((Component)base.ragdollPhysicsBody).gameObject); Object.Destroy((Object)(object)((Component)playerPhysicsBody).gameObject); Object.Destroy((Object)(object)((Component)this).gameObject); } return; } if ((Object)(object)((NetworkBehaviour)this).NetworkObject != (Object)null && !((NetworkBehaviour)this).NetworkObject.IsSpawned) { RemoveRainCollision(); ((PlayerPhysicsRegion)vehicleZone).disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains((PlayerPhysicsRegion)(object)vehicleZone)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove((PlayerPhysicsRegion)(object)vehicleZone); } for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; if ((Object)(object)((Component)val).transform.parent == (Object)(object)((PlayerPhysicsRegion)vehicleZone).physicsTransform) { Transform parent = (val.isInElevator ? val.playersManager.elevatorTransform : val.playersManager.playersContainer); ((Component)val).transform.SetParent(parent); Plugin.LogWarning($"Player {i} setting parent since vehicle was removed"); } } if (IsPlayerSeatedInCar()) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)((PlayerPhysicsRegion)vehicleZone).physicsTransform).GetComponentsInChildren(); for (int j = 0; j < componentsInChildren.Length; j++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[j]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[j]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[j].isHeld) { componentsInChildren[j].FallToGround(false, false, default(Vector3)); } } base.destroyNextFrame = true; return; } if (base.magnetedToShip) { if (!StartOfRound.Instance.magnetOn) { base.magnetedToShip = false; if ((Object)(object)StartOfRound.Instance.attachedVehicle == (Object)(object)this) { StartOfRound.Instance.isObjectAttachedToMagnet = false; } CollectItemsInTruck(); return; } base.magnetTime = Mathf.Min(base.magnetTime + Time.deltaTime, 1f); base.magnetRotationTime = Mathf.Min(base.magnetTime + Time.deltaTime * 0.75f, 1f); if (!base.finishedMagneting && base.magnetTime > 0.7f) { base.finishedMagneting = true; base.turbulenceAmount = 2f; base.turbulenceAudio.volume = 0.6f; base.turbulenceAudio.PlayOneShot(base.maxCollisions[Random.Range(0, base.maxCollisions.Length)]); } } else { base.finishedMagneting = false; if ((Object)(object)StartOfRound.Instance.attachedVehicle == (Object)(object)this) { StartOfRound.Instance.attachedVehicle = null; } } ReactToDamage(); if (!base.carDestroyed) { SetCarEffects(steeringWheelAnimValue); UpdateOccupantAnimations(); if (base.localPlayerInControl && base.ignitionStarted) { GetVehicleInput(); return; } base.moveInputVector = Vector2.zero; base.steeringAnimValue = 0f; steeringWheelAnimValue = 0f; } } private void ReactToDamage() { //IL_002c: 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) normalisedCarHP = (float)base.carHP / (float)base.baseCarHP; base.healthMeter.localScale = new Vector3(1f, 1f, Mathf.Lerp(base.healthMeter.localScale.z, Mathf.Clamp(normalisedCarHP, 0.01f, 1f), 6f * Time.deltaTime)); if (!((NetworkBehaviour)this).IsOwner) { return; } if (base.carHP < 18 && Time.realtimeSinceStartup - base.timeAtLastDamage > 21f) { base.timeAtLastDamage = Time.realtimeSinceStartup; base.carHP++; syncedCarHP = base.carHP; SyncCarHealthRpc(base.carHP); } if (base.carHP < 9) { if (!base.isHoodOnFire) { SetHoodFireAndSync(setOnFire: true); } } else if (base.isHoodOnFire && base.carHP >= 9) { SetHoodFireAndSync(setOnFire: false); } } [Rpc(/*Could not decode attribute arguments.*/)] private void SyncCarHealthRpc(int carHealth) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1844343163u, val3, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, carHealth); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1844343163u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.timeAtLastDamage = Time.realtimeSinceStartup; syncedCarHP = carHealth; base.carHP = syncedCarHP; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncExtremeStressRpc(bool underStress) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1591966560u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref underStress, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1591966560u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.carDestroyed) { base.underExtremeStress = false; } else { base.underExtremeStress = underStress; } } } private void SetHoodFireAndSync(bool setOnFire) { SetHoodOnFireLocalClient(setOnFire); SetHoodOnFireRpc(setOnFire); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetHoodOnFireRpc(bool onFire) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2498962303u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref onFire, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2498962303u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetHoodOnFireLocalClient(onFire); } } } private void SetHoodOnFireLocalClient(bool setOnFire) { base.isHoodOnFire = setOnFire; if (setOnFire) { base.hoodFireAudio.Play(); base.hoodFireParticle.Play(); if (!base.carHoodOpen && !base.carDestroyed) { SetHoodOpenLocalClient(setOpen: true); } } else { base.hoodFireAudio.Stop(); base.hoodFireParticle.Stop(true, (ParticleSystemStopBehavior)1); } } public void ToggleHoodOpenLocalClient() { base.carHoodOpen = !base.carHoodOpen; base.carHoodAnimator.SetBool("hoodOpen", base.carHoodOpen); SetHoodOpenRpc(base.carHoodOpen); } public void SetHoodOpenLocalClient(bool setOpen) { if (base.carHoodOpen != setOpen) { base.carHoodOpen = setOpen; base.carHoodAnimator.SetBool("hoodOpen", setOpen); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetHoodOpenRpc(bool open) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2563565079u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref open, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2563565079u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.carHoodOpen = open; base.carHoodAnimator.SetBool("hoodOpen", base.carHoodOpen); } } } private void UpdateOccupantAnimations() { if (!((Object)(object)base.currentDriver == (Object)null) && !((Object)(object)base.currentDriver.playerBodyAnimator == (Object)null) && !disableAnimations && base.keyIgnitionCoroutine == null && base.ignitionStarted) { base.currentDriver.playerBodyAnimator.SetFloat("animationSpeed", playerSteeringWheelAnimFloat); base.currentDriver.playerBodyAnimator.SetFloat("SA_CarMotionTime", base.gearStickAnimValue); int num = 1; if ((Object)(object)playerWhoShifted == (Object)(object)base.currentDriver && Time.realtimeSinceStartup - base.timeAtLastGearShift < 1.35f) { num = 5; } base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", num); } } public void LateUpdate() { if (!base.carDestroyed) { if ((Object)(object)base.currentDriver != (Object)null && (Object)(object)lastDriver != (Object)(object)base.currentDriver && !base.magnetedToShip) { lastDriver = base.currentDriver; } if (base.honkingHorn && base.hornAudio.isPlaying && base.hornAudio.pitch < 1f) { base.hornAudio.Stop(); } bool audiosMuted = base.magnetedToShip && (StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipDoorsEnabled); SetAudiosMuted(audiosMuted); } } public void SetAudiosMuted(bool setMuted) { base.hornAudio.mute = setMuted; base.engineAudio1.mute = setMuted; base.engineAudio2.mute = setMuted; cabinAudio.mute = setMuted; carKeyAudio.mute = setMuted; base.rollingAudio.mute = setMuted; base.skiddingAudio.mute = setMuted; base.turbulenceAudio.mute = setMuted; base.hoodFireAudio.mute = setMuted; base.extremeStressAudio.mute = setMuted; base.pushAudio.mute = setMuted; base.radioAudio.mute = setMuted; base.radioInterference.mute = setMuted; } public void CollectItemsInTruck() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) Collider[] array = Physics.OverlapSphere(((Component)this).transform.position, 25f, 64, (QueryTriggerInteraction)2); for (int i = 0; i < array.Length; i++) { GrabbableObject component = ((Component)array[i]).GetComponent(); if ((Object)(object)component == (Object)null || component.isHeld || component.isHeldByEnemy || (Object)(object)((Component)component).transform.parent != (Object)(object)((Component)this).transform) { continue; } if ((Object)(object)lastDriver == (Object)null) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (localPlayerController != null) { localPlayerController.SetItemInElevator(base.magnetedToShip, base.magnetedToShip, component); } } else { lastDriver.SetItemInElevator(base.magnetedToShip, base.magnetedToShip, component); } } } public void AddEngineOil() { int num = Mathf.Min(base.carHP + 4, base.baseCarHP); AddEngineOilOnLocalClient(num); AddEngineOilRpc(num); } public void AddEngineOilOnLocalClient(int setCarHP) { base.hoodAudio.PlayOneShot(base.pourOil); base.carHP = setCarHP; } [Rpc(/*Could not decode attribute arguments.*/)] public void AddEngineOilRpc(int setHP) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(725428718u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, setHP); ((NetworkBehaviour)this).__endSendRpc(ref val2, 725428718u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; AddEngineOilOnLocalClient(setHP); } } } private void DoTurboBoost(CallbackContext context) { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) if (((CallbackContext)(ref context)).performed) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null) && !localPlayerController.isPlayerDead && localPlayerController.isPlayerControlled && !localPlayerController.isTypingChat && !localPlayerController.quickMenuManager.isMenuOpen && base.localPlayerInControl && base.ignitionStarted && !base.jumpingInCar && !base.keyIsInDriverHand) { Vector2 dir = InputSystem.actions.FindAction(PLAYER_MOVEMENT, false).ReadValue(); UseTurboBoostLocalClient(dir); UseTurboBoostRpc(); } } } public void UseTurboBoostLocalClient(Vector2 dir = default(Vector2)) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetTrigger("SA_JumpInCar"); } PlayerControllerB currentDriver2 = base.currentDriver; if (currentDriver2 != null) { currentDriver2.movementAudio.PlayOneShot(base.jumpInCarSFX); } if (((NetworkBehaviour)this).IsOwner) { base.jumpingInCar = true; ((MonoBehaviour)this).StartCoroutine(JerkCarUpward(Vector2.op_Implicit(dir))); } } private IEnumerator JerkCarUpward(Vector3 dir) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner) { base.jumpingInCar = false; yield break; } yield return (object)new WaitForSeconds(0.16f); Vector3 jerkForce = ((Component)this).transform.TransformDirection(new Vector3(dir.x, 0f, dir.y)); base.mainRigidbody.AddForce(jerkForce * base.turboBoostForce * 0.22f + Vector3.up * base.turboBoostUpwardForce * 0.1f, (ForceMode)1); base.mainRigidbody.AddForceAtPosition(Vector3.up * base.jumpForce, ((Component)base.hoodFireAudio).transform.position - Vector3.up * 2f, (ForceMode)1); yield return (object)new WaitForSeconds(0.15f); base.jumpingInCar = false; } [Rpc(/*Could not decode attribute arguments.*/)] public void UseTurboBoostRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(799916389u, val3, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 799916389u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseTurboBoostLocalClient(); } } } public void PushTruckWithArms() { //IL_0070: 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_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) if (!base.magnetedToShip && !((Object)(object)GameNetworkManager.Instance.localPlayerController.overridePhysicsParent != (Object)null) && !((Object)(object)GameNetworkManager.Instance.localPlayerController.physicsParent == (Object)(object)base.physicsRegion.physicsTransform) && Physics.Raycast(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward, ref base.hit, 10f, 1073742656, (QueryTriggerInteraction)1)) { Vector3 point = ((RaycastHit)(ref base.hit)).point; Vector3 forward = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward; tempPushTransform.position = point; Vector3 localPosition = tempPushTransform.localPosition; float turbulence = Mathf.Min(base.turbulenceAmount + 0.5f, 2f); if (((NetworkBehaviour)this).IsOwner) { PlayPushAudio(localPosition, turbulence); base.mainRigidbody.AddForceAtPosition(Vector3.Normalize(forward * 1000f) * Random.Range(40f, 50f) * base.pushForceMultiplier, tempPushTransform.position - ((Component)base.mainRigidbody).transform.up * base.pushVerticalOffsetAmount, (ForceMode)1); PushTruckFromOwnerRpc(localPosition, turbulence); } else { PushTruckRpc(localPosition, forward, turbulence); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void PushTruckRpc(Vector3 pushPosition, Vector3 dir, float turbulence) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1939604604u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pushPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref dir); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref turbulence, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1939604604u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayPushAudio(pushPosition, turbulence); if (((NetworkBehaviour)this).IsOwner) { tempPushTransform.localPosition = pushPosition; base.mainRigidbody.AddForceAtPosition(Vector3.Normalize(dir * 1000f) * Random.Range(40f, 50f) * base.pushForceMultiplier, tempPushTransform.position - ((Component)base.mainRigidbody).transform.up * base.pushVerticalOffsetAmount, (ForceMode)1); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void PushTruckFromOwnerRpc(Vector3 pushPosition, float turbulence) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3125062218u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pushPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref turbulence, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3125062218u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayPushAudio(pushPosition, turbulence); } } } public void PlayPushAudio(Vector3 pos, float turbulence) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) ((Component)base.pushAudio).transform.localPosition = pos; base.pushAudio.Play(); base.turbulenceAmount = turbulence; } public void OnDisable() { //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) RemoveRainCollision(); DisableControl(); ((PlayerPhysicsRegion)vehicleZone).disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains((PlayerPhysicsRegion)(object)vehicleZone)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove((PlayerPhysicsRegion)(object)vehicleZone); } for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; if ((Object)(object)((Component)val).transform.parent == (Object)(object)((PlayerPhysicsRegion)vehicleZone).physicsTransform) { Transform parent = (val.isInElevator ? val.playersManager.elevatorTransform : val.playersManager.playersContainer); ((Component)val).transform.SetParent(parent); Plugin.LogWarning($"Player {i} setting parent since vehicle was disabled"); } } if (IsPlayerSeatedInCar()) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)((PlayerPhysicsRegion)vehicleZone).physicsTransform).GetComponentsInChildren(); for (int j = 0; j < componentsInChildren.Length; j++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[j]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[j]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[j].isHeld) { componentsInChildren[j].FallToGround(false, false, default(Vector3)); } } } public void PlayLeftDashboardButtonPress() { leftDashboardAudio.PlayOneShot(dashButtonPress); PlayLeftDashboardButtonPressRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] private void PlayLeftDashboardButtonPressRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2793699754u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2793699754u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; leftDashboardAudio.PlayOneShot(dashButtonPress); } } } public void PlayCenterDashboardButtonPress() { centerDashboardAudio.PlayOneShot(dashButtonPress); PlayCenterDashboardButtonPressRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] private void PlayCenterDashboardButtonPressRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2582773965u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2582773965u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; centerDashboardAudio.PlayOneShot(dashButtonPress); } } } public void PlayRoofInteractionButtonPress() { roofInteractionAudio.PlayOneShot(dashButtonPress); PlayRoofInteractionButtonPressRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] private void PlayRoofInteractionButtonPressRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4245304892u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4245304892u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; roofInteractionAudio.PlayOneShot(dashButtonPress); } } } public void ToggleHeadlightsLocalClient() { headlampsOn = !headlampsOn; base.headlightsContainer.SetActive(headlampsOn); leftDashboardAudio.PlayOneShot(base.headlightsToggleSFX); SetHeadlightMaterial(base.headlightsContainer.activeSelf); ToggleHeadlightsRpc(headlampsOn); } [Rpc(/*Could not decode attribute arguments.*/)] public void ToggleHeadlightsRpc(bool setLightsOn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1445334011u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setLightsOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1445334011u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; headlampsOn = setLightsOn; base.headlightsContainer.SetActive(headlampsOn); leftDashboardAudio.PlayOneShot(base.headlightsToggleSFX); SetHeadlightMaterial(headlampsOn); } } } public void SetHeadlightMaterial(bool on) { Material val = (on ? base.headlightsOnMat : base.headlightsOffMat); Material[] sharedMaterials = ((Renderer)base.mainBodyMesh).sharedMaterials; sharedMaterials[3] = val; ((Renderer)base.mainBodyMesh).sharedMaterials = sharedMaterials; sharedMaterials = ((Renderer)base.lod1Mesh).sharedMaterials; sharedMaterials[2] = val; ((Renderer)base.lod1Mesh).sharedMaterials = sharedMaterials; sharedMaterials = ((Renderer)base.lod2Mesh).sharedMaterials; sharedMaterials[1] = val; ((Renderer)base.lod2Mesh).sharedMaterials = sharedMaterials; } internal void SetDashboardGaugesOn(bool on) { if (gaugesOn != on) { gaugesOn = on; gaugeLightContainer.SetActive(gaugesOn); ((Renderer)speedometerMesh).material = (on ? needleOnMaterial : needleOffMaterial); ((Renderer)tachometerMesh).material = (on ? needleOnMaterial : needleOffMaterial); ((Graphic)speedometerImage).material = (on ? speedometerOnMaterial : speedometerOffMaterial); ((Graphic)tachometerImage).material = (on ? tachometerOnMaterial : tachometerOffMaterial); } } protected override void __initializeVariables() { ((VehicleController)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Expected O, but got Unknown //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Expected O, but got Unknown //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Expected O, but got Unknown //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Expected O, but got Unknown //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Expected O, but got Unknown //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Expected O, but got Unknown //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Expected O, but got Unknown //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Expected O, but got Unknown //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Expected O, but got Unknown //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Expected O, but got Unknown //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Expected O, but got Unknown //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Expected O, but got Unknown //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Expected O, but got Unknown //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Expected O, but got Unknown //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Expected O, but got Unknown //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Expected O, but got Unknown //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3646988633u, new RpcReceiveHandler(__rpc_handler_3646988633), "ShiftToGearRpc"); ((NetworkBehaviour)this).__registerRpc(1606966662u, new RpcReceiveHandler(__rpc_handler_1606966662), "ToggleCabinLightsOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(559298925u, new RpcReceiveHandler(__rpc_handler_559298925), "ToggleCabinLightsRpc"); ((NetworkBehaviour)this).__registerRpc(1565903847u, new RpcReceiveHandler(__rpc_handler_1565903847), "TryIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(1377561967u, new RpcReceiveHandler(__rpc_handler_1377561967), "TryStartIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(4062380867u, new RpcReceiveHandler(__rpc_handler_4062380867), "CancelTryIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(2218070621u, new RpcReceiveHandler(__rpc_handler_2218070621), "StartIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(2004876350u, new RpcReceiveHandler(__rpc_handler_2004876350), "RemoveKeyFromIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(2486552702u, new RpcReceiveHandler(__rpc_handler_2486552702), "CancelSetPlayerInVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(2635849284u, new RpcReceiveHandler(__rpc_handler_2635849284), "SetDriverInVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(3992045072u, new RpcReceiveHandler(__rpc_handler_3992045072), "SetDriverInVehicleOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(1813739882u, new RpcReceiveHandler(__rpc_handler_1813739882), "SetDriverInVehicleNotOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(3156768623u, new RpcReceiveHandler(__rpc_handler_3156768623), "OnDriverExitVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(2002477769u, new RpcReceiveHandler(__rpc_handler_2002477769), "OnDriverExitVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(2639261388u, new RpcReceiveHandler(__rpc_handler_2639261388), "SetPassengerInVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(3911999087u, new RpcReceiveHandler(__rpc_handler_3911999087), "SetPassengerInVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(2064211234u, new RpcReceiveHandler(__rpc_handler_2064211234), "OnPassengerExitVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(1821892825u, new RpcReceiveHandler(__rpc_handler_1821892825), "SetBackLeftPassengerInVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(627394285u, new RpcReceiveHandler(__rpc_handler_627394285), "SetBackLeftPassengerInVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(3310941490u, new RpcReceiveHandler(__rpc_handler_3310941490), "OnBackLeftPassengerExitVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(1686437049u, new RpcReceiveHandler(__rpc_handler_1686437049), "SetBackMiddlePassengerInVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(3301448698u, new RpcReceiveHandler(__rpc_handler_3301448698), "SetBackMiddlePassengerInVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(2939451655u, new RpcReceiveHandler(__rpc_handler_2939451655), "OnBackMiddlePassengerExitVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(3953312235u, new RpcReceiveHandler(__rpc_handler_3953312235), "SetBackRightPassengerInVehicleServerRpc"); ((NetworkBehaviour)this).__registerRpc(145869324u, new RpcReceiveHandler(__rpc_handler_145869324), "SetBackRightPassengerInVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(2597747102u, new RpcReceiveHandler(__rpc_handler_2597747102), "OnBackRightPassengerExitVehicleRpc"); ((NetworkBehaviour)this).__registerRpc(2623378010u, new RpcReceiveHandler(__rpc_handler_2623378010), "OnDriverLeaveGameServerRpc"); ((NetworkBehaviour)this).__registerRpc(1758630016u, new RpcReceiveHandler(__rpc_handler_1758630016), "OnDriverLeaveGameRpc"); ((NetworkBehaviour)this).__registerRpc(2694304376u, new RpcReceiveHandler(__rpc_handler_2694304376), "OnPassengerLeaveGameRpc"); ((NetworkBehaviour)this).__registerRpc(202486398u, new RpcReceiveHandler(__rpc_handler_202486398), "OnBackLeftPassengerLeaveGameRpc"); ((NetworkBehaviour)this).__registerRpc(483350378u, new RpcReceiveHandler(__rpc_handler_483350378), "OnBackMiddlePassengerLeaveGameRpc"); ((NetworkBehaviour)this).__registerRpc(2819610473u, new RpcReceiveHandler(__rpc_handler_2819610473), "OnBackRightPassengerLeaveGameRpc"); ((NetworkBehaviour)this).__registerRpc(3210169668u, new RpcReceiveHandler(__rpc_handler_3210169668), "SyncPlayerInputsRpc"); ((NetworkBehaviour)this).__registerRpc(91946280u, new RpcReceiveHandler(__rpc_handler_91946280), "SetCarTyreStressRpc"); ((NetworkBehaviour)this).__registerRpc(2267252635u, new RpcReceiveHandler(__rpc_handler_2267252635), "SyncCarEffectsRpc"); ((NetworkBehaviour)this).__registerRpc(728965984u, new RpcReceiveHandler(__rpc_handler_728965984), "SyncRadioTimeRpc"); ((NetworkBehaviour)this).__registerRpc(2641975322u, new RpcReceiveHandler(__rpc_handler_2641975322), "SetRadioStationRpc"); ((NetworkBehaviour)this).__registerRpc(2528730006u, new RpcReceiveHandler(__rpc_handler_2528730006), "SetRadioRpc"); ((NetworkBehaviour)this).__registerRpc(2525560865u, new RpcReceiveHandler(__rpc_handler_2525560865), "SetRadioSignalQualityRpc"); ((NetworkBehaviour)this).__registerRpc(3748484443u, new RpcReceiveHandler(__rpc_handler_3748484443), "CarBumpRpc"); ((NetworkBehaviour)this).__registerRpc(4114752875u, new RpcReceiveHandler(__rpc_handler_4114752875), "CarCollisionRpc"); ((NetworkBehaviour)this).__registerRpc(2328715077u, new RpcReceiveHandler(__rpc_handler_2328715077), "CarCollisionSFXRpc"); ((NetworkBehaviour)this).__registerRpc(1707397339u, new RpcReceiveHandler(__rpc_handler_1707397339), "DealDamageRpc"); ((NetworkBehaviour)this).__registerRpc(678708753u, new RpcReceiveHandler(__rpc_handler_678708753), "DestroyCarRpc"); ((NetworkBehaviour)this).__registerRpc(2625370616u, new RpcReceiveHandler(__rpc_handler_2625370616), "MagnetCarRpc"); ((NetworkBehaviour)this).__registerRpc(1880307780u, new RpcReceiveHandler(__rpc_handler_1880307780), "SyncWheelTorqueRpc"); ((NetworkBehaviour)this).__registerRpc(1755331995u, new RpcReceiveHandler(__rpc_handler_1755331995), "SyncDrivetrainRpc"); ((NetworkBehaviour)this).__registerRpc(663166843u, new RpcReceiveHandler(__rpc_handler_663166843), "SyncCarPositionRpc"); ((NetworkBehaviour)this).__registerRpc(1844343163u, new RpcReceiveHandler(__rpc_handler_1844343163), "SyncCarHealthRpc"); ((NetworkBehaviour)this).__registerRpc(1591966560u, new RpcReceiveHandler(__rpc_handler_1591966560), "SyncExtremeStressRpc"); ((NetworkBehaviour)this).__registerRpc(2498962303u, new RpcReceiveHandler(__rpc_handler_2498962303), "SetHoodOnFireRpc"); ((NetworkBehaviour)this).__registerRpc(2563565079u, new RpcReceiveHandler(__rpc_handler_2563565079), "SetHoodOpenRpc"); ((NetworkBehaviour)this).__registerRpc(725428718u, new RpcReceiveHandler(__rpc_handler_725428718), "AddEngineOilRpc"); ((NetworkBehaviour)this).__registerRpc(799916389u, new RpcReceiveHandler(__rpc_handler_799916389), "UseTurboBoostRpc"); ((NetworkBehaviour)this).__registerRpc(1939604604u, new RpcReceiveHandler(__rpc_handler_1939604604), "PushTruckRpc"); ((NetworkBehaviour)this).__registerRpc(3125062218u, new RpcReceiveHandler(__rpc_handler_3125062218), "PushTruckFromOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(2793699754u, new RpcReceiveHandler(__rpc_handler_2793699754), "PlayLeftDashboardButtonPressRpc"); ((NetworkBehaviour)this).__registerRpc(2582773965u, new RpcReceiveHandler(__rpc_handler_2582773965), "PlayCenterDashboardButtonPressRpc"); ((NetworkBehaviour)this).__registerRpc(4245304892u, new RpcReceiveHandler(__rpc_handler_4245304892), "PlayRoofInteractionButtonPressRpc"); ((NetworkBehaviour)this).__registerRpc(1445334011u, new RpcReceiveHandler(__rpc_handler_1445334011), "ToggleHeadlightsRpc"); ((VehicleController)this).__initializeRpcs(); } private static void __rpc_handler_3646988633(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setGear = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setGear); int gearIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref gearIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).ShiftToGearRpc(playerId, setGear, gearIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1606966662(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; ((HaulerController)(object)target).ToggleCabinLightsOwnerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_559298925(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool setToggle = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setToggle, default(ForPrimitives)); bool isIgnitionOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isIgnitionOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).ToggleCabinLightsRpc(setToggle, isIgnitionOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1565903847(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool isIgnitionOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isIgnitionOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).TryIgnitionRpc(setKeyInSlot, isIgnitionOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1377561967(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 shiftInterlock = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shiftInterlock, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).TryStartIgnitionRpc(shiftInterlock); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4062380867(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool isIgnitionOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isIgnitionOn, default(ForPrimitives)); int playerAnimIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerAnimIndex); int ignitionAnimIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref ignitionAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).CancelTryIgnitionRpc(setKeyInSlot, isIgnitionOn, playerAnimIndex, ignitionAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2218070621(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; ((HaulerController)(object)target).StartIgnitionRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2004876350(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; ((HaulerController)(object)target).RemoveKeyFromIgnitionRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2486552702(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).CancelSetPlayerInVehicleRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2635849284(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); RpcParams ext = rpcParams.Ext; target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetDriverInVehicleServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3992045072(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; ((HaulerController)(object)target).SetDriverInVehicleOwnerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1813739882(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool isIgnitionOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isIgnitionOn, default(ForPrimitives)); bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool setStarted = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setStarted, default(ForPrimitives)); int playerAnimIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetDriverInVehicleNotOwnerRpc(playerId, isIgnitionOn, setKeyInSlot, setStarted, playerAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3156768623(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 carLocation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carLocation); Quaternion carRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carRotation); bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool engineStarted = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref engineStarted, default(ForPrimitives)); bool isIgnitionOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isIgnitionOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnDriverExitVehicleServerRpc(playerId, carLocation, carRotation, setKeyInSlot, engineStarted, isIgnitionOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2002477769(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 carLocation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carLocation); Quaternion carRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carRotation); bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool setStarted = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setStarted, default(ForPrimitives)); bool isIgnitionOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isIgnitionOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnDriverExitVehicleRpc(playerId, carLocation, carRotation, setKeyInSlot, setStarted, isIgnitionOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2639261388(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); RpcParams ext = rpcParams.Ext; target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetPassengerInVehicleServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3911999087(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference passengerInVehicleRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref passengerInVehicleRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetPassengerInVehicleRpc(passengerInVehicleRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2064211234(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference playerNetObjRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); Vector3 exitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnPassengerExitVehicleRpc(playerNetObjRef, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1821892825(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); RpcParams ext = rpcParams.Ext; target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackLeftPassengerInVehicleServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_627394285(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference backLeftPassengerInVehicleRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref backLeftPassengerInVehicleRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackLeftPassengerInVehicleRpc(backLeftPassengerInVehicleRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3310941490(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference playerNetObjRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); Vector3 exitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnBackLeftPassengerExitVehicleRpc(playerNetObjRef, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1686437049(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); RpcParams ext = rpcParams.Ext; target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackMiddlePassengerInVehicleServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3301448698(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference backMiddlePassengerInVehicleRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref backMiddlePassengerInVehicleRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackMiddlePassengerInVehicleRpc(backMiddlePassengerInVehicleRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2939451655(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference playerNetObjRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); Vector3 exitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnBackMiddlePassengerExitVehicleRpc(playerNetObjRef, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3953312235(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); RpcParams ext = rpcParams.Ext; target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackRightPassengerInVehicleServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_145869324(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference backRightPassengerInVehicleRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref backRightPassengerInVehicleRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackRightPassengerInVehicleRpc(backRightPassengerInVehicleRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2597747102(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkBehaviourReference playerNetObjRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); Vector3 exitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnBackRightPassengerExitVehicleRpc(playerNetObjRef, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2623378010(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnDriverLeaveGameServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1758630016(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 carLocation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carLocation); Quaternion carRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carRotation); bool setIgnitionState = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setIgnitionState, default(ForPrimitives)); bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool isIgnitionOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isIgnitionOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnDriverLeaveGameRpc(playerId, carLocation, carRotation, setIgnitionState, setKeyInSlot, isIgnitionOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2694304376(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnPassengerLeaveGameRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_202486398(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnBackLeftPassengerLeaveGameRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_483350378(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnBackMiddlePassengerLeaveGameRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2819610473(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnBackRightPassengerLeaveGameRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3210169668(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector2 playerInput = default(Vector2); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerInput); bool gasPressed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gasPressed, default(ForPrimitives)); bool brakePressed = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref brakePressed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncPlayerInputsRpc(playerInput, gasPressed, brakePressed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_91946280(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float stress = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref stress, default(ForPrimitives)); bool wheelSkidding = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref wheelSkidding, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetCarTyreStressRpc(stress, wheelSkidding); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2267252635(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float wheelRotation = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref wheelRotation, default(ForPrimitives)); float playerSteering = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerSteering, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncCarEffectsRpc(wheelRotation, playerSteering); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_728965984(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float songTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref songTime, default(ForPrimitives)); float syncedTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref syncedTime, default(ForPrimitives)); float staticTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref staticTime, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncRadioTimeRpc(songTime, syncedTime, staticTime); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2641975322(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int radioStation = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioStation); float setTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setTime, default(ForPrimitives)); float signalQuality = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref signalQuality, default(ForPrimitives)); float signalDecrease = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref signalDecrease, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetRadioStationRpc(radioStation, setTime, signalQuality, signalDecrease); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2528730006(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool setRadioOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setRadioOn, default(ForPrimitives)); int radioStation = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioStation); float setTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setTime, default(ForPrimitives)); float signalQuality = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref signalQuality, default(ForPrimitives)); float signalDecrease = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref signalDecrease, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetRadioRpc(setRadioOn, radioStation, setTime, signalQuality, signalDecrease); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2525560865(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int signalQuality = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref signalQuality); float signalDecrease = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref signalDecrease, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetRadioSignalQualityRpc(signalQuality, signalDecrease); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3748484443(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 vel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vel); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).CarBumpRpc(vel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4114752875(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 vel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vel); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).CarCollisionRpc(vel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2328715077(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 audioPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref audioPosition); int audio = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref audio); int audioType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref audioType); float vol = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vol, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).CarCollisionSFXRpc(audioPosition, audio, audioType, vol); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1707397339(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int carHealth = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref carHealth); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).DealDamageRpc(carHealth); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_678708753(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; ((HaulerController)(object)target).DestroyCarRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2625370616(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 targetPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetPosition); Vector3 targetRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetRotation); Vector3 startPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startPosition); Quaternion startRotation = default(Quaternion); ((FastBufferReader)(ref reader)).ReadValueSafe(ref startRotation); Vector3 tempRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref tempRotation); Vector3 avgVel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref avgVel); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).MagnetCarRpc(targetPosition, targetRotation, startPosition, startRotation, tempRotation, avgVel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1880307780(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float motorTorque = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref motorTorque, default(ForPrimitives)); float brakeTorque = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref brakeTorque, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncWheelTorqueRpc(motorTorque, brakeTorque); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1755331995(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float frontWheelSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref frontWheelSpeed, default(ForPrimitives)); float backWheelSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref backWheelSpeed, default(ForPrimitives)); float wheelSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref wheelSpeed, default(ForPrimitives)); float engineSpeed = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref engineSpeed, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncDrivetrainRpc(frontWheelSpeed, backWheelSpeed, wheelSpeed, engineSpeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_663166843(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 carPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carPosition); Vector3 carRotation = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref carRotation); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncCarPositionRpc(carPosition, carRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1844343163(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int carHealth = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref carHealth); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncCarHealthRpc(carHealth); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1591966560(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool underStress = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref underStress, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncExtremeStressRpc(underStress); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2498962303(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 hoodOnFireRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hoodOnFireRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetHoodOnFireRpc(hoodOnFireRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2563565079(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 hoodOpenRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref hoodOpenRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetHoodOpenRpc(hoodOpenRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_725428718(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int setHP = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setHP); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).AddEngineOilRpc(setHP); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_799916389(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; ((HaulerController)(object)target).UseTurboBoostRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1939604604(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pushPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pushPosition); Vector3 dir = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dir); float turbulence = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref turbulence, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).PushTruckRpc(pushPosition, dir, turbulence); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3125062218(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pushPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pushPosition); float turbulence = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref turbulence, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).PushTruckFromOwnerRpc(pushPosition, turbulence); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2793699754(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; ((HaulerController)(object)target).PlayLeftDashboardButtonPressRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2582773965(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; ((HaulerController)(object)target).PlayCenterDashboardButtonPressRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4245304892(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; ((HaulerController)(object)target).PlayRoofInteractionButtonPressRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1445334011(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool setLightsOn = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setLightsOn, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).ToggleHeadlightsRpc(setLightsOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "HaulerController"; } } public class HaulerPhysicsRegion : PlayerPhysicsRegion { public HaulerController haulerController = null; private float playerInsideInterval; private bool playerInsideThisFrame; private bool addedRegionToList; public bool playerInZone; public bool isRegionActive; public bool parentPlayerBodies; public void OnDestroy() { //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) base.disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains((PlayerPhysicsRegion)(object)this)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove((PlayerPhysicsRegion)(object)this); } for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[i]; if ((Object)(object)((Component)val).transform.parent == (Object)(object)base.physicsTransform) { Transform parent = (val.isInElevator ? val.playersManager.elevatorTransform : val.playersManager.playersContainer); ((Component)val).transform.SetParent(parent); Plugin.LogWarning($"Player {i} setting parent since physics region was destroyed"); } } if (!base.allowDroppingItems || (Object)(object)base.itemDropCollider == (Object)null) { return; } GrabbableObject[] componentsInChildren = ((Component)base.physicsTransform).GetComponentsInChildren(); for (int j = 0; j < componentsInChildren.Length; j++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[j]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[j]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[j].isHeld) { componentsInChildren[j].FallToGround(false, false, default(Vector3)); } } } public void OnTriggerStay(Collider other) { if (base.disablePhysicsRegion) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { base.hasLocalPlayer = false; playerInZone = false; return; } string tag = ((Component)other).gameObject.tag; if (parentPlayerBodies && tag.StartsWith("PlayerRagdoll")) { PlayerControllerB val = null; DeadBodyInfo val2 = default(DeadBodyInfo); if (((Component)other).gameObject.TryGetComponent(ref val2)) { val = val2.playerScript; } if ((Object)(object)val != (Object)null && (Object)(object)val.deadBody != (Object)null && !val.deadBody.isParentedToPhysicsRegion) { val.deadBody.SetPhysicsParent(base.physicsTransform, base.physicsCollider); } } else if (((Component)other).gameObject.CompareTag("Player") && !((Object)(object)((Component)other).gameObject != (Object)(object)((Component)localPlayerController).gameObject)) { playerInsideThisFrame = true; playerInsideInterval = 0f; } } public void SetPhysicsRegionActive() { if (!isRegionActive) { if (addedRegionToList) { TryRemovePhysicsRegionFromList(); } } else { base.checkInterval = 0f; base.removePlayerNextFrame = false; TryAddPhysicsRegionToList(); } } public void SetPlayerZoneActive() { playerInZone = true; } public bool IsPhysicsRegionActive() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return Vector3.Angle(((Component)this).transform.up, Vector3.up) <= base.maxTippingAngle && !base.disablePhysicsRegion; } public void TryRemovePhysicsRegionFromList() { StartOfRound.Instance?.CurrentPlayerPhysicsRegions?.Remove((PlayerPhysicsRegion)(object)this); addedRegionToList = false; base.hasLocalPlayer = false; base.removePlayerNextFrame = false; base.checkInterval = 0f; } public void TryAddPhysicsRegionToList() { if (!addedRegionToList && isRegionActive && StartOfRound.Instance.CurrentPlayerPhysicsRegions != null && !StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains((PlayerPhysicsRegion)(object)this)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Add((PlayerPhysicsRegion)(object)this); addedRegionToList = true; base.hasLocalPlayer = true; } } public void Update() { if (base.disablePhysicsRegion) { base.physicsCollider.enabled = false; return; } isRegionActive = IsPhysicsRegionActive(); UpdatePhysicsRegion(); SetPhysicsRegionAndZone(ref base.checkInterval, ref base.removePlayerNextFrame, ref base.hasLocalPlayer, removeFromPhysicsList: true); } public void UpdatePhysicsRegion() { if (!playerInsideThisFrame) { if (playerInZone) { playerInZone = false; } return; } if (playerInsideThisFrame) { SetPhysicsRegionActive(); SetPlayerZoneActive(); } if (playerInsideInterval <= 0.15f) { playerInsideInterval += Time.deltaTime; return; } playerInsideThisFrame = false; playerInsideInterval = 0f; } public void SetPhysicsRegionAndZone(ref float interval, ref bool removeNextFrame, ref bool hasPlayer, bool removeFromPhysicsList = false) { if (!hasPlayer) { return; } if (interval <= 0.15f) { interval += Time.deltaTime; return; } if (!removeNextFrame) { removeNextFrame = true; return; } removeNextFrame = false; interval = 0f; hasPlayer = false; if (removeFromPhysicsList) { TryRemovePhysicsRegionFromList(); } } } public class HaulerPlayerZone : MonoBehaviour { public HaulerController haulerController = null; public Transform physicsTransform = null; public Collider physicsCollider = null; private float playerInsideInterval; private bool playerInsideThisFrame; private bool removePlayerFromZoneNextFrame; private float checkZoneInterval; public bool unsetInZoneWhileSeated; public bool setInZoneWhileSeated; public bool playerInZone; public bool disableZone; public void OnEnable() { if (setInZoneWhileSeated && unsetInZoneWhileSeated) { Plugin.LogWarning("'Set in zone' and 'Unset in zone' are set simulteanously! this will cause issues"); Plugin.LogWarning("Fallback to set behaviour 'Set zone --> not seated'"); setInZoneWhileSeated = false; unsetInZoneWhileSeated = true; } else if (!setInZoneWhileSeated && !unsetInZoneWhileSeated) { Plugin.LogWarning("'Set in zone' and 'Unset in zone' are unset simulteanously! this will cause issues"); Plugin.LogWarning("Fallback to set behaviour 'Set zone --> not seated'"); setInZoneWhileSeated = false; unsetInZoneWhileSeated = true; } } public void OnDestroy() { disableZone = true; } public void OnTriggerStay(Collider other) { if (!disableZone) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null) && ((Component)other).gameObject.CompareTag("Player") && !((Object)(object)((Component)other).gameObject != (Object)(object)((Component)localPlayerController).gameObject)) { playerInsideThisFrame = true; playerInsideInterval = 0f; } } } public void Update() { if (disableZone) { physicsCollider.enabled = false; } else if (VehicleUtils.IsPlayerSeatedInPickup(GameNetworkManager.Instance.localPlayerController, haulerController)) { if (setInZoneWhileSeated) { playerInZone = true; } else if (unsetInZoneWhileSeated) { playerInZone = false; } removePlayerFromZoneNextFrame = false; checkZoneInterval = 0f; } else { UpdatePlayerZone(); SetPlayerZone(ref checkZoneInterval, ref removePlayerFromZoneNextFrame, ref playerInZone); } } public void UpdatePlayerZone() { if (playerInsideThisFrame) { if (playerInsideThisFrame) { SetPlayerZoneActive(); } if (playerInsideInterval <= 0.15f) { playerInsideInterval += Time.deltaTime; return; } playerInsideThisFrame = false; playerInsideInterval = 0f; } } private void SetPlayerZoneActive() { checkZoneInterval = 0f; removePlayerFromZoneNextFrame = false; playerInZone = true; } public void SetPlayerZone(ref float checkInterval, ref bool removeNextFrame, ref bool hasPlayer) { if (hasPlayer) { if (checkInterval <= 0.15f) { checkInterval += Time.deltaTime; return; } if (!removeNextFrame) { removeNextFrame = true; return; } removeNextFrame = false; checkInterval = 0f; hasPlayer = false; } } } public class HaulerSeatAnimator : VehicleSeatAnimator { public HaulerController vehicleController = null; public override void OnPlayerLeaveGame() { if ((Object)(object)base.seatTrigger == (Object)(object)((VehicleController)vehicleController).driverSeatTrigger) { vehicleController.OnDriverLeaveGameServerRpc((int)base.seatTrigger.playerScriptInSpecialAnimation.playerClientId); } else if ((Object)(object)base.seatTrigger == (Object)(object)((VehicleController)vehicleController).passengerSeatTrigger) { vehicleController.OnPassengerLeaveGameRpc((int)base.seatTrigger.playerScriptInSpecialAnimation.playerClientId); } else if ((Object)(object)base.seatTrigger == (Object)(object)vehicleController.backLeftPassengerSeatTrigger) { vehicleController.OnBackLeftPassengerLeaveGameRpc((int)base.seatTrigger.playerScriptInSpecialAnimation.playerClientId); } else if ((Object)(object)base.seatTrigger == (Object)(object)vehicleController.backPassengerSeatTrigger) { vehicleController.OnBackMiddlePassengerLeaveGameRpc((int)base.seatTrigger.playerScriptInSpecialAnimation.playerClientId); } else if ((Object)(object)base.seatTrigger == (Object)(object)vehicleController.backRightPassengerSeatTrigger) { vehicleController.OnBackRightPassengerLeaveGameRpc((int)base.seatTrigger.playerScriptInSpecialAnimation.playerClientId); } } public override void ResetPlayerData(PlayerControllerB player) { player.ladderCameraHorizontal = 0f; } } public class HaulerSoundManager : MonoBehaviour { public HaulerController controller = null; public float checkInterval; public void Update() { if ((Object)(object)controller == (Object)null || !((NetworkBehaviour)controller).IsSpawned) { return; } if (checkInterval < 0.5f) { checkInterval += Time.deltaTime; return; } checkInterval = 0f; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null)) { PlayerControllerB key = localPlayerController; if (localPlayerController.isPlayerDead && (Object)(object)localPlayerController.spectatedPlayerScript != (Object)null) { key = localPlayerController.spectatedPlayerScript; } bool flag = PlayerControllerBPatches.playerData[key]?.playerRidingInPickupCab ?? false; bool perspectiveInPickup = flag; UpdateRainAudio(perspectiveInPickup); } } public void UpdateRainAudio(bool perspectiveInPickup = false) { if (!((VehicleController)controller).carDestroyed) { controller.roofRainAudioActive = Utilities.IsItRaining() && perspectiveInPickup; } } } public class HaulerWheelCollider : MonoBehaviour { public struct WheelColliderHit { public bool grounded; public Vector3 point; public Vector3 normal; public float force; public float forwardSlip; public float sidewaysSlip; public Collider collider; } public float wheelRadius = 0.84f; public float wheelInertia = 30f; public float suspensionLength = 0.6f; public float minSuspensionLength = 0.25f; public float maxSuspensionLength = 0.7f; public float springRate = 50000f; public float damperRate = 2500f; public LayerMask collisionLayers = LayerMask.op_Implicit(-1); public AnimationCurve slipCurve = AnimationCurve.Linear(0f, 0f, 1f, 1f); public Transform cachedTransform = null; public Transform visualTransform = null; public Rigidbody cachedRigidbody = null; private float fixedDeltaTime = 0.02f; private Vector3 cachedPosition = Vector3.zero; private Vector3 wheelForward = Vector3.zero; private Vector3 wheelRight = Vector3.zero; private Vector3 wheelUp = Vector3.zero; public bool isGrounded = false; private RaycastHit hitResult = default(RaycastHit); private float suspensionVelocity = 0f; private float bumpStopOffset = 0f; private float previousSuspensionLength = 0f; private float currentSuspensionLength = 0f; private Vector3 projectedForward = Vector3.zero; private Vector3 projectedRight = Vector3.zero; private Vector3 worldVelocity = Vector3.zero; private Vector2 localVelocity = Vector2.zero; private Vector2 slip = Vector2.zero; private Vector2 localGravityForce = Vector2.zero; private Vector2 localVelocityForce = Vector2.zero; private Vector2 localTireForce = Vector2.zero; private Vector3 worldTireForce = Vector3.zero; private Quaternion localRotation = Quaternion.identity; private Vector3 rightNormal; public float visualRotation = 0f; public float rollingResistance = 0f; public float frictionCoefficient = 0f; public float surfaceGripMultiplier = 0f; public float wheelRPM = 0f; public float SteerAngle = 0f; private float Load = 0f; public float AngularVelocity = 0f; public float MotorTorque = 0f; public float BrakeTorque = 0f; public void OnEnable() { currentSuspensionLength = suspensionLength; } public bool GetGroundHit(out WheelColliderHit hit) { //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_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!isGrounded) { hit = default(WheelColliderHit); return false; } hit = new WheelColliderHit { grounded = true, point = ((RaycastHit)(ref hitResult)).point, normal = ((RaycastHit)(ref hitResult)).normal, force = Load, forwardSlip = slip.y, sidewaysSlip = slip.x, collider = ((RaycastHit)(ref hitResult)).collider }; return true; } public void FixedUpdate() { } } public class HaulerWindow : MonoBehaviour { public HaulerController haulerController = null; public AudioSource windowAudio = null; public AudioClip windowOpen = null; public AudioClip windowClose = null; public bool isWindowOpen; public void OnWindowOpen() { isWindowOpen = true; } public void OnWindowClose() { isWindowOpen = false; } public void PlayWindowOpenAudio() { if ((Object)(object)windowAudio == (Object)null) { Plugin.LogWarning("No window audio source set for " + ((Object)((Component)this).gameObject).name); } else if ((Object)(object)windowOpen == (Object)null || (Object)(object)windowClose == (Object)null) { Plugin.LogWarning("No window audio clips set for " + ((Object)((Component)this).gameObject).name); } else { windowAudio.PlayOneShot(windowOpen); } } public void PlayWindowCloseAudio() { if ((Object)(object)windowAudio == (Object)null) { Plugin.LogWarning("No window audio source set for " + ((Object)((Component)this).gameObject).name); } else if ((Object)(object)windowOpen == (Object)null || (Object)(object)windowClose == (Object)null) { Plugin.LogWarning("No window audio clips set for " + ((Object)((Component)this).gameObject).name); } else { windowAudio.PlayOneShot(windowClose); } } } public class SunroofSnipper : NetworkBehaviour { public AudioSource snipAudio = null; public AudioClip snipClip = null; public void OnTriggerEnter(Collider other) { //IL_007d: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = default(PlayerControllerB); if (((Component)other).gameObject.CompareTag("Player") && ((Component)other).gameObject.TryGetComponent(ref val) && !val.isPlayerDead && val.isPlayerControlled && !((Object)(object)val != (Object)(object)GameNetworkManager.Instance.localPlayerController) && !val.inVehicleAnimation && !val.isCrouching) { PlayDeathClipOnLocalClient(); val.KillPlayer(Vector3.up * 5f, true, (CauseOfDeath)17, 7, default(Vector3), false); } } private void PlayDeathClipOnLocalClient() { snipAudio.PlayOneShot(snipClip); PlayDeathClipRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] public void PlayDeathClipRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4153328400u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4153328400u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1) { base.__rpc_exec_stage = (__RpcExecStage)0; snipAudio.PlayOneShot(snipClip); } } } 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 ((NetworkBehaviour)this).__registerRpc(4153328400u, new RpcReceiveHandler(__rpc_handler_4153328400), "PlayDeathClipRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4153328400(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; ((SunroofSnipper)(object)target).PlayDeathClipRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SunroofSnipper"; } } } namespace CompanyHauler.Patches { [HarmonyPatch(typeof(ElevatorAnimationEvents))] public static class ElevatorAnimationEventsPatches { [HarmonyPatch("ElevatorFullyRunning")] [HarmonyPrefix] private static void ElevatorAnimationEvents_Pre_ElevatorFullyRunning() { HaulerController pickupController = VehicleUtils.pickupController; if (!((Object)(object)pickupController == (Object)null)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; bool flag = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController); bool flag2 = VehicleUtils.IsPlayerInPickupBounds(localPlayerController, pickupController); bool flag3 = VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); if (flag || flag2 || flag3) { localPlayerController.isInElevator = true; } } } } [HarmonyPatch(typeof(GameNetworkManager))] public static class GameNetworkManagerPatches { [HarmonyPatch("Start")] [HarmonyPostfix] private static void GameNetworkManager_Post_Start(GameNetworkManager __instance) { HaulerNetworker.Init(); } } [HarmonyPatch(typeof(HUDManager))] public static class HUDManagerPatches { [HarmonyPatch("HelmetCondensationDrops")] [HarmonyPostfix] private static void HUDManager_Post_HelmetCondensationDrops(HUDManager __instance) { HaulerController pickupController = VehicleUtils.pickupController; if (!((Object)(object)pickupController == (Object)null)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; bool flag = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController); bool flag2 = VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); if (flag2 || flag) { __instance.increaseHelmetCondensation = false; } } } } [HarmonyPatch(typeof(Landmine))] public static class LandminePatches { [HarmonyPatch("SpawnExplosion")] [HarmonyPrefix] private static void Landmine_Pre_SpawnExplosion(Landmine __instance, Vector3 explosionPosition, bool spawnExplosionEffect, ref float killRange, ref float damageRange, int nonLethalDamage, float physicsForce, GameObject overridePrefab, bool goThroughCar) { //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (VehicleUtils.IsPlayerNearPickup(localPlayerController, pickupController)) { bool flag = !goThroughCar && !spawnExplosionEffect && killRange == 2.4f && damageRange == 5f && nonLethalDamage == 1 && physicsForce == 0f; bool flag2 = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController); bool flag3 = VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); bool flag4 = pickupController.vehicleCabZone.physicsCollider.ClosestPoint(explosionPosition) != explosionPosition; if (flag && (flag3 || flag2) && flag4) { killRange = -1f; damageRange = -1f; } } } } [HarmonyPatch(typeof(PlayerControllerB))] public static class PlayerControllerBPatches { public class PlayerControllerBData { public bool playerRidingInPickupCab; public bool playerRidingOnPickup; } public static Dictionary playerData = new Dictionary(); private static Quaternion armsMetarigParentRot = Quaternion.Euler(90f, 0f, 0f); private static Quaternion armsMetarigRot = Quaternion.Euler(-90f, 0f, 0f); private static Vector3 localArmsPos = new Vector3(0f, -0.008f, -0.43f); private static Quaternion localArmsRot = Quaternion.Euler(84.78056f, 0f, 0f); private static Vector3 playerBodyPos = Vector3.zero; private static Quaternion playerBodyRot = Quaternion.Euler(-90f, 0f, 0f); private static void RemoveStalePlayerData() { List list = new List(); foreach (PlayerControllerB key in playerData.Keys) { if (!Object.op_Implicit((Object)(object)key)) { list.Add(key); } } foreach (PlayerControllerB item in list) { playerData.Remove(item); } } [HarmonyPatch("Awake")] [HarmonyPostfix] private static void PlayerControllerB_Post_Awake(PlayerControllerB __instance) { RemoveStalePlayerData(); if (!playerData.ContainsKey(__instance)) { PlayerControllerBData value = new PlayerControllerBData(); playerData.Add(__instance, value); } } [HarmonyPatch("LateUpdate")] [HarmonyPrefix] public static void PlayerControllerB_Pre_LateUpdate(PlayerControllerB __instance) { if (!((Object)(object)__instance == (Object)null) && __instance.isPlayerControlled && !((Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { SetPlayerVehicleZone(__instance); } } private static void SetPlayerVehicleZone(PlayerControllerB playerController) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) HaulerController pickupController = VehicleUtils.pickupController; PlayerControllerBData playerControllerBData = playerData[playerController]; bool flag = pickupController?.vehicleCabZone.playerInZone ?? false; bool flag2 = pickupController?.vehicleZone.playerInZone ?? false; if (playerControllerBData.playerRidingInPickupCab != flag || playerControllerBData.playerRidingOnPickup != flag2) { playerControllerBData.playerRidingInPickupCab = flag; playerControllerBData.playerRidingOnPickup = flag2; HaulerNetworker.Instance?.SyncPlayerZoneRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)playerController).NetworkObject), flag, flag2); } } [HarmonyPatch("LateUpdate")] [HarmonyPostfix] private static void PlayerControllerB_Post_LateUpdate(PlayerControllerB __instance) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance == (Object)null) && !__instance.isPlayerDead && __instance.isPlayerControlled) { HaulerController pickupController = VehicleUtils.pickupController; if (!((Object)(object)pickupController == (Object)null) && VehicleUtils.IsPlayerSeatedInPickup(__instance, pickupController)) { Transform playerModelArmsMetarig = __instance.playerModelArmsMetarig; Transform localArmsTransform = __instance.localArmsTransform; Transform transform = ((Component)__instance.playerBodyAnimator).transform; ((Component)playerModelArmsMetarig.parent).transform.localRotation = armsMetarigParentRot; playerModelArmsMetarig.localRotation = armsMetarigRot; localArmsTransform.localPosition = localArmsPos; localArmsTransform.localRotation = localArmsRot; transform.localPosition = playerBodyPos; transform.localRotation = playerBodyRot; } } } } [HarmonyPatch(typeof(StartOfRound))] public static class StartOfRoundPatches { [HarmonyPatch("Awake")] [HarmonyPrefix] private static void StartOfRound_Pre_Awake() { HaulerNetworker.Create(); } [HarmonyPatch("SyncAlreadyHeldObjectsServerRpc")] [HarmonyPostfix] private static void StartOfRound_Post_SyncAlreadyHeldObjectsServerRpc(StartOfRound __instance, int joiningClientId) { if (!Object.op_Implicit((Object)(object)__instance.attachedVehicle) || !(__instance.attachedVehicle is HaulerController haulerController)) { return; } try { if ((Object)(object)haulerController == (Object)null) { Plugin.LogError("Attempted to send client data, but the Pickup is null? please report this to Scandal."); } else { haulerController.SendClientSyncData(); } } catch (Exception ex) { Plugin.LogError("Exception caught sending saved Pickup data:\n" + ex); } } } [HarmonyPatch(typeof(VehicleController))] public static class VehicleControllerPatches { [HarmonyPatch("DisableVehicleCollisionForAllPlayers")] [HarmonyPrefix] private static bool VehicleController_Pre_DisableVehicleCollisionForAllPlayers(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.DisableVehicleCollisionForAllPlayers(); return false; } [HarmonyPatch("EnableVehicleCollisionForAllPlayers")] [HarmonyPrefix] private static bool VehicleController_Pre_EnableVehicleCollisionForAllPlayers(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.EnableVehicleCollisionForAllPlayers(); return false; } [HarmonyPatch("SetVehicleCollisionForPlayer")] [HarmonyPrefix] private static bool VehicleController_Pre_SetVehicleCollisionForPlayer(VehicleController __instance, bool __runOriginal, bool setEnabled, PlayerControllerB player) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.SetVehicleCollisionForPlayer(setEnabled, player); return false; } [HarmonyPatch("SetBackDoorOpen")] [HarmonyPrefix] private static bool VehicleController_Pre_SetBackDoorOpen(VehicleController __instance, bool __runOriginal, bool open) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("SetFrontCabinLightOn")] [HarmonyPrefix] private static bool VehicleController_Pre_SetFrontCabinLightOn(VehicleController __instance, bool __runOriginal, bool setOn) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.SetFrontCabinLightOn(setOn); return false; } [HarmonyPatch("AddEngineOil")] [HarmonyPrefix] private static bool VehicleController_Pre_AddEngineOil(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.AddEngineOil(); return false; } [HarmonyPatch("AddTurboBoost")] [HarmonyPrefix] private static bool VehicleController_Pre_AddTurboBoost(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("StartMagneting")] [HarmonyPrefix] private static bool VehicleController_Pre_StartMagneting(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("CollectItemsInTruck")] [HarmonyPrefix] private static bool VehicleController_Pre_CollectItemsInTruck(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("DestroyCar")] [HarmonyPrefix] private static bool VehicleController_Pre_DestroyCar(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.DestroyCar(); return false; } [HarmonyPatch("ExitDriverSideSeat")] [HarmonyPrefix] private static bool VehicleController_Pre_ExitDriverSideSeat(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("ExitPassengerSideSeat")] [HarmonyPrefix] private static bool VehicleController_Pre_ExitPassengerSideSeat(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("CarReactToObstacle")] [HarmonyPrefix] private static bool VehicleController_Pre_CarReactToObstacle(VehicleController __instance, bool __runOriginal, Vector3 vel, Vector3 position, Vector3 impulse, CarObstacleType type, float obstacleSize, EnemyAI enemyScript, bool dealDamage) { //IL_0024: 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.CarReactToObstacle(vel, position, impulse, type, obstacleSize, enemyScript, dealDamage); return false; } [HarmonyPatch("DealPermanentDamage")] [HarmonyPrefix] private static bool VehicleController_Pre_DealPermanentDamage(VehicleController __instance, bool __runOriginal, int damageAmount, Vector3 damagePosition) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.DealPermanentDamage(damageAmount, damagePosition); return false; } [HarmonyPatch("DamagePlayerInVehicle")] [HarmonyPrefix] private static bool VehicleController_Pre_DamagePlayerInVehicle(VehicleController __instance, bool __runOriginal, Vector3 vel, float magnitude) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.DamagePlayerInVehicle(vel); return false; } [HarmonyPatch("SetInternalStress")] [HarmonyPrefix] private static bool VehicleController_Pre_SetInternalStress(VehicleController __instance, bool __runOriginal, float carStressIncrease) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.SetInternalStress(carStressIncrease); return false; } [HarmonyPatch("ToggleHeadlightsLocalClient")] [HarmonyPrefix] private static bool VehicleController_Pre_ToggleHeadlightsLocalClient(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.ToggleHeadlightsLocalClient(); return false; } [HarmonyPatch("SetHeadlightMaterial")] [HarmonyPrefix] private static bool VehicleController_Pre_SetHeadlightMaterial(VehicleController __instance, bool __runOriginal, bool on) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.SetHeadlightMaterial(on); return false; } [HarmonyPatch("SpringDriverSeatLocalClient")] [HarmonyPrefix] private static bool VehicleController_Pre_SpringDriverSeatLocalClient(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("SetRadioOnLocalClient")] [HarmonyPrefix] private static bool VehicleController_Pre_SetRadioOnLocalClient(VehicleController __instance, bool __runOriginal, bool on, bool setClip) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.SetRadioOnLocalClient(on, setClip); return false; } [HarmonyPatch("SwitchRadio")] [HarmonyPrefix] private static bool VehicleController_Pre_SwitchRadio(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.SwitchRadio(); return false; } [HarmonyPatch("ChangeRadioStation")] [HarmonyPrefix] private static bool VehicleController_Pre_ChangeRadioStation(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.ChangeRadioStation(); return false; } [HarmonyPatch("StartTryCarIgnition")] [HarmonyPrefix] private static bool VehicleController_Pre_StartTryCarIgnition(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.StartTryCarIgnition(); return false; } [HarmonyPatch("CancelTryCarIgnition")] [HarmonyPrefix] private static bool VehicleController_Pre_CancelTryCarIgnition(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.CancelTryCarIgnition(); return false; } [HarmonyPatch("RemoveKeyFromIgnition")] [HarmonyPrefix] private static bool VehicleController_Pre_RemoveKeyFromIgnition(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.RemoveKeyFromIgnition(); return false; } } } namespace CompanyHauler.Patches.InternalUtils { [HarmonyPatch] public static class ScandalsTweaksPatches { public static bool IsPlayerInPickupCab(PlayerControllerB player) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return false; } return VehicleUtils.IsPlayerSeatedInPickup(player, pickupController) || VehicleUtils.IsPlayerInPickupCab(player, pickupController, usePlayerData: true); } [HarmonyPatch(typeof(JLLCompatibility), "CanBlowPlayer")] [HarmonyPrefix] private static bool JLLCompatibility_Pre_CanBlowPlayer(PlayerControllerB player, ref bool __result) { if (IsPlayerInPickupCab(player)) { __result = false; return false; } return true; } [HarmonyPatch(typeof(JLLCompatibility), "CanDamagePlayer")] [HarmonyPrefix] private static bool JLLCompatibility_Pre_CanDamagePlayer(PlayerControllerB player, ref bool __result) { if (IsPlayerInPickupCab(player)) { __result = false; return false; } return true; } [HarmonyPatch(typeof(Utilities), "ShouldAllowSightThroughVehicle")] [HarmonyPrefix] private static bool Utilities_Pre_ShouldAllowSightThroughVehicle(PlayerControllerB player, EnemyAI enemy, ref bool __result) { if (IsPlayerInPickupCab(player)) { __result = !player.isCrouching; return false; } return true; } [HarmonyPatch(typeof(GiantKiwiAIPatches), "IsTargetPlayerInVehicle")] [HarmonyPrefix] private static bool GiantKiwiAIPatches_Pre_IsTargetPlayerInVehicle(GiantKiwiAI giantKiwiAi, VehicleController vehicleController, ref bool __result) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) if (!(vehicleController is HaulerController haulerController)) { return true; } PlayerControllerB targetPlayer = ((EnemyAI)giantKiwiAi).targetPlayer; bool flag = VehicleUtils.IsPlayerSeatedInPickup(targetPlayer, haulerController); bool flag2 = VehicleUtils.IsPlayerInPickupCab(targetPlayer, haulerController, usePlayerData: true); bool flag3 = ((VehicleController)haulerController).ontopOfTruckCollider.ClosestPoint(((Component)targetPlayer).transform.position) == ((Component)targetPlayer).transform.position; if (flag || flag2 || flag3) { __result = true; return false; } return true; } [HarmonyPatch(typeof(BushWolfEnemyPatches), "IsTargetPlayerProtected")] [HarmonyPrefix] private static bool BushWolfEnemyPatches_Pre_IsTargetPlayerProtected(PlayerControllerB player, VehicleController vehicle, ref bool __result) { if (!(vehicle is HaulerController pickupScript)) { return true; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(player, pickupScript); bool flag2 = VehicleUtils.IsPlayerInPickupCab(player, pickupScript, usePlayerData: true); if (flag) { if (VehicleUtils.IsSeatedPlayerProtected(player, pickupScript, checkSunroof: false, checkWindows: true)) { __result = true; return false; } return true; } if (!flag2) { return true; } if (VehicleUtils.IsPlayerProtectedByPickup(player, pickupScript)) { __result = true; return false; } return true; } [HarmonyPatch(typeof(LandminePatches), "ShouldCheckCustomKnockback")] [HarmonyPrefix] private static bool LandminePatches_Pre_ShouldCheckCustomKnockback(ref bool __result) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; HaulerController pickupController = VehicleUtils.pickupController; if (VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController)) { __result = true; return false; } return true; } [HarmonyPatch(typeof(LandminePatches), "CanPlayerBeKnockedBack")] [HarmonyPrefix] private static bool LandminePatches_Pre_CanPlayerBeKnockedBack(ref bool __result) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; HaulerController pickupController = VehicleUtils.pickupController; if (VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController)) { __result = false; return false; } return true; } } } namespace CompanyHauler.Patches.Enemies { [HarmonyPatch(typeof(BaboonBirdAI))] public static class BaboonBirdAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool BaboonBirdAI_Pre_OnCollideWithPlayer(BaboonBirdAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, ((EnemyAI)__instance).inSpecialAnimation || __instance.doingKillAnimation, false); if ((Object)(object)val == (Object)null) { return true; } bool flag = VehicleUtils.IsPlayerInPickupBounds(val, pickupController); bool flag2 = VehicleUtils.IsPlayerInPickupCab(val, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(val, pickupController)) { return !VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 5f); } if (!flag) { return true; } if (!flag2) { return true; } return !VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 5f); } } [HarmonyPatch(typeof(EnemyAI))] public static class EnemyAIPatches { [HarmonyPatch("PlayerIsTargetable")] [HarmonyPostfix] private static void EnemyAI_Post_PlayerIsTargetable(EnemyAI __instance, PlayerControllerB playerScript, bool cannotBeInShip, bool overrideInsideFactoryCheck, bool checkForMineshaftStartTile, ref bool __result) { if (!(__instance is BushWolfEnemy)) { return; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(playerScript, pickupController); bool flag2 = VehicleUtils.IsPlayerInPickupCab(playerScript, pickupController, usePlayerData: true); if (flag) { if (VehicleUtils.IsSeatedPlayerProtected(playerScript, pickupController, checkSunroof: false, checkWindows: true)) { __result = false; } } else if (flag2 && VehicleUtils.IsPlayerProtectedByPickup(playerScript, pickupController)) { __result = false; } } } [HarmonyPatch(typeof(ForestGiantAI))] public static class ForestGiantAIPatches { [HarmonyPatch("AnimationEventA")] [HarmonyPrefix] private static bool ForestGiantAI_Pre_AnimationEventA(ForestGiantAI __instance, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return false; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController); bool flag2 = VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); if (flag || flag2) { return false; } return true; } [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool ForestGiantAI_Pre_OnCollideWithPlayer(ForestGiantAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, __instance.inEatingPlayerAnimation, false); if ((Object)(object)val == (Object)null) { return true; } bool flag = VehicleUtils.IsPlayerInPickupBounds(val, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(val, pickupController)) { return !VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true, velocityCheck: true, 8f); } if (!flag) { return true; } return !VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true, velocityCheck: true, 8f); } } [HarmonyPatch(typeof(GiantKiwiAI))] public static class GiantKiwiAIPatches { [HarmonyPatch("IsEggInsideClosedTruck")] [HarmonyPrefix] private static bool GiantKiwiAI_Pre_IsEggInsideClosedTruck(GiantKiwiAI __instance, KiwiBabyItem egg, bool closedTruck, ref bool __result, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } if ((Object)(object)((GrabbableObject)egg).parentObject != (Object)(object)((Component)((VehicleController)pickupController).physicsRegion.parentNetworkObject).transform) { return true; } __result = !pickupController.tailgateOpen; return false; } [HarmonyPatch("AnimationEventB")] [HarmonyPrefix] private static void GiantKiwiAI_Pre_AnimationEventB(GiantKiwiAI __instance) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null || !localPlayerController.isPlayerControlled || localPlayerController.isPlayerDead) { return; } bool flag = VehicleUtils.IsPlayerInPickupBounds(localPlayerController, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController)) { if (VehicleUtils.IsSeatedPlayerProtected(localPlayerController, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true, velocityCheck: true, 10f)) { __instance.timeSinceHittingPlayer = 0.4f; } } else if (flag && VehicleUtils.IsPlayerProtectedByPickup(localPlayerController, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 10f)) { __instance.timeSinceHittingPlayer = 0.4f; } } } [HarmonyPatch(typeof(MaskedPlayerEnemy))] public static class MaskedPlayerEnemyPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool MaskedPlayerEnemy_Pre_OnCollideWithPlayer(MaskedPlayerEnemy __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, __instance.inKillAnimation || __instance.startingKillAnimationLocalClient || !__instance.enemyEnabled, false); if ((Object)(object)val == (Object)null) { return true; } bool flag = VehicleUtils.IsPlayerInPickupBounds(val, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(val, pickupController)) { return !VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: false, velocityCheck: true, 5f); } if (!flag) { return true; } return !VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: false, velocityCheck: true, 5f); } } [HarmonyPatch(typeof(MouthDogAI))] public static class MouthDogAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool MouthDogAI_Pre_OnCollideWithPlayer(MouthDogAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, __instance.inKillAnimation, false); if ((Object)(object)val == (Object)null) { return true; } bool flag = VehicleUtils.IsPlayerInPickupBounds(val, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(val, pickupController)) { return !VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: true, velocityCheck: true, 10f); } if (!flag) { return true; } return !VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: true, velocityCheck: true, 10f); } } [HarmonyPatch(typeof(PumaAI))] public static class PumaAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool PumaAI_Pre_OnCollideWithPlayer(PumaAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val == (Object)null) { return true; } bool flag = VehicleUtils.IsPlayerInPickupBounds(val, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(val, pickupController)) { return !VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 10f); } if (!flag) { return true; } return !VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 10f); } } [HarmonyPatch(typeof(RadMechAI))] public static class RadMechAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool RadMechAI_Pre_OnCollideWithPlayer(RadMechAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val == (Object)null) { return true; } bool flag = VehicleUtils.IsPlayerInPickupBounds(val, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(val, pickupController)) { return !VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true); } if (!flag) { return true; } return !VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true); } } [HarmonyPatch(typeof(RedLocustBees))] public static class RedLocustBeesPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static void RedLocustBees_Pre_OnCollideWithPlayer(RedLocustBees __instance, Collider other) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val == (Object)null) { return; } bool flag = VehicleUtils.IsPlayerInPickupBounds(val, pickupController); if (VehicleUtils.IsPlayerSeatedInPickup(val, pickupController)) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: false, velocityCheck: true, 5f)) { __instance.timeSinceHittingPlayer = 0f; } } else if (flag && VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: false, velocityCheck: true, 5f)) { __instance.timeSinceHittingPlayer = 0f; } } } [HarmonyPatch(typeof(SandWormAI))] public static class SandWormAIPatches { [HarmonyPatch("EatPlayer")] [HarmonyPrefix] private static bool SandWormAI_Pre_EatPlayer(SandWormAI __instance, PlayerControllerB playerScript, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } if (VehicleUtils.IsPlayerSeatedInPickup(playerScript, pickupController)) { return false; } if (VehicleUtils.IsPlayerInPickupCab(playerScript, pickupController)) { return false; } return true; } } } namespace CompanyHauler.Networking { internal class HaulerNetworker : NetworkBehaviour { internal static GameObject networkPrefab; internal static HaulerNetworker? Instance { get; private set; } internal static void Init() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown if ((Object)(object)networkPrefab != (Object)null) { Plugin.LogDebug("Skipped network handler registration, because it has already been initialized."); return; } try { networkPrefab = new GameObject("HaulerNetworker") { hideFlags = (HideFlags)61 }; NetworkObject val = networkPrefab.AddComponent(); byte[] value = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(typeof(HaulerNetworker).Assembly.GetName().Name + ((Object)networkPrefab).name)); val.GlobalObjectIdHash = BitConverter.ToUInt32(value, 0); networkPrefab.AddComponent(); NetworkManager.Singleton.PrefabHandler.AddNetworkPrefab(networkPrefab); Plugin.LogDebug("Successfully registered network handler."); } catch (Exception arg) { Plugin.LogError($"Encountered some fatal error while registering network handler. The mod will not function like this.\n{arg}"); } } internal static void Create() { try { if (NetworkManager.Singleton.IsServer && (Object)(object)networkPrefab != (Object)null) { Object.Instantiate(networkPrefab).GetComponent().Spawn(true); } } catch { Plugin.LogError("Encountered some fatal error while spawning network handler. It is likely that registration failed earlier on start-up, please consult your logs."); } } private void Awake() { Instance = this; } public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if ((Object)(object)Instance != (Object)(object)this) { NetworkObject val = default(NetworkObject); if ((Object)(object)Instance != (Object)null && ((Component)Instance).TryGetComponent(ref val) && !val.IsSpawned && (Object)(object)Instance != (Object)(object)networkPrefab) { Object.Destroy((Object)(object)Instance); } Plugin.LogWarning("There are 2 HaulerNetworkers instantiated, and the wrong one was assigned as Instance. This shouldn't happen, but is recoverable."); Instance = this; } Plugin.LogDebug("Successfully spawned network handler."); } private void Start() { if (!((Object)(object)this != (Object)(object)Instance) && ((NetworkBehaviour)this).IsSpawned) { Plugin.LogDebug("Start on 'HaulerNetworker' called."); } } [Rpc(/*Could not decode attribute arguments.*/)] internal void SyncPlayerZoneRpc(NetworkObjectReference player, bool setCab, bool setRiding) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: 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) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1360226805u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref player, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setCab, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setRiding, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1360226805u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val4 = default(NetworkObject); if (((NetworkObjectReference)(ref player)).TryGet(ref val4, (NetworkManager)null)) { PlayerControllerB val5 = default(PlayerControllerB); if (!((Component)val4).TryGetComponent(ref val5)) { Plugin.LogError("Failed to find player network object."); return; } PlayerControllerBPatches.PlayerControllerBData playerControllerBData = PlayerControllerBPatches.playerData[val5]; if (playerControllerBData == null) { Plugin.LogError($"Failed to find player data. clientId? {val5.playerClientId}"); return; } playerControllerBData.playerRidingInPickupCab = setCab; playerControllerBData.playerRidingOnPickup = setRiding; } else { Plugin.LogError("Failed to set player zone data."); } } 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 ((NetworkBehaviour)this).__registerRpc(1360226805u, new RpcReceiveHandler(__rpc_handler_1360226805), "SyncPlayerZoneRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1360226805(NetworkBehaviour? target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference player = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref player, default(ForNetworkSerializable)); bool setCab = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setCab, default(ForPrimitives)); bool setRiding = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setRiding, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerNetworker)(object)target).SyncPlayerZoneRpc(player, setCab, setRiding); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string? __getTypeName() { return "HaulerNetworker"; } } } namespace CompanyHauler.Compatibility { [HarmonyPatch] public static class FirstPersonViewCompatibility { [HarmonyPatch(typeof(HaulerController), "SetCarKeyEffects")] [HarmonyPrefix] public static void HaulerController_Pre_SetCarKeyEffects(HaulerController __instance, ref bool localUseBodyHands) { if (LocalBodyViewController.LocalBodyShown) { localUseBodyHands = true; } } } [HarmonyPatch] public static class ImmersiveVisorCompatibility { [HarmonyPatch(typeof(VisorRainState), "LineCastForCeiling")] [HarmonyPrefix] public static bool VisorRainState_Pre_LineCastForCeiling(VisorRainState __instance, ref bool __result) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; bool flag = VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); bool flag2 = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController); if (flag || flag2) { __result = true; return false; } return true; } } [HarmonyPatch] public static class LethalElementsCompatibility { public static bool IsIndoorLighting(PlayerControllerB playerScript) { return (Object)(object)playerScript.currentAudioTrigger != (Object)null && playerScript.currentAudioTrigger.insideLighting; } [HarmonyPatch(typeof(PlayerEffectsManager), "SetPlayerTemperature")] [HarmonyPrefix] public static void PlayerEffectsManager_Pre_SetPlayerTemperature(PlayerEffectsManager __instance, float temperatureDelta) { if ((Object)(object)HeatwaveWeather.Instance == (Object)null || !((BaseWeather)HeatwaveWeather.Instance).IsActive) { return; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!VehicleUtils.IsPlayerInPickupBounds(localPlayerController, pickupController) && !VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) && !VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController)) { return; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); bool flag2 = VehicleUtils.IsPlayerOnOutsideOfPickup(localPlayerController, pickupController); bool flag3 = IsIndoorLighting(localPlayerController); if (flag && VehicleUtils.IsPickupCabEnclosed(pickupController)) { if (!flag3) { PlayerEffectsManager.heatTransferRate = 0.75f; } else { PlayerEffectsManager.heatTransferRate = 1f; } } else { PlayerEffectsManager.heatTransferRate = 1f; } if (flag2) { PlayerEffectsManager.heatTransferRate = 1f; } } [HarmonyPatch(typeof(HaulerController), "Start")] [HarmonyPostfix] public static void HaulerController_Post_Start(HaulerController __instance) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) SnowTrackersManager.AddFootprintTracker((MonoBehaviour)(object)__instance, 6f, 0.75f, 1f, new Vector3(0f, 0f, -1f)); } [HarmonyPatch(typeof(HaulerController), "FixedUpdate")] [HarmonyPostfix] public static void HaulerController_Post_FixedUpdate(HaulerController __instance) { if (SnowPatches.IsSnowActive()) { SnowTrackersManager.UpdateFootprintTracker((MonoBehaviour)(object)__instance, !__instance.allWheelsAirborne); } } [HarmonyPatch(typeof(SnowfallVFXManager), "Update")] [HarmonyPostfix] public static void SnowfallVFXManager_Post_Update_VFX() { HaulerController pickupController = VehicleUtils.pickupController; if (!((Object)(object)pickupController == (Object)null)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((VehicleUtils.IsPlayerInPickupBounds(localPlayerController, pickupController) || VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController)) && (VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController))) { PlayerEffectsManager.isUnderSnow = false; SnowfallVFXManager.snowMovementHindranceMultiplier = 1f; } } } [HarmonyPatch(typeof(BlizzardWeather), "SetColdZoneState")] [HarmonyPrefix] public static bool BlizzardWeather_Pre_SetColdZoneState(BlizzardWeather __instance) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (VehicleUtils.IsPlayerInPickupBounds(localPlayerController, pickupController) || VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController)) { return false; } return true; } [HarmonyPatch(typeof(SnowfallWeather), "SetColdZoneState")] [HarmonyPrefix] public static bool SnowfallWeather_Pre_SetColdZoneState(SnowfallWeather __instance) { if ((Object)(object)BlizzardWeather.Instance == (Object)null) { return true; } HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!VehicleUtils.IsPlayerInPickupBounds(localPlayerController, pickupController) && !VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) && !VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController)) { return true; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); bool flag2 = VehicleUtils.IsPlayerOnOutsideOfPickup(localPlayerController, pickupController); bool flag3 = IsIndoorLighting(localPlayerController); if (flag) { if (VehicleUtils.IsPickupCabEnclosed(pickupController)) { PlayerEffectsManager.isInColdZone = !flag3; } else { PlayerEffectsManager.isInColdZone = IsWindAllowedVehicle(localPlayerController, pickupController) && BlizzardWeather.Instance.isLocalPlayerInWind; } return false; } if (flag2) { PlayerEffectsManager.isInColdZone = IsWindAllowedVehicle(localPlayerController, pickupController) && BlizzardWeather.Instance.isLocalPlayerInWind; return false; } return true; } [HarmonyPatch(typeof(BlizzardWeather), "Update")] [HarmonyPrefix] public static bool BlizzardWeather_Pre_Update(BlizzardWeather __instance) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!VehicleUtils.IsPlayerInPickupBounds(localPlayerController, pickupController) && !VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) && !VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController)) { return true; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(localPlayerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(localPlayerController, pickupController); bool flag2 = VehicleUtils.IsPlayerOnOutsideOfPickup(localPlayerController, pickupController); SnowfallWeather instance = SnowfallWeather.Instance; if (instance != null) { instance.Update(); } if (flag) { PlayerEffectsManager.heatTransferRate = 0.75f; __instance.isPlayerInBlizzard = __instance.isLocalPlayerInWind && !VehicleUtils.IsPickupCabEnclosed(pickupController); } else if (flag2) { PlayerEffectsManager.heatTransferRate = 1f; __instance.isPlayerInBlizzard = __instance.isLocalPlayerInWind; } return false; } public static bool IsWindAllowedVehicle(PlayerControllerB playerController, HaulerController pickupController) { if (IsIndoorLighting(playerController)) { return false; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(playerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(playerController, pickupController); bool flag2 = VehicleUtils.IsPlayerOnOutsideOfPickup(playerController, pickupController); if (flag && !VehicleUtils.IsPickupCabEnclosed(pickupController)) { return true; } if (flag2) { return true; } return false; } [HarmonyPatch(typeof(HeatwavePatches), "CheckConditionsForHeatingStop")] [HarmonyPrefix] public static bool HeatwavePatches_Pre_CheckConditionsForHeatingStop(PlayerControllerB playerController, ref bool __result) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } if (!VehicleUtils.IsPlayerInPickupBounds(playerController, pickupController) && !VehicleUtils.IsPlayerSeatedInPickup(playerController, pickupController) && !VehicleUtils.IsPlayerInPickupCab(playerController, pickupController)) { return true; } bool flag = VehicleUtils.IsPlayerSeatedInPickup(playerController, pickupController) || VehicleUtils.IsPlayerInPickupCab(playerController, pickupController); bool flag2 = VehicleUtils.IsPlayerOnOutsideOfPickup(playerController, pickupController); bool flag3 = IsIndoorLighting(playerController); if (flag && VehicleUtils.IsPickupCabEnclosed(pickupController)) { __result = true; } else { __result = (flag3 ? true : false); } if (flag2) { __result = (flag3 ? true : false); } return false; } [HarmonyPatch(typeof(HeatwavePatches), "CheckConditionsForHeatingPause")] [HarmonyPrefix] public static bool HeatwavePatches_Pre_CheckConditionsForHeatingPause(PlayerControllerB playerController, ref bool __result) { HaulerController pickupController = VehicleUtils.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } if (!VehicleUtils.IsPlayerInPickupBounds(playerController, pickupController) && !VehicleUtils.IsPlayerSeatedInPickup(playerController, pickupController) && !VehicleUtils.IsPlayerInPickupCab(playerController, pickupController)) { return true; } __result = false; return false; } } [HarmonyPatch] public static class LethalMinCompatibility { [HarmonyPatch(typeof(PikminVehicleController), "InitializeReferences")] [HarmonyPrefix] public static bool PikminVehicleController_Pre_InitializeReferences(PikminVehicleController __instance) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) HaulerController haulerController = default(HaulerController); if (((Component)__instance).TryGetComponent(ref haulerController)) { __instance.controller = (VehicleController)(object)haulerController; __instance.PointsRegion = haulerController.collisionTrigger.insideTruckNavMeshBounds; __instance.PikminCheckRegion = ((VehicleController)haulerController).physicsRegion.itemDropCollider; __instance.PikminWarpPoint = new GameObject("Pikmin Warp Point").transform; __instance.PikminWarpPoint.SetParent(((Component)__instance).transform); __instance.PikminWarpPoint.localPosition = new Vector3(0f, -2.18f, -7.33f); __instance.PikminWarpPoint.localScale = new Vector3(1f, 1f, 1f); __instance.OriginalWTLocalPosition = __instance.PikminWarpPoint.localPosition; return false; } return true; } [HarmonyPatch(typeof(HaulerCollisionTrigger), "OnTriggerEnter")] [HarmonyPrefix] public static bool HaulerCollisionTrigger_Pre_OnTriggerEnter(HaulerCollisionTrigger __instance, Collider other) { try { PikminCollisionDetect val = default(PikminCollisionDetect); if (((Component)other).gameObject.CompareTag("Enemy") && ((Component)other).gameObject.TryGetComponent(ref val)) { return false; } } catch (Exception arg) { Plugin.LogError($"Error in `HaulerCollisionTrigger.OnTriggerEnter`: {arg}"); return true; } return true; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace glojam.CompanyHauler.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }