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.Scripts; using CompanyHauler.Utils; using GameNetcodeStuff; using HarmonyLib; using LethalMin; using Microsoft.CodeAnalysis; using ScandalsTweaks.Compatibility; using ScandalsTweaks.Patches; using ScandalsTweaks.Scripts; using ScandalsTweaks.Utils; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.Rendering.HighDefinition; using UnityEngine.UI; 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("ImmersiveVisor")] [assembly: IgnoresAccessChecksTo("NoteBoxz.LethalMin")] [assembly: IgnoresAccessChecksTo("scandal.scandalstweaks")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("glojam.CompanyHauler")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("2.1.1.0")] [assembly: AssemblyInformationalVersion("2.1.1+001c725ecc2d58bf480f9aec93c97422a3ef273c")] [assembly: AssemblyProduct("CompanyHauler")] [assembly: AssemblyTitle("glojam.CompanyHauler")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("2.1.1.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.1.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public static Plugin Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } public void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; UserConfig.InitConfig(); Patch(); Logger.LogInfo((object)"glojam.CompanyHauler v2.1.1 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"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); if (IsModPresent("NoteBoxz.LethalMin")) { LethalMinCompatibility.PatchAllCompatibilityMethods(Harmony); } if (IsModPresent("ImmersiveVisor")) { ImmersiveVisorCompatibility.PatchAllCompatibilityMethods(Harmony); } Logger.LogDebug((object)"Finished patching!"); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching!"); } internal static bool IsModPresent(string name) { return Chainloader.PluginInfos.ContainsKey(name); } } 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(); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "glojam.CompanyHauler"; public const string PLUGIN_NAME = "CompanyHauler"; public const string PLUGIN_VERSION = "2.1.1"; } } 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 PlayerUtils { internal static bool disableAnimationSync; internal static bool isSeatedInPickup; } internal static class References { internal static ItemDropship itemShip; internal static HaulerController pickupController; } public static class VehicleUtils { public static bool IsEnemyInPickup(EnemyAI enemyScript, HaulerController pickupController) { //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_0022: 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_004f: Unknown result type (might be due to invalid IL or missing references) if (((Collider)pickupController.collisionTrigger.insideTruckNavMeshBounds).ClosestPoint(((Component)enemyScript).transform.position) == ((Component)enemyScript).transform.position || ((Collider)pickupController.collisionTrigger.insideTruckNavMeshBounds).ClosestPoint(enemyScript.agent.destination) == enemyScript.agent.destination) { return true; } return false; } public static bool IsPlayerSeatedInPickup() { return PlayerUtils.isSeatedInPickup; } public static bool IsPlayerInPickupBounds(HaulerController pickupController) { return pickupController.vehicleZone.playerInZone; } public static bool IsPlayerInPickupCab(HaulerController pickupController) { return pickupController.vehicleCabZone.playerInZone; } public static bool IsSeatedPlayerProtected(PlayerControllerB playerController, HaulerController pickupController, bool checkSunroof = false, bool checkWindows = false, bool windshieldCheck = false, bool velocityCheck = false, float velocityMagnitude = 0f) { float magnitude = ((Vector3)(ref ((VehicleController)pickupController).averageVelocity)).magnitude; if (velocityCheck && magnitude > velocityMagnitude) { return true; } bool windshieldBroken = ((VehicleController)pickupController).windshieldBroken; bool sunroofOpen = pickupController.sunroofOpen; bool flag = (Object)(object)playerController == (Object)(object)((VehicleController)pickupController).currentDriver || (Object)(object)playerController == (Object)(object)((VehicleController)pickupController).currentPassenger; if ((checkSunroof && sunroofOpen) || (flag && windshieldCheck && windshieldBroken)) { return false; } bool flag2 = ((VehicleController)pickupController).driverSideDoor.boolValue || (checkWindows && pickupController.frontLeftWindow.isWindowOpen); bool flag3 = ((VehicleController)pickupController).passengerSideDoor.boolValue || (checkWindows && pickupController.frontRightWindow.isWindowOpen); bool flag4 = pickupController.backLeftDoor.boolValue || (checkWindows && pickupController.backLeftWindow.isWindowOpen); bool flag5 = pickupController.backRightDoor.boolValue || (checkWindows && pickupController.backRightWindow.isWindowOpen); if (((Object)(object)playerController == (Object)(object)((VehicleController)pickupController).currentDriver && flag2) || ((Object)(object)playerController == (Object)(object)((VehicleController)pickupController).currentPassenger && flag3)) { return false; } if (((Object)(object)playerController == (Object)(object)pickupController.currentBackLeftPassenger && flag4) || ((Object)(object)playerController == (Object)(object)pickupController.currentMiddlePassenger && (flag4 || flag5)) || ((Object)(object)playerController == (Object)(object)pickupController.currentBackRightPassenger && flag5)) { return false; } return true; } public static bool IsPlayerProtectedByPickup(PlayerControllerB playerController, HaulerController pickupController, bool checkSunroof = false, bool checkWindows = false, bool windshieldCheck = false, bool velocityCheck = false, float velocityMagnitude = 0f) { if (((VehicleController)pickupController).carDestroyed) { return false; } float magnitude = ((Vector3)(ref ((VehicleController)pickupController).averageVelocity)).magnitude; if (velocityCheck && magnitude > velocityMagnitude) { return true; } bool windshieldBroken = ((VehicleController)pickupController).windshieldBroken; bool sunroofOpen = pickupController.sunroofOpen; bool flag = ((VehicleController)pickupController).driverSideDoor.boolValue || ((VehicleController)pickupController).passengerSideDoor.boolValue || pickupController.backLeftDoor.boolValue || pickupController.backRightDoor.boolValue; bool flag2 = pickupController.frontLeftWindow.isWindowOpen || pickupController.frontRightWindow.isWindowOpen || pickupController.backLeftWindow.isWindowOpen || pickupController.backRightWindow.isWindowOpen; bool tailgateOpen = pickupController.tailgateOpen; if ((IsPlayerInPickupCab(pickupController) && flag) || (checkSunroof && sunroofOpen) || (checkWindows && flag2) || (windshieldCheck && windshieldBroken)) { return false; } if (IsPlayerInPickupBounds(pickupController) && !IsPlayerInPickupCab(pickupController)) { return false; } return true; } public static bool IsPlayerNearPickup(PlayerControllerB playerController, HaulerController pickupController) { //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)pickupController).mainRigidbody.position; Vector3 position2 = ((Component)playerController).transform.position; if (Vector3.Distance(position2, position) > 10f) { return false; } return true; } } } 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 || !PlayerUtils.isSeatedInPickup) { ((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")] 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; [Header("Player")] public HaulerPhysicsRegion vehicleZone = null; public HaulerPlayerZone vehicleCabZone = null; public PlayerControllerB lastDriver = null; public PlayerControllerB playerWhoShifted = null; public PlayerControllerB? currentBackLeftPassenger = null; public PlayerControllerB? currentMiddlePassenger = 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; 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"; [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 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 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 dashboardSymbolCoroutine = 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 MeshRenderer windshieldMesh = null; public AnimatedObjectTrigger windowWipers = null; public PlayAudioAnimationEvent windowWipersEvent = null; public bool automaticWipersOn; private string[] carTooltips = new string[3] { "Gas pedal: [W]", "Brake pedal: [S]", "Boost: [Space]" }; public bool tailgateOpen; public bool sunroofOpen; public bool cabLightToggled; public float playerSteeringWheelAnimFloat; public float syncedPlayerSteeringAnim; public float shiftSpeed = 25f; public bool gaugesOn; public bool headlampsOn; public bool disableAnimations; public bool inIgnitionAnimation; public bool accessoryMode; public bool twistingKey; [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() { References.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; SetTruckStats(); } 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(SetCarRainCollisions()); 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 SetCarRainCollisions() { yield return (object)new WaitForSeconds(4f); ParticleSystem[] particleTriggers = (ParticleSystem[])(object)new ParticleSystem[9] { GlobalReferences.rainParticles, GlobalReferences.rainHitParticles, GlobalReferences.stormyRainParticles, GlobalReferences.stormyRainHitParticles, GlobalReferences.wesleyHurricaneRainParticles, GlobalReferences.wesleyHurricaneRainHitParticles, GlobalReferences.wesleyHurricaneSandParticles, GlobalReferences.wesleyForsakenRainParticles, GlobalReferences.wesleyForsakenRainHitParticles }; for (int i = 0; i < particleTriggers.Length; i++) { if ((Object)(object)particleTriggers[i] == (Object)null) { Plugin.Logger.LogDebug((object)"Hauler: 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 || !cabLightToggled) { base.frontCabinLightContainer.SetActive(setOn); ((Renderer)base.frontCabinLightMesh).material = (setOn ? base.headlightsOnMat : base.headlightsOffMat); } } public void ToggleCabinLights() { cabLightToggled = !cabLightToggled; ToggleCabinLightsLocalClient(cabLightToggled, accessoryMode); ToggleCabinLightsRpc(cabLightToggled, accessoryMode); } public void ToggleCabinLightsLocalClient(bool setToggle, bool accessoryMode) { if (setToggle) { SetFrontCabinLightOn(setOn: false); } else { SetFrontCabinLightOn(accessoryMode); } } [Rpc(/*Could not decode attribute arguments.*/)] public void ToggleCabinLightsRpc(bool setToggle, bool accessoriesOnThisFrame) { //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 accessoriesOnThisFrame, 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; cabLightToggled = setToggle; ToggleCabinLightsLocalClient(cabLightToggled, accessoriesOnThisFrame); } } } public void StartTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted) { CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: true)); TryIgnitionRpc(base.keyIsInIgnition, accessoryMode); } } private IEnumerator TryIgnition(bool isLocalDriver) { if ((Object)(object)base.currentDriver == (Object)null) { base.keyIgnitionCoroutine = null; yield break; } if (base.keyIsInIgnition) { SetKeyIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: true); if (base.currentDriver.playerBodyAnimator.GetInteger("SA_CarAnim") == 3 || base.currentDriver.playerBodyAnimator.GetInteger("SA_CarAnim") == 13) { base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 2); } else { base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 12); } int animIndex = base.currentDriver.playerBodyAnimator.GetInteger("SA_CarAnim"); ignitionAnimator.SetInteger("SAIgnition_Anim", animIndex); yield return (object)new WaitForSeconds(0.02f); carKeyAudio.PlayOneShot(base.twistKey); SetKeyIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.1467f); } else { PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 2); } ignitionAnimator.SetInteger("SAIgnition_Anim", 2); SetKeyIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: false); yield return (object)new WaitForSeconds(0.6f); carKeyAudio.PlayOneShot(base.insertKey); SetKeyIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.2f); carKeyAudio.PlayOneShot(base.twistKey); SetKeyIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.18f); } SetKeyIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); if (!isLocalDriver) { yield break; } bool shiftInterlock = (int)base.gear == 3; if (shiftInterlock) { PlayIgnitionAudio(); } accessoryMode = true; if (!hasSweepedDashboard && dashboardSymbolCoroutine == null) { dashboardSymbolCoroutine = ((MonoBehaviour)this).StartCoroutine(TryDashboardSweep()); } SetKeyIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); SetFrontCabinLightOn(accessoryMode); 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; accessoryMode = true; PlayerControllerB currentDriver2 = base.currentDriver; if (currentDriver2 != null) { currentDriver2.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } SetKeyIgnitionValues(keyTwisting: false, keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(accessoryMode); SetDashboardGaugesOn(on: true); CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); StartIgnitionRpc(); } else { base.chanceToStartIgnition += 14f; base.chanceToStartIgnition = Mathf.Clamp(base.chanceToStartIgnition, 0f, 99f); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryIgnitionRpc(bool setKeyInSlot, bool accessoriesActive) { //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 accessoriesActive, 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; SetKeyIgnitionValues(keyTwisting: false, keyInHand: false, setKeyInSlot); if (accessoryMode != accessoriesActive) { accessoryMode = accessoriesActive; SetFrontCabinLightOn(accessoryMode); } 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(); } accessoryMode = true; if (!hasSweepedDashboard && dashboardSymbolCoroutine == null) { dashboardSymbolCoroutine = ((MonoBehaviour)this).StartCoroutine(TryDashboardSweep()); } SetKeyIgnitionValues(keyTwisting: true, keyInHand: true, keyInSlot: true); SetFrontCabinLightOn(accessoryMode); 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 && base.keyIgnitionCoroutine != null && (base.keyIgnitionCoroutine != null || !startIgnitionTrigger.isBeingHeldByPlayer)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim") == 2 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } else if (localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim") == 12 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } else { localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; int integer = localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim"); int num = integer; if (integer == 13) { num = 3; } ignitionAnimator.SetInteger("SAIgnition_Anim", num); CancelTryIgnitionRpc(base.keyIsInIgnition, accessoryMode, integer, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelTryIgnitionRpc(bool setKeyInSlot, bool accessoriesActive, 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 accessoriesActive, 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) { ((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); } SetKeyIgnitionValues(keyTwisting: false, keyInHand: false, setKeyInSlot); SetDashboardGaugesOn(accessoriesActive); if (accessoryMode != accessoriesActive) { accessoryMode = accessoriesActive; SetFrontCabinLightOn(accessoryMode); } } } [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); } SetKeyIgnitionValues(keyTwisting: false, keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(accessoryMode); SetDashboardGaugesOn(on: true); CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); } } public void SetIgnition(bool started, bool cabLightOn) { SetFrontCabinLightOn(cabLightOn); base.carEngine1AudioActive = started; if (started) { disableAnimations = false; inIgnitionAnimation = false; base.startKeyIgnitionTrigger.SetActive(false); base.removeKeyIgnitionTrigger.SetActive(true); if (started != 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); SetKeyIgnitionValues(keyTwisting: false, keyInHand: true, keyInSlot: false); carKeyAudio.PlayOneShot(base.removeKey); SetIgnition(started: false, cabLightOn: false); accessoryMode = false; hasPlayedIgnitionChime = false; CancelDashboardSweep(); SetDashboardGaugesOn(on: false); yield return (object)new WaitForSeconds(0.73f); SetKeyIgnitionValues(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 SetKeyIgnitionValues(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 CancelSetPlayerInVehicleClientRpc(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(2613342545u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2613342545u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == playerId) { HUDManager.Instance.DisplayTip("Kicked from vehicle", "You have been forcefully kicked to prevent a softlock!", false, false, "LC_Tip1"); } } } public void SetDriverInCar() { //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) SetDriverInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetDriverInCarServerRpc(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_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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(3575576769u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3575576769u, 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)) { base.currentDriver = val3; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(rpcParams.Receive.SenderClientId); SetDriverInCarOwnerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetDriverInCarOwnerRpc(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) //IL_0206: 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(2061638504u, val3, val, (SendTo)0, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2061638504u, val3, val, (SendTo)0, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)frontLeftSeat).SetLocalPlayerIntoSeat(); ActivateControl(); SetTriggerHoverTip(base.driverSideDoorTrigger, "Exit : [LMB]"); startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionCoroutine(); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); playerSteeringWheelAnimFloat = 0.5f; syncedPlayerSteeringAnim = 0.5f; if (base.keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } else 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); } SetDriverInCarNotOwnerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), accessoryMode, base.keyIsInIgnition, base.ignitionStarted, integer); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarNotOwnerRpc(NetworkBehaviourReference playerNetObjRef, bool accessoriesActive, bool setKeyInSlot, bool engineStarted, int currentAnimIndex) { //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_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_00e2: 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(388386796u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref accessoriesActive, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref engineStarted, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, currentAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 388386796u, val3, val, (SendTo)1, (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.Logger.LogError((object)"SetDriverIntoCarNotOwnerRpc failed to find player object reference from network behaviour!"); return; } base.currentDriver = val4; ((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); accessoryMode = accessoriesActive; SetFrontCabinLightOn(accessoriesActive); base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = engineStarted; val4.playerBodyAnimator.SetInteger("SA_CarAnim", currentAnimIndex); } } public void OnDriverExitCar() { //IL_011f: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0151: 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) { PlayerUtils.disableAnimationSync = false; base.localPlayerInControl = false; SetTriggerHoverTip(base.driverSideDoorTrigger, "Use door : [LMB]"); disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); GlobalUtilities.ResetHUDToolTips(GameNetworkManager.Instance.localPlayerController); if ((Object)(object)base.currentDriver != (Object)(object)GameNetworkManager.Instance.localPlayerController) { HUDManager.Instance.DisplayTip("Err?", "This state should not occur! aborting!", false, false, "LC_Tip1"); return; } DisableControl(); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, accessoryMode); base.chanceToStartIgnition = 10f; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; OnDriverExitCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), base.syncedPosition, base.syncedRotation, base.keyIsInIgnition, base.ignitionStarted, accessoryMode); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitCarRpc(NetworkBehaviourReference playerNetObjRef, Vector3 carLocation, Quaternion carRotation, bool setKeyInSlot, bool engineStarted, bool accessoriesActive) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012a: 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_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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: 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_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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_0186: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) 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(1845809747u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((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 accessoriesActive, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1845809747u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(0uL); } PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet(ref val4, (NetworkManager)null)) { Plugin.Logger.LogError((object)"OnDriverExitRpc failed to find player object reference from network behaviour!"); 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 = engineStarted; 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; CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, accessoriesActive); SetDashboardGaugesOn(accessoriesActive); 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 = CanExitCar(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 SetPassengerInCar() { //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) SetPassengerInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInCarServerRpc(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_010b: 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(1959727518u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1959727518u, 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)) { base.currentPassenger = val3; SetPassengerInCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInCarRpc(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(1819189263u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1819189263u, 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.Logger.LogError((object)"SetPassengerInCarRpc failed to find player object reference from network behaviour!"); return; } if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)frontRightSeat).SetLocalPlayerIntoSeat(); base.localPlayerInPassengerSeat = true; SetTriggerHoverTip(base.passengerSideDoorTrigger, "Exit : [LMB]"); 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 OnPassengerExitCar() { //IL_007b: 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) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening) { PlayerUtils.disableAnimationSync = false; base.localPlayerInPassengerSeat = false; SetTriggerHoverTip(base.passengerSideDoorTrigger, "Use door : [LMB]"); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); base.currentPassenger = null; OnPassengerExitCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnPassengerExitCarRpc(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_0126: 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(575050736u, 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, 575050736u, 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.Logger.LogError((object)"OnPassengerExitCarRpc 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 = CanExitCar(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 SetBackLeftPassengerInCar() { //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) SetBackLeftPassengerInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackLeftPassengerInCarServerRpc(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_010b: 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(2177354871u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2177354871u, 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)) { currentBackLeftPassenger = val3; SetBackLeftPassengerInCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackLeftPassengerInCarRpc(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(56273478u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 56273478u, 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.Logger.LogError((object)"SetBackLeftPassengerInCarRpc failed to find player object reference from network behaviour!"); return; } if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)backLeftSeat).SetLocalPlayerIntoSeat(); localPlayerInBackLeftPassengerSeat = true; SetTriggerHoverTip(backLeftDoorTrigger, "Exit : [LMB]"); if (backLeftDoor.boolValue) { backLeftDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)backLeftSeat).SetPlayerAnimations(val4, false); } currentBackLeftPassenger = val4; val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } public void OnBackLeftPassengerExitCar() { //IL_007b: 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) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening) { PlayerUtils.disableAnimationSync = false; localPlayerInBackLeftPassengerSeat = false; SetTriggerHoverTip(backLeftDoorTrigger, "Use door : [LMB]"); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); currentBackLeftPassenger = null; OnBackLeftPassengerExitCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackLeftPassengerExitCarRpc(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_0126: 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(3659353797u, 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, 3659353797u, 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.Logger.LogError((object)"OnBackLeftPassengerExitCarRpc 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 = CanExitCar(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 SetMiddlePassengerInCar() { //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) SetMiddlePassengerInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetMiddlePassengerInCarServerRpc(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_010b: 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(3207419338u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3207419338u, 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)currentMiddlePassenger != (Object)null)) { currentMiddlePassenger = val3; SetMiddlePassengerInCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetMiddlePassengerInCarRpc(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(3200783047u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3200783047u, 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.Logger.LogError((object)"SetMiddlePassengerInCarRpc failed to find player object reference from network behaviour!"); return; } if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)backSeat).SetLocalPlayerIntoSeat(); localPlayerInMiddlePassengerSeat = true; SetTriggerHoverTip(backLeftDoorTrigger, "Exit : [LMB]"); SetTriggerHoverTip(backRightDoorTrigger, "Exit : [LMB]"); if (backLeftDoor.boolValue) { backLeftDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (backRightDoor.boolValue) { backRightDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)backSeat).SetPlayerAnimations(val4, false); } currentMiddlePassenger = val4; val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } public void OnMiddlePassengerExitCar() { //IL_008d: 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 (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening) { PlayerUtils.disableAnimationSync = false; localPlayerInMiddlePassengerSeat = false; SetTriggerHoverTip(backLeftDoorTrigger, "Use door : [LMB]"); SetTriggerHoverTip(backRightDoorTrigger, "Use door : [LMB]"); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); currentMiddlePassenger = null; OnMiddlePassengerExitCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnMiddlePassengerExitCarRpc(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_0126: 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(1230454351u, 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, 1230454351u, 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.Logger.LogError((object)"OnMiddlePassengerExitCarRpc 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); currentMiddlePassenger = 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 = CanExitCar(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 SetBackRightPassengerInCar() { //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) SetBackRightPassengerInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackRightPassengerInCarServerRpc(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_010b: 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(2145969876u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2145969876u, 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)) { currentBackRightPassenger = val3; SetBackRightPassengerInCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetBackRightPassengerInCarRpc(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(3945774727u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3945774727u, 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.Logger.LogError((object)"SetBackRightPassengerInCarRpc failed to find player object reference from network behaviour!"); return; } if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)backRightSeat).SetLocalPlayerIntoSeat(); localPlayerInBackRightPassengerSeat = true; SetTriggerHoverTip(backRightDoorTrigger, "Exit : [LMB]"); if (backRightDoor.boolValue) { backRightDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)backRightSeat).SetPlayerAnimations(val4, false); } currentBackRightPassenger = val4; val4.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } public void OnBackRightPassengerExitCar() { //IL_007b: 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) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening) { PlayerUtils.disableAnimationSync = false; localPlayerInBackRightPassengerSeat = false; SetTriggerHoverTip(backRightDoorTrigger, "Use door : [LMB]"); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); currentBackRightPassenger = null; OnBackRightPassengerExitCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnBackRightPassengerExitCarRpc(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_0126: 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(1974394838u, 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, 1974394838u, 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.Logger.LogError((object)"OnBackRightPassengerExitCarRpc 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 = CanExitCar(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, accessoryMode); OnDriverLeaveGameRpc(playerId, base.syncedPosition, base.syncedRotation, base.ignitionStarted, base.keyIsInIgnition, accessoryMode); } } } public void OnDriverLeave(PlayerControllerB playerController, bool setIgnitionState, bool setKeyInSlot, bool preIgnition) { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = null; accessoryMode = preIgnition; SetDashboardGaugesOn(accessoryMode); 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.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, accessoryMode); } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverLeaveGameRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setIgnitionState, bool setKeyInSlot, bool preIgnition) { //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 preIgnition, 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, preIgnition); } } } [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_00fa: 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.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_00fa: 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.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); currentBackLeftPassenger = null; } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnMiddlePassengerLeaveGameRpc(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_00fa: 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(2520530790u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2520530790u, 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.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); currentMiddlePassenger = 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_00fa: 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.TeleportPlayer(StartOfRound.Instance.notSpawnedPosition.position, false, 0f, false, true); currentBackRightPassenger = null; } } } private int CanExitCar(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() { InputSystem.actions.FindAction("Jump", false).performed += DoTurboBoost; 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() { InputSystem.actions.FindAction("Jump", false).performed -= DoTurboBoost; 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 GetVehicleInput() { //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) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null || localPlayerController.isTypingChat || localPlayerController.quickMenuManager.isMenuOpen) { return; } SyncVehicleInput(); base.moveInputVector = IngamePlayerSettings.Instance.playerInput.actions.FindAction("Move", false).ReadValue(); 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)); } base.drivePedalPressed = base.moveInputVector.y > 0.1f && shiftGearCoroutine == null; base.brakePedalPressed = base.moveInputVector.y < -0.1f; float magnitude = ((Vector3)(ref base.averageVelocity)).magnitude; if (!(magnitude < 0.5f)) { float num = Mathf.Clamp01(magnitude / 8f); if (base.moveInputVector.x == 0f && UserConfig.RecenterWheel.Value) { base.steeringWheelAnimFloat = NormaliseFloat(Mathf.MoveTowards(base.steeringWheelAnimFloat, 0f, base.steeringWheelTurnSpeed * num * 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.Logger.LogDebug((object)"Hauler: Attempted to enable collision, but this is unnecessary!"); } public void DisableVehicleCollisionForAllPlayers() { Plugin.Logger.LogDebug((object)"Hauler: Attempted to disable collision, but this is unnecessary!"); } public void SetVehicleCollisionForPlayer(bool setEnabled, PlayerControllerB player) { Plugin.Logger.LogDebug((object)"Hauler: Attempted to set collision, but this is unnecessary!"); } private void SetTruckStats() { //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_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0310: 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 = 400f; carDeacceleration = 2900f; reverseCarAcceleration = 2800f; 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.25f, 0.7f); base.mainRigidbody.automaticInertiaTensor = false; base.speed = 55f; base.stability = 0.55f; 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 = 23; base.carHitPlayerForceFraction = 30f; base.carReactToPlayerHitMultiplier = 2850f; base.turboBoostForce = 12000f; base.turboBoostUpwardForce = 28800f; base.jumpForce = 5600f; base.pushForceMultiplier = 78f; base.pushVerticalOffsetAmount = 1.1f; base.steeringWheelTurnSpeed = 4.35f; 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) { bool flag2 = currentMotorTorque > 800f && Mathf.Abs(forwardsSlip) > 0.35f; bool flag3 = currentMotorTorque > 800f && Mathf.Abs(sidewaysSlip) > 0.2f; if ((flag2 || flag3) && 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; } } } private void SetCarKeyEffects() { //IL_008e: 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_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_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: 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_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: 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_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0216: 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_0242: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02af: 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; } Transform val = (base.localPlayerInControl ? base.currentDriver.localItemHolder : base.currentDriver.serverItemHolder); Vector3 localPosition = (base.localPlayerInControl ? keyPosLocal : keyPosServer); Vector3 val2 = (base.localPlayerInControl ? 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 TryDashboardSweep() { 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; dashboardSymbolCoroutine = null; } private void CancelDashboardSweep() { if (dashboardSymbolCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dashboardSymbolCoroutine); dashboardSymbolCoroutine = 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 (!accessoryMode) { SetWarningLampsOff(); hasPlayedCheckEngineWarning = false; } else { SetWarningLamps(); } } private void SetRadioScreen() { if (!accessoryMode && !base.radioOn) { ((TMP_Text)radioScreen).text = null; } 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) { //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(748805417u, val3, val, (SendTo)3, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref songTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 748805417u, val3, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.currentSongTime = songTime; SetRadioTime(); } } } public void SetRadioTime() { if (!((Object)(object)base.radioAudio.clip == (Object)null) && base.radioOn) { base.radioAudio.time = Mathf.Clamp(base.currentSongTime % base.radioAudio.clip.length, 0f, base.radioAudio.clip.length); } } public void ChangeRadioStation() { if (base.radioClips.Length == 0) { Plugin.Logger.LogWarning((object)"Hauler: 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); SetRadioStationRpc(base.currentRadioClip, base.radioSignalQuality, base.radioSignalDecreaseThreshold); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetRadioStationRpc(int radioStation, 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_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_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_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) 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(2702494867u, val3, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, radioStation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalQuality, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2702494867u, 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.Logger.LogWarning((object)"Hauler: 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); } } public void SwitchRadio() { if (base.radioClips.Length == 0) { Plugin.Logger.LogWarning((object)"Hauler: No music found! are you using CruiserTunes to remove the original tracks?"); return; } SetRadioOnLocalClient(!base.radioOn, setClip: false); SetRadioRpc(base.radioOn, base.currentRadioClip, base.radioSignalQuality, base.radioSignalDecreaseThreshold); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetRadioRpc(bool on, int radioStation, 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_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_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(3881796577u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref on, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, radioStation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalQuality, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3881796577u, 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.Logger.LogWarning((object)"Hauler: No music found! are you using CruiserTunes to remove the original tracks?"); return; } base.currentRadioClip = radioStation; base.radioSignalQuality = signalQuality; base.radioSignalDecreaseThreshold = signalDecrease; SetRadioOnLocalClient(on, setClip: false); } } public void SetRadioValues() { //IL_0112: Unknown result type (might be due to invalid IL or missing references) if (!base.radioOn || (Object)(object)base.radioAudio.clip == (Object)null) { if (base.radioAudio.isPlaying) { base.radioAudio.Stop(); } if (base.radioInterference.isPlaying) { base.radioInterference.Stop(); } if (base.currentSongTime > 0f) { base.currentSongTime = 0f; } return; } if (((NetworkBehaviour)this).IsServer) { base.currentSongTime = base.radioAudio.time; if (Time.realtimeSinceStartup - timeLastSyncedRadio > 1f) { timeLastSyncedRadio = Time.realtimeSinceStartup; SyncRadioTimeRpc(base.currentSongTime); } 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, 2692); } } 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.Logger.LogDebug((object)$"Hauler: Radio called with on? {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.Logger.LogDebug((object)"Hauler: Setting station, was null!"); } base.radioAudio.clip = base.radioClips[base.currentRadioClip]; Plugin.Logger.LogDebug((object)$"Hauler: Set radio clip to {base.currentRadioClip}, station? {((Object)base.radioAudio.clip).name}"); } base.currentSongTime = 0f; SetRadioTime(); base.radioAudio.Play(); base.radioInterference.Play(); } else { base.radioAudio.Stop(); base.radioInterference.Stop(); Plugin.Logger.LogDebug((object)"Hauler: 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_0316: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_034e: 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_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_0389: 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(1, position); } } } else { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * (base.carReactToPlayerHitMultiplier - 220f), (ForceMode)1); if (dealDamage) { DealPermanentDamage(1, position); } if (enemyScript is GiantKiwiAI) { PlayerControllerB val2 = (((Object)(object)base.currentDriver != (Object)null) ? base.currentDriver : base.currentPassenger); enemyScript.HitEnemyOnLocalClient(12, Vector3.zero, val2, false, -1); } else { enemyScript.KillEnemyOnOwnerClient(false); } } 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 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) CarBumpLocalClient(vel); CarBumpRpc(vel); } public void CarBumpLocalClient(Vector3 vel) { //IL_0029: 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_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_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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) if (VehicleUtils.IsPlayerSeatedInPickup() && ((Vector3)(ref vel)).magnitude > 50f) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.externalForceAutoFade += vel; } else if (VehicleUtils.IsPlayerInPickupBounds(this)) { vel = Vector3.ClampMagnitude(vel, 30f); PlayerControllerB localPlayerController2 = GameNetworkManager.Instance.localPlayerController; localPlayerController2.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_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_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_00c7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; 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_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_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_00c7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; 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_01a8: 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_01bf: 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_01c5: 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_017e: 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) //IL_00bb: 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_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_0058: 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_00f7: 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_010c: Unknown result type (might be due to invalid IL or missing references) if (VehicleUtils.IsPlayerSeatedInPickup()) { if (((Vector3)(ref vel)).magnitude > 30f) { if (GameNetworkManager.Instance.localPlayerController.health < 48) { GameNetworkManager.Instance.localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); } else { GameNetworkManager.Instance.localPlayerController.DamagePlayer(40, true, true, (CauseOfDeath)16, 0, false, vel); } return; } if (((Vector3)(ref vel)).magnitude <= 24f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); GameNetworkManager.Instance.localPlayerController.DamagePlayer(30, true, true, (CauseOfDeath)16, 0, false, vel); return; } HUDManager.Instance.ShakeCamera((ScreenShakeType)3); if (GameNetworkManager.Instance.localPlayerController.health < 20) { GameNetworkManager.Instance.localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); } else { GameNetworkManager.Instance.localPlayerController.DamagePlayer(20, true, true, (CauseOfDeath)16, 0, false, vel); } } else if (VehicleUtils.IsPlayerInPickupBounds(this)) { if (GameNetworkManager.Instance.localPlayerController.health <= 40) { GameNetworkManager.Instance.localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); return; } GameNetworkManager.Instance.localPlayerController.DamagePlayer(30, true, true, (CauseOfDeath)16, 0, false, vel); PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.externalForceAutoFade += vel; } } private void BreakWindshield() { if (!base.windshieldBroken) { base.glassParticle.Play(); base.windshieldBroken = true; ((Renderer)windshieldMesh).enabled = false; ((Behaviour)windowWipersEvent).enabled = false; windshieldAudio.PlayOneShot(base.windshieldBreak); } } 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: 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 (base.ignitionStarted) { 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(); RemoveCarRainCollision(); 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.underExtremeStress = false; base.engineAudio1.Stop(); base.engineAudio2.Stop(); base.turbulenceAudio.Stop(); base.pushAudio.Stop(); base.miscAudio.Stop(); base.steeringWheelAudio.Stop(); base.gearStickAudio.Stop(); base.rollingAudio.Stop(); base.radioAudio.Stop(); base.radioInterference.Stop(); base.extremeStressAudio.Stop(); carKeyAudio.Stop(); base.honkingHorn = false; base.hornAudio.Stop(); base.skiddingAudio.Stop(); cabinAudio.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; accessoryMode = 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_0019: 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_002d: 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_003f: 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) if (VehicleUtils.IsPlayerSeatedInPickup()) { 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; currentMiddlePassenger = null; currentBackRightPassenger = null; } public void RemoveCarRainCollision() { //IL_0081: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown ParticleSystem[] array = (ParticleSystem[])(object)new ParticleSystem[9] { GlobalReferences.rainParticles, GlobalReferences.rainHitParticles, GlobalReferences.stormyRainParticles, GlobalReferences.stormyRainHitParticles, GlobalReferences.wesleyHurricaneRainParticles, GlobalReferences.wesleyHurricaneRainHitParticles, GlobalReferences.wesleyHurricaneSandParticles, GlobalReferences.wesleyForsakenRainParticles, GlobalReferences.wesleyForsakenRainHitParticles }; ParticleSystem[] array2 = array; foreach (ParticleSystem val in array2) { if ((Object)(object)val == (Object)null) { Plugin.Logger.LogDebug((object)"ScanVan: 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.Logger.LogDebug((object)$"Hauler: 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 = maxSteeringAngle * 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; } 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.deltaTime), minTorque * inclineBoost, maxForwardTorque); } else { currentMotorTorque = Mathf.MoveTowards(currentMotorTorque, base.idleSpeed, carDeacceleration / inclineBoost * Time.deltaTime); } 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_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019a: 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) { RemoveCarRainCollision(); ((PlayerPhysicsRegion)vehicleZone).disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains((PlayerPhysicsRegion)(object)vehicleZone)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove((PlayerPhysicsRegion)(object)vehicleZone); } if (base.localPlayerInControl || base.localPlayerInPassengerSeat || localPlayerInBackLeftPassengerSeat || localPlayerInMiddlePassengerSeat || localPlayerInBackRightPassengerSeat) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)((PlayerPhysicsRegion)vehicleZone).physicsTransform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[i]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[i]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[i].isHeld) { componentsInChildren[i].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 (base.localPlayerInControl && !base.setControlTips) { base.setControlTips = true; HUDManager.Instance.ChangeControlTipMultiple(carTooltips, false, (Item)null); } 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(); } SetAudiosMuted(); } } public void SetAudiosMuted() { bool mute = base.magnetedToShip && (StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipDoorsEnabled); base.hornAudio.mute = mute; base.engineAudio1.mute = mute; base.engineAudio2.mute = mute; cabinAudio.mute = mute; carKeyAudio.mute = mute; base.rollingAudio.mute = mute; base.skiddingAudio.mute = mute; base.turbulenceAudio.mute = mute; base.hoodFireAudio.mute = mute; base.extremeStressAudio.mute = mute; base.pushAudio.mute = mute; base.radioAudio.mute = mute; base.radioInterference.mute = mute; } 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_0099: 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_00a0: 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("Move", 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_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_00b8: 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_00c8: 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) if (!base.magnetedToShip && !((Object)(object)GameNetworkManager.Instance.localPlayerController.overridePhysicsParent != (Object)null) && !vehicleZone.playerInZone) { Vector3 point = ((RaycastHit)(ref base.hit)).point; Vector3 forward = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward; if (((NetworkBehaviour)this).IsOwner) { base.mainRigidbody.AddForceAtPosition(Vector3.Normalize(forward * 1000f) * Random.Range(40f, 50f) * base.pushForceMultiplier, point - ((Component)base.mainRigidbody).transform.up * base.pushVerticalOffsetAmount, (ForceMode)1); PushTruckFromOwnerRpc(point); } else { PushTruckRpc(point, forward); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void PushTruckRpc(Vector3 pushPosition, Vector3 dir) { //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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013d: 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_014d: 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_0164: 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) 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(1383366079u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pushPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref dir); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1383366079u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((Component)base.pushAudio).transform.position = pushPosition; base.pushAudio.Play(); base.turbulenceAmount = Mathf.Min(base.turbulenceAmount + 0.5f, 2f); if (((NetworkBehaviour)this).IsOwner) { base.mainRigidbody.AddForceAtPosition(Vector3.Normalize(dir * 1000f) * Random.Range(40f, 50f) * base.pushForceMultiplier, pushPosition - ((Component)base.mainRigidbody).transform.up * base.pushVerticalOffsetAmount, (ForceMode)1); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void PushTruckFromOwnerRpc(Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_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_00d1: 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(3644655644u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3644655644u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((Component)base.pushAudio).transform.position = pos; base.pushAudio.Play(); base.turbulenceAmount = Mathf.Min(base.turbulenceAmount + 0.5f, 2f); } } } public void OnDisable() { //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) RemoveCarRainCollision(); DisableControl(); if (base.localPlayerInControl || base.localPlayerInPassengerSeat || localPlayerInBackLeftPassengerSeat || localPlayerInMiddlePassengerSeat || localPlayerInBackRightPassengerSeat) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)((PlayerPhysicsRegion)vehicleZone).physicsTransform).GetComponentsInChildren(); for (int i = 0; i < componentsInChildren.Length; i++) { if ((Object)(object)RoundManager.Instance.mapPropsContainer != (Object)null) { ((Component)componentsInChildren[i]).transform.SetParent(RoundManager.Instance.mapPropsContainer.transform, true); } else { ((Component)componentsInChildren[i]).transform.SetParent((Transform)null, true); } if (!componentsInChildren[i].isHeld) { componentsInChildren[i].FallToGround(false, false, default(Vector3)); } } ((PlayerPhysicsRegion)vehicleZone).disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains((PlayerPhysicsRegion)(object)vehicleZone)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove((PlayerPhysicsRegion)(object)vehicleZone); } References.pickupController = null; } 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 ((NetworkBehaviour)this).__registerRpc(3646988633u, new RpcReceiveHandler(__rpc_handler_3646988633), "ShiftToGearRpc"); ((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(2613342545u, new RpcReceiveHandler(__rpc_handler_2613342545), "CancelSetPlayerInVehicleClientRpc"); ((NetworkBehaviour)this).__registerRpc(3575576769u, new RpcReceiveHandler(__rpc_handler_3575576769), "SetDriverInCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(2061638504u, new RpcReceiveHandler(__rpc_handler_2061638504), "SetDriverInCarOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(388386796u, new RpcReceiveHandler(__rpc_handler_388386796), "SetDriverInCarNotOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(1845809747u, new RpcReceiveHandler(__rpc_handler_1845809747), "OnDriverExitCarRpc"); ((NetworkBehaviour)this).__registerRpc(1959727518u, new RpcReceiveHandler(__rpc_handler_1959727518), "SetPassengerInCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(1819189263u, new RpcReceiveHandler(__rpc_handler_1819189263), "SetPassengerInCarRpc"); ((NetworkBehaviour)this).__registerRpc(575050736u, new RpcReceiveHandler(__rpc_handler_575050736), "OnPassengerExitCarRpc"); ((NetworkBehaviour)this).__registerRpc(2177354871u, new RpcReceiveHandler(__rpc_handler_2177354871), "SetBackLeftPassengerInCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(56273478u, new RpcReceiveHandler(__rpc_handler_56273478), "SetBackLeftPassengerInCarRpc"); ((NetworkBehaviour)this).__registerRpc(3659353797u, new RpcReceiveHandler(__rpc_handler_3659353797), "OnBackLeftPassengerExitCarRpc"); ((NetworkBehaviour)this).__registerRpc(3207419338u, new RpcReceiveHandler(__rpc_handler_3207419338), "SetMiddlePassengerInCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(3200783047u, new RpcReceiveHandler(__rpc_handler_3200783047), "SetMiddlePassengerInCarRpc"); ((NetworkBehaviour)this).__registerRpc(1230454351u, new RpcReceiveHandler(__rpc_handler_1230454351), "OnMiddlePassengerExitCarRpc"); ((NetworkBehaviour)this).__registerRpc(2145969876u, new RpcReceiveHandler(__rpc_handler_2145969876), "SetBackRightPassengerInCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(3945774727u, new RpcReceiveHandler(__rpc_handler_3945774727), "SetBackRightPassengerInCarRpc"); ((NetworkBehaviour)this).__registerRpc(1974394838u, new RpcReceiveHandler(__rpc_handler_1974394838), "OnBackRightPassengerExitCarRpc"); ((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(2520530790u, new RpcReceiveHandler(__rpc_handler_2520530790), "OnMiddlePassengerLeaveGameRpc"); ((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(748805417u, new RpcReceiveHandler(__rpc_handler_748805417), "SyncRadioTimeRpc"); ((NetworkBehaviour)this).__registerRpc(2702494867u, new RpcReceiveHandler(__rpc_handler_2702494867), "SetRadioStationRpc"); ((NetworkBehaviour)this).__registerRpc(3881796577u, new RpcReceiveHandler(__rpc_handler_3881796577), "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(1383366079u, new RpcReceiveHandler(__rpc_handler_1383366079), "PushTruckRpc"); ((NetworkBehaviour)this).__registerRpc(3644655644u, new RpcReceiveHandler(__rpc_handler_3644655644), "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_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 accessoriesOnThisFrame = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref accessoriesOnThisFrame, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).ToggleCabinLightsRpc(setToggle, accessoriesOnThisFrame); 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 accessoriesActive = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref accessoriesActive, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).TryIgnitionRpc(setKeyInSlot, accessoriesActive); 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 accessoriesActive = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref accessoriesActive, 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, accessoriesActive, 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_2613342545(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).CancelSetPlayerInVehicleClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3575576769(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).SetDriverInCarServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2061638504(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 driverInCarOwnerRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref driverInCarOwnerRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetDriverInCarOwnerRpc(driverInCarOwnerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_388386796(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_008f: 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_00ad: 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) { NetworkBehaviourReference playerNetObjRef = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerNetObjRef, default(ForNetworkSerializable)); bool accessoriesActive = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref accessoriesActive, default(ForPrimitives)); bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool engineStarted = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref engineStarted, default(ForPrimitives)); int currentAnimIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currentAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetDriverInCarNotOwnerRpc(playerNetObjRef, accessoriesActive, setKeyInSlot, engineStarted, currentAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1845809747(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_0064: 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_007f: 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_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00af: 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_00be: 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_00dd: 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 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 accessoriesActive = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref accessoriesActive, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnDriverExitCarRpc(playerNetObjRef, carLocation, carRotation, setKeyInSlot, engineStarted, accessoriesActive); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1959727518(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).SetPassengerInCarServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1819189263(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 passengerInCarRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref passengerInCarRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetPassengerInCarRpc(passengerInCarRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_575050736(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).OnPassengerExitCarRpc(playerNetObjRef, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2177354871(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).SetBackLeftPassengerInCarServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_56273478(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 backLeftPassengerInCarRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref backLeftPassengerInCarRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackLeftPassengerInCarRpc(backLeftPassengerInCarRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3659353797(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).OnBackLeftPassengerExitCarRpc(playerNetObjRef, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3207419338(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).SetMiddlePassengerInCarServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3200783047(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 middlePassengerInCarRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref middlePassengerInCarRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetMiddlePassengerInCarRpc(middlePassengerInCarRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1230454351(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).OnMiddlePassengerExitCarRpc(playerNetObjRef, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2145969876(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).SetBackRightPassengerInCarServerRpc(playerId, ext); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3945774727(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 backRightPassengerInCarRpc = default(NetworkBehaviourReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref backRightPassengerInCarRpc, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SetBackRightPassengerInCarRpc(backRightPassengerInCarRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1974394838(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).OnBackRightPassengerExitCarRpc(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 preIgnition = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref preIgnition, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).OnDriverLeaveGameRpc(playerId, carLocation, carRotation, setIgnitionState, setKeyInSlot, preIgnition); 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_2520530790(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).OnMiddlePassengerLeaveGameRpc(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_748805417(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float songTime = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref songTime, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).SyncRadioTimeRpc(songTime); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2702494867(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_006c: 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) { int radioStation = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioStation); 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, signalQuality, signalDecrease); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3881796577(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_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) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int radioStation = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref radioStation); 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(flag, radioStation, 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_1383366079(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 pushPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pushPosition); Vector3 dir = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dir); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).PushTruckRpc(pushPosition, dir); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3644655644(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((HaulerController)(object)target).PushTruckFromOwnerRpc(pos); 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 bool removePlayerFromZoneNextFrame; private float checkZoneInterval; private bool addedRegionToList; public bool playerInZone; public bool isRegionActive; public bool parentPlayerBodies; public void OnDestroy() { //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) base.disablePhysicsRegion = true; TryRemovePhysicsRegionFromList(); for (int i = 0; i < StartOfRound.Instance?.allPlayerScripts.Length; i++) { if ((Object)(object)((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.parent == (Object)(object)base.physicsTransform) { ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.SetParent((Transform)null); Debug.Log((object)$"Hauler: Player {i} setting parent null 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)) { TrySetPlayerInPhysicsRegion(); TrySetPlayerInZone(); } } public void TrySetPlayerInPhysicsRegion() { if (!isRegionActive) { if (addedRegionToList) { TryRemovePhysicsRegionFromList(); } } else { base.checkInterval = 0f; base.removePlayerNextFrame = false; TryAddPhysicsRegionToList(); } } public void TrySetPlayerInZone() { if (!VehicleUtils.IsPlayerSeatedInPickup()) { checkZoneInterval = 0f; removePlayerFromZoneNextFrame = false; 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; } 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() { isRegionActive = IsPhysicsRegionActive(); SetPhysicsRegionAndZone(ref base.checkInterval, ref base.removePlayerNextFrame, ref base.hasLocalPlayer, ignoreSeated: true, setPlayerParent: true); SetPhysicsRegionAndZone(ref checkZoneInterval, ref removePlayerFromZoneNextFrame, ref playerInZone, ignoreSeated: false); } public void SetPhysicsRegionAndZone(ref float checkInterval, ref bool removeNextFrame, ref bool hasPlayer, bool ignoreSeated, bool setPlayerParent = false) { if (!setPlayerParent && !ignoreSeated && VehicleUtils.IsPlayerSeatedInPickup()) { removeNextFrame = false; hasPlayer = true; checkInterval = 0f; } else { if (!hasPlayer) { return; } if (checkInterval <= 0.15f) { checkInterval += Time.deltaTime; return; } if (!removeNextFrame) { removeNextFrame = true; return; } removeNextFrame = false; checkInterval = 0f; hasPlayer = false; if (setPlayerParent) { TryRemovePhysicsRegionFromList(); } } } } public class HaulerPlayerZone : MonoBehaviour { public HaulerController haulerController = null; public Transform physicsTransform = null; public Collider physicsCollider = null; 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.Logger.LogWarning((object)"Hauler: 'Set in zone' and 'Unset in zone' are set simulteanously! this will cause issues!"); Plugin.Logger.LogWarning((object)"Hauler: Fallback to set behaviour 'Set zone --> not seated'"); setInZoneWhileSeated = false; unsetInZoneWhileSeated = true; } else if (!setInZoneWhileSeated && !unsetInZoneWhileSeated) { Plugin.Logger.LogWarning((object)"Hauler: 'Set in zone' and 'Unset in zone' are unset simulteanously! this will cause issues!"); Plugin.Logger.LogWarning((object)"Hauler: Fallback to set behaviour 'Set zone --> not seated'"); setInZoneWhileSeated = false; unsetInZoneWhileSeated = true; } } public void OnDestroy() { disableZone = true; } public void OnTriggerStay(Collider other) { if (disableZone) { playerInZone = false; return; } 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) && !VehicleUtils.IsPlayerSeatedInPickup()) { checkZoneInterval = 0f; removePlayerFromZoneNextFrame = false; playerInZone = true; } } public void Update() { if (disableZone) { playerInZone = false; return; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (setInZoneWhileSeated) { removePlayerFromZoneNextFrame = false; checkZoneInterval = 0f; playerInZone = true; return; } if (unsetInZoneWhileSeated) { removePlayerFromZoneNextFrame = false; checkZoneInterval = 0f; playerInZone = false; return; } } SetPlayerZone(ref checkZoneInterval, ref removePlayerFromZoneNextFrame, ref playerInZone); } 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.OnMiddlePassengerLeaveGameRpc((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 override void SetPlayerSeated(bool setSeated, PlayerControllerB localPlayer) { PlayerUtils.isSeatedInPickup = setSeated; } } public class HaulerSoundManager : MonoBehaviour { public HaulerController controller = null; public float checkInterval; public void LateUpdate() { if ((Object)(object)controller == (Object)null) { 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; controller.roofRainAudioActive = GlobalUtilities.IsItRaining() && flag; } } } 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.Logger.LogWarning((object)"Hauler: No window audio set for this window!"); } else if ((Object)(object)windowOpen == (Object)null || (Object)(object)windowClose == (Object)null) { Plugin.Logger.LogWarning((object)"Hauler: No window audio clips set for this window!"); } else { windowAudio.PlayOneShot(windowOpen); } } public void PlayWindowCloseAudio() { if ((Object)(object)windowAudio == (Object)null) { Plugin.Logger.LogWarning((object)"Hauler: No window audio set for this window!"); } else if ((Object)(object)windowOpen == (Object)null || (Object)(object)windowClose == (Object)null) { Plugin.Logger.LogWarning((object)"Hauler: No window audio clips set for this window!"); } else { windowAudio.PlayOneShot(windowClose); } } } public class SunroofSnipper : MonoBehaviour { public AudioSource snipAudio = null; public AudioClip snipClip = null; public void OnTriggerEnter(Collider other) { //IL_007a: 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_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) if (((Component)other).gameObject.CompareTag("Player")) { PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if (!((Object)(object)component == (Object)null) && !component.isPlayerDead && component.isPlayerControlled && !((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController) && !component.inVehicleAnimation && !component.isCrouching) { PlayDeathClipOnLocalClient(); component.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() { snipAudio.PlayOneShot(snipClip); } } } namespace CompanyHauler.Patches { [HarmonyPatch(typeof(ElevatorAnimationEvents))] public static class ElevatorAnimationEventsPatches { [HarmonyPatch("ElevatorFullyRunning")] [HarmonyPrefix] private static void ElevatorFullyRunning_Prefix() { HaulerController pickupController = References.pickupController; if (!((Object)(object)pickupController == (Object)null)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { localPlayerController.isInElevator = true; } } } } [HarmonyPatch(typeof(GameNetworkManager))] public static class GameNetworkManagerPatches { [HarmonyPatch("Start")] [HarmonyPostfix] private static void Start_Postfix(GameNetworkManager __instance) { HaulerNetworker.Init(); } } [HarmonyPatch(typeof(HUDManager))] public static class HUDManagerPatches { [HarmonyPatch("HelmetCondensationDrops")] [HarmonyPostfix] private static void HelmetCondensationDrops_Postfix(HUDManager __instance) { HaulerController pickupController = References.pickupController; if (!((Object)(object)pickupController == (Object)null) && VehicleUtils.IsPlayerInPickupCab(pickupController)) { __instance.increaseHelmetCondensation = false; } } } [HarmonyPatch(typeof(ItemDropship))] public static class ItemDropshipPatches { [HarmonyPatch("Start")] [HarmonyPrefix] private static void Start_Prefix(ItemDropship __instance) { if (!((Object)(object)__instance == (Object)null)) { References.itemShip = __instance; } } } [HarmonyPatch(typeof(Landmine))] public static class LandminePatches { [HarmonyPatch("SpawnExplosion")] [HarmonyPrefix] private static void SpawnExplosion_Prefix(Landmine __instance, Vector3 explosionPosition, bool spawnExplosionEffect, ref float killRange, ref float damageRange, int nonLethalDamage, float physicsForce, GameObject overridePrefab, bool goThroughCar) { HaulerController pickupController = References.pickupController; if (!((Object)(object)pickupController == (Object)null) && VehicleUtils.IsPlayerNearPickup(GameNetworkManager.Instance.localPlayerController, pickupController) && !goThroughCar && !spawnExplosionEffect && killRange == 2.4f && damageRange == 5f && (float)nonLethalDamage == 1f && physicsForce == 0f && (VehicleUtils.IsPlayerSeatedInPickup() || VehicleUtils.IsPlayerInPickupCab(pickupController))) { killRange = -1f; damageRange = -1f; } } } [HarmonyPatch(typeof(PlayerControllerB))] public static class PlayerControllerBPatches { public class PlayerControllerBData { public bool playerSeatedInPickup; public bool playerRidingInPickupCab; public bool playerRidingOnPickup; public bool syncedSeatedInPickup; public bool syncedRidingInPickupCab; public bool syncedRidingOnPickup; } 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 Awake_Postfix(PlayerControllerB __instance) { RemoveStalePlayerData(); if (!playerData.ContainsKey(__instance)) { PlayerControllerBData value = new PlayerControllerBData(); playerData.Add(__instance, value); } } [HarmonyPatch("UpdatePlayerAnimationsToOtherClients")] [HarmonyPrefix] private static bool UpdatePlayerAnimationsToOtherClients_Prefix(PlayerControllerB __instance, Vector2 moveInputVector) { if ((Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return true; } if (PlayerUtils.disableAnimationSync) { return false; } return true; } [HarmonyPatch("LateUpdate")] [HarmonyPostfix] public static void LateUpdate_Zone_Postfix(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_008d: Unknown result type (might be due to invalid IL or missing references) HaulerController pickupController = References.pickupController; PlayerControllerBData playerControllerBData = playerData[playerController]; bool isSeatedInPickup = PlayerUtils.isSeatedInPickup; bool flag = pickupController?.vehicleCabZone.playerInZone ?? false; bool flag2 = pickupController?.vehicleZone.playerInZone ?? false; if (playerControllerBData.playerSeatedInPickup != isSeatedInPickup || playerControllerBData.playerRidingInPickupCab != flag || playerControllerBData.playerRidingOnPickup != flag2) { playerControllerBData.playerSeatedInPickup = isSeatedInPickup; playerControllerBData.playerRidingInPickupCab = flag; playerControllerBData.playerRidingOnPickup = flag2; HaulerNetworker.Instance?.SyncPlayerZoneRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)playerController).NetworkObject), isSeatedInPickup, flag, flag2); } } [HarmonyPatch("LateUpdate")] [HarmonyPostfix] private static void LateUpdate_Postfix(PlayerControllerB __instance) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_00a6: 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 (!((Object)(object)__instance == (Object)null) && !__instance.isPlayerDead && __instance.isPlayerControlled && __instance.inVehicleAnimation && playerData[__instance].playerSeatedInPickup) { ((Component)__instance.playerModelArmsMetarig.parent).transform.localRotation = armsMetarigParentRot; __instance.playerModelArmsMetarig.localRotation = armsMetarigRot; __instance.localArmsTransform.localPosition = localArmsPos; __instance.localArmsTransform.localRotation = localArmsRot; ((Component)__instance.playerBodyAnimator).transform.localPosition = playerBodyPos; ((Component)__instance.playerBodyAnimator).transform.localRotation = playerBodyRot; } } } [HarmonyPatch(typeof(StartOfRound))] public static class StartOfRoundPatches { [HarmonyPatch("Awake")] [HarmonyPrefix] private static void Awake_Prefix(StartOfRound __instance) { HaulerNetworker.Create(); } [HarmonyPatch("SyncAlreadyHeldObjectsServerRpc")] [HarmonyPostfix] private static void SyncAlreadyHeldObjectsServerRpc_Postfix(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.Logger.LogError((object)"Hauler: Attempted to send client data, but the pickup is null? please report this to Scandal."); } else { haulerController.SendClientSyncData(); } } catch (Exception ex) { Plugin.Logger.LogError((object)("Hauler: Exception caught sending saved Cruiser data:\n" + ex)); } } } [HarmonyPatch(typeof(VehicleController))] public static class VehicleControllerPatches { [HarmonyPatch("DisableVehicleCollisionForAllPlayers")] [HarmonyPrefix] private static bool DisableVehicleCollisionForAllPlayers_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("EnableVehicleCollisionForAllPlayers")] [HarmonyPrefix] private static bool EnableVehicleCollisionForAllPlayers_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("SetVehicleCollisionForPlayer")] [HarmonyPrefix] private static bool SetVehicleCollisionForPlayer_Prefix(VehicleController __instance, bool __runOriginal, bool setEnabled, PlayerControllerB player) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("SetBackDoorOpen")] [HarmonyPrefix] private static bool SetBackDoorOpen_Prefix(VehicleController __instance, bool __runOriginal, bool open) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("SetFrontCabinLightOn")] [HarmonyPrefix] private static bool SetFrontCabinLightOn_Prefix(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 AddEngineOil_Prefix(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 AddTurboBoost_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("StartMagneting")] [HarmonyPrefix] private static bool StartMagneting_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("CollectItemsInTruck")] [HarmonyPrefix] private static bool CollectItemsInTruck_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("DestroyCar")] [HarmonyPrefix] private static bool DestroyCar_Prefix(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 ExitDriverSideSeat_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("ExitPassengerSideSeat")] [HarmonyPrefix] private static bool ExitPassengerSideSeat_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("CarReactToObstacle")] [HarmonyPrefix] private static bool CarReactToObstacle_Prefix(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 DealPermanentDamage_Prefix(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 DamagePlayerInVehicle_Prefix(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 SetInternalStress_Prefix(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 ToggleHeadlightsLocalClient_Prefix(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 SetHeadlightMaterial_Prefix(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 SpringDriverSeatLocalClient_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController)) { return true; } return false; } [HarmonyPatch("SetRadioOnLocalClient")] [HarmonyPrefix] private static bool SetRadioOnLocalClient_Prefix(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 SwitchRadio_Prefix(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 ChangeRadioStation_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is HaulerController haulerController)) { return true; } haulerController.ChangeRadioStation(); return false; } } } namespace CompanyHauler.Patches.InternalUtils { [HarmonyPatch] public static class ScandalsTweaksPatches { public static bool IsPlayerInPickup(PlayerControllerB player) { if (PlayerControllerBPatches.playerData[player].playerSeatedInPickup || PlayerControllerBPatches.playerData[player].playerRidingInPickupCab) { return true; } return false; } [HarmonyPatch(typeof(JLLCompatibility), "CanPlayerBeBlown")] [HarmonyPrefix] private static bool CanPlayerBeBlown_Prefix(PlayerControllerB player, ref bool __result) { if (IsPlayerInPickup(player)) { __result = false; return false; } return true; } [HarmonyPatch(typeof(GlobalUtilities), "ShouldAllowSightForVehicle")] [HarmonyPrefix] private static bool ShouldAllowSightForVehicle_Prefix(PlayerControllerB player, EnemyAI enemy, ref bool __result) { if (IsPlayerInPickup(player)) { __result = !player.isCrouching; return false; } return true; } [HarmonyPatch(typeof(GiantKiwiAI_Patches), "IsTargetPlayerInVehicle")] [HarmonyPrefix] private static bool IsTargetPlayerInVehicle_Prefix(GiantKiwiAI giantKiwiAi, VehicleController vehicleController, ref bool __result) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (!(vehicleController is HaulerController haulerController)) { return true; } PlayerControllerBPatches.PlayerControllerBData playerControllerBData = PlayerControllerBPatches.playerData[((EnemyAI)giantKiwiAi).targetPlayer]; if (playerControllerBData.playerSeatedInPickup || playerControllerBData.playerRidingInPickupCab || ((VehicleController)haulerController).ontopOfTruckCollider.ClosestPoint(((Component)((EnemyAI)giantKiwiAi).targetPlayer).transform.position) == ((Component)((EnemyAI)giantKiwiAi).targetPlayer).transform.position) { __result = true; return false; } return true; } [HarmonyPatch(typeof(Landmine_Patches), "ShouldCheckCustomKnockback")] [HarmonyPrefix] private static bool ShouldCheckCustomKnockback_Prefix(ref bool __result) { if (PlayerUtils.isSeatedInPickup) { __result = true; return false; } return true; } [HarmonyPatch(typeof(Landmine_Patches), "CanPlayerBeKnockedBack")] [HarmonyPrefix] private static bool CanPlayerBeKnockedBack_Prefix(ref bool __result) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (IsPlayerInPickup(localPlayerController)) { __result = false; return false; } return true; } [HarmonyPatch(typeof(Landmine_Patches), "CurrentForceMultiplier")] [HarmonyPrefix] private static bool CurrentForceMultiplier_Prefix(ref float __result) { if ((Object)(object)References.pickupController != (Object)null) { __result = 1f; return false; } return true; } } } namespace CompanyHauler.Patches.Enemies { [HarmonyPatch(typeof(BaboonBirdAI))] public static class BaboonBirdAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(BaboonBirdAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.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; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 5f)) { return false; } return true; } if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { if (VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 5f)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(BushWolfEnemy))] public static class BushWolfEnemyPatches { [HarmonyPatch("Update")] [HarmonyPostfix] private static void Update_Postfix(BushWolfEnemy __instance) { if ((Object)(object)((EnemyAI)__instance).targetPlayer == (Object)null || ((EnemyAI)__instance).targetPlayer.isPlayerDead || !((EnemyAI)__instance).targetPlayer.isPlayerControlled || Object.op_Implicit((Object)(object)((EnemyAI)__instance).targetPlayer.inAnimationWithEnemy) || ((EnemyAI)__instance).stunNormalizedTimer > 0f) { return; } HaulerController pickupController = References.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } PlayerControllerBPatches.PlayerControllerBData playerControllerBData = PlayerControllerBPatches.playerData[((EnemyAI)__instance).targetPlayer]; if (playerControllerBData.playerSeatedInPickup && VehicleUtils.IsSeatedPlayerProtected(((EnemyAI)__instance).targetPlayer, pickupController, checkSunroof: false, checkWindows: true)) { ((EnemyAI)__instance).agent.speed = 0f; __instance.CancelReelingPlayerIn(); if (((NetworkBehaviour)__instance).IsOwner && __instance.tongueLengthNormalized < -0.25f) { ((EnemyAI)__instance).SwitchToBehaviourState(0); } } else if (playerControllerBData.playerRidingInPickupCab && !((VehicleController)pickupController).driverSideDoor.boolValue && !((VehicleController)pickupController).passengerSideDoor.boolValue && !pickupController.backLeftDoor.boolValue && !pickupController.backRightDoor.boolValue) { ((EnemyAI)__instance).agent.speed = 0f; __instance.CancelReelingPlayerIn(); if (((NetworkBehaviour)__instance).IsOwner && __instance.tongueLengthNormalized < -0.25f) { ((EnemyAI)__instance).SwitchToBehaviourState(0); } } } } [HarmonyPatch(typeof(EnemyAI))] public static class EnemyAIPatches { [HarmonyPatch("PlayerIsTargetable")] [HarmonyPostfix] private static void PlayerIsTargetable_Postfix(EnemyAI __instance, PlayerControllerB playerScript, bool cannotBeInShip, bool overrideInsideFactoryCheck, bool checkForMineshaftStartTile, ref bool __result) { if (!(__instance is BushWolfEnemy)) { return; } HaulerController pickupController = References.pickupController; if (!((Object)(object)pickupController == (Object)null)) { PlayerControllerBPatches.PlayerControllerBData playerControllerBData = PlayerControllerBPatches.playerData[playerScript]; if (playerControllerBData.playerSeatedInPickup && VehicleUtils.IsSeatedPlayerProtected(playerScript, pickupController, checkSunroof: false, checkWindows: true)) { __result = false; } if (playerControllerBData.playerRidingInPickupCab && !((VehicleController)pickupController).driverSideDoor.boolValue && !((VehicleController)pickupController).passengerSideDoor.boolValue && !pickupController.backLeftDoor.boolValue && !pickupController.backRightDoor.boolValue) { __result = false; } } } } [HarmonyPatch(typeof(ForestGiantAI))] public static class ForestGiantAIPatches { [HarmonyPatch("AnimationEventA")] [HarmonyPrefix] private static bool AnimationEventA_Prefix(ForestGiantAI __instance, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return false; } if (VehicleUtils.IsPlayerInPickupCab(pickupController) || VehicleUtils.IsPlayerSeatedInPickup()) { return false; } return true; } [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(ForestGiantAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.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; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true, velocityCheck: true, 8f)) { return false; } return true; } if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { if (VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true, velocityCheck: true, 8f)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(GiantKiwiAI))] public static class GiantKiwiAIPatches { [HarmonyPatch("IsEggInsideClosedTruck")] [HarmonyPrefix] private static bool IsEggInsideClosedTruck_Prefix(GiantKiwiAI __instance, KiwiBabyItem egg, bool closedTruck, ref bool __result, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } if ((Object)(object)((GrabbableObject)egg).parentObject == (Object)(object)((Component)((VehicleController)pickupController).physicsRegion.parentNetworkObject).transform) { __result = !pickupController.tailgateOpen; return false; } return true; } [HarmonyPatch("AnimationEventB")] [HarmonyPrefix] private static void AnimationEventB_Prefix(GiantKiwiAI __instance) { HaulerController pickupController = References.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null || !localPlayerController.isPlayerControlled || localPlayerController.isPlayerDead) { return; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(localPlayerController, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true, velocityCheck: true, 10f)) { __instance.timeSinceHittingPlayer = 0f; } } else if (VehicleUtils.IsPlayerInPickupBounds(pickupController) && 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 OnCollideWithPlayer_Prefix(MaskedPlayerEnemy __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.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; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: false, velocityCheck: true, 5f)) { return false; } return true; } if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { if (VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: false, velocityCheck: true, 5f)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(MouthDogAI))] public static class MouthDogAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(MouthDogAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.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; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: true, velocityCheck: true, 10f)) { return false; } return true; } if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { if (VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: false, windshieldCheck: true, velocityCheck: true, 10f)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(PumaAI))] public static class PumaAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(PumaAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.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; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 10f)) { return false; } return true; } if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { if (VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: true, velocityCheck: true, 10f)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(RadMechAI))] public static class RadMechAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(RadMechAI __instance, Collider other, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.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; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true)) { return false; } return true; } if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { if (VehicleUtils.IsPlayerProtectedByPickup(val, pickupController, checkSunroof: true, checkWindows: true, windshieldCheck: true)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(RedLocustBees))] public static class RedLocustBeesPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static void OnCollideWithPlayer_Prefix(RedLocustBees __instance, Collider other) { HaulerController pickupController = References.pickupController; if ((Object)(object)pickupController == (Object)null) { return; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val == (Object)null) { return; } if (VehicleUtils.IsPlayerSeatedInPickup()) { if (VehicleUtils.IsSeatedPlayerProtected(val, pickupController, checkSunroof: false, checkWindows: true, windshieldCheck: false, velocityCheck: true, 5f)) { __instance.timeSinceHittingPlayer = 0f; } } else if (VehicleUtils.IsPlayerInPickupBounds(pickupController) && 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 EatPlayer_Prefix(SandWormAI __instance, PlayerControllerB playerScript, bool __runOriginal) { if (!__runOriginal) { return false; } HaulerController pickupController = References.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } if (VehicleUtils.IsPlayerSeatedInPickup()) { return false; } if (VehicleUtils.IsPlayerInPickupBounds(pickupController)) { if (VehicleUtils.IsPlayerInPickupCab(pickupController)) { return false; } return true; } 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_002d: 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_0040: Expected O, but got Unknown if ((Object)(object)networkPrefab != (Object)null) { Plugin.Logger.LogDebug((object)"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.Logger.LogDebug((object)"Successfully registered network handler. This is good news!"); } catch (Exception arg) { Plugin.Logger.LogError((object)$"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.Logger.LogError((object)"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.Logger.LogWarning((object)"There are 2 HaulerNetworkers instantiated, and the wrong one was assigned as Instance. This shouldn't happen, but is recoverable"); Instance = this; } Plugin.Logger.LogDebug((object)"Successfully spawned network handler."); } private void Start() { if (!((Object)(object)this != (Object)(object)Instance) && ((NetworkBehaviour)this).IsSpawned) { Plugin.Logger.LogDebug((object)"Hauler: Start on 'HaulerNetworker' called!"); } } [Rpc(/*Could not decode attribute arguments.*/)] internal void SyncPlayerZoneRpc(NetworkObjectReference player, bool setSeated, 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_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) { return; } if ((int)base.__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3800174095u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref player, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setSeated, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setCab, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref setRiding, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3800174095u, 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.Logger.LogError((object)"Hauler: Failed to find player network object!"); return; } PlayerControllerBPatches.PlayerControllerBData playerControllerBData = PlayerControllerBPatches.playerData[val5]; if (playerControllerBData == null) { Plugin.Logger.LogError((object)$"Hauler: Failed to find player data. clientId? {val5.playerClientId}"); return; } playerControllerBData.playerSeatedInPickup = setSeated; playerControllerBData.playerRidingInPickupCab = setCab; playerControllerBData.playerRidingOnPickup = setRiding; } else { Plugin.Logger.LogError((object)"Hauler: 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(3800174095u, new RpcReceiveHandler(__rpc_handler_3800174095), "SyncPlayerZoneRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3800174095(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_00a0: 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) { NetworkObjectReference player = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref player, default(ForNetworkSerializable)); bool setSeated = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setSeated, default(ForPrimitives)); 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, setSeated, setCab, setRiding); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string? __getTypeName() { return "HaulerNetworker"; } } } namespace CompanyHauler.Compatibility { public static class ImmersiveVisorCompatibility { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void PatchAllCompatibilityMethods(Harmony harmony) { ApplyVisorPatch(harmony); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPrefix] public static void ApplyVisorPatch(Harmony harmony) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(VisorRainState), "LineCastForCeiling", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(ImmersiveVisorCompatibility), "LineCastForCeiling_Prefix", (Type[])null, (Type[])null); harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } public static bool LineCastForCeiling_Prefix(VisorRainState __instance, ref bool __result) { HaulerController pickupController = References.pickupController; if ((Object)(object)pickupController == (Object)null) { return true; } if (VehicleUtils.IsPlayerInPickupCab(pickupController)) { __result = true; return false; } return true; } } public static class LethalMinCompatibility { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void PatchAllCompatibilityMethods(Harmony harmony) { ApplyPikminPatch(harmony); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPrefix] public static void ApplyPikminPatch(Harmony harmony) { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(HaulerCollisionTrigger), "OnTriggerEnter", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(LethalMinCompatibility), "OnTriggerEnter_Prefix", (Type[])null, (Type[])null); MethodInfo methodInfo3 = AccessTools.Method(typeof(PikminVehicleController), "InitializeReferences", (Type[])null, (Type[])null); MethodInfo methodInfo4 = AccessTools.Method(typeof(LethalMinCompatibility), "InitializeReferences_Prefix", (Type[])null, (Type[])null); harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo3, new HarmonyMethod(methodInfo4), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } public static bool InitializeReferences_Prefix(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; } public static bool OnTriggerEnter_Prefix(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.Logger.LogError((object)$"Error in HaulerCollisionTrigger.OnTriggerEnterPrefix: {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 { } }