using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using GameNetcodeStuff; using HarmonyLib; using LethalCompanyInputUtils.Api; using LethalMin; using Microsoft.CodeAnalysis; using ScandalsTweaks.Patches; using ScandalsTweaks.Utils; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Rendering.HighDefinition; using UnityEngine.Scripting.APIUpdating; using VoxxWeatherPlugin.Patches; using VoxxWeatherPlugin.Utils; using VoxxWeatherPlugin.Weathers; using Woecust.ImmersiveVisor; using scandal.v55cruiser.NetcodePatcher; using v55Cruiser; using v55Cruiser.Behaviour; using v55Cruiser.Compatibility; using v55Cruiser.Patches; using v55Cruiser.Utils; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ImmersiveVisor")] [assembly: IgnoresAccessChecksTo("NoteBoxz.LethalMin")] [assembly: IgnoresAccessChecksTo("scandal.scandalstweaks")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("voxx.LethalElementsPlugin")] [assembly: AssemblyCompany("scandal.v55cruiser")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.2.4.0")] [assembly: AssemblyInformationalVersion("1.2.4+9ca65b399502caf978de31f57e0dfb9b3cbfb6f1")] [assembly: AssemblyProduct("v55Cruiser")] [assembly: AssemblyTitle("scandal.v55cruiser")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.2.4.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public enum TruckVersionType { V55 = 1, V56, V70 } public class v55VehicleCollisionTrigger : MonoBehaviour { public v55VehicleController 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_00e3: 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_00f8: 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_0105: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_0420: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Invalid comparison between Unknown and I4 //IL_0180: 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_01c9: 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_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_049f: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_022f: 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_023c: Unknown result type (might be due to invalid IL or missing references) //IL_04df: 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_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0513: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: 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) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Unknown result type (might be due to invalid IL or missing references) //IL_05e4: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) //IL_05ed: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_0602: Expected I4, but got Unknown //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_0618: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0656: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_068c: 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); ((Component)other).TryGetComponent(ref val); if ((Object)(object)val == (Object)null) { return; } Transform physicsTransform = ((VehicleController)mainScript).physicsRegion.physicsTransform; if ((Object)(object)val.overridePhysicsParent == (Object)(object)physicsTransform || Time.realtimeSinceStartup - timeSinceHittingPlayer < 0.25f) { 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 { if (!((Component)other).gameObject.CompareTag("Enemy") || Time.realtimeSinceStartup - timeSinceHittingEnemy < 0.25f) { return; } EnemyAICollisionDetect val4 = default(EnemyAICollisionDetect); ((Component)other).TryGetComponent(ref val4); if ((Object)(object)val4 == (Object)null || (Object)(object)val4.mainScript == (Object)null || val4.mainScript.isEnemyDead || (!val4.mainScript.enemyType.canDie && (int)val4.mainScript.enemyType.SizeLimit == 0)) { return; } Object navMeshOwner = val4.mainScript.agent.navMeshOwner; Behaviour val5 = (Behaviour)(object)((navMeshOwner is Behaviour) ? navMeshOwner : null); if (((Object)(object)val5 != (Object)null && ((Component)val5).transform.IsChildOf(((Component)mainScript).transform)) || Vector3.Angle(((VehicleController)mainScript).averageVelocity, ((Component)val4.mainScript).transform.position - ((Component)this).transform.position) > 130f || (mainScript.liftGateOpen && (((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; } } timeSinceHittingEnemy = Time.realtimeSinceStartup; Vector3 position = ((Component)val4).transform.position; bool flag = false; NavSizeLimit sizeLimit = val4.mainScript.enemyType.SizeLimit; NavSizeLimit val6 = sizeLimit; 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; } } } } } public class v55VehicleController : VehicleController { [Header("Variety")] public TruckVersionType truckType; public v55InteriorType LHDInterior = null; public v55InteriorType RHDInterior = null; public v55InteriorType currentInterior = null; public Transform v55HealthMeter = null; public Transform v56HealthMeter = null; public GameObject v55EngineBay = null; public GameObject v56EngineBay = null; public int interiorType; public bool isInteriorRHD; [Header("Vehicle Physics")] public List wheels = null; public v55VehicleCollisionTrigger collisionTrigger = null; public Rigidbody playerPhysicsBody = null; private WheelHit[] wheelHits = (WheelHit[])(object)new WheelHit[4]; public Vector3 previousVehiclePosition; public bool inBetaMode; public float steeringAngle; public bool allWheelsAirborne; private float timeSinceUntethered; public float sidewaysSlip; public float forwardsSlip; public float wheelTorque; public float wheelBrakeTorque = 2000f; public float maxBrakingPower = 2000f; public float frontWheelRPM; public float backWheelRPM; public float wheelRPM; public bool hasDeliveredVehicle; [Header("Drivetrain")] public float forwardWheelSpeed; public float reverseWheelSpeed; [Header("Multiplayer")] public Collider vehicleBounds = null; public Collider storageCompartment = null; public PlayerControllerB lastDriver = null; public PlayerControllerB playerWhoShifted = null; public Vector3 playerPositionOffset; public Vector3 seatNodePositionOffset; public Vector2 syncedMoveInputVector; public float syncedPlayerSteeringAnim; public float syncedWheelRotation; public float syncedSteeringInput; public float syncedFrontWheelRPM; public float syncedBackWheelRPM; public float syncedWheelRPM; public float syncedEngineRPM; public float syncedMotorTorque; public float syncedBrakeTorque; public int syncedCarHP; public bool syncedDrivePedalPressed; public bool syncedBrakePedalPressed; public float tyreStress; public bool wheelSlipping; public float syncCarEffectsInterval; public float syncWheelTorqueInterval; public float syncCarDrivetrainInterval; [Header("Effects")] public GameObject[] disableOnDestroy = null; public InteractTrigger pushTruckTrigger = null; public Collider[] weatherEffectBlockers = null; public ParticleSystem frontTireSparks = null; public MeshRenderer leftBrakeMesh = null; public MeshRenderer rightBrakeMesh = null; public MeshRenderer backLeftBrakeMesh = null; public MeshRenderer backRightBrakeMesh = null; public AnimationCurve engineAudio1Curve = null; public AnimationCurve engineAudio2Curve = null; public GameObject destroyedTruckMesh_1 = null; public GameObject windshieldMesh = null; public GameObject carKeyInHand = null; public MeshRenderer radarMapIcon = null; public MeshRenderer radarMapDestroyedIcon = null; public Animator ignitionAnimator = null; public GameObject carKeyContainer = null; public Transform ignitionKeyPosition = null; private Transform leftHandServerItemTarget = null; public MeshRenderer frontLeftDoorMesh = null; public MeshRenderer frontRightDoorMesh = null; public MeshRenderer steeringWheelMesh = null; private Vector3 ignitionKeyScale = new Vector3(0.06f, 0.06f, 0.06f); private Vector3 LHD_Pos_Local = new Vector3(0.0489f, 0.1371f, -0.1566f); private Vector3 LHD_Pos_Server = new Vector3(0.0366f, 0.1023f, -0.1088f); private Vector3 LHD_Rot_Local = new Vector3(-3.446f, 3.193f, 172.642f); private Vector3 LHD_Rot_Server = new Vector3(-191.643f, 174.051f, -7.768005f); private Vector3 RHD_Pos_Local = new Vector3(-0.01708288f, 0.1665026f, -0.1157278f); private Vector3 RHD_Pos_Server = new Vector3(-0.0194879f, 0.1340649f, -0.1071167f); private Vector3 RHD_Rot_Local = new Vector3(21.592f, -11.63f, -158.578f); private Vector3 RHD_Rot_Server = new Vector3(-9.158f, -18.16f, -162.445f); public float wheelRotSpeed; public bool isCabLightOn; public bool liftGateOpen; public bool disableAnimations; public bool inIgnitionAnimation; public float playerSteeringWheelAnimFloat; public float ignitionRotSpeed = 45f; [Header("Audio")] public AudioSource carKeySoundsAudio = null; public AudioSource ejectorButtonAudio = null; public AudioSource reverseWhineAudio = null; public AudioSource verticalColumnAudio = null; public AudioClip dashboardButton = null; public AudioClip engineRev1 = null; public AudioClip revEngineStart1 = null; [Header("Radio")] public AudioClip radio_BabyFace = null; public float timeLastSyncedRadio; public float radioPingTimestamp; [Header("Materials")] public Material destroyedTruckMaterial = null; public Material greyLightOffMat = null; public Material redLightOffMat = null; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (!StartOfRound.Instance.inShipPhase && ((NetworkBehaviour)this).IsServer) { int interiorTypeRpc = 0; bool value = UserConfig.TrueJank.Value; bool value2 = UserConfig.BabyFaceRadio.Value; if (UserConfig.RightHandedWheel.Value && !value) { interiorTypeRpc = new Random(StartOfRound.Instance.randomMapSeed).Next(0, 2); } SetInteriorTypeRpc(interiorTypeRpc); if (value2) { AddBabyFaceRadioRpc(); } SetTrueV55ModeRpc(value); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetTrueV55ModeRpc(bool isFucked) { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2704251898u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref isFucked, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2704251898u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetTrueV55Mode(isFucked); } } } public void SetTrueV55Mode(bool isFucked) { //IL_00c3: 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_00ee: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0178: 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_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_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_004a: 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_0064: 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) inBetaMode = isFucked; if (inBetaMode) { JointSpring val = default(JointSpring); val.spring = 2700f; val.damper = 500f; val.targetPosition = 0.5f; JointSpring suspensionSpring = val; base.FrontLeftWheel.suspensionSpring = suspensionSpring; base.FrontRightWheel.suspensionSpring = suspensionSpring; base.BackRightWheel.suspensionSpring = suspensionSpring; base.BackLeftWheel.suspensionSpring = suspensionSpring; base.FrontLeftWheel.sprungMass = 8.96825f; base.FrontRightWheel.sprungMass = 8.96825f; base.BackLeftWheel.sprungMass = 33.20035f; base.BackRightWheel.sprungMass = 33.20035f; } else { JointSpring val = default(JointSpring); val.spring = 40000f; val.damper = 750f; val.targetPosition = 0.88f; JointSpring suspensionSpring = val; ((Component)base.FrontLeftWheel).transform.localPosition = new Vector3(-1.69f, 0f, 0f); ((Component)base.FrontRightWheel).transform.localPosition = new Vector3(1.69f, 0f, 0f); ((Component)base.BackLeftWheel).transform.localPosition = new Vector3(-1.69f, 0f, 0f); ((Component)base.BackRightWheel).transform.localPosition = new Vector3(1.69f, 0f, 0f); base.FrontLeftWheel.suspensionSpring = suspensionSpring; base.FrontRightWheel.suspensionSpring = suspensionSpring; base.BackRightWheel.suspensionSpring = suspensionSpring; base.BackLeftWheel.suspensionSpring = suspensionSpring; base.FrontLeftWheel.sprungMass = 54.4f; base.FrontRightWheel.sprungMass = 54.4f; base.BackLeftWheel.sprungMass = 147.4f; base.BackRightWheel.sprungMass = 147.4f; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetInteriorTypeRpc(int carInteriorType) { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2830820490u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, carInteriorType); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2830820490u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetInteriorType(carInteriorType); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void AddBabyFaceRadioRpc() { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(704329810u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 704329810u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.radioClips = CollectionExtensions.AddToArray(base.radioClips, radio_BabyFace); } } } public void SetInteriorType(int carInteriorType) { //IL_0062: 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_0081: 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_00bc: 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_00ec: 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_010b: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0150: 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_018b: 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_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: 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_02ee: Unknown result type (might be due to invalid IL or missing references) //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0333: Unknown result type (might be due to invalid IL or missing references) //IL_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) interiorType = carInteriorType; switch (interiorType) { case 0: currentInterior = LHDInterior; isInteriorRHD = false; ((Component)RHDInterior).gameObject.SetActive(false); ((Component)ejectorButtonAudio).transform.localPosition = new Vector3(-0.325f, ((Component)ejectorButtonAudio).transform.localPosition.y, ((Component)ejectorButtonAudio).transform.localPosition.z); ((Component)base.steeringWheelAudio).transform.localPosition = new Vector3(-0.956f, ((Component)base.steeringWheelAudio).transform.localPosition.y, ((Component)base.steeringWheelAudio).transform.localPosition.z); ((Component)carKeySoundsAudio).transform.localPosition = new Vector3(-0.5525f, ((Component)carKeySoundsAudio).transform.localPosition.y, ((Component)carKeySoundsAudio).transform.localPosition.z); ((Component)verticalColumnAudio).transform.localPosition = new Vector3(-1.4215f, ((Component)verticalColumnAudio).transform.localPosition.y, ((Component)verticalColumnAudio).transform.localPosition.z); ((Component)base.springAudio).transform.localPosition = new Vector3(-1f, ((Component)base.springAudio).transform.localPosition.y, ((Component)base.springAudio).transform.localPosition.z); ((Component)ignitionAnimator).transform.localPosition = new Vector3(-0.5525247f, ((Component)ignitionAnimator).transform.localPosition.y, ((Component)ignitionAnimator).transform.localPosition.z); ((Component)base.steeringWheelAnimator).transform.localPosition = new Vector3(-0.97943f, 0.18512f, 2.30265f); break; case 1: currentInterior = RHDInterior; isInteriorRHD = true; ((Component)LHDInterior).gameObject.SetActive(false); ((Component)ejectorButtonAudio).transform.localPosition = new Vector3(0.325f, ((Component)ejectorButtonAudio).transform.localPosition.y, ((Component)ejectorButtonAudio).transform.localPosition.z); ((Component)base.steeringWheelAudio).transform.localPosition = new Vector3(0.956f, ((Component)base.steeringWheelAudio).transform.localPosition.y, ((Component)base.steeringWheelAudio).transform.localPosition.z); ((Component)carKeySoundsAudio).transform.localPosition = new Vector3(0.5525f, ((Component)carKeySoundsAudio).transform.localPosition.y, ((Component)carKeySoundsAudio).transform.localPosition.z); ((Component)verticalColumnAudio).transform.localPosition = new Vector3(1.4215f, ((Component)verticalColumnAudio).transform.localPosition.y, ((Component)verticalColumnAudio).transform.localPosition.z); ((Component)base.springAudio).transform.localPosition = new Vector3(1f, ((Component)base.springAudio).transform.localPosition.y, ((Component)base.springAudio).transform.localPosition.z); ((Component)ignitionAnimator).transform.localPosition = new Vector3(0.5525247f, ((Component)ignitionAnimator).transform.localPosition.y, ((Component)ignitionAnimator).transform.localPosition.z); ((Component)base.steeringWheelAnimator).transform.localPosition = new Vector3(0.97943f, 0.18512f, 2.30265f); break; } v55InteriorType v55InteriorType = currentInterior; base.gearStickAnimator = v55InteriorType.gearStickAnimator; base.driverSeatTrigger = v55InteriorType.driverSeatTrigger; base.passengerSeatTrigger = v55InteriorType.passengerSeatTrigger; base.driverSeatSpringAnimator = v55InteriorType.driverSeatSpringAnimator; if (StartOfRound.Instance.inShipPhase) { base.hasBeenSpawned = true; } } public void Awake() { //IL_0061: 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_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_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_0088: 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_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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_0108: 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_0113: 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_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) base.mainRigidbody.ResetCenterOfMass(); base.mainRigidbody.automaticCenterOfMass = true; base.ragdollPhysicsBody.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody1.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody2.interpolation = (RigidbodyInterpolation)1; ((VehicleController)this).Awake(); References.truckController = this; base.physicsRegion.priority = 1; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; seatNodePositionOffset = Vector3.zero; playerPositionOffset = Vector3.zero; SetFrontCabinLightOn(setOn: false); Transform transform = ((Component)LHDInterior.driverSeatTrigger.playerPositionNode).transform; transform.localPosition += seatNodePositionOffset; Transform transform2 = ((Component)LHDInterior.passengerSeatTrigger.playerPositionNode).transform; transform2.localPosition += seatNodePositionOffset; Transform transform3 = ((Component)RHDInterior.driverSeatTrigger.playerPositionNode).transform; transform3.localPosition += seatNodePositionOffset; Transform transform4 = ((Component)RHDInterior.passengerSeatTrigger.playerPositionNode).transform; transform4.localPosition += seatNodePositionOffset; base.backDoorOpen = true; forwardWheelSpeed = 10000f; reverseWheelSpeed = -10000f; SetTruckStats(); } private void SetTruckStats() { //IL_0003: 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_014a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) base.gear = (CarGearShift)3; base.MaxEngineRPM = 300f; base.MinEngineRPM = 100f; base.engineIntensityPercentage = 180f; base.EngineTorque = 1100f; base.carAcceleration = 250f; base.idleSpeed = 15f; base.mainRigidbody.automaticCenterOfMass = false; base.mainRigidbody.centerOfMass = new Vector3(0f, -0.5534029f, -0.9468046f); base.mainRigidbody.automaticInertiaTensor = false; base.carMaxSpeed = 60f; base.mainRigidbody.maxLinearVelocity = base.carMaxSpeed; base.mainRigidbody.maxAngularVelocity = 4f; base.brakeSpeed = 2000f; wheelBrakeTorque = maxBrakingPower; base.pushForceMultiplier = 27f; base.pushVerticalOffsetAmount = 1f; base.steeringWheelTurnSpeed = 4f; base.torqueForce = 2.5f; SetWheelFriction(); base.FrontLeftWheel.brakeTorque = maxBrakingPower; base.FrontRightWheel.brakeTorque = maxBrakingPower; base.BackLeftWheel.brakeTorque = maxBrakingPower; base.BackRightWheel.brakeTorque = maxBrakingPower; base.FrontLeftWheel.center = Vector3.zero; base.FrontRightWheel.center = Vector3.zero; base.BackRightWheel.center = Vector3.zero; base.BackLeftWheel.center = Vector3.zero; base.FrontLeftWheel.wheelDampingRate = 0.8f; base.FrontRightWheel.wheelDampingRate = 0.8f; base.BackRightWheel.wheelDampingRate = 0.8f; base.BackLeftWheel.wheelDampingRate = 0.8f; base.FrontLeftWheel.mass = 25f; base.FrontRightWheel.mass = 25f; base.BackLeftWheel.mass = 25f; base.BackRightWheel.mass = 25f; base.FrontLeftWheel.suspensionDistance = 0.4f; base.FrontRightWheel.suspensionDistance = 0.4f; base.BackRightWheel.suspensionDistance = 0.4f; base.BackLeftWheel.suspensionDistance = 0.4f; base.FrontLeftWheel.forceAppPointDistance = -0.01f; base.FrontRightWheel.forceAppPointDistance = -0.01f; base.BackRightWheel.forceAppPointDistance = -0.01f; base.BackLeftWheel.forceAppPointDistance = -0.01f; base.turboBoostForce = 3000f; base.turboBoostUpwardForce = 7200f; base.jumpForce = 600f; base.baseCarHP = 30; base.carHP = base.baseCarHP; syncedCarHP = base.carHP; base.carFragility = 1f; base.positionOffset = new Vector3(0.0472f, 0.103f, -0.09f); base.rotationOffset = Vector3.zero; truckType = TruckVersionType.V55; v55EngineBay.SetActive(truckType == TruckVersionType.V55); v56EngineBay.SetActive(truckType != TruckVersionType.V55); ((Component)v55HealthMeter).gameObject.SetActive(truckType == TruckVersionType.V55); ((Component)v56HealthMeter).gameObject.SetActive(truckType != TruckVersionType.V55); ((Component)base.turboMeter).gameObject.SetActive(truckType != TruckVersionType.V55); if (truckType == TruckVersionType.V55) { base.healthMeter = v55HealthMeter; } else { base.healthMeter = v56HealthMeter; } } private void SetWheelFriction() { //IL_0003: 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_005d: 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_0084: 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_00c5: 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_00df: Unknown result type (might be due to invalid IL or missing references) WheelFrictionCurve val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 0.2f; ((WheelFrictionCurve)(ref val)).extremumValue = 1f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 0.4f; ((WheelFrictionCurve)(ref val)).stiffness = 2.7f; base.FrontLeftWheel.forwardFriction = val; base.FrontRightWheel.forwardFriction = val; ((WheelFrictionCurve)(ref val)).stiffness = 0.75f; base.BackLeftWheel.forwardFriction = val; base.BackRightWheel.forwardFriction = val; ((WheelFrictionCurve)(ref val)).stiffness = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 0.75f; ((WheelFrictionCurve)(ref val)).extremumSlip = 0.7f; base.FrontLeftWheel.sidewaysFriction = val; base.FrontRightWheel.sidewaysFriction = val; base.BackLeftWheel.sidewaysFriction = val; base.BackRightWheel.sidewaysFriction = val; } public void Start() { //IL_0091: 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_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_00cf: 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) ((MonoBehaviour)this).StartCoroutine(SetCarRainCollisions()); 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.loadedVehicleFromSave = true; base.mainRigidbody.isKinematic = true; ((Component)this).transform.position = StartOfRound.Instance.magnetPoint.position + StartOfRound.Instance.magnetPoint.forward * 7f; ((Component)this).transform.rotation = Quaternion.Euler(new Vector3(0f, 90f, 0f)); base.magnetedToShip = true; base.inDropshipAnimation = false; hasDeliveredVehicle = true; base.hasBeenSpawned = true; StartMagneting(); } } 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)"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 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); } if (interiorType == -1) { interiorType = 0; } SyncClientDataRpc(interiorType, UserConfig.BabyFaceRadio.Value); SetTrueV55ModeRpc(UserConfig.TrueJank.Value); } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncClientDataRpc(int carInteriorType, bool baby) { //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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2819297796u, val2, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, carInteriorType); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref baby, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2819297796u, val2, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetInteriorType(carInteriorType); if (baby) { base.radioClips = CollectionExtensions.AddToArray(base.radioClips, radio_BabyFace); } } } public void SetBackDoorOpen(bool open) { liftGateOpen = open; } private void SetFrontCabinLightOn(bool setOn) { isCabLightOn = setOn; Material material = (setOn ? base.headlightsOnMat : base.headlightsOffMat); base.frontCabinLightContainer.SetActive(setOn); ((Renderer)base.frontCabinLightMesh).material = material; } public void StartTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted) { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } disableAnimations = true; inIgnitionAnimation = true; base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: true)); TryIgnitionRpc(base.keyIsInIgnition, isCabLightOn); } } private IEnumerator TryIgnition(bool isLocalDriver) { if ((Object)(object)base.currentDriver == (Object)null) { base.keyIgnitionCoroutine = null; yield break; } if (base.keyIsInIgnition) { SetKeyIgnitionValues(keyInHand: false, keyInSlot: true); if (base.currentDriver.playerBodyAnimator.GetInteger("SA_CarAnim") == 3) { 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); if (inBetaMode) { yield return (object)new WaitForSeconds(0.035f); } else { yield return (object)new WaitForSeconds(0.02f); } carKeySoundsAudio.PlayOneShot(base.twistKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.1467f); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); } else { PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 2); } ignitionAnimator.SetInteger("SAIgnition_Anim", 2); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); if (inBetaMode) { yield return (object)new WaitForSeconds(0.66f); carKeySoundsAudio.PlayOneShot(base.insertKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); yield return (object)new WaitForSeconds(0.2f); carKeySoundsAudio.PlayOneShot(base.twistKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); yield return (object)new WaitForSeconds(0.1f); } else { yield return (object)new WaitForSeconds(0.6f); carKeySoundsAudio.PlayOneShot(base.insertKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.2f); carKeySoundsAudio.PlayOneShot(base.twistKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.185f); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); } } if (!isLocalDriver) { yield break; } SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); SetFrontCabinLightOn(base.keyIsInIgnition); PlayIgnitionAudio(); TryStartIgnitionRpc(); yield return (object)new WaitForSeconds(Random.Range(0.4f, 1.1f)); if ((float)Random.Range(0, 100) < base.chanceToStartIgnition) { disableAnimations = false; inIgnitionAnimation = false; PlayerControllerB currentDriver2 = base.currentDriver; if (currentDriver2 != null) { currentDriver2.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } SetKeyIgnitionValues(keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(base.keyIsInIgnition); CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); StartIgnitionRpc(); } else { base.chanceToStartIgnition += 15f; base.chanceToStartIgnition = Mathf.Clamp(base.chanceToStartIgnition, 0f, 99f); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryIgnitionRpc(bool setKeyInSlot, bool cabLightActive) { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2843149083u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref cabLightActive, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2843149083u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!base.ignitionStarted) { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } disableAnimations = true; inIgnitionAnimation = true; SetKeyIgnitionValues(keyInHand: false, setKeyInSlot); if (!isCabLightOn && cabLightActive) { SetFrontCabinLightOn(cabLightActive); } base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: false)); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryStartIgnitionRpc() { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(41763978u, val2, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 41763978u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); SetFrontCabinLightOn(base.keyIsInIgnition); PlayIgnitionAudio(); } } } public void PlayIgnitionAudio() { if (inBetaMode) { base.engineAudio1.clip = base.revEngineStart; base.engineAudio1.volume = 0.7f; base.engineAudio1.PlayOneShot(engineRev1); base.carEngine1AudioActive = true; return; } base.engineAudio1.Stop(); base.engineAudio1.clip = revEngineStart1; base.engineAudio1.volume = 0.7f; if ((Object)(object)base.engineAudio1.clip == (Object)(object)revEngineStart1) { base.engineAudio1.PlayOneShot(base.engineRev); } base.carEngine1AudioActive = true; if ((Object)(object)base.engineAudio1.clip == (Object)(object)revEngineStart1) { base.engineAudio1.pitch = 1f; } } public void CancelTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted && base.keyIgnitionCoroutine != null) { CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; if (GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim") == 2 && base.keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } else if (GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim") == 12) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 3); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } int integer = base.currentDriver.playerBodyAnimator.GetInteger("SA_CarAnim"); ignitionAnimator.SetInteger("SAIgnition_Anim", integer); CancelTryIgnitionRpc(base.keyIsInIgnition, isCabLightOn, integer); } } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelTryIgnitionRpc(bool setKeyInSlot, bool cabLightActive, 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_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_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_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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(864949164u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref cabLightActive, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val3, currentAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val3, 864949164u, val2, 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", currentAnimIndex); } ignitionAnimator.SetInteger("SAIgnition_Anim", currentAnimIndex); if (!inBetaMode && setKeyInSlot && !base.keyIsInIgnition) { carKeySoundsAudio.PlayOneShot(base.insertKey); } SetKeyIgnitionValues(keyInHand: false, setKeyInSlot); if (setKeyInSlot && isCabLightOn != cabLightActive) { SetFrontCabinLightOn(cabLightActive); } } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3842753156u, val2, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3842753156u, val2, 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(keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(base.keyIsInIgnition); 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(); if (!inBetaMode) { 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) { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); base.chanceToStartIgnition = 20f; 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.26f); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); carKeySoundsAudio.PlayOneShot(base.removeKey); SetIgnition(started: false, cabLightOn: false); yield return (object)new WaitForSeconds(0.73f); SetKeyIgnitionValues(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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(488072872u, val2, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 488072872u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.ignitionStarted) { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); } } public void CancelIgnitionAnimation(bool ignitionOn, bool setIgnitionAnim) { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } base.carEngine1AudioActive = ignitionOn; base.keyIsInDriverHand = false; if (setIgnitionAnim) { ignitionAnimator.SetInteger("SAIgnition_Anim", ignitionOn ? 1 : 0); } } public void SetKeyIgnitionValues(bool keyInHand, bool keyInSlot) { base.keyIsInDriverHand = keyInHand; base.keyIsInIgnition = keyInSlot; } public void ResetTruckVelocityTimer() { if (((Vector3)(ref base.averageVelocity)).magnitude < 3f) { base.limitTruckVelocityTimer = 0.7f; } } public void SetTriggerHoverTip(InteractTrigger trigger, string tip) { trigger.hoverTip = tip; } public void SetDriverInCar() { if (base.hasBeenSpawned && !base.carDestroyed && !Object.op_Implicit((Object)(object)GameNetworkManager.Instance.localPlayerController.inAnimationWithEnemy) && !GameNetworkManager.Instance.localPlayerController.inVehicleAnimation) { if ((Object)(object)base.currentDriver != (Object)null) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); HUDManager.Instance.DisplayTip("Seat occupied", "You cannot enter an occupied seat! aborting!", false, false, "LC_Tip1"); } else { SetDriverInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarServerRpc(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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3818516466u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3818516466u, val2, 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 || val4.isPlayerDead || !val4.isPlayerControlled || (Object)(object)base.currentDriver != (Object)null) { CancelSetPlayerInVehicleClientRpc(playerId); return; } base.currentDriver = StartOfRound.Instance.allPlayerScripts[playerId]; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(StartOfRound.Instance.allPlayerScripts[playerId].actualClientId); SetDriverInCarOwnerRpc(); SetDriverInCarClientsRpc(playerId); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarOwnerRpc() { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1926889168u, val2, val, (SendTo)0, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1926889168u, val2, val, (SendTo)0, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerUtils.disableAnimationSync = true; SetVehicleCollisionForPlayer(setEnabled: false, GameNetworkManager.Instance.localPlayerController); InteractTriggerPatches.specialInteractCoroutine = ((MonoBehaviour)this).StartCoroutine(InteractTriggerPatches.SpecialTruckInteractAnimation(base.driverSeatTrigger, GameNetworkManager.Instance.localPlayerController, this, currentInterior.driverSeat)); ActivateControl(); InteractTrigger trigger = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); AnimatedObjectTrigger val4 = (isInteriorRHD ? base.passengerSideDoor : base.driverSideDoor); SetTriggerHoverTip(trigger, "Exit : [LMB]"); base.startKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; base.removeKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; 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); } if (base.ignitionStarted) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } if (val4.boolValue) { val4.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarClientsRpc(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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3473842934u, val2, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3473842934u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.currentDriver = StartOfRound.Instance.allPlayerScripts[playerId]; SetVehicleCollisionForPlayer(setEnabled: false, base.currentDriver); base.startKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; base.removeKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; currentInterior.driverSeat.ReplacePlayerAnimator(StartOfRound.Instance.allPlayerScripts[playerId], isLocalPlayer: false, base.driverSeatTrigger); base.currentDriver.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); playerSteeringWheelAnimFloat = 0.5f; syncedPlayerSteeringAnim = 0.5f; if (base.keyIsInIgnition) { base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 0); } if (base.ignitionStarted) { base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } } } public void OnDriverExit() { //IL_0142: 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_0153: 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_0174: 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_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: 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; DisableVehicleCollisionForAllPlayers(); InteractTrigger trigger = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); SetTriggerHoverTip(trigger, "Use door : [LMB]"); disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; base.startKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; base.removeKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); PlayerUtils.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, isCabLightOn); base.chanceToStartIgnition = 20f; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; OnDriverExitServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)this).transform.position, ((Component)this).transform.rotation, base.steeringAnimValue, base.drivePedalPressed, base.brakePedalPressed); OnDriverExitRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, base.syncedPosition, base.syncedRotation, base.ignitionStarted, base.keyIsInIgnition, base.drivePedalPressed, base.brakePedalPressed, isCabLightOn); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitServerRpc(int playerId, Vector3 carLocation, Quaternion carRotation, float steeringInput, bool gasFloored, bool brakeFloored) { //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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4191783025u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref steeringInput, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref gasFloored, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref brakeFloored, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4191783025u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null) && val4.isPlayerControlled) { base.syncedPosition = carLocation; base.syncedRotation = carRotation; if (inBetaMode) { base.steeringAnimValue = steeringInput; } syncedDrivePedalPressed = gasFloored; syncedBrakePedalPressed = brakeFloored; base.drivePedalPressed = gasFloored; base.brakePedalPressed = brakeFloored; base.currentDriver = null; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setIgnitionState, bool setKeyInSlot, bool gasFloored, bool brakeFloored, 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_00fa: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_019b: 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) 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4161890078u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref setIgnitionState, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref gasFloored, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref brakeFloored, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref preIgnition, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4161890078u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null) && val4.isPlayerControlled) { base.syncedPosition = carLocation; base.syncedRotation = carRotation; syncedDrivePedalPressed = gasFloored; syncedBrakePedalPressed = brakeFloored; base.drivePedalPressed = gasFloored; base.brakePedalPressed = brakeFloored; base.currentDriver = null; 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; base.startKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; base.removeKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; currentInterior.driverSeat.ReturnPlayerAnimator(StartOfRound.Instance.allPlayerScripts[playerId], isLocalPlayer: false, base.driverSeatTrigger); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, preIgnition); base.chanceToStartIgnition = 20f; if (base.localPlayerInPassengerSeat) { SetVehicleCollisionForPlayer(setEnabled: false, GameNetworkManager.Instance.localPlayerController); } } } public void SetPassengerInCar() { if (base.hasBeenSpawned && !base.carDestroyed && !Object.op_Implicit((Object)(object)GameNetworkManager.Instance.localPlayerController.inAnimationWithEnemy) && !GameNetworkManager.Instance.localPlayerController.inVehicleAnimation) { if ((Object)(object)base.currentPassenger != (Object)null) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); HUDManager.Instance.DisplayTip("Seat occupied", "You cannot enter an occupied seat! aborting!", false, false, "LC_Tip1"); } else { SetPassengerInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetPassengerInCarServerRpc(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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1540494745u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1540494745u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val4 == (Object)null || val4.isPlayerDead || !val4.isPlayerControlled || (Object)(object)base.currentPassenger != (Object)null) { CancelSetPlayerInVehicleClientRpc(playerId); return; } SetVehicleCollisionForPlayer(setEnabled: false, val4); if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == playerId) { SetPassengerIntoPassengerSeat(); } else { currentInterior.passengerSeat.ReplacePlayerAnimator(StartOfRound.Instance.allPlayerScripts[playerId], isLocalPlayer: false, base.passengerSeatTrigger); } base.currentPassenger = val4; SetPassengerInCarRpc(playerId); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetPassengerInCarRpc(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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3857058091u, val2, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3857058091u, val2, 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]; SetVehicleCollisionForPlayer(setEnabled: false, val4); if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == playerId) { SetPassengerIntoPassengerSeat(); } else { currentInterior.passengerSeat.ReplacePlayerAnimator(StartOfRound.Instance.allPlayerScripts[playerId], isLocalPlayer: false, base.passengerSeatTrigger); } base.currentPassenger = val4; base.currentPassenger.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); } } public void SetPassengerIntoPassengerSeat() { PlayerUtils.disableAnimationSync = true; InteractTriggerPatches.specialInteractCoroutine = ((MonoBehaviour)this).StartCoroutine(InteractTriggerPatches.SpecialTruckInteractAnimation(base.passengerSeatTrigger, GameNetworkManager.Instance.localPlayerController, this, currentInterior.passengerSeat)); base.localPlayerInPassengerSeat = true; InteractTrigger trigger = (isInteriorRHD ? base.driverSideDoorTrigger : base.passengerSideDoorTrigger); AnimatedObjectTrigger val = (isInteriorRHD ? base.driverSideDoor : base.passengerSideDoor); SetTriggerHoverTip(trigger, "Exit : [LMB]"); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetFloat("animationSpeed", 0.5f); if (val.boolValue) { val.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } public void OnPassengerExit() { //IL_00ff: 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; SetVehicleCollisionForPlayer(setEnabled: true, GameNetworkManager.Instance.localPlayerController); base.localPlayerInPassengerSeat = false; InteractTrigger trigger = (isInteriorRHD ? base.driverSideDoorTrigger : base.passengerSideDoorTrigger); SetTriggerHoverTip(trigger, "Use door : [LMB]"); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); PlayerUtils.ResetHUDToolTips(GameNetworkManager.Instance.localPlayerController); if ((Object)(object)base.currentPassenger != (Object)(object)GameNetworkManager.Instance.localPlayerController) { HUDManager.Instance.DisplayTip("Err?", "This state should not occur! aborting!", false, false, "LC_Tip1"); return; } base.currentPassenger = null; OnPassengerExitRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnPassengerExitRpc(int playerId, Vector3 exitPoint) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_0076: 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_0137: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4196259508u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4196259508u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null) && val4.isPlayerControlled && !((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController)) { currentInterior.passengerSeat.ReturnPlayerAnimator(StartOfRound.Instance.allPlayerScripts[playerId], isLocalPlayer: false, base.passengerSeatTrigger); val4.TeleportPlayer(exitPoint, false, 0f, false, true); base.currentPassenger = null; if (!((NetworkBehaviour)this).IsOwner) { SetVehicleCollisionForPlayer(setEnabled: true, GameNetworkManager.Instance.localPlayerController); } } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1393046261u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1393046261u, val2, 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"); } } } [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_0127: 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) 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(922548461u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 922548461u, val2, 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(StartOfRound.Instance.allPlayerScripts[0].actualClientId); OnDriverLeave(val4, base.ignitionStarted, base.keyIsInIgnition, base.drivePedalPressed, base.brakePedalPressed, isCabLightOn); OnDriverLeaveGameRpc(playerId, base.syncedPosition, base.syncedRotation, base.ignitionStarted, base.keyIsInIgnition, base.drivePedalPressed, base.brakePedalPressed, isCabLightOn); } } } public void OnDriverLeave(PlayerControllerB playerController, bool setIgnitionState, bool setKeyInSlot, bool gasFloored, bool brakeFloored, bool preIgnition) { //IL_00c9: Unknown result type (might be due to invalid IL or missing references) base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = null; 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; base.startKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; base.removeKeyIgnitionTrigger.GetComponent().isBeingHeldByPlayer = false; currentInterior.driverSeat.ReturnPlayerAnimator(playerController, isLocalPlayer: false, base.driverSeatTrigger); playerController.TeleportPlayer(Vector3.zero, false, 0f, false, true); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, preIgnition); if (base.localPlayerInPassengerSeat) { SetVehicleCollisionForPlayer(setEnabled: false, GameNetworkManager.Instance.localPlayerController); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverLeaveGameRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setIgnitionState, bool setKeyInSlot, bool gasFloored, bool brakeFloored, 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_00fa: 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_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2891603058u, val2, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref setIgnitionState, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref gasFloored, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref brakeFloored, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref preIgnition, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2891603058u, val2, 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, gasFloored, brakeFloored, 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_00fb: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3769073087u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3769073087u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { currentInterior.passengerSeat.ReturnPlayerAnimator(val4, isLocalPlayer: false, base.passengerSeatTrigger); val4.TeleportPlayer(Vector3.zero, false, 0f, false, true); base.currentPassenger = null; if (!((NetworkBehaviour)this).IsOwner) { SetVehicleCollisionForPlayer(setEnabled: true, GameNetworkManager.Instance.localPlayerController); } } } public void ExitFrontLeftSideSeat() { //IL_00ca: 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) if ((base.localPlayerInControl || isInteriorRHD) && (base.localPlayerInPassengerSeat || !isInteriorRHD)) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); if (!base.driverSideDoor.boolValue) { base.driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } int num = CanExitCar(passengerSide: false); 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 ExitFrontRightSideSeat() { //IL_00ca: 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) if ((base.localPlayerInPassengerSeat || isInteriorRHD) && (base.localPlayerInControl || !isInteriorRHD)) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger("SA_CarAnim", 0); if (!base.passengerSideDoor.boolValue) { base.passengerSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } int num = CanExitCar(passengerSide: true); 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); } } } private int CanExitCar(bool passengerSide) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0024: 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) if (!passengerSide) { for (int i = 0; i < base.driverSideExitPoints.Length; i++) { if (!CheckExitPointInvalid(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, base.driverSideExitPoints[i].position, base.exitCarLayerMask, (QueryTriggerInteraction)1)) { return i; } } return -1; } for (int j = 0; j < base.passengerSideExitPoints.Length; j++) { if (!CheckExitPointInvalid(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, base.passengerSideExitPoints[j].position, base.exitCarLayerMask, (QueryTriggerInteraction)1)) { return j; } } 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 EnableVehicleCollisionForAllPlayers() { //IL_009e: 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_005e: 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) for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if ((Object)(object)StartOfRound.Instance.allPlayerScripts[i] != (Object)(object)base.currentPassenger) { if ((Object)(object)StartOfRound.Instance.allPlayerScripts[i] != (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((Collider)StartOfRound.Instance.allPlayerScripts[i].thisController).excludeLayers = LayerMask.op_Implicit(1073745920); StartOfRound.Instance.allPlayerScripts[i].playerRigidbody.excludeLayers = LayerMask.op_Implicit(1073745920); break; } ((Collider)StartOfRound.Instance.allPlayerScripts[i].thisController).excludeLayers = LayerMask.op_Implicit(0); StartOfRound.Instance.allPlayerScripts[i].playerRigidbody.excludeLayers = LayerMask.op_Implicit(0); } } } public void DisableVehicleCollisionForAllPlayers() { //IL_0090: 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_004e: 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) for (int i = 0; i < StartOfRound.Instance.allPlayerScripts.Length; i++) { if (!base.localPlayerInControl && !base.localPlayerInPassengerSeat && (Object)(object)StartOfRound.Instance.allPlayerScripts[i] == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((Collider)StartOfRound.Instance.allPlayerScripts[i].thisController).excludeLayers = LayerMask.op_Implicit(0); StartOfRound.Instance.allPlayerScripts[i].playerRigidbody.excludeLayers = LayerMask.op_Implicit(0); } else { ((Collider)StartOfRound.Instance.allPlayerScripts[i].thisController).excludeLayers = LayerMask.op_Implicit(1073745920); StartOfRound.Instance.allPlayerScripts[i].playerRigidbody.excludeLayers = LayerMask.op_Implicit(1073745920); } } } public void SetVehicleCollisionForPlayer(bool setEnabled, PlayerControllerB player) { //IL_003f: 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_0015: 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) if (!setEnabled) { ((Collider)player.thisController).excludeLayers = LayerMask.op_Implicit(1073745920); player.playerRigidbody.excludeLayers = LayerMask.op_Implicit(1073745920); } else { ((Collider)player.thisController).excludeLayers = LayerMask.op_Implicit(0); player.playerRigidbody.excludeLayers = LayerMask.op_Implicit(0); } } private void GetVehicleInput() { //IL_004c: 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_008a: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_00da: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) && !GameNetworkManager.Instance.localPlayerController.isTypingChat && !GameNetworkManager.Instance.localPlayerController.quickMenuManager.isMenuOpen) { 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); } if (!base.ignitionStarted) { base.moveInputVector = Vector2.zero; base.steeringAnimValue = 0f; base.drivePedalPressed = false; base.brakePedalPressed = false; } else { base.moveInputVector = IngamePlayerSettings.Instance.playerInput.actions.FindAction("Move", false).ReadValue(); base.steeringAnimValue = base.moveInputVector.x; base.steeringInput = Mathf.Clamp(base.steeringInput + base.moveInputVector.x * base.steeringWheelTurnSpeed * Time.deltaTime, -3f, 3f); base.drivePedalPressed = UserVehicleControls.VehicleControlsInstance.GasPedalKey.IsPressed(); base.brakePedalPressed = UserVehicleControls.VehicleControlsInstance.BrakePedalKey.IsPressed(); } } } private void ActivateControl() { base.localPlayerInControl = true; base.steeringAnimValue = 0f; base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = GameNetworkManager.Instance.localPlayerController; } private void DisableControl() { base.localPlayerInControl = false; if (!inBetaMode) { base.steeringAnimValue = 0f; } base.currentDriver = null; } public void ShiftGearForwardInput(CallbackContext context) { if (((CallbackContext)(ref context)).performed) { ShiftGearForward(); } } public void ShiftGearForward() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 if ((int)base.gear != 3) { if ((int)base.gear == 2) { ShiftToGearAndSync(3); } else if ((int)base.gear == 1) { ShiftToGearAndSync(2); } } } public void ShiftGearBackInput(CallbackContext context) { if (((CallbackContext)(ref context)).performed) { ShiftGearBack(); } } private void ShiftGearBack() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Invalid comparison between Unknown and I4 if ((int)base.gear != 1) { if ((int)base.gear == 3) { ShiftToGearAndSync(2); } else if ((int)base.gear == 2) { ShiftToGearAndSync(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_002d: Unknown result type (might be due to invalid IL or missing references) if ((int)base.gear != setGear) { base.timeAtLastGearShift = Time.realtimeSinceStartup; playerWhoShifted = GameNetworkManager.Instance.localPlayerController; base.gear = (CarGearShift)setGear; base.gearStickAudio.PlayOneShot(base.gearStickAudios[setGear - 1]); ShiftToGearRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, setGear); } } [Rpc(/*Could not decode attribute arguments.*/)] public void ShiftToGearRpc(int playerId, int setGear) { //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_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_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_00f2: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4010263211u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); BytePacker.WriteValueBitPacked(val3, setGear); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4010263211u, val2, 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[setGear - 1]); } } } public void StartMagneting() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: 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_007f: 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_00a3: 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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_0197: 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_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: 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_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0211: 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_021a: 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_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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_0243: 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_024c: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_0332: 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_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0347: 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_035a: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: 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) //IL_02b3: 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_0397: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)this).IsOwner) { return; } base.mainRigidbody.isKinematic = 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; float num = Vector3.Angle(RoundManager.Instance.tempTransform.forward, -StartOfRound.Instance.magnetPoint.forward); rotation = base.mainRigidbody.rotation; Vector3 eulerAngles2 = ((Quaternion)(ref rotation)).eulerAngles; if (num < 47f || num > 133f) { if (eulerAngles2.y < 0f) { eulerAngles2.y -= 46f - num; } else { eulerAngles2.y += 46f - num; } } eulerAngles2.y = Mathf.Round(eulerAngles2.y / 90f) * 90f; eulerAngles2.z = Mathf.Round(eulerAngles2.z / 90f) * 90f; eulerAngles2.x += Random.Range(-5f, 5f); base.magnetTargetRotation = Quaternion.Euler(eulerAngles2); base.magnetStartRotation = base.mainRigidbody.rotation; Quaternion rotation2 = base.mainRigidbody.rotation; base.mainRigidbody.rotation = base.magnetTargetRotation; base.magnetTargetPosition = ((Collider)base.boundsCollider).ClosestPoint(StartOfRound.Instance.magnetPoint.position) - base.mainRigidbody.position; float y = base.magnetTargetPosition.y; Bounds bounds = ((Collider)base.boundsCollider).bounds; if (y >= ((Bounds)(ref bounds)).extents.y) { ref float y2 = ref base.magnetTargetPosition.y; float num2 = y2; bounds = ((Collider)base.boundsCollider).bounds; y2 = num2 - ((Bounds)(ref bounds)).extents.y / 2f; } else { float y3 = base.magnetTargetPosition.y; bounds = ((Collider)base.boundsCollider).bounds; if (y3 <= ((Bounds)(ref bounds)).extents.y * 0.4f) { ref float y4 = ref base.magnetTargetPosition.y; float num3 = y4; bounds = ((Collider)base.boundsCollider).bounds; y4 = num3 + ((Bounds)(ref bounds)).extents.y / 2f; } } base.magnetTargetPosition = StartOfRound.Instance.magnetPoint.position - base.magnetTargetPosition; base.magnetTargetPosition.z = Mathf.Min(-20.4f, base.magnetTargetPosition.z); base.magnetTargetPosition.y = Mathf.Max(2.5f, base.magnetStartPosition.y); base.magnetTargetPosition = StartOfRound.Instance.elevatorTransform.InverseTransformPoint(base.magnetTargetPosition); base.mainRigidbody.rotation = rotation2; base.magnetStartPosition = base.mainRigidbody.position; 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_0132: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(21932990u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref targetPosition); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref targetRotation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref startPosition); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref startRotation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref tempRotation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref avgVel); ((NetworkBehaviour)this).__endSendRpc(ref val3, 21932990u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.mainRigidbody.isKinematic = 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(); } } } public void CollectItemsInTruck() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) if (truckType == TruckVersionType.V55) { return; } 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)array[i]).transform.parent == (Object)(object)((Component)this).transform) { if ((Object)(object)lastDriver != (Object)null) { lastDriver.SetItemInElevator(base.magnetedToShip, base.magnetedToShip, component); } else if ((Object)(object)lastDriver == (Object)null && (Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null) { GameNetworkManager.Instance.localPlayerController.SetItemInElevator(base.magnetedToShip, base.magnetedToShip, component); } } } } public void AddEngineOil() { if (truckType != TruckVersionType.V55) { 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(918372418u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, setHP); ((NetworkBehaviour)this).__endSendRpc(ref val3, 918372418u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; AddEngineOilOnLocalClient(setHP); } } } public void AddTurboBoost() { if (truckType != TruckVersionType.V55) { int setTurboBoosts = Mathf.Min(base.turboBoosts + 1, 5); AddTurboBoostOnLocalClient(setTurboBoosts); AddTurboBoostRpc(setTurboBoosts); } } public void AddTurboBoostOnLocalClient(int setTurboBoosts) { base.hoodAudio.PlayOneShot(base.pourTurbo); base.turboBoosts = setTurboBoosts; } [Rpc(/*Could not decode attribute arguments.*/)] public void AddTurboBoostRpc(int setTurboBoosts) { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3360889087u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, setTurboBoosts); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3360889087u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; AddTurboBoostOnLocalClient(setTurboBoosts); } } } private void DoTurboBoost(CallbackContext context) { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) if (((CallbackContext)(ref context)).performed && truckType != TruckVersionType.V55) { 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 = IngamePlayerSettings.Instance.playerInput.actions.FindAction("Move", false).ReadValue(); UseTurboBoostLocalClient(dir); UseTurboBoostRpc(); } } } public void UseTurboBoostLocalClient(Vector2 dir = default(Vector2)) { //IL_0137: 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_007c: 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_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_009e: 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_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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) 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) { if (base.turboBoosts == 0) { base.jumpingInCar = true; ((MonoBehaviour)this).StartCoroutine(jerkCarUpward(Vector2.op_Implicit(dir))); return; } Vector3 val = ((Component)this).transform.TransformDirection(new Vector3(dir.x, 0f, dir.y)); base.mainRigidbody.AddForce(val * base.turboBoostForce + Vector3.up * base.turboBoostUpwardForce * 0.6f, (ForceMode)1); } if (base.turboBoosts > 0) { base.turboBoosts = Mathf.Max(0, base.turboBoosts - 1); base.turboBoostAudio.PlayOneShot(base.turboBoostSFX); base.engineAudio1.PlayOneShot(base.turboBoostSFX2); base.turboBoostParticle.Play(true); if (Vector3.Distance(((Component)StartOfRound.Instance.audioListener).transform.position, ((Component)base.turboBoostAudio).transform.position) < 10f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } } } 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1336299420u, val2, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1336299420u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; UseTurboBoostLocalClient(); } } } public void SetHonkingLocalClient(bool honk) { base.honkingHorn = honk; SetHonkRpc(honk); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetHonkRpc(bool honk) { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2695918748u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref honk, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2695918748u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.honkingHorn = honk; } } } public void OnDisable() { //IL_00ad: 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) RemoveCarRainCollision(); DisableControl(); if (base.localPlayerInControl || base.localPlayerInPassengerSeat) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)base.physicsRegion.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.physicsRegion.disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains(base.physicsRegion)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove(base.physicsRegion); } PlayerUtils.seatedInTruck = false; PlayerUtils.isPlayerOnTruck = false; PlayerUtils.isPlayerInStorage = false; } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncPlayerZoneRpc(int playerId, bool onTruck, bool inStorage) { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1088122190u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref onTruck, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref inStorage, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1088122190u, val2, val, (SendTo)5, (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) && !val4.isPlayerDead && val4.isPlayerControlled) { PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(val4); data.isPlayerOnTruck = onTruck; data.isPlayerInStorage = inStorage; } } } public void Update() { //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_07f7: Unknown result type (might be due to invalid IL or missing references) //IL_0657: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Invalid comparison between Unknown and I4 //IL_0699: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06a4: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Invalid comparison between Unknown and I4 //IL_06ae: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Invalid comparison between Unknown and I4 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(); base.physicsRegion.disablePhysicsRegion = true; if (StartOfRound.Instance.CurrentPlayerPhysicsRegions.Contains(base.physicsRegion)) { StartOfRound.Instance.CurrentPlayerPhysicsRegions.Remove(base.physicsRegion); } if (base.localPlayerInControl || base.localPlayerInPassengerSeat) { GameNetworkManager.Instance.localPlayerController.CancelSpecialTriggerAnimations(); } GrabbableObject[] componentsInChildren = ((Component)base.physicsRegion.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; 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 (StartOfRound.Instance.inShipPhase) { base.carHP = base.baseCarHP; syncedCarHP = base.carHP; } 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; } if (((NetworkBehaviour)this).IsOwner) { if (base.enabledCollisionForAllPlayers) { base.enabledCollisionForAllPlayers = false; DisableVehicleCollisionForAllPlayers(); } if (!base.inDropshipAnimation) { SyncCarPhysicsToOtherClients(); } } else if (!base.enabledCollisionForAllPlayers) { base.enabledCollisionForAllPlayers = true; EnableVehicleCollisionForAllPlayers(); } } ReactToDamage(); if (base.carDestroyed) { RHDInterior.driverSeatTrigger.interactable = false; RHDInterior.passengerSeatTrigger.interactable = false; LHDInterior.driverSeatTrigger.interactable = false; LHDInterior.passengerSeatTrigger.interactable = false; return; } RHDInterior.driverSeatTrigger.interactable = isInteriorRHD && base.hasBeenSpawned && Time.realtimeSinceStartup - base.timeSinceSpringingDriverSeat > 3f; RHDInterior.passengerSeatTrigger.interactable = isInteriorRHD && base.hasBeenSpawned; LHDInterior.driverSeatTrigger.interactable = !isInteriorRHD && base.hasBeenSpawned && Time.realtimeSinceStartup - base.timeSinceSpringingDriverSeat > 3f; LHDInterior.passengerSeatTrigger.interactable = !isInteriorRHD && base.hasBeenSpawned; if (PlayerUtils.seatedInTruck) { SyncPlayerLookInput(); } if (!disableAnimations && (Object)(object)base.currentDriver != (Object)null && (Object)(object)base.currentDriver.playerBodyAnimator != (Object)null) { base.currentDriver.playerBodyAnimator.SetFloat("animationSpeed", playerSteeringWheelAnimFloat); base.currentDriver.playerBodyAnimator.SetFloat("SA_CarMotionTime", base.gearStickAnimValue); if (base.ignitionStarted && base.keyIgnitionCoroutine == null) { PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(base.currentDriver); int num = 1; if (isInteriorRHD ? (data.vehicleCameraHorizontal < currentInterior.cameraLookAngle) : (data.vehicleCameraHorizontal > currentInterior.cameraLookAngle)) { num = ((!(Time.realtimeSinceStartup - base.timeAtLastGearShift < 1.7f) || !((Object)(object)playerWhoShifted == (Object)(object)base.currentDriver)) ? 4 : 5); base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", num); } else { base.currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", num); } } } SetCarEffects(base.steeringAnimValue); if (!base.ignitionStarted) { base.EngineRPM = Mathf.Lerp(base.EngineRPM, 0f, 3f * Time.deltaTime); } if (((NetworkBehaviour)this).IsOwner) { if (base.localPlayerInControl && (Object)(object)base.currentDriver != (Object)null) { GetVehicleInput(); } float num2 = 0f; if ((base.ignitionStarted && !inBetaMode) || (base.localPlayerInControl && inBetaMode)) { if ((int)base.gear != 3 && base.brakePedalPressed && base.drivePedalPressed) { num2 += 2f; base.lastStressType += "; Accelerating while braking"; } CarGearShift gear = base.gear; CarGearShift val = gear; if ((int)val != 2) { if ((int)val == 3) { if (base.drivePedalPressed) { num2 += 1.2f; base.lastStressType += "; Accelerating while in park"; } else if (!allWheelsAirborne && Mathf.Abs(wheelRPM) > 300f) { num2 += Mathf.Clamp((Mathf.Abs(wheelRPM) - 200f) / 350f, 0f, 1.3f); base.lastStressType += "; In park while at high speed"; } } } else if (wheelRPM > 500f) { num2 += Mathf.Max((wheelRPM - 500f) / 1000f, 0f); base.lastStressType += "; Reversing while at high speed"; } } SetInternalStress(num2); base.stressPerSecond = num2; } else { if (base.ignitionStarted) { base.EngineRPM = syncedEngineRPM; } frontWheelRPM = syncedFrontWheelRPM; backWheelRPM = syncedBackWheelRPM; wheelRPM = syncedWheelRPM; base.moveInputVector = syncedMoveInputVector; base.steeringAnimValue = base.moveInputVector.x; base.drivePedalPressed = syncedDrivePedalPressed; base.brakePedalPressed = syncedBrakePedalPressed; } } public void SyncPlayerLookInput() { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null || localPlayerController.isPlayerDead || !localPlayerController.isPlayerControlled) { return; } PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(localPlayerController); if (data.vehicleCameraHorizontal != localPlayerController.ladderCameraHorizontal) { data.vehicleCameraHorizontal = localPlayerController.ladderCameraHorizontal; } if (data.syncLookInputInterval >= 0.14f) { if (data.lastVehicleCameraHorizontal != localPlayerController.ladderCameraHorizontal) { data.syncLookInputInterval = 0f; data.lastVehicleCameraHorizontal = localPlayerController.ladderCameraHorizontal; SyncPlayerLookInputRpc((int)localPlayerController.playerClientId, localPlayerController.ladderCameraHorizontal); } } else { data.syncLookInputInterval += Time.deltaTime; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncPlayerLookInputRpc(int playerId, float lookInput) { //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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2732009751u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref lookInput, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2732009751u, val2, val, (SendTo)5, (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) && !val4.isPlayerDead && val4.isPlayerControlled) { val4.ladderCameraHorizontal = lookInput; PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(val4); data.vehicleCameraHorizontal = lookInput; } } } public void UpdatePlayerVehicleAnimations() { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null) && !localPlayerController.isPlayerDead && localPlayerController.isPlayerControlled) { int integer = localPlayerController.playerBodyAnimator.GetInteger("SA_CarAnim"); PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(localPlayerController); if (data.currentCarAnimation != integer) { data.currentCarAnimation = integer; SyncPlayerVehicleAnimationsRpc((int)localPlayerController.playerClientId, integer, isTrigger: false, null); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncPlayerVehicleAnimationsRpc(int playerId, int animIndex, bool isTrigger, string triggerName) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: 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_0126: 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_00f8: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1975982465u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); BytePacker.WriteValueBitPacked(val3, animIndex); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref isTrigger, default(ForPrimitives)); bool flag = triggerName != null; ((FastBufferWriter)(ref val3)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val3)).WriteValueSafe(triggerName, false); } ((NetworkBehaviour)this).__endSendRpc(ref val3, 1975982465u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val4 == (Object)null) { Plugin.Logger.LogWarning((object)("no driver found for " + ((Object)((Component)this).gameObject).name + ", aborting")); } else if (!val4.isPlayerDead && val4.isPlayerControlled) { if (isTrigger) { val4.playerBodyAnimator.SetTrigger(triggerName); } else { val4.playerBodyAnimator.SetInteger("SA_CarAnim", animIndex); } } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(9094750u, val2, val, (SendTo)3, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref songTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 9094750u, val2, 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, 0.01f, base.radioAudio.clip.length - 0.1f); } } public void ChangeRadioStation() { if (base.radioClips.Length == 0) { Plugin.Logger.LogWarning((object)"V55: No music found! if using CruiserTunes to remove original radio music, then this is ignorable!"); 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1360849916u, val2, val, (SendTo)5, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, radioStation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref signalQuality, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1360849916u, val2, 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)"V55: No music found! if using CruiserTunes to remove original radio music, then this is ignorable!"); 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)"V55: No music found! if using CruiserTunes to remove original radio music, then this is ignorable!"); 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2677513065u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref on, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val3, radioStation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref signalQuality, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2677513065u, val2, 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)"V55: No music found! if using CruiserTunes to remove original radio music, then this is ignorable!"); return; } base.currentRadioClip = radioStation; base.radioSignalQuality = signalQuality; base.radioSignalDecreaseThreshold = signalDecrease; SetRadioOnLocalClient(on, setClip: false); } } public void SetRadioValues() { //IL_00f3: Unknown result type (might be due to invalid IL or missing references) if (!base.radioOn) { if (base.radioAudio.isPlaying) { base.radioAudio.Stop(); } if (base.radioInterference.isPlaying) { base.radioInterference.Stop(); } base.currentSongTime = 0f; return; } if (((NetworkBehaviour)this).IsHost) { base.currentSongTime += Time.deltaTime; if (Time.realtimeSinceStartup - timeLastSyncedRadio > 1f) { timeLastSyncedRadio = Time.realtimeSinceStartup; SyncRadioTimeRpc(base.currentSongTime); } } if (((NetworkBehaviour)this).IsServer && base.radioAudio.isPlaying && Time.realtimeSinceStartup > radioPingTimestamp) { radioPingTimestamp = Time.realtimeSinceStartup + 1f; RoundManager.Instance.PlayAudibleNoise(((Component)base.radioAudio).transform.position, 16f, Mathf.Min((base.radioAudio.volume + base.radioInterference.volume) * 0.5f, 0.9f), 0, false, 106217); } if (((NetworkBehaviour)this).IsOwner) { float num = Random.Range(0, 100); float num2 = (3f - base.radioSignalQuality - 1.5f) * base.radioSignalTurbulence; base.radioSignalDecreaseThreshold = Mathf.Clamp(base.radioSignalDecreaseThreshold + Time.deltaTime * num2, 0f, 100f); if (num > base.radioSignalDecreaseThreshold) { base.radioSignalQuality = Mathf.Clamp(base.radioSignalQuality - Time.deltaTime, 0f, 3f); } else { base.radioSignalQuality = Mathf.Clamp(base.radioSignalQuality + Time.deltaTime, 0f, 3f); } if (Time.realtimeSinceStartup - base.changeRadioSignalTime > 0.3f) { base.changeRadioSignalTime = Time.realtimeSinceStartup; if (base.radioSignalQuality < 1.2f && Random.Range(0, 100) < 6) { base.radioSignalQuality = Mathf.Min(base.radioSignalQuality + 1.5f, 3f); base.radioSignalDecreaseThreshold = Mathf.Min(base.radioSignalDecreaseThreshold + 30f, 100f); } SetRadioSignalQualityRpc((int)Mathf.Round(base.radioSignalQuality), base.radioSignalDecreaseThreshold); } } switch ((int)Mathf.Round(base.radioSignalQuality)) { case 3: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 1f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 0f, 2f * Time.deltaTime); break; case 2: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 0.85f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 0.4f, 2f * Time.deltaTime); break; case 1: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 0.6f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 0.8f, 2f * Time.deltaTime); break; case 0: base.radioAudio.volume = Mathf.Lerp(base.radioAudio.volume, 0.4f, 2f * Time.deltaTime); base.radioInterference.volume = Mathf.Lerp(base.radioInterference.volume, 1f, 2f * Time.deltaTime); break; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetRadioSignalQualityRpc(int signalQuality, float signalDecrease) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3722939512u, val2, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, signalQuality); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref signalDecrease, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3722939512u, val2, 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)$"V55: 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)"V55: Setting station, was null!"); } base.radioAudio.clip = base.radioClips[base.currentRadioClip]; Plugin.Logger.LogDebug((object)$"V55: 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)"V55: Stop radio playback!"); } } private void MatchWheelMeshToCollider(MeshRenderer wheelMesh, WheelCollider wheelCollider, float steeringInput) { //IL_00df: 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_0015: 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_001b: 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_0027: 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_0093: 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_005c: 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_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_00c1: Unknown result type (might be due to invalid IL or missing references) if (inBetaMode) { Vector3 position = ((Component)wheelCollider).transform.position; if (Physics.Raycast(position, -((Component)wheelCollider).transform.up, ref base.hit, wheelCollider.suspensionDistance + wheelCollider.radius, 2304)) { ((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(wheelRotSpeed, steeringInput, 0f); } else { Vector3 position2 = default(Vector3); Quaternion rotation = default(Quaternion); wheelCollider.GetWorldPose(ref position2, ref rotation); ((Component)wheelMesh).transform.position = position2; ((Component)wheelMesh).transform.rotation = rotation; } } 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 (base.localPlayerInControl && (Object)(object)base.currentDriver != (Object)null) { playerSteeringWheelAnimFloat = base.currentDriver.playerBodyAnimator.GetFloat("animationSpeed") + num * 2f; } SetCarAutomaticShifter(); SetCarLightingEffects(); SetCarAudioEffects(); SetCarTyreEffects(); SetCarKeyEffects(); if (((NetworkBehaviour)this).IsOwner) { SyncCarEffectsToOtherClients(); if (!base.syncedExtremeStress && base.underExtremeStress && base.extremeStressAudio.volume > 0.35f) { base.syncedExtremeStress = true; SyncExtremeStressRpc(base.underExtremeStress); } else if (base.syncedExtremeStress && !base.underExtremeStress && base.extremeStressAudio.volume < 0.5f) { base.syncedExtremeStress = false; SyncExtremeStressRpc(base.underExtremeStress); } } else { base.steeringWheelAnimFloat = Mathf.MoveTowards(base.steeringWheelAnimFloat, syncedWheelRotation, base.steeringWheelTurnSpeed * Time.deltaTime / 6f); base.steeringInput = Mathf.MoveTowards(base.steeringInput, syncedSteeringInput, base.steeringWheelTurnSpeed * Time.deltaTime); playerSteeringWheelAnimFloat = Mathf.MoveTowards(playerSteeringWheelAnimFloat, syncedPlayerSteeringAnim, base.steeringWheelTurnSpeed * Time.deltaTime / 6f); } } public 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, 1f, 15f * Time.deltaTime * (Time.realtimeSinceStartup - base.timeAtLastGearShift)); break; case 1: base.gearStickAnimValue = Mathf.MoveTowards(base.gearStickAnimValue, 0.5f, 15f * Time.deltaTime * (Time.realtimeSinceStartup - base.timeAtLastGearShift)); break; case 0: base.gearStickAnimValue = Mathf.MoveTowards(base.gearStickAnimValue, 0f, 15f * Time.deltaTime * (Time.realtimeSinceStartup - base.timeAtLastGearShift)); break; } base.gearStickAnimator.SetFloat("gear", Mathf.Clamp(base.gearStickAnimValue, 0.01f, 0.99f)); } public void SetCarManualShifter() { } public void SetCarLightingEffects() { float num = Mathf.Round(wheelRPM / 5f) * 5f; if (num <= -5f && base.keyIsInIgnition && !base.backLightsOn) { base.backLightsOn = true; ((Renderer)base.backLightsMesh).material = base.backLightOnMat; base.backLightsContainer.SetActive(true); } else if ((base.backLightsOn && !base.keyIsInIgnition) || (base.backLightsOn && num > -5f)) { base.backLightsOn = false; ((Renderer)base.backLightsMesh).material = base.headlightsOffMat; base.backLightsContainer.SetActive(false); } } 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) { return; } if ((Object)(object)audio == (Object)(object)base.engineAudio1 || (Object)(object)audio == (Object)(object)base.engineAudio2) { if (audio.volume == 0f) { audio.Stop(); } } else if (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_01d0: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) float highest = Mathf.Clamp(base.EngineRPM / base.engineIntensityPercentage, 0.65f, 1.15f); float highest2 = Mathf.Clamp(base.EngineRPM / base.engineIntensityPercentage, 0.7f, 1.5f); float num = Mathf.Abs(wheelRPM); float highest3 = Mathf.Clamp(num / 63f, 0f, 1f); base.carEngine2AudioActive = base.ignitionStarted; base.carRollingAudioActive = !allWheelsAirborne && num > 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 && !inBetaMode && Time.realtimeSinceStartup - base.timeAtLastEngineAudioPing > (inBetaMode ? 0.01f : 2f)) { base.timeAtLastEngineAudioPing = Time.realtimeSinceStartup; int num2 = (inBetaMode ? 106217 : 2692); if (base.EngineRPM > 130f) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 32f, 0.75f, 0, false, num2); } if (base.EngineRPM > 60f) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 25f, 0.6f, 0, false, num2); } else if (!base.ignitionStarted) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 15f, 0.6f, 0, false, num2); } else { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 11f, 0.5f, 0, false, num2); } } 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) { if (!inBetaMode) { base.hornAudio.pitch = 1f; } if (!base.hornAudio.isPlaying) { base.hornAudio.Play(); if (inBetaMode) { base.hornAudio.pitch = 1f; } } 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.Stop(); } } } public void SetCarTyreEffects() { //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 = num > -0.6f && num < 0.4f && (((Vector3)(ref base.averageVelocity)).magnitude > 4f || num2 > 400f); if (base.BackLeftWheel.isGrounded && base.BackRightWheel.isGrounded) { bool flag2 = wheelTorque > 900f && Mathf.Abs(forwardsSlip) > 0.2f; bool flag3 = false; if ((inBetaMode && wheelTorque > 900f) || flag2 || flag3) { flag = true; num = Mathf.Max(num, 0.8f); 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(tyreStress - num) > 0.02f || wheelSlipping != flag) { tyreStress = num; wheelSlipping = flag; SetTyreStressRpc(num, flag); } } else { if (wheelSlipping && ((Vector3)(ref base.averageVelocity)).magnitude > 8f && !base.tireSparks.isPlaying) { base.tireSparks.Play(true); } else if (!wheelSlipping && base.tireSparks.isEmitting) { base.tireSparks.Stop(true, (ParticleSystemStopBehavior)1); } SetVehicleAudioProperties(base.skiddingAudio, wheelSlipping, 0f, tyreStress, 3f, useVolumeInsteadOfPitch: true); } } public void SetCarKeyEffects() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_051a: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_07d5: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_082e: Unknown result type (might be due to invalid IL or missing references) //IL_0844: Unknown result type (might be due to invalid IL or missing references) //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0892: 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_02c6: Unknown result type (might be due to invalid IL or missing references) //IL_0277: 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_0662: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_0611: 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_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_0370: 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_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039a: 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_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_067a: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_061c: Unknown result type (might be due to invalid IL or missing references) //IL_067f: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06ea: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_0755: Unknown result type (might be due to invalid IL or missing references) //IL_0757: Unknown result type (might be due to invalid IL or missing references) if (((Behaviour)ignitionAnimator).enabled != !inBetaMode) { ((Behaviour)ignitionAnimator).enabled = !inBetaMode; } if (inBetaMode) { if ((Object)(object)((Component)base.keyObject).transform.parent != (Object)(object)carKeyContainer.transform) { ((Component)base.keyObject).transform.SetParent(carKeyContainer.transform); } ((Component)base.keyObject).transform.localScale = ignitionKeyScale; if ((Object)(object)base.currentDriver == (Object)null || !base.keyIsInDriverHand) { if (((Renderer)base.keyObject).enabled != base.keyIsInIgnition) { ((Renderer)base.keyObject).enabled = base.keyIsInIgnition; } if ((Object)(object)carKeyInHand.transform.parent != (Object)(object)carKeyContainer.transform) { carKeyInHand.transform.SetParent(carKeyContainer.transform, false); } carKeyInHand.transform.localScale = Vector3.one; carKeyInHand.transform.localPosition = Vector3.zero; carKeyInHand.transform.localRotation = Quaternion.identity; if (base.ignitionStarted) { ((Component)base.keyObject).transform.position = base.ignitionTurnedPosition.position; ((Component)base.keyObject).transform.rotation = base.ignitionTurnedPosition.rotation; } else { ((Component)base.keyObject).transform.position = base.ignitionNotTurnedPosition.position; ((Component)base.keyObject).transform.rotation = base.ignitionNotTurnedPosition.rotation; } } else if (base.keyIsInDriverHand) { if (!((Renderer)base.keyObject).enabled) { ((Renderer)base.keyObject).enabled = true; } Transform val = ((!base.localPlayerInControl) ? base.currentDriver.serverItemHolder : base.currentDriver.localItemHolder); if (base.localPlayerInControl) { carKeyInHand.transform.SetLocalPositionAndRotation(new Vector3(-0.002f, 0.036f, -0.042f), Quaternion.Euler(-3.616f, -2.302f, 0.145f)); } else { carKeyInHand.transform.SetLocalPositionAndRotation(new Vector3(-0.04170258f, 6.530248E-05f, -0.03752365f), Quaternion.Euler(13.794f, -3.466f, -20.947f)); } if ((Object)(object)carKeyInHand.transform.parent != (Object)(object)val.parent) { carKeyInHand.transform.SetParent(val.parent, false); } carKeyInHand.transform.localScale = Vector3.one; ((Component)base.keyObject).transform.position = carKeyInHand.transform.position; ((Component)base.keyObject).transform.rotation = carKeyInHand.transform.rotation; ((Component)base.keyObject).transform.Rotate(base.rotationOffset); Vector3 positionOffset = base.positionOffset; positionOffset = carKeyInHand.transform.rotation * positionOffset; Transform transform = ((Component)base.keyObject).transform; transform.position += positionOffset; } } else 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)carKeyContainer.transform) { ((Component)base.keyObject).transform.SetParent(carKeyContainer.transform); } ((Component)base.keyObject).transform.localScale = ignitionKeyScale; if ((Object)(object)carKeyInHand.transform.parent != (Object)(object)carKeyContainer.transform) { carKeyInHand.transform.SetParent(carKeyContainer.transform, false); } carKeyInHand.transform.localScale = Vector3.one; carKeyInHand.transform.localPosition = Vector3.zero; carKeyInHand.transform.localRotation = Quaternion.identity; ((Component)base.keyObject).transform.position = ignitionKeyPosition.position; ((Component)base.keyObject).transform.rotation = ignitionKeyPosition.rotation; if ((Object)(object)base.currentDriver == (Object)null && (Object)(object)leftHandServerItemTarget != (Object)null) { leftHandServerItemTarget = null; } } else if ((Object)(object)leftHandServerItemTarget == (Object)null) { leftHandServerItemTarget = ((Component)base.currentDriver.bodyParts[2].Find("hand.L")).transform; } else if (base.keyIsInDriverHand) { if (!((Renderer)base.keyObject).enabled) { ((Renderer)base.keyObject).enabled = true; } Transform val2; Vector3 localPosition; Vector3 val3; if (!isInteriorRHD) { val2 = (base.localPlayerInControl ? base.currentDriver.localItemHolder.parent : base.currentDriver.serverItemHolder.parent); localPosition = (base.localPlayerInControl ? LHD_Pos_Local : LHD_Pos_Server); val3 = (base.localPlayerInControl ? LHD_Rot_Local : LHD_Rot_Server); } else { val2 = (Transform)(base.localPlayerInControl ? ((object)((Component)base.currentDriver.leftHandItemTarget).transform) : ((object)leftHandServerItemTarget)); localPosition = (base.localPlayerInControl ? RHD_Pos_Local : RHD_Pos_Server); val3 = (base.localPlayerInControl ? RHD_Rot_Local : RHD_Rot_Server); } if ((Object)(object)carKeyInHand.transform.parent != (Object)(object)val2) { carKeyInHand.transform.SetParent(val2, false); } carKeyInHand.transform.localScale = Vector3.one; carKeyInHand.transform.localPosition = Vector3.zero; carKeyInHand.transform.localRotation = Quaternion.identity; if ((Object)(object)((Component)base.keyObject).transform.parent != (Object)(object)carKeyInHand.transform) { ((Component)base.keyObject).transform.SetParent(carKeyInHand.transform); } ((Component)base.keyObject).transform.localPosition = localPosition; ((Component)base.keyObject).transform.localRotation = Quaternion.Euler(val3); } else { if (((Renderer)base.keyObject).enabled) { ((Renderer)base.keyObject).enabled = false; } if ((Object)(object)((Component)base.keyObject).transform.parent != (Object)(object)carKeyContainer.transform) { ((Component)base.keyObject).transform.SetParent(carKeyContainer.transform); } ((Component)base.keyObject).transform.localScale = ignitionKeyScale; if ((Object)(object)carKeyInHand.transform.parent != (Object)(object)carKeyContainer.transform) { carKeyInHand.transform.SetParent(carKeyContainer.transform, false); } carKeyInHand.transform.localScale = Vector3.one; carKeyInHand.transform.localPosition = Vector3.zero; carKeyInHand.transform.localRotation = Quaternion.identity; ((Component)base.keyObject).transform.position = ignitionKeyPosition.position; ((Component)base.keyObject).transform.rotation = ignitionKeyPosition.rotation; } } public void FixedUpdate() { //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_0230: 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_0241: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: 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_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: 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) //IL_0306: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0343: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_035d: 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_0371: 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_0398: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0506: Unknown result type (might be due to invalid IL or missing references) //IL_050b: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Unknown result type (might be due to invalid IL or missing references) //IL_04d8: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_052c: 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_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Unknown result type (might be due to invalid IL or missing references) //IL_055b: Unknown result type (might be due to invalid IL or missing references) //IL_0572: 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_0594: Unknown result type (might be due to invalid IL or missing references) //IL_059f: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: 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_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0477: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0887: Unknown result type (might be due to invalid IL or missing references) //IL_088c: Unknown result type (might be due to invalid IL or missing references) //IL_0b11: Unknown result type (might be due to invalid IL or missing references) //IL_0b16: Unknown result type (might be due to invalid IL or missing references) //IL_0be9: Unknown result type (might be due to invalid IL or missing references) //IL_0bee: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08f1: Invalid comparison between Unknown and I4 //IL_0b61: Unknown result type (might be due to invalid IL or missing references) //IL_0b49: Unknown result type (might be due to invalid IL or missing references) //IL_0b4b: Unknown result type (might be due to invalid IL or missing references) //IL_092a: Unknown result type (might be due to invalid IL or missing references) //IL_092f: Unknown result type (might be due to invalid IL or missing references) //IL_0931: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_0935: Unknown result type (might be due to invalid IL or missing references) //IL_0938: Unknown result type (might be due to invalid IL or missing references) //IL_094a: Expected I4, but got Unknown //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0a0c: Invalid comparison between Unknown and I4 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) { if (base.itemShip.untetheredVehicle) { timeSinceUntethered = Time.realtimeSinceStartup; 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; base.mainRigidbody.isKinematic = 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; } } else if ((Object)(object)base.itemShip == (Object)null) { base.inDropshipAnimation = false; base.mainRigidbody.isKinematic = true; base.mainRigidbody.MovePosition(StartOfRound.Instance.notSpawnedPosition.position + Vector3.forward * 30f); base.syncedPosition = base.mainRigidbody.position; base.syncedRotation = base.mainRigidbody.rotation; } } if (base.magnetedToShip) { base.mainRigidbody.isKinematic = 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) { base.mainRigidbody.isKinematic = true; Vector3 val = base.syncedPosition + base.averageVelocity * Time.fixedDeltaTime; Mathf.Clamp(base.syncSpeedMultiplier * Vector3.Distance(((Component)this).transform.position, base.syncedPosition), 1.3f, 300f); Vector3 val2 = Vector3.Lerp(((Component)this).transform.position, base.syncedPosition, Time.fixedDeltaTime * base.syncSpeedMultiplier); base.mainRigidbody.MovePosition(val2); base.mainRigidbody.MoveRotation(Quaternion.Lerp(((Component)this).transform.rotation, base.syncedRotation, base.syncRotationSpeed)); base.truckVelocityLastFrame = base.mainRigidbody.velocity; } if (((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) { if (!Physics.Linecast(((Component)this).transform.position, StartOfRound.Instance.magnetPoint.position, 256, (QueryTriggerInteraction)1)) { StartMagneting(); } return; } } if (base.averageCount > base.movingAverageLength) { base.averageVelocity += (base.mainRigidbody.velocity - base.averageVelocity) / (float)(base.movingAverageLength + 1); } else { base.averageCount++; base.averageVelocity += base.mainRigidbody.velocity; if (base.averageCount == base.movingAverageLength) { base.averageVelocity /= (float)base.averageCount; } } base.ragdollPhysicsBody.Move(base.mainRigidbody.position, base.mainRigidbody.rotation); base.windwiperPhysicsBody1.Move(base.windwiper1.position, base.windwiper1.rotation); base.windwiperPhysicsBody2.Move(base.windwiper2.position, base.windwiper2.rotation); if (base.carDestroyed) { wheelRotSpeed = 0f; previousVehiclePosition = base.mainRigidbody.position; return; } steeringAngle = (inBetaMode ? (15f * base.steeringInput) : (50f * base.steeringWheelAnimFloat)); base.FrontLeftWheel.steerAngle = steeringAngle; base.FrontRightWheel.steerAngle = steeringAngle; base.FrontLeftWheel.motorTorque = wheelTorque; base.FrontRightWheel.motorTorque = wheelTorque; base.BackLeftWheel.motorTorque = wheelTorque; base.BackRightWheel.motorTorque = wheelTorque; base.FrontLeftWheel.brakeTorque = wheelBrakeTorque; base.FrontRightWheel.brakeTorque = wheelBrakeTorque; base.BackLeftWheel.brakeTorque = wheelBrakeTorque; base.BackRightWheel.brakeTorque = wheelBrakeTorque; 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); float num = Mathf.Round(wheelRPM / 4f) * 4f; wheelRotSpeed = Mathf.Repeat(wheelRotSpeed + num * 0.5f * 57.29578f * Time.fixedDeltaTime, 360f); MatchWheelMeshToCollider(base.leftWheelMesh, base.FrontLeftWheel, 50f * base.steeringWheelAnimFloat); MatchWheelMeshToCollider(base.rightWheelMesh, base.FrontRightWheel, 50f * base.steeringWheelAnimFloat); MatchWheelMeshToCollider(base.backLeftWheelMesh, base.BackLeftWheel, 0f); MatchWheelMeshToCollider(base.backRightWheelMesh, base.BackRightWheel, 0f); allWheelsAirborne = !base.FrontLeftWheel.isGrounded && !base.FrontRightWheel.isGrounded && !base.BackLeftWheel.isGrounded && !base.BackRightWheel.isGrounded; if (!((NetworkBehaviour)this).IsOwner) { wheelTorque = syncedMotorTorque; wheelBrakeTorque = syncedBrakeTorque; forwardsSlip = 0f; sidewaysSlip = 0f; previousVehiclePosition = base.mainRigidbody.position; return; } if ((base.localPlayerInControl && inBetaMode) || !inBetaMode) { bool flag = base.drivePedalPressed && base.ignitionStarted; bool flag2 = !base.drivePedalPressed && base.ignitionStarted; if (base.ignitionStarted && (int)base.gear != 3) { if (base.brakePedalPressed) { wheelBrakeTorque = 2000f; } else { wheelBrakeTorque = 0f; } } CarGearShift gear = base.gear; CarGearShift val3 = gear; switch (val3 - 1) { case 2: wheelBrakeTorque = 2000f; wheelTorque = 0f; break; case 1: if (flag) { wheelTorque = 0f - base.EngineTorque; } else if (flag2) { wheelTorque = base.idleSpeed * -1f; } break; case 0: if (flag) { wheelTorque = Mathf.Clamp(Mathf.MoveTowards(wheelTorque, base.EngineTorque, base.carAcceleration * Time.fixedDeltaTime), 325f, 1000f); } else if (flag2) { wheelTorque = base.idleSpeed * 1f; } break; } if (!base.ignitionStarted && (int)base.gear != 3) { wheelTorque = 0f; wheelBrakeTorque = 2000f; } frontWheelRPM = NormaliseFloat((base.FrontLeftWheel.rpm + base.FrontRightWheel.rpm) / 2f); backWheelRPM = NormaliseFloat((base.BackLeftWheel.rpm + base.BackRightWheel.rpm) / 2f); wheelRPM = NormaliseFloat((frontWheelRPM + backWheelRPM) / 2f); if (base.ignitionStarted) { base.EngineRPM = Mathf.Abs(wheelRPM); } } SyncCarDrivetrainToOtherClients(); SyncCarWheelTorqueToOtherClients(); if (base.mainRigidbody.IsSleeping() || base.magnetedToShip || allWheelsAirborne) { forwardsSlip = 0f; sidewaysSlip = 0f; previousVehiclePosition = base.mainRigidbody.position; return; } WheelHit val4 = default(WheelHit); for (int i = 0; i < wheels.Count; i++) { if (wheels[i].GetGroundHit(ref val4)) { wheelHits[i] = val4; } 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; previousVehiclePosition = base.mainRigidbody.position; } public float NormaliseFloat(float num) { if (float.IsNaN(num) || float.IsInfinity(num)) { return 0f; } return num; } public void SyncCarEffectsToOtherClients() { if (syncCarEffectsInterval > 0.02f) { if (syncedWheelRotation != base.steeringWheelAnimFloat) { syncCarEffectsInterval = 0f; syncedWheelRotation = base.steeringWheelAnimFloat; syncedSteeringInput = base.steeringInput; syncedPlayerSteeringAnim = playerSteeringWheelAnimFloat; SyncCarEffectsRpc(base.steeringWheelAnimFloat, base.steeringInput, playerSteeringWheelAnimFloat); } } else { syncCarEffectsInterval += Time.deltaTime; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncCarEffectsRpc(float wheelRotation, float steerInput, 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4051414770u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref wheelRotation, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref steerInput, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref playerSteering, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4051414770u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncedWheelRotation = wheelRotation; syncedSteeringInput = steerInput; syncedPlayerSteeringAnim = playerSteering; } } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(197659815u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref playerInput); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref gasPressed, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref brakePressed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 197659815u, val2, 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; } } } private void SyncCarPhysicsToOtherClients() { //IL_0026: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: 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) //IL_007b: 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_00d4: 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_00e5: 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_00f6: 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) base.mainRigidbody.isKinematic = false; float num = 0.12f; if (base.syncCarPositionInterval > num) { 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.deltaTime; } } [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_00d4: 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_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1832740683u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carPosition); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carRotation); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1832740683u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.syncedPosition = carPosition; base.syncedRotation = Quaternion.Euler(carRotation); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetTyreStressRpc(float wheelStress, 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(509756710u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref wheelStress, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref wheelSkidding, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 509756710u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; tyreStress = wheelStress; wheelSlipping = wheelSkidding; } } } public void SyncCarDrivetrainToOtherClients() { float num = 0.14f * ((Vector3)(ref base.averageVelocity)).magnitude; num = Mathf.Clamp(num, 0.14f, 0.21f); if (syncCarDrivetrainInterval >= num) { float num2 = NormaliseFloat(Mathf.Round(frontWheelRPM)); float num3 = NormaliseFloat(Mathf.Round(backWheelRPM)); if (syncedFrontWheelRPM != num2 || syncedBackWheelRPM != num3) { syncCarDrivetrainInterval = 0f; syncedFrontWheelRPM = num2; syncedBackWheelRPM = num3; syncedWheelRPM = wheelRPM; syncedEngineRPM = base.EngineRPM; SyncCarDrivetrainRpc(frontWheelRPM, backWheelRPM, wheelRPM); } } else { syncCarDrivetrainInterval += Time.fixedDeltaTime; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncCarDrivetrainRpc(float frontWheelSpeed, float backWheelSpeed, float wheelSpeed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4214428700u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref frontWheelSpeed, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref backWheelSpeed, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref wheelSpeed, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4214428700u, val2, 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 = Mathf.Abs(wheelSpeed); } } } public void SyncCarWheelTorqueToOtherClients() { if (syncWheelTorqueInterval >= 0.14f) { float num = Mathf.Round(wheelTorque); float num2 = Mathf.Round(wheelBrakeTorque); if (syncedMotorTorque != num || syncedBrakeTorque != num2) { syncWheelTorqueInterval = 0f; syncedMotorTorque = wheelTorque; syncedBrakeTorque = wheelBrakeTorque; SyncWheelTorqueRpc(wheelTorque, wheelBrakeTorque); } } else { syncWheelTorqueInterval += 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2949658452u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref motorTorque, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref brakeTorque, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2949658452u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncedMotorTorque = motorTorque; syncedBrakeTorque = brakeTorque; } } } public void LateUpdate() { bool mute = base.magnetedToShip && (StartOfRound.Instance.inShipPhase || !StartOfRound.Instance.shipDoorsEnabled); base.hornAudio.mute = mute; base.engineAudio1.mute = mute; base.engineAudio2.mute = mute; carKeySoundsAudio.mute = mute; ejectorButtonAudio.mute = mute; base.springAudio.mute = mute; reverseWhineAudio.mute = mute; verticalColumnAudio.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; if ((Object)(object)base.currentDriver != (Object)null && (Object)(object)lastDriver != (Object)(object)base.currentDriver && !base.magnetedToShip) { lastDriver = base.currentDriver; } if (!inBetaMode && base.honkingHorn && base.hornAudio.isPlaying && base.hornAudio.pitch < 1f) { base.hornAudio.Stop(); } } 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_033d: Unknown result type (might be due to invalid IL or missing references) //IL_033e: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_035e: 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_0375: 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_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_03da: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) 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); } CarBumpLocalClient(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 = 1f; _ = 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 { CarBumpLocalClient(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 (truckType == TruckVersionType.V70 && obstacleSize > 2f) { DealPermanentDamage(1, position); } } if (truckType != TruckVersionType.V70) { DealPermanentDamage(2, position); } } else { base.mainRigidbody.AddForce(Vector3.Normalize(-impulse * 1E+09f) * (base.carReactToPlayerHitMultiplier - 220f), (ForceMode)1); if (dealDamage) { DealPermanentDamage(1, position); } if (enemyScript is GiantKiwiAI || truckType == TruckVersionType.V70) { 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_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_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_00e1: 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ce: 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_00ab: 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_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_021e: 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_032d: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_0424: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0415: 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_0381: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: 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) { 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.35f); base.lastStressType = "Scraping"; } return; } float setVolume = 0.5f; int num2 = -1; if (((Vector3)(ref base.averageVelocity)).magnitude > 27f) { if (base.carHP < 3) { DestroyCarRpc(); DestroyCar(); return; } int damageAmount = base.carHP - 2; damagePosition = default(Vector3); DealPermanentDamage(damageAmount, damagePosition); } if (num > base.maximumBumpForce && ((Vector3)(ref base.averageVelocity)).magnitude > 11f) { 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(2, damagePosition); } else if (num > base.mediumBumpForce && ((Vector3)(ref base.averageVelocity)).magnitude > 3f) { 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); damagePosition = default(Vector3); DealPermanentDamage(1, damagePosition); } else if (((Vector3)(ref base.averageVelocity)).magnitude > 1.5f) { num2 = 0; setVolume = Mathf.Clamp((num - base.mediumBumpForce) / (base.maximumBumpForce - base.mediumBumpForce), 0.25f, 1f); setVolume = Mathf.Clamp(setVolume + Random.Range(-0.15f, 0.25f), 0.25f, 1f); } if (num2 == -1) { return; } PlayCollisionAudio(val, num2, setVolume); if (num > base.maximumBumpForce + 10000f && ((Vector3)(ref base.averageVelocity)).magnitude > 19f) { if (Random.Range(0, 2) == 0) { CarCollisionRpc(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f), onlyLocalDriver: false); DamagePlayerInVehicle(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f), onlyLocalDriver: false); BreakWindshield(); damagePosition = default(Vector3); DealPermanentDamage(2, damagePosition); } else { CarCollisionRpc(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f), onlyLocalDriver: true); DamagePlayerInVehicle(Vector3.ClampMagnitude(-collision.relativeVelocity, 60f), onlyLocalDriver: true); damagePosition = default(Vector3); DealPermanentDamage(2, damagePosition); } } else { CarBumpLocalClient(Vector3.ClampMagnitude(-collision.relativeVelocity, 40f)); } } public void CarBumpLocalClient(Vector3 vel) { //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_0038: 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_0073: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) if ((base.localPlayerInControl || base.localPlayerInPassengerSeat) && ((Vector3)(ref vel)).magnitude > 50f) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.externalForceAutoFade += vel; } else if (VehicleUtils.IsPlayerInVehicleBounds()) { if (PlayerUtils.isPlayerInStorage) { vel = Vector3.ClampMagnitude(vel, 30f); } PlayerControllerB localPlayerController2 = GameNetworkManager.Instance.localPlayerController; localPlayerController2.externalForceAutoFade += vel; CarBumpRpc(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_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_0102: 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_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_0120: 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) //IL_012b: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(727985888u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref vel); ((NetworkBehaviour)this).__endSendRpc(ref val3, 727985888u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((base.localPlayerInControl || base.localPlayerInPassengerSeat) && ((Vector3)(ref vel)).magnitude > 50f) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; localPlayerController.externalForceAutoFade += vel; } else if (VehicleUtils.IsPlayerInVehicleBounds()) { if (PlayerUtils.isPlayerInStorage) { vel = Vector3.ClampMagnitude(vel, 30f); } PlayerControllerB localPlayerController2 = GameNetworkManager.Instance.localPlayerController; localPlayerController2.externalForceAutoFade += vel; } } [Rpc(/*Could not decode attribute arguments.*/)] public void CarCollisionRpc(Vector3 vel, bool onlyLocalDriver) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4051615060u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref vel); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref onlyLocalDriver, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4051615060u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DamagePlayerInVehicle(vel, onlyLocalDriver); if (!onlyLocalDriver) { BreakWindshield(); } } } private void DamagePlayerInVehicle(Vector3 vel, bool onlyLocalDriver) { //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_0047: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_008b: 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_00a0: Unknown result type (might be due to invalid IL or missing references) if (base.localPlayerInPassengerSeat && onlyLocalDriver) { return; } if (base.localPlayerInPassengerSeat || base.localPlayerInControl) { GameNetworkManager.Instance.localPlayerController.KillPlayer(vel, true, (CauseOfDeath)16, 0, ((Component)this).transform.up * 0.77f, false); } else if (VehicleUtils.IsPlayerInVehicleBounds()) { 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() { //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (!base.windshieldBroken) { base.windshieldBroken = true; ((Collider)base.windshieldPhysicsCollider).enabled = false; windshieldMesh.SetActive(false); base.glassParticle.Play(); ((Component)base.miscAudio).transform.localPosition = windshieldMesh.transform.localPosition; base.miscAudio.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_012d: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(113234185u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref audioPosition); BytePacker.WriteValueBitPacked(val3, audio); BytePacker.WriteValueBitPacked(val3, audioType); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref vol, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 113234185u, val2, 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_0166: 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) 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); int num = (inBetaMode ? 106217 : 2692); if (collisionType >= 2) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 18f + volume * 7f, 0.6f, 0, false, num); } else if (collisionType >= 1) { RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 12f + volume * 7f, 0.6f, 0, false, num); } if (collisionType == -1) { array = base.minCollisions; val = array[Random.Range(0, array.Length)]; source.PlayOneShot(val); } } public void SetInternalStress(float carStressIncrease = 0f) { //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) if (!StartOfRound.Instance.inShipPhase && !base.carDestroyed && ((NetworkBehaviour)this).IsOwner) { if (carStressIncrease <= 0f) { base.carStressChange = Mathf.Clamp(base.carStressChange - Time.deltaTime, -0.25f, 0.5f); } else { base.carStressChange = Mathf.Clamp(base.carStressChange + Time.deltaTime * 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.magnetedToShip && !StartOfRound.Instance.inShipPhase) { base.timeAtLastDamage = Time.realtimeSinceStartup; base.carHP -= damageAmount; syncedCarHP = base.carHP; if (base.carHP <= 0) { 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3190658997u, val2, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, carHealth); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3190658997u, val2, 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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1771295468u, val2, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1771295468u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!base.carDestroyed) { DestroyCar(); } } } public void DestroyCar() { //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_031c: 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_0395: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03b4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_0404: Unknown result type (might be due to invalid IL or missing references) //IL_0429: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f0: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_04fb: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Unknown result type (might be due to invalid IL or missing references) //IL_053b: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0615: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Unknown result type (might be due to invalid IL or missing references) //IL_0625: Unknown result type (might be due to invalid IL or missing references) //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) if (!base.carDestroyed) { base.carDestroyed = true; base.magnetedToShip = false; StartOfRound.Instance.isObjectAttachedToMagnet = false; RemoveCarRainCollision(); CollectItemsInTruck(); BreakWindshield(); base.underExtremeStress = false; base.hoodPoppedUp = true; ((Renderer)base.keyObject).enabled = false; base.engineAudio1.Stop(); base.engineAudio2.Stop(); base.turbulenceAudio.Stop(); base.rollingAudio.Stop(); base.radioAudio.Stop(); base.radioInterference.Stop(); base.extremeStressAudio.Stop(); carKeySoundsAudio.Stop(); base.honkingHorn = false; base.hornAudio.Stop(); frontTireSparks.Stop(); base.tireSparks.Stop(); base.skiddingAudio.Stop(); base.turboBoostAudio.Stop(); base.turboBoostParticle.Stop(); int num = (inBetaMode ? 106217 : 2692); RoundManager.Instance.PlayAudibleNoise(((Component)base.engineAudio1).transform.position, 20f, 0.8f, 0, false, num); base.FrontLeftWheel.motorTorque = 0f; base.FrontRightWheel.motorTorque = 0f; base.BackLeftWheel.motorTorque = 0f; base.BackRightWheel.motorTorque = 0f; base.FrontLeftWheel.brakeTorque = 0f; base.FrontRightWheel.brakeTorque = 0f; base.BackLeftWheel.brakeTorque = 0f; base.BackRightWheel.brakeTorque = 0f; ((Collider)base.FrontLeftWheel).enabled = false; ((Collider)base.FrontRightWheel).enabled = false; ((Collider)base.BackLeftWheel).enabled = false; ((Collider)base.BackRightWheel).enabled = false; ((Renderer)base.leftWheelMesh).enabled = false; ((Renderer)base.rightWheelMesh).enabled = false; ((Renderer)base.backLeftWheelMesh).enabled = false; ((Renderer)base.backRightWheelMesh).enabled = false; ((Component)base.carHoodAnimator).gameObject.SetActive(false); base.backDoorContainer.SetActive(false); liftGateOpen = true; base.headlightsContainer.SetActive(false); base.backLightsContainer.SetActive(false); ((Component)base.steeringWheelAnimator).transform.localEulerAngles = new Vector3(-141.303f, 0f, 90f); if (isInteriorRHD) { destroyedTruckMesh_1.SetActive(true); base.destroyedTruckMesh.SetActive(false); ((Component)base.steeringWheelAnimator).transform.localPosition = new Vector3(0.97943f, 0.101f, 2.363f); } else { destroyedTruckMesh_1.SetActive(false); base.destroyedTruckMesh.SetActive(true); ((Component)base.steeringWheelAnimator).transform.localPosition = new Vector3(-0.97943f, 0.101f, 2.363f); } ((Renderer)radarMapIcon).enabled = false; ((Renderer)radarMapDestroyedIcon).enabled = true; ((Component)base.mainBodyMesh).gameObject.SetActive(false); for (int i = 0; i < disableOnDestroy.Length; i++) { disableOnDestroy[i].SetActive(false); } base.mainRigidbody.ResetCenterOfMass(); base.mainRigidbody.AddForceAtPosition(Vector3.up * 1560f, ((Component)base.hoodFireAudio).transform.position - Vector3.up, (ForceMode)1); base.frontCabinLightContainer.transform.localPosition = new Vector3(0f, -0.239f, 0f); ((Component)base.frontCabinLightMesh).transform.localPosition = new Vector3(-0.0073f, -0.00406f, -0.00475f); ((Component)base.frontCabinLightMesh).transform.localRotation = Quaternion.Euler(-8.361f, 12.786f, -1.679f); ((Component)base.frontCabinLightMesh).gameObject.SetActive(true); ((Renderer)base.frontCabinLightMesh).enabled = true; ((Renderer)frontLeftDoorMesh).material = destroyedTruckMaterial; ((Renderer)frontRightDoorMesh).material = destroyedTruckMaterial; ((Renderer)steeringWheelMesh).material = destroyedTruckMaterial; base.ignitionStarted = false; base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); base.keyIsInDriverHand = false; base.keyIsInIgnition = false; base.keyIgnitionCoroutine = null; base.EngineRPM = 0f; frontWheelRPM = 0f; backWheelRPM = 0f; wheelRPM = 0f; base.steeringAnimValue = 0f; syncedMoveInputVector = Vector2.zero; base.moveInputVector = Vector2.zero; if (base.localPlayerInControl || base.localPlayerInPassengerSeat) { GameNetworkManager.Instance.localPlayerController.KillPlayer(Vector3.up * 27f + 20f * Random.insideUnitSphere, true, (CauseOfDeath)3, 6, Vector3.up * 1.5f, false); } InteractTrigger[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren(); for (int j = 0; j < componentsInChildren.Length; j++) { componentsInChildren[j].interactable = false; componentsInChildren[j].CancelAnimationExternally(); } base.driverSideDoorTrigger.interactable = true; base.passengerSideDoorTrigger.interactable = true; LHDInterior.driverSeatTrigger.interactable = false; LHDInterior.passengerSeatTrigger.interactable = false; RHDInterior.driverSeatTrigger.interactable = false; RHDInterior.passengerSeatTrigger.interactable = false; pushTruckTrigger.interactable = false; base.currentDriver = null; base.currentPassenger = null; Landmine.SpawnExplosion(((Component)this).transform.position + ((Component)this).transform.forward + Vector3.up * 1.5f, true, 6f, 10f, 30, 200f, base.truckDestroyedExplosion, true); } } 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)"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); } } } } private void ReactToDamage() { //IL_0017: 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_0070: 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) base.healthMeter.localScale = new Vector3(1f, 1f, Mathf.Lerp(base.healthMeter.localScale.z, Mathf.Clamp((float)base.carHP / (float)base.baseCarHP, 0.01f, 1f), 6f * Time.deltaTime)); base.turboMeter.localScale = new Vector3(1f, 1f, Mathf.Lerp(base.turboMeter.localScale.z, Mathf.Clamp((float)base.turboBoosts / 5f, 0.01f, 1f), 6f * Time.deltaTime)); if (!((NetworkBehaviour)this).IsOwner) { return; } if (base.carHP < 7 && Time.realtimeSinceStartup - base.timeAtLastDamage > 16f) { base.timeAtLastDamage = Time.realtimeSinceStartup; base.carHP++; syncedCarHP = base.carHP; SyncCarHealthRpc(base.carHP); } if (base.carDestroyed) { if (base.carHP < 3) { if (!base.isHoodOnFire) { base.isHoodOnFire = true; base.hoodFireAudio.Play(); base.hoodFireParticle.Play(); SetHoodOnFireRpc(base.isHoodOnFire); } } else if (base.isHoodOnFire && base.carHP >= 3) { base.isHoodOnFire = false; base.hoodFireAudio.Stop(); base.hoodFireParticle.Stop(true, (ParticleSystemStopBehavior)1); SetHoodOnFireRpc(base.isHoodOnFire); } } else if (base.carHP < 3) { if (!base.isHoodOnFire) { if (!base.hoodPoppedUp) { base.hoodPoppedUp = true; SetHoodOpenLocalClient(setOpen: true); } base.isHoodOnFire = true; base.hoodFireAudio.Play(); base.hoodFireParticle.Play(); SetHoodOnFireRpc(base.isHoodOnFire); } } else if (base.isHoodOnFire) { base.isHoodOnFire = false; base.hoodPoppedUp = false; base.hoodFireAudio.Stop(); base.hoodFireParticle.Stop(true, (ParticleSystemStopBehavior)1); SetHoodOnFireRpc(base.isHoodOnFire); } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3938964334u, val2, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, carHealth); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3938964334u, val2, 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 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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1459409878u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref onFire, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1459409878u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.isHoodOnFire = onFire; if (base.isHoodOnFire) { base.hoodFireAudio.Play(); base.hoodFireParticle.Play(); } else { base.hoodFireAudio.Stop(); base.hoodFireParticle.Stop(true, (ParticleSystemStopBehavior)1); } } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1423326709u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref underStress, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1423326709u, val2, 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; } } } public void PushTruckWithArms() { //IL_0024: 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_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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_00e9: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0119: 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_0136: Unknown result type (might be due to invalid IL or missing references) if (!base.magnetedToShip && Physics.Raycast(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward, ref base.hit, 10f, 1073742656, (QueryTriggerInteraction)1) && !((Object)(object)GameNetworkManager.Instance.localPlayerController.overridePhysicsParent != (Object)null) && !PlayerUtils.isPlayerInStorage) { Vector3 point = ((RaycastHit)(ref base.hit)).point; Vector3 forward = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward; int clip = Random.Range(0, base.minCollisions.Length); 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, clip); } else { PushTruckRpc(point, forward, clip); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void PushTruckRpc(Vector3 pushPosition, Vector3 dir, int clip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_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) //IL_013f: 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_014a: 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_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3701931298u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref pushPosition); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref dir); BytePacker.WriteValueBitPacked(val3, clip); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3701931298u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.pushAudio.clip = base.minCollisions[clip]; ((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, int clip) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_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_0083: 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_00f2: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4277925572u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref pos); BytePacker.WriteValueBitPacked(val3, clip); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4277925572u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.pushAudio.clip = base.minCollisions[clip]; ((Component)base.pushAudio).transform.position = pos; base.pushAudio.Play(); base.turbulenceAmount = Mathf.Min(base.turbulenceAmount + 0.5f, 2f); } } } public void ToggleHoodOpenLocalClient() { base.carHoodOpen = !base.carHoodOpen; if (!base.carHoodOpen) { base.hoodPoppedUp = false; } 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); SetHoodOpenRpc(open: true); } } [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) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2095956418u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref open, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2095956418u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.carHoodOpen != open) { base.carHoodOpen = open; if (!base.carHoodOpen) { base.hoodPoppedUp = false; } base.carHoodAnimator.SetBool("hoodOpen", open); } } public void UseButtonOnLocalClient(string triggerString) { if (!((Object)(object)currentInterior?.verticalColumnAnimator == (Object)null)) { v55InteriorType v55InteriorType = currentInterior; if (v55InteriorType != null) { v55InteriorType.verticalColumnAnimator.SetTrigger(triggerString); } } } public void ToggleWipersOnLocalClient() { verticalColumnAudio.PlayOneShot(dashboardButton); UseButtonOnLocalClient("clickWiperButton"); ToggleWipersRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] public void ToggleWipersRpc() { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1085326842u, val2, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1085326842u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; verticalColumnAudio.PlayOneShot(dashboardButton); UseButtonOnLocalClient("clickWiperButton"); } } } public void OpenCabinWindowOnLocalClient() { verticalColumnAudio.PlayOneShot(dashboardButton); UseButtonOnLocalClient("clickCabinButton"); OpenCabinWindowRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] public void OpenCabinWindowRpc() { //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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1499313525u, val2, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1499313525u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; verticalColumnAudio.PlayOneShot(dashboardButton); UseButtonOnLocalClient("clickCabinButton"); } } } public void ToggleHeadlightsLocalClient() { base.headlightsContainer.SetActive(!base.headlightsContainer.activeSelf); verticalColumnAudio.PlayOneShot(base.headlightsToggleSFX); SetHeadlightMaterial(base.headlightsContainer.activeSelf); UseButtonOnLocalClient("clickLightButton"); ToggleHeadlightsRpc(base.headlightsContainer.activeSelf); } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(379102476u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref setLightsOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 379102476u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.headlightsContainer.SetActive(setLightsOn); verticalColumnAudio.PlayOneShot(base.headlightsToggleSFX); SetHeadlightMaterial(setLightsOn); UseButtonOnLocalClient("clickLightButton"); } } } private void SetHeadlightMaterial(bool on) { Material val = (on ? base.headlightsOnMat : base.headlightsOffMat); Material[] sharedMaterials = ((Renderer)base.mainBodyMesh).sharedMaterials; sharedMaterials[1] = val; ((Renderer)base.mainBodyMesh).sharedMaterials = sharedMaterials; ((Renderer)base.lod1Mesh).sharedMaterials = sharedMaterials; ((Renderer)base.lod2Mesh).sharedMaterials = sharedMaterials; } public void SpringDriverSeatLocalClient() { if (!(Time.realtimeSinceStartup - base.timeSinceSpringingDriverSeat < 3f)) { base.timeSinceSpringingDriverSeat = Time.realtimeSinceStartup; SpringDriverSeatRpc(); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SpringDriverSeatRpc() { //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_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_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_01d0: 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1615077013u, val2, val, (SendTo)6, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1615077013u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; base.timeSinceSpringingDriverSeat = Time.realtimeSinceStartup; base.springAudio.Play(); ejectorButtonAudio.PlayOneShot(dashboardButton); base.driverSeatSpringAnimator.SetTrigger("spring"); currentInterior.ejectorButtonAnimator.SetTrigger("press"); int num = (inBetaMode ? 106217 : 2692); RoundManager.Instance.PlayAudibleNoise(((Component)base.springAudio).transform.position, 30f, 1f, 0, false, num); if (!((Object)(object)localPlayerController == (Object)null) && localPlayerController.isPlayerControlled && !localPlayerController.isPlayerDead && (base.localPlayerInControl || Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)base.springAudio).transform.position) < 0.9f)) { localPlayerController.externalForceAutoFade += ((Component)this).transform.up * base.springForce; } } } 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 ((NetworkBehaviour)this).__registerRpc(2704251898u, new RpcReceiveHandler(__rpc_handler_2704251898), "SetTrueV55ModeRpc"); ((NetworkBehaviour)this).__registerRpc(2830820490u, new RpcReceiveHandler(__rpc_handler_2830820490), "SetInteriorTypeRpc"); ((NetworkBehaviour)this).__registerRpc(704329810u, new RpcReceiveHandler(__rpc_handler_704329810), "AddBabyFaceRadioRpc"); ((NetworkBehaviour)this).__registerRpc(2819297796u, new RpcReceiveHandler(__rpc_handler_2819297796), "SyncClientDataRpc"); ((NetworkBehaviour)this).__registerRpc(2843149083u, new RpcReceiveHandler(__rpc_handler_2843149083), "TryIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(41763978u, new RpcReceiveHandler(__rpc_handler_41763978), "TryStartIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(864949164u, new RpcReceiveHandler(__rpc_handler_864949164), "CancelTryIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(3842753156u, new RpcReceiveHandler(__rpc_handler_3842753156), "StartIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(488072872u, new RpcReceiveHandler(__rpc_handler_488072872), "RemoveKeyFromIgnitionRpc"); ((NetworkBehaviour)this).__registerRpc(3818516466u, new RpcReceiveHandler(__rpc_handler_3818516466), "SetDriverInCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(1926889168u, new RpcReceiveHandler(__rpc_handler_1926889168), "SetDriverInCarOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(3473842934u, new RpcReceiveHandler(__rpc_handler_3473842934), "SetDriverInCarClientsRpc"); ((NetworkBehaviour)this).__registerRpc(4191783025u, new RpcReceiveHandler(__rpc_handler_4191783025), "OnDriverExitServerRpc"); ((NetworkBehaviour)this).__registerRpc(4161890078u, new RpcReceiveHandler(__rpc_handler_4161890078), "OnDriverExitRpc"); ((NetworkBehaviour)this).__registerRpc(1540494745u, new RpcReceiveHandler(__rpc_handler_1540494745), "SetPassengerInCarServerRpc"); ((NetworkBehaviour)this).__registerRpc(3857058091u, new RpcReceiveHandler(__rpc_handler_3857058091), "SetPassengerInCarRpc"); ((NetworkBehaviour)this).__registerRpc(4196259508u, new RpcReceiveHandler(__rpc_handler_4196259508), "OnPassengerExitRpc"); ((NetworkBehaviour)this).__registerRpc(1393046261u, new RpcReceiveHandler(__rpc_handler_1393046261), "CancelSetPlayerInVehicleClientRpc"); ((NetworkBehaviour)this).__registerRpc(922548461u, new RpcReceiveHandler(__rpc_handler_922548461), "OnDriverLeaveGameServerRpc"); ((NetworkBehaviour)this).__registerRpc(2891603058u, new RpcReceiveHandler(__rpc_handler_2891603058), "OnDriverLeaveGameRpc"); ((NetworkBehaviour)this).__registerRpc(3769073087u, new RpcReceiveHandler(__rpc_handler_3769073087), "OnPassengerLeaveGameRpc"); ((NetworkBehaviour)this).__registerRpc(4010263211u, new RpcReceiveHandler(__rpc_handler_4010263211), "ShiftToGearRpc"); ((NetworkBehaviour)this).__registerRpc(21932990u, new RpcReceiveHandler(__rpc_handler_21932990), "MagnetCarRpc"); ((NetworkBehaviour)this).__registerRpc(918372418u, new RpcReceiveHandler(__rpc_handler_918372418), "AddEngineOilRpc"); ((NetworkBehaviour)this).__registerRpc(3360889087u, new RpcReceiveHandler(__rpc_handler_3360889087), "AddTurboBoostRpc"); ((NetworkBehaviour)this).__registerRpc(1336299420u, new RpcReceiveHandler(__rpc_handler_1336299420), "UseTurboBoostRpc"); ((NetworkBehaviour)this).__registerRpc(2695918748u, new RpcReceiveHandler(__rpc_handler_2695918748), "SetHonkRpc"); ((NetworkBehaviour)this).__registerRpc(1088122190u, new RpcReceiveHandler(__rpc_handler_1088122190), "SyncPlayerZoneRpc"); ((NetworkBehaviour)this).__registerRpc(2732009751u, new RpcReceiveHandler(__rpc_handler_2732009751), "SyncPlayerLookInputRpc"); ((NetworkBehaviour)this).__registerRpc(1975982465u, new RpcReceiveHandler(__rpc_handler_1975982465), "SyncPlayerVehicleAnimationsRpc"); ((NetworkBehaviour)this).__registerRpc(9094750u, new RpcReceiveHandler(__rpc_handler_9094750), "SyncRadioTimeRpc"); ((NetworkBehaviour)this).__registerRpc(1360849916u, new RpcReceiveHandler(__rpc_handler_1360849916), "SetRadioStationRpc"); ((NetworkBehaviour)this).__registerRpc(2677513065u, new RpcReceiveHandler(__rpc_handler_2677513065), "SetRadioRpc"); ((NetworkBehaviour)this).__registerRpc(3722939512u, new RpcReceiveHandler(__rpc_handler_3722939512), "SetRadioSignalQualityRpc"); ((NetworkBehaviour)this).__registerRpc(4051414770u, new RpcReceiveHandler(__rpc_handler_4051414770), "SyncCarEffectsRpc"); ((NetworkBehaviour)this).__registerRpc(197659815u, new RpcReceiveHandler(__rpc_handler_197659815), "SyncPlayerInputsRpc"); ((NetworkBehaviour)this).__registerRpc(1832740683u, new RpcReceiveHandler(__rpc_handler_1832740683), "SyncCarPositionRpc"); ((NetworkBehaviour)this).__registerRpc(509756710u, new RpcReceiveHandler(__rpc_handler_509756710), "SetTyreStressRpc"); ((NetworkBehaviour)this).__registerRpc(4214428700u, new RpcReceiveHandler(__rpc_handler_4214428700), "SyncCarDrivetrainRpc"); ((NetworkBehaviour)this).__registerRpc(2949658452u, new RpcReceiveHandler(__rpc_handler_2949658452), "SyncWheelTorqueRpc"); ((NetworkBehaviour)this).__registerRpc(727985888u, new RpcReceiveHandler(__rpc_handler_727985888), "CarBumpRpc"); ((NetworkBehaviour)this).__registerRpc(4051615060u, new RpcReceiveHandler(__rpc_handler_4051615060), "CarCollisionRpc"); ((NetworkBehaviour)this).__registerRpc(113234185u, new RpcReceiveHandler(__rpc_handler_113234185), "CarCollisionSFXRpc"); ((NetworkBehaviour)this).__registerRpc(3190658997u, new RpcReceiveHandler(__rpc_handler_3190658997), "DealDamageRpc"); ((NetworkBehaviour)this).__registerRpc(1771295468u, new RpcReceiveHandler(__rpc_handler_1771295468), "DestroyCarRpc"); ((NetworkBehaviour)this).__registerRpc(3938964334u, new RpcReceiveHandler(__rpc_handler_3938964334), "SyncCarHealthRpc"); ((NetworkBehaviour)this).__registerRpc(1459409878u, new RpcReceiveHandler(__rpc_handler_1459409878), "SetHoodOnFireRpc"); ((NetworkBehaviour)this).__registerRpc(1423326709u, new RpcReceiveHandler(__rpc_handler_1423326709), "SyncExtremeStressRpc"); ((NetworkBehaviour)this).__registerRpc(3701931298u, new RpcReceiveHandler(__rpc_handler_3701931298), "PushTruckRpc"); ((NetworkBehaviour)this).__registerRpc(4277925572u, new RpcReceiveHandler(__rpc_handler_4277925572), "PushTruckFromOwnerRpc"); ((NetworkBehaviour)this).__registerRpc(2095956418u, new RpcReceiveHandler(__rpc_handler_2095956418), "SetHoodOpenRpc"); ((NetworkBehaviour)this).__registerRpc(1085326842u, new RpcReceiveHandler(__rpc_handler_1085326842), "ToggleWipersRpc"); ((NetworkBehaviour)this).__registerRpc(1499313525u, new RpcReceiveHandler(__rpc_handler_1499313525), "OpenCabinWindowRpc"); ((NetworkBehaviour)this).__registerRpc(379102476u, new RpcReceiveHandler(__rpc_handler_379102476), "ToggleHeadlightsRpc"); ((NetworkBehaviour)this).__registerRpc(1615077013u, new RpcReceiveHandler(__rpc_handler_1615077013), "SpringDriverSeatRpc"); ((VehicleController)this).__initializeRpcs(); } private static void __rpc_handler_2704251898(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 trueV55ModeRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref trueV55ModeRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetTrueV55ModeRpc(trueV55ModeRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2830820490(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 interiorTypeRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref interiorTypeRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetInteriorTypeRpc(interiorTypeRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_704329810(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; ((v55VehicleController)(object)target).AddBabyFaceRadioRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2819297796(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 carInteriorType = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref carInteriorType); bool baby = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref baby, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SyncClientDataRpc(carInteriorType, baby); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2843149083(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 cabLightActive = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref cabLightActive, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).TryIgnitionRpc(setKeyInSlot, cabLightActive); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_41763978(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; ((v55VehicleController)(object)target).TryStartIgnitionRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_864949164(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_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) { bool setKeyInSlot = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref setKeyInSlot, default(ForPrimitives)); bool cabLightActive = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref cabLightActive, default(ForPrimitives)); int currentAnimIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref currentAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).CancelTryIgnitionRpc(setKeyInSlot, cabLightActive, currentAnimIndex); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3842753156(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; ((v55VehicleController)(object)target).StartIgnitionRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_488072872(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; ((v55VehicleController)(object)target).RemoveKeyFromIgnitionRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3818516466(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 driverInCarServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverInCarServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetDriverInCarServerRpc(driverInCarServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1926889168(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; ((v55VehicleController)(object)target).SetDriverInCarOwnerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3473842934(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 driverInCarClientsRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref driverInCarClientsRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetDriverInCarClientsRpc(driverInCarClientsRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4191783025(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); float steeringInput = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref steeringInput, default(ForPrimitives)); bool gasFloored = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gasFloored, default(ForPrimitives)); bool brakeFloored = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref brakeFloored, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).OnDriverExitServerRpc(playerId, carLocation, carRotation, steeringInput, gasFloored, brakeFloored); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4161890078(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_00a7: 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_00c2: 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_00d7: 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_00ea: 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) 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 gasFloored = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gasFloored, default(ForPrimitives)); bool brakeFloored = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref brakeFloored, default(ForPrimitives)); bool preIgnition = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref preIgnition, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).OnDriverExitRpc(playerId, carLocation, carRotation, setIgnitionState, setKeyInSlot, gasFloored, brakeFloored, preIgnition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1540494745(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 passengerInCarServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref passengerInCarServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetPassengerInCarServerRpc(passengerInCarServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3857058091(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 passengerInCarRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref passengerInCarRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetPassengerInCarRpc(passengerInCarRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4196259508(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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_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) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); Vector3 exitPoint = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).OnPassengerExitRpc(playerId, exitPoint); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1393046261(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; ((v55VehicleController)(object)target).CancelSetPlayerInVehicleClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_922548461(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; ((v55VehicleController)(object)target).OnDriverLeaveGameServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2891603058(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_00a7: 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_00c2: 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_00d7: 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_00ea: 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) 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 gasFloored = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gasFloored, default(ForPrimitives)); bool brakeFloored = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref brakeFloored, default(ForPrimitives)); bool preIgnition = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref preIgnition, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).OnDriverLeaveGameRpc(playerId, carLocation, carRotation, setIgnitionState, setKeyInSlot, gasFloored, brakeFloored, preIgnition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3769073087(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; ((v55VehicleController)(object)target).OnPassengerLeaveGameRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4010263211(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int setGear = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setGear); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).ShiftToGearRpc(playerId, setGear); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_21932990(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; ((v55VehicleController)(object)target).MagnetCarRpc(targetPosition, targetRotation, startPosition, startRotation, tempRotation, avgVel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_918372418(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; ((v55VehicleController)(object)target).AddEngineOilRpc(setHP); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3360889087(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 setTurboBoosts = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setTurboBoosts); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).AddTurboBoostRpc(setTurboBoosts); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1336299420(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; ((v55VehicleController)(object)target).UseTurboBoostRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2695918748(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 honkRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref honkRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetHonkRpc(honkRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1088122190(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); bool onTruck = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref onTruck, default(ForPrimitives)); bool inStorage = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref inStorage, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SyncPlayerZoneRpc(playerId, onTruck, inStorage); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2732009751(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 playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); float lookInput = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lookInput, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SyncPlayerLookInputRpc(playerId, lookInput); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1975982465(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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_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_0096: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); int animIndex = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref animIndex); bool isTrigger = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isTrigger, default(ForPrimitives)); bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string triggerName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref triggerName, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SyncPlayerVehicleAnimationsRpc(playerId, animIndex, isTrigger, triggerName); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_9094750(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; ((v55VehicleController)(object)target).SyncRadioTimeRpc(songTime); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1360849916(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; ((v55VehicleController)(object)target).SetRadioStationRpc(radioStation, signalQuality, signalDecrease); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2677513065(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 on = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref on, 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; ((v55VehicleController)(object)target).SetRadioRpc(on, radioStation, signalQuality, signalDecrease); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3722939512(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; ((v55VehicleController)(object)target).SetRadioSignalQualityRpc(signalQuality, signalDecrease); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4051414770(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float wheelRotation = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref wheelRotation, default(ForPrimitives)); float steerInput = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref steerInput, default(ForPrimitives)); float playerSteering = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref playerSteering, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SyncCarEffectsRpc(wheelRotation, steerInput, playerSteering); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_197659815(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; ((v55VehicleController)(object)target).SyncPlayerInputsRpc(playerInput, gasPressed, brakePressed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1832740683(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; ((v55VehicleController)(object)target).SyncCarPositionRpc(carPosition, carRotation); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_509756710(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 wheelStress = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref wheelStress, default(ForPrimitives)); bool wheelSkidding = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref wheelSkidding, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SetTyreStressRpc(wheelStress, wheelSkidding); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4214428700(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float 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)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).SyncCarDrivetrainRpc(frontWheelSpeed, backWheelSpeed, wheelSpeed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2949658452(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; ((v55VehicleController)(object)target).SyncWheelTorqueRpc(motorTorque, brakeTorque); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_727985888(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; ((v55VehicleController)(object)target).CarBumpRpc(vel); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4051615060(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 vel = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref vel); bool onlyLocalDriver = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref onlyLocalDriver, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).CarCollisionRpc(vel, onlyLocalDriver); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_113234185(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; ((v55VehicleController)(object)target).CarCollisionSFXRpc(audioPosition, audio, audioType, vol); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3190658997(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; ((v55VehicleController)(object)target).DealDamageRpc(carHealth); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1771295468(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; ((v55VehicleController)(object)target).DestroyCarRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3938964334(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; ((v55VehicleController)(object)target).SyncCarHealthRpc(carHealth); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1459409878(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; ((v55VehicleController)(object)target).SetHoodOnFireRpc(hoodOnFireRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1423326709(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; ((v55VehicleController)(object)target).SyncExtremeStressRpc(underStress); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3701931298(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //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_005b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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); int clip = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clip); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).PushTruckRpc(pushPosition, dir, clip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4277925572(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); int clip = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref clip); target.__rpc_exec_stage = (__RpcExecStage)1; ((v55VehicleController)(object)target).PushTruckFromOwnerRpc(pos, clip); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2095956418(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; ((v55VehicleController)(object)target).SetHoodOpenRpc(hoodOpenRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1085326842(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; ((v55VehicleController)(object)target).ToggleWipersRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1499313525(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; ((v55VehicleController)(object)target).OpenCabinWindowRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_379102476(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; ((v55VehicleController)(object)target).ToggleHeadlightsRpc(setLightsOn); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1615077013(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; ((v55VehicleController)(object)target).SpringDriverSeatRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "v55VehicleController"; } } namespace v55Cruiser { [BepInPlugin("scandal.v55cruiser", "v55Cruiser", "1.2.4")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { internal static List networkPrefabs = new List(); public static Plugin Instance { get; private set; } = null; internal static ManualLogSource Logger { get; private set; } = null; internal static Harmony? Harmony { get; set; } public static GameObject CompanyCruiserPrefab { get; internal set; } = null; public static GameObject CompanyCruiserManualPrefab { get; internal set; } = null; public void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "v55cruiser")); if ((Object)(object)val == (Object)null) { Logger.LogError((object)"[AssetBundle] Failed to load asset bundle: v55cruiser"); return; } CompanyCruiserPrefab = val.LoadAsset("CompanyCruiser.prefab"); CompanyCruiserManualPrefab = val.LoadAsset("CompanyCruiserManual.prefab"); if ((Object)(object)CompanyCruiserPrefab != (Object)null) { if (!networkPrefabs.Contains(CompanyCruiserPrefab)) { networkPrefabs.Add(CompanyCruiserPrefab); } Logger.LogInfo((object)"[AssetBundle] Successfully loaded prefab: CompanyCruiser"); } else { Logger.LogError((object)"[AssetBundle] Failed to load prefab: CompanyCruiser"); } if ((Object)(object)CompanyCruiserManualPrefab != (Object)null) { if (!networkPrefabs.Contains(CompanyCruiserManualPrefab)) { networkPrefabs.Add(CompanyCruiserManualPrefab); } Logger.LogInfo((object)"[AssetBundle] Successfully loaded prefab: CompanyCruiserManual"); } else { Logger.LogError((object)"[AssetBundle] Failed to load prefab: CompanyCruiserManual"); } AssetBundle val2 = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "playeranimationbundles")); if ((Object)(object)val2 == (Object)null) { Logger.LogError((object)"[AssetBundle] Failed to load asset bundle: playeranimationbundles"); return; } References.truckPlayerAnimator = val2.LoadAsset("truckPlayerMetarig.controller"); if ((Object)(object)References.truckPlayerAnimator != (Object)null) { Logger.LogInfo((object)"[AssetBundle] Successfully loaded runtime controller: truckPlayerMetarig"); } else { Logger.LogError((object)"[AssetBundle] Failed to load runtime controller: truckPlayerMetarig"); } UserVehicleControls.VehicleControlsInstance = new UserVehicleControls.VehicleControls(); UserConfig.InitConfig(); NetcodePatcher(); Patch(); Logger.LogInfo((object)"scandal.v55cruiser v1.2.4 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("scandal.v55cruiser"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); if (IsModPresent("voxx.LethalElementsPlugin")) { LethalElementsCompatibility.PatchAllCompatibilityMethods(Harmony); } 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); } private void NetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "scandal.v55cruiser"; public const string PLUGIN_NAME = "v55Cruiser"; public const string PLUGIN_VERSION = "1.2.4"; } } namespace v55Cruiser.Utils { public static class PlayerUtils { private struct AnimationInfo { public string stateName; public float normalizedTime; } public static bool seatedInTruck = false; public static bool disableAnimationSync; public static bool isPlayerOnTruck; public static bool isPlayerInStorage; public static readonly int stopAnimationID = Animator.StringToHash("SA_stopAnimation"); private static float[] storedParameters = new float[0]; private static bool[] storedBools = new bool[0]; private static int[] storedInts = new int[0]; private static AnimationInfo[] storedAnimations = new AnimationInfo[0]; public static void ResetHUDToolTips(PlayerControllerB player) { if (!((Object)(object)player == (Object)null) && !player.isPlayerDead && player.isPlayerControlled) { if ((Object)(object)player.currentlyHeldObjectServer != (Object)null) { player.currentlyHeldObjectServer.SetControlTipsForItem(); } else { HUDManager.Instance.ClearControlTips(); } } } public static void StoreParameters(Animator playerAnimator) { //IL_0049: 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_0050: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Expected I4, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) AnimatorControllerParameter[] parameters = playerAnimator.parameters; storedParameters = new float[parameters.Length]; storedBools = new bool[parameters.Length]; storedInts = new int[parameters.Length]; storedAnimations = new AnimationInfo[playerAnimator.layerCount]; for (int i = 0; i < parameters.Length; i++) { AnimatorControllerParameter val = parameters[i]; AnimatorControllerParameterType type = val.type; AnimatorControllerParameterType val2 = type; switch (val2 - 1) { case 0: storedParameters[i] = playerAnimator.GetFloat(val.name); break; case 3: storedBools[i] = playerAnimator.GetBool(val.name); break; case 2: storedInts[i] = playerAnimator.GetInteger(val.name); break; } } for (int j = 0; j < playerAnimator.layerCount; j++) { AnimatorStateInfo currentAnimatorStateInfo = playerAnimator.GetCurrentAnimatorStateInfo(j); AnimationInfo animationInfo = default(AnimationInfo); animationInfo.stateName = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).fullPathHash.ToString(); animationInfo.normalizedTime = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).normalizedTime; AnimationInfo animationInfo2 = animationInfo; storedAnimations[j] = animationInfo2; } } public static void RestoreParameters(Animator playerAnimator) { //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_0019: 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_001c: 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_0034: Expected I4, but got Unknown AnimatorControllerParameter[] parameters = playerAnimator.parameters; for (int i = 0; i < parameters.Length; i++) { AnimatorControllerParameter val = parameters[i]; AnimatorControllerParameterType type = val.type; AnimatorControllerParameterType val2 = type; switch (val2 - 1) { case 0: playerAnimator.SetFloat(val.name, storedParameters[i]); break; case 3: playerAnimator.SetBool(val.name, storedBools[i]); break; case 2: playerAnimator.SetInteger(val.name, storedInts[i]); break; } } for (int j = 0; j < playerAnimator.layerCount; j++) { AnimationInfo animationInfo = storedAnimations[j]; playerAnimator.Play(int.Parse(animationInfo.stateName), j, animationInfo.normalizedTime); } } public static void ResetPlayerData(PlayerControllerB player) { PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(player); data.currentCarAnimation = -1; player.ladderCameraHorizontal = 0f; data.vehicleCameraHorizontal = 0f; data.lastVehicleCameraHorizontal = 0f; } } public static class References { internal static ItemDropship itemShip; internal static v55VehicleController truckController; internal static RuntimeAnimatorController truckPlayerAnimator; } public static class SaveManager { private static string SavePrefix = "V55CruiserData."; public static void Save(string key, T data) { ES3.Save(SavePrefix + key, data, GameNetworkManager.Instance.currentSaveFileName); } public static bool TryLoad(string key, out T data) { if (!ES3.KeyExists(SavePrefix + key, GameNetworkManager.Instance.currentSaveFileName)) { data = default(T); return false; } data = ES3.Load(SavePrefix + key, GameNetworkManager.Instance.currentSaveFileName); return true; } public static void Delete(string key) { ES3.DeleteKey(SavePrefix + key, GameNetworkManager.Instance.currentSaveFileName); } } internal class UserConfig { internal static ConfigEntry BabyFaceRadio; internal static ConfigEntry RightHandedWheel; internal static ConfigEntry TrueJank; internal static void InitConfig() { ConfigFile config = ((BaseUnityPlugin)Plugin.Instance).Config; config.SaveOnConfigSet = false; BabyFaceRadio = config.Bind("Host", "Baby-Face", false, "[Host] If true, will enable the unused (copyrighted) 'baby-face' radio track"); RightHandedWheel = config.Bind("Host", "Right-Hand-Drive", false, "[Host] If true, will enable a random chance for the Cruiser to be right-hand-drive (must disable true-v55)"); TrueJank = config.Bind("Host", "True-V55", true, "[Host] If true, will unfix some issues, and make the Cruiser more V55 like"); ClearOrphanedEntries(config); config.Save(); config.SaveOnConfigSet = true; } private static void ClearOrphanedEntries(ConfigFile config) { PropertyInfo propertyInfo = AccessTools.Property(typeof(ConfigFile), "OrphanedEntries"); Dictionary dictionary = (Dictionary)propertyInfo.GetValue(config); dictionary.Clear(); } } internal class UserVehicleControls { internal class VehicleControls : LcInputActions { [InputAction(/*Could not decode attribute arguments.*/)] public InputAction GasPedalKey { get; set; } = null; [InputAction(/*Could not decode attribute arguments.*/)] public InputAction BrakePedalKey { get; set; } = null; } internal static VehicleControls VehicleControlsInstance; } public static class VehicleUtils { public static readonly int stopAnimationID = Animator.StringToHash("SA_stopAnimation"); public static float lastCheckTime = 0f; public static float cooldown = 0.25f; public static bool MeetsSpecialConditionsToCheck() { if (Time.realtimeSinceStartup - lastCheckTime < cooldown) { return false; } lastCheckTime = Time.realtimeSinceStartup; return true; } public static bool IsEnemyInVehicle(EnemyAI enemyScript, v55VehicleController controller) { //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)controller.collisionTrigger.insideTruckNavMeshBounds).ClosestPoint(((Component)enemyScript).transform.position) == ((Component)enemyScript).transform.position || ((Collider)controller.collisionTrigger.insideTruckNavMeshBounds).ClosestPoint(enemyScript.agent.destination) == enemyScript.agent.destination) { return true; } return false; } public static bool IsPlayerInVehicleBounds() { return PlayerUtils.isPlayerOnTruck; } public static bool IsPlayerSeatedInVehicle(v55VehicleController controller) { return PlayerUtils.seatedInTruck; } public static bool IsSeatedPlayerProtected(PlayerControllerB player, v55VehicleController controller) { return false; } public static bool IsPlayerProtectedByVehicle(PlayerControllerB player, v55VehicleController controller) { if (((VehicleController)controller).carDestroyed) { return false; } bool liftGateOpen = controller.liftGateOpen; if (PlayerUtils.isPlayerInStorage && liftGateOpen) { return false; } if (PlayerUtils.isPlayerOnTruck && !PlayerUtils.isPlayerInStorage) { return false; } return true; } public static bool IsPlayerNearTruck(PlayerControllerB player, v55VehicleController vehicle) { //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)vehicle).mainRigidbody.position; Vector3 position2 = ((Component)player).transform.position; if (Vector3.Distance(position2, position) > 10f) { return false; } return true; } } } namespace v55Cruiser.Patches { [HarmonyPatch(typeof(BaboonBirdAI))] public static class BaboonBirdAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(BaboonBirdAI __instance, ref Collider other) { PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, ((EnemyAI)__instance).inSpecialAnimation || __instance.doingKillAnimation, false); if ((Object)(object)val == (Object)null) { return true; } if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; float magnitude = ((Vector3)(ref ((VehicleController)truckController).averageVelocity)).magnitude; if (VehicleUtils.IsPlayerSeatedInVehicle(truckController)) { return false; } bool flag = VehicleUtils.IsEnemyInVehicle((EnemyAI)(object)__instance, truckController); if (VehicleUtils.IsPlayerInVehicleBounds()) { if (PlayerUtils.isPlayerInStorage && !flag) { return false; } if (!PlayerUtils.isPlayerInStorage) { return magnitude < 2f; } return true; } if (flag) { return false; } return true; } } [HarmonyPatch(typeof(BushWolfEnemy))] public static class BushWolfEnemyPatches { [HarmonyPatch("Update")] [HarmonyPostfix] private static void Update_Postfix(BushWolfEnemy __instance) { if (!__instance.foundSpawningPoint || StartOfRound.Instance.livingPlayers == 0 || !((EnemyAI)__instance).isEnemyDead || ((EnemyAI)__instance).stunNormalizedTimer > 0f || __instance.matingCallTimer >= 0f || ((EnemyAI)__instance).currentBehaviourStateIndex != 2 || __instance.timeSinceKillingPlayer < 2f || __instance.timeSinceTakingDamage < 0.35f || __instance.failedTongueShoot || (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 || (Object)(object)References.truckController == (Object)null) { return; } v55VehicleController truckController = References.truckController; PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(((EnemyAI)__instance).targetPlayer); if (data.isPlayerInStorage && !truckController.liftGateOpen) { ((EnemyAI)__instance).agent.speed = 0f; __instance.CancelReelingPlayerIn(); if (((NetworkBehaviour)__instance).IsOwner && __instance.tongueLengthNormalized < -0.25f) { ((EnemyAI)__instance).SwitchToBehaviourState(0); } } } } [HarmonyPatch(typeof(ElevatorAnimationEvents))] public static class ElevatorAnimationEventsPatches { [HarmonyPatch("ElevatorFullyRunning")] [HarmonyPrefix] private static void ElevatorFullyRunning_Prefix() { if (!((Object)(object)References.truckController == (Object)null) && ((VehicleController)References.truckController).magnetedToShip) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (PlayerUtils.seatedInTruck || PlayerUtils.isPlayerOnTruck || PlayerUtils.isPlayerInStorage) { localPlayerController.isInElevator = false; } } } } [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) { BushWolfEnemy val = (BushWolfEnemy)(object)((__instance is BushWolfEnemy) ? __instance : null); if (val != null && !((Object)(object)References.truckController == (Object)null)) { v55VehicleController truckController = References.truckController; PlayerControllerBPatches.PlayerControllerBData data = PlayerControllerBPatches.GetData(playerScript); if (data.isPlayerInStorage && !truckController.liftGateOpen) { __result = false; } } } } [HarmonyPatch(typeof(ForestGiantAI))] public static class ForestGiantAIPatches { [HarmonyPatch("AnimationEventA")] [HarmonyPrefix] private static bool AnimationEventA_Prefix(ForestGiantAI __instance) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return false; } if ((Object)(object)References.truckController == (Object)null) { return true; } if (PlayerUtils.isPlayerInStorage) { return false; } return true; } [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(ForestGiantAI __instance, ref Collider other) { if ((Object)(object)((EnemyAI)__instance).inSpecialAnimationWithPlayer != (Object)null || __instance.inEatingPlayerAnimation || ((EnemyAI)__instance).stunNormalizedTimer >= 0f || ((EnemyAI)__instance).currentBehaviourStateIndex == 2) { return true; } PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, __instance.inEatingPlayerAnimation, false); if ((Object)(object)val == (Object)null) { return true; } if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if (VehicleUtils.IsPlayerSeatedInVehicle(truckController)) { return true; } if (VehicleUtils.IsPlayerInVehicleBounds()) { if (VehicleUtils.IsPlayerProtectedByVehicle(val, truckController)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(GameNetworkManager))] public static class GameNetworkManagerPatches { [HarmonyPatch("Start")] [HarmonyPostfix] private static void GameNetworkManager_Start(GameNetworkManager __instance) { foreach (GameObject networkPrefab in Plugin.networkPrefabs) { if (!NetworkManager.Singleton.NetworkConfig.Prefabs.Contains(networkPrefab)) { NetworkManager.Singleton.AddNetworkPrefab(networkPrefab); } } } [HarmonyPatch("SaveItemsInShip")] [HarmonyPostfix] private static void SaveItemsInShip_Postfix(GameNetworkManager __instance) { try { v55VehicleController v55VehicleController = default(v55VehicleController); if (Object.op_Implicit((Object)(object)StartOfRound.Instance.attachedVehicle) && ((Component)StartOfRound.Instance.attachedVehicle).TryGetComponent(ref v55VehicleController)) { SaveManager.Save("AttachedVehicleInterior", v55VehicleController.interiorType); Plugin.Logger.LogMessage((object)"Successfully saved Cruiser data."); } else { SaveManager.Delete("AttachedVehicleInterior"); } } catch (Exception ex) { Plugin.Logger.LogError((object)("Exception caught saving Cruiser data:\n" + ex)); } } } [HarmonyPatch(typeof(GiantKiwiAI))] internal static class GiantKiwiAIPatches { [HarmonyPatch("NavigateTowardsTargetPlayer")] [HarmonyPrefix] private static bool NavigateTowardsTargetPlayer_Prefix(GiantKiwiAI __instance) { //IL_0040: 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_00ab: 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_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_0152: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if (((EnemyAI)__instance).setDestinationToPlayerInterval <= 0f) { if (Vector3.Distance(((Component)((EnemyAI)__instance).targetPlayer).transform.position, ((Component)truckController).transform.position) < 10f) { ((EnemyAI)__instance).setDestinationToPlayerInterval = 0.25f; bool flag = (Object)(object)((VehicleController)truckController).currentDriver == (Object)(object)((EnemyAI)__instance).targetPlayer || (Object)(object)((VehicleController)truckController).currentPassenger == (Object)(object)((EnemyAI)__instance).targetPlayer; bool flag2 = truckController.vehicleBounds.ClosestPoint(((Component)((EnemyAI)__instance).targetPlayer).transform.position) == ((Component)((EnemyAI)__instance).targetPlayer).transform.position; bool flag3 = ((VehicleController)truckController).ontopOfTruckCollider.ClosestPoint(((Component)((EnemyAI)__instance).targetPlayer).transform.position) == ((Component)((EnemyAI)__instance).targetPlayer).transform.position; bool isPlayerInStorage = PlayerUtils.isPlayerInStorage; int num = -1; if (flag || flag2 || isPlayerInStorage || flag3) { __instance.targetPlayerIsInTruck = true; num = -33; } ((EnemyAI)__instance).destination = RoundManager.Instance.GetNavMeshPosition(((Component)((EnemyAI)__instance).targetPlayer).transform.position, RoundManager.Instance.navHit, 5.5f, num); return false; } return true; } return true; } [HarmonyPatch("IsEggInsideClosedTruck")] [HarmonyPrefix] private static bool IsEggInsideClosedTruck_Prefix(GiantKiwiAI __instance, KiwiBabyItem egg, bool closedTruck, ref bool __result) { if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if ((Object)(object)((GrabbableObject)egg).parentObject == (Object)(object)((Component)((VehicleController)truckController).physicsRegion.parentNetworkObject).transform) { __result = !closedTruck || !truckController.liftGateOpen; return false; } return true; } [HarmonyPatch("AnimationEventB")] [HarmonyPrefix] private static void AnimationEventB_Prefix(GiantKiwiAI __instance) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null || !localPlayerController.isPlayerControlled || localPlayerController.isPlayerDead || (Object)(object)References.truckController == (Object)null) { return; } v55VehicleController truckController = References.truckController; bool flag = VehicleUtils.IsEnemyInVehicle((EnemyAI)(object)__instance, truckController); if (VehicleUtils.IsPlayerInVehicleBounds()) { if (PlayerUtils.isPlayerInStorage && !flag) { __instance.timeSinceHittingPlayer = 0.4f; } } else if (flag) { __instance.timeSinceHittingPlayer = 0.4f; } } } [HarmonyPatch(typeof(HUDManager))] public class HUDManagerPatches { [HarmonyPatch("HelmetCondensationDrops")] [HarmonyPostfix] private static void HelmetCondensationDrops_Postfix(HUDManager __instance) { if (!((Object)(object)References.truckController == (Object)null) && PlayerUtils.isPlayerInStorage) { __instance.increaseHelmetCondensation = false; } } } [HarmonyPatch(typeof(InteractTrigger))] public static class InteractTriggerPatches { private static VehiclePlayerSeat currentPlayerSeat = null; public static Coroutine specialInteractCoroutine = null; public static float interactTime = 0.6f; public static float timeSinceSpecialInteraction; [HarmonyPatch("Interact")] [HarmonyPrefix] private static bool Interact_Prefix(InteractTrigger __instance, ref Transform playerTransform, bool __runOriginal) { if (!__runOriginal) { return false; } PlayerControllerB component = ((Component)playerTransform).GetComponent(); if ((Object)(object)component == (Object)null || component.isPlayerDead || !component.isPlayerControlled) { return true; } if (component.inSpecialInteractAnimation && !component.isClimbingLadder && !__instance.allowUseWhileInAnimation) { return true; } if (!__instance.setVehicleAnimation || (Object)(object)__instance.overridePlayerParent == (Object)null) { return true; } v55VehicleController v55VehicleController = default(v55VehicleController); if (!((Component)__instance.overridePlayerParent).TryGetComponent(ref v55VehicleController)) { return true; } if (specialInteractCoroutine != null) { ((MonoBehaviour)v55VehicleController).StopCoroutine(specialInteractCoroutine); } timeSinceSpecialInteraction = Time.realtimeSinceStartup; if (__instance.interactCooldown) { if (__instance.currentCooldownValue >= 0f) { return false; } __instance.currentCooldownValue = __instance.cooldownTime; } component.ResetFallGravity(); ((UnityEvent)(object)__instance.onInteractEarly).Invoke((PlayerControllerB)null); return false; } public static IEnumerator SpecialTruckInteractAnimation(InteractTrigger trigger, PlayerControllerB playerController, v55VehicleController controller, VehiclePlayerSeat playerSeat) { playerSeat.ReplacePlayerAnimator(playerController, isLocalPlayer: true, trigger); currentPlayerSeat = playerSeat; trigger.UpdateUsedByPlayerServerRpc((int)playerController.playerClientId); trigger.isPlayingSpecialAnimation = true; trigger.lockedPlayer = playerController.thisPlayerBody; trigger.playerScriptInSpecialAnimation = playerController; if (trigger.clampLooking) { trigger.playerScriptInSpecialAnimation.minVerticalClamp = trigger.minVerticalClamp; trigger.playerScriptInSpecialAnimation.maxVerticalClamp = trigger.maxVerticalClamp; trigger.playerScriptInSpecialAnimation.horizontalClamp = trigger.horizontalClamp; trigger.playerScriptInSpecialAnimation.clampLooking = true; } trigger.playerScriptInSpecialAnimation.overridePhysicsParent = trigger.overridePlayerParent; trigger.playerScriptInSpecialAnimation.inVehicleAnimation = true; if (trigger.hidePlayerItem && (Object)(object)trigger.playerScriptInSpecialAnimation.currentlyHeldObjectServer != (Object)null) { trigger.playerScriptInSpecialAnimation.currentlyHeldObjectServer.EnableItemMeshes(false); } playerController.UpdateSpecialAnimationValue(true, (short)trigger.playerPositionNode.eulerAngles.y, 0f, false); playerController.inSpecialInteractAnimation = true; playerController.currentTriggerInAnimationWith = trigger; playerController.playerBodyAnimator.ResetTrigger(PlayerUtils.stopAnimationID); playerController.playerBodyAnimator.ResetTrigger(trigger.animationString); playerController.playerBodyAnimator.SetTrigger(trigger.animationString); HUDManager.Instance.ClearControlTips(); if (!trigger.stopAnimationManually) { yield return (object)new WaitForSeconds(trigger.animationWaitTime); trigger.StopSpecialAnimation(); } yield return (object)new WaitForSeconds(interactTime); specialInteractCoroutine = null; } [HarmonyPatch("Update")] [HarmonyPrefix] private static void Update_Prefix(InteractTrigger __instance) { v55VehicleController v55VehicleController = default(v55VehicleController); if ((Object)(object)__instance == (Object)null || (Object)(object)((NetworkBehaviour)__instance).NetworkManager == (Object)null || !((NetworkBehaviour)__instance).NetworkManager.IsListening || (Object)(object)__instance.lockedPlayer == (Object)null || !__instance.isPlayingSpecialAnimation || __instance.playerScriptInSpecialAnimation.isPlayerControlled || !__instance.playerScriptInSpecialAnimation.disconnectedMidGame || !__instance.setVehicleAnimation || (Object)(object)__instance.overridePlayerParent == (Object)null || !((Component)__instance.overridePlayerParent).TryGetComponent(ref v55VehicleController)) { return; } PlayerControllerB playerScriptInSpecialAnimation = __instance.playerScriptInSpecialAnimation; if (!((Object)(object)playerScriptInSpecialAnimation == (Object)null)) { __instance.StopUsingClientRpc((int)__instance.playerScriptInSpecialAnimation.playerClientId); if ((Object)(object)__instance == (Object)(object)((VehicleController)v55VehicleController).driverSeatTrigger) { v55VehicleController.OnDriverLeaveGameServerRpc((int)playerScriptInSpecialAnimation.playerClientId); } else if ((Object)(object)__instance == (Object)(object)((VehicleController)v55VehicleController).passengerSeatTrigger) { v55VehicleController.OnPassengerLeaveGameRpc((int)playerScriptInSpecialAnimation.playerClientId); } } } [HarmonyPatch("StopSpecialAnimation")] [HarmonyPrefix] private static bool StopSpecialAnimation_bool_prefix(InteractTrigger __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if ((Object)(object)__instance == (Object)null) { return true; } if ((Object)(object)__instance.lockedPlayer == (Object)null) { return true; } if (__instance.isGettingDestroyed) { return true; } PlayerControllerB component = ((Component)__instance.lockedPlayer).GetComponent(); if ((Object)(object)component == (Object)null || !component.isPlayerControlled) { return true; } if ((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return true; } if (!__instance.setVehicleAnimation || (Object)(object)__instance.overridePlayerParent == (Object)null) { return true; } v55VehicleController v55VehicleController = default(v55VehicleController); if (!((Component)__instance.overridePlayerParent).TryGetComponent(ref v55VehicleController)) { return true; } if (specialInteractCoroutine != null) { ((MonoBehaviour)__instance).StopCoroutine(specialInteractCoroutine); specialInteractCoroutine = null; } if ((Object)(object)currentPlayerSeat == (Object)null) { return true; } currentPlayerSeat.ReturnPlayerAnimator(component, isLocalPlayer: true, __instance); return true; } } [HarmonyPatch(typeof(ItemDropship))] public static class ItemDropshipPatches { [HarmonyPatch("Start")] [HarmonyPrefix] private static void Start_Postfix(ItemDropship __instance) { if (!((Object)(object)__instance == (Object)null)) { References.itemShip = __instance; } } } [HarmonyPatch(typeof(Landmine))] public 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) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)References.truckController == (Object)null) && VehicleUtils.IsPlayerNearTruck(GameNetworkManager.Instance.localPlayerController, References.truckController) && !goThroughCar && PlayerUtils.isPlayerInStorage && References.truckController.storageCompartment.ClosestPoint(explosionPosition) != explosionPosition) { killRange = -1f; damageRange = -1f; } } } [HarmonyPatch(typeof(Landmine_Patches))] public class ExternalLandminePatches { [HarmonyPatch("ShouldCheckCustomKnockback")] [HarmonyPrefix] private static bool ShouldCheckCustomKnockback_Prefix(ref bool __result) { return true; } [HarmonyPatch("CanPlayerBeKnockedBack")] [HarmonyPrefix] private static bool CanPlayerBeKnockedBack_Prefix(ref bool __result) { return true; } [HarmonyPatch("CurrentForceMultiplier")] [HarmonyPrefix] private static bool CurrentForceMultiplier_Prefix(ref float __result) { if ((Object)(object)References.truckController != (Object)null) { __result = 1f; return false; } return true; } } [HarmonyPatch(typeof(MaskedPlayerEnemy))] internal class MaskedPlayerEnemyPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(MaskedPlayerEnemy __instance, ref Collider other) { PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, __instance.inKillAnimation || __instance.startingKillAnimationLocalClient || !__instance.enemyEnabled, false); if ((Object)(object)val == (Object)null) { return true; } if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; float magnitude = ((Vector3)(ref ((VehicleController)truckController).averageVelocity)).magnitude; if (VehicleUtils.IsPlayerSeatedInVehicle(truckController)) { return false; } bool flag = VehicleUtils.IsEnemyInVehicle((EnemyAI)(object)__instance, truckController); if (VehicleUtils.IsPlayerInVehicleBounds()) { if (PlayerUtils.isPlayerInStorage && !flag) { return false; } if (!PlayerUtils.isPlayerInStorage) { return magnitude < 2f; } return true; } if (flag) { return false; } return true; } } [HarmonyPatch(typeof(MouthDogAI))] public static class MouthDogAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(MouthDogAI __instance, ref Collider other) { PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, __instance.inKillAnimation, false); if ((Object)(object)val == (Object)null) { return true; } if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if (VehicleUtils.IsPlayerInVehicleBounds()) { if (VehicleUtils.IsPlayerProtectedByVehicle(val, truckController)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(PlayerControllerB))] public static class PlayerControllerBPatches { public class PlayerControllerBData { public float syncLookInputInterval; public float vehicleCameraHorizontal; public float lastVehicleCameraHorizontal; public int currentCarAnimation = -1; public bool isPlayerOnTruck; public bool isPlayerInStorage; } public static float checkInterval; public static Dictionary playerData = new Dictionary(); 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); } } public static PlayerControllerBData GetData(PlayerControllerB player) { if (!playerData.TryGetValue(player, out PlayerControllerBData value)) { value = new PlayerControllerBData(); playerData[player] = value; } return value; } [HarmonyPatch("Awake")] [HarmonyPostfix] private static void Awake_Postfix(PlayerControllerB __instance) { RemoveStalePlayerData(); if (!playerData.ContainsKey(__instance)) { playerData.Add(__instance, new PlayerControllerBData()); } } [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("SetItemInElevator")] [HarmonyPrefix] private static bool SetItemInElevator_Prefix(PlayerControllerB __instance, bool droppedInShipRoom, bool droppedInElevator, ref GrabbableObject gObject) { if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if ((Object)(object)((Component)gObject).transform.parent == (Object)(object)((Component)truckController).transform) { return false; } return true; } [HarmonyPatch("Update")] [HarmonyPostfix] public static void Update_Postfix(PlayerControllerB __instance) { if ((Object)(object)__instance == (Object)null || __instance.isPlayerDead || !__instance.isPlayerControlled || (Object)(object)__instance != (Object)(object)GameNetworkManager.Instance.localPlayerController || (Object)(object)References.truckController == (Object)null) { return; } v55VehicleController truckController = References.truckController; if (__instance.inVehicleAnimation && Object.op_Implicit((Object)(object)__instance.currentTriggerInAnimationWith) && Object.op_Implicit((Object)(object)__instance.currentTriggerInAnimationWith.overridePlayerParent) && (Object)(object)__instance.currentTriggerInAnimationWith.overridePlayerParent == (Object)(object)((Component)truckController).transform) { PlayerUtils.seatedInTruck = true; PlayerUtils.isPlayerOnTruck = true; PlayerUtils.isPlayerInStorage = false; } else if (!__instance.inVehicleAnimation && PlayerUtils.seatedInTruck) { PlayerUtils.seatedInTruck = false; } if (checkInterval <= 0.3f) { checkInterval += Time.deltaTime; return; } checkInterval = 0f; PlayerControllerBData data = GetData(__instance); if (data.isPlayerOnTruck != PlayerUtils.isPlayerOnTruck || data.isPlayerInStorage != PlayerUtils.isPlayerInStorage) { data.isPlayerOnTruck = PlayerUtils.isPlayerOnTruck; data.isPlayerInStorage = PlayerUtils.isPlayerInStorage; truckController.SyncPlayerZoneRpc((int)__instance.playerClientId, PlayerUtils.isPlayerOnTruck, PlayerUtils.isPlayerInStorage); } } [HarmonyPatch("LateUpdate")] [HarmonyPostfix] private static void LateUpdate_Postfix(PlayerControllerB __instance) { //IL_00af: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)__instance == (Object)null) && !__instance.isPlayerDead && __instance.isPlayerControlled && !((Object)(object)References.truckController == (Object)null)) { v55VehicleController truckController = References.truckController; if (__instance.inVehicleAnimation && Object.op_Implicit((Object)(object)__instance.currentTriggerInAnimationWith) && Object.op_Implicit((Object)(object)__instance.currentTriggerInAnimationWith.overridePlayerParent) && (Object)(object)__instance.currentTriggerInAnimationWith.overridePlayerParent == (Object)(object)((Component)truckController).transform) { ((Component)__instance.playerModelArmsMetarig.parent).transform.localRotation = Quaternion.Euler(90f, 0f, 0f); __instance.playerModelArmsMetarig.localRotation = Quaternion.Euler(-90f, 0f, 0f); __instance.localArmsTransform.localPosition = new Vector3(0f, -0.008f, -0.43f); __instance.localArmsTransform.localRotation = Quaternion.Euler(84.78056f, 0f, 0f); } } } } [HarmonyPatch(typeof(PumaAI))] internal static class PumaAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(PumaAI __instance, ref Collider other) { PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val == (Object)null) { return true; } if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; float magnitude = ((Vector3)(ref ((VehicleController)truckController).averageVelocity)).magnitude; if (VehicleUtils.IsPlayerSeatedInVehicle(truckController)) { if (magnitude >= 2f) { return false; } if (VehicleUtils.IsSeatedPlayerProtected(val, truckController)) { return false; } return true; } bool flag = VehicleUtils.IsEnemyInVehicle((EnemyAI)(object)__instance, truckController); if (VehicleUtils.IsPlayerInVehicleBounds()) { if (PlayerUtils.isPlayerInStorage && !flag) { return false; } if (!PlayerUtils.isPlayerInStorage) { return magnitude < 2f; } return true; } if (flag) { return false; } return true; } } [HarmonyPatch(typeof(RadMechAI))] internal static class RadMechAIPatches { [HarmonyPatch("OnCollideWithPlayer")] [HarmonyPrefix] private static bool OnCollideWithPlayer_Prefix(RadMechAI __instance, ref Collider other) { PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val == (Object)null) { return true; } if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if (VehicleUtils.IsPlayerSeatedInVehicle(truckController)) { return true; } if (VehicleUtils.IsPlayerInVehicleBounds()) { if (VehicleUtils.IsPlayerProtectedByVehicle(val, truckController)) { return false; } return true; } return true; } } [HarmonyPatch(typeof(StartOfRound))] public static class StartOfRoundPatches { [HarmonyPatch("Awake")] [HarmonyAfter(new string[] { "butterystancakes.lethalcompany.radiobabyface" })] [HarmonyPostfix] private static void Awake_Postfix(StartOfRound __instance) { __instance.VehiclesList[0] = Plugin.CompanyCruiserPrefab; } [HarmonyPatch("SyncAlreadyHeldObjectsServerRpc")] [HarmonyPostfix] private static void SyncAlreadyHeldObjectsServerRpc_Postfix(StartOfRound __instance, int joiningClientId) { if (!Object.op_Implicit((Object)(object)__instance.attachedVehicle) || !(__instance.attachedVehicle is v55VehicleController v55VehicleController)) { return; } try { if ((Object)(object)v55VehicleController == (Object)null) { Plugin.Logger.LogError((object)"attempted to send client data, but the truck is null? please report this to Scandal."); } else { v55VehicleController.SendClientSyncData(); } } catch (Exception ex) { Plugin.Logger.LogError((object)("exception caught sending saved Cruiser data:\n" + ex)); } } [HarmonyPatch("LoadAttachedVehicle")] [HarmonyPostfix] private static void LoadAttachedVehicle_Postfix(StartOfRound __instance) { if (!Object.op_Implicit((Object)(object)__instance.attachedVehicle) || !(__instance.attachedVehicle is v55VehicleController v55VehicleController)) { return; } try { int data; if ((Object)(object)v55VehicleController == (Object)null) { Plugin.Logger.LogError((object)"attempted to load saved data, but the truck is null? please report this to Scandal."); } else if (SaveManager.TryLoad("AttachedVehicleInterior", out data)) { v55VehicleController.interiorType = data; v55VehicleController.SetInteriorType(v55VehicleController.interiorType); } } catch (Exception ex) { Plugin.Logger.LogError((object)("exception caught loading saved Cruiser data:\n" + ex)); } } } [HarmonyPatch(typeof(Terminal))] public static class TerminalPatches { [HarmonyPatch("Awake")] [HarmonyPrefix] private static void Awake_Prefix(Terminal __instance) { TerminalNode result = __instance.terminalNodes.allKeywords[0].compatibleNouns[40].result; result.itemCost = 400; result.terminalOptions[0].result.itemCost = 400; __instance.buyableVehicles[0].creditsWorth = 400; __instance.buyableVehicles[0].vehiclePrefab = Plugin.CompanyCruiserPrefab; __instance.buyableVehicles[0].secondaryPrefab = Plugin.CompanyCruiserManualPrefab; } } [HarmonyPatch(typeof(TerrainObstacleTrigger))] public static class TerrainObstacleTriggerPatches { [HarmonyPatch("OnTriggerEnter")] [HarmonyPrefix] private static bool OnTriggerEnter_Prefix(TerrainObstacleTrigger __instance, Collider other, bool __runOriginal) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_00fc: 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) if (!__runOriginal) { return false; } if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController v55VehicleController = default(v55VehicleController); ((Component)other).TryGetComponent(ref v55VehicleController); if ((Object)(object)v55VehicleController == (Object)null) { return true; } if (((NetworkBehaviour)v55VehicleController).IsOwner && ((Vector3)(ref ((VehicleController)v55VehicleController).averageVelocity)).magnitude >= 5f && Vector3.Angle(((VehicleController)v55VehicleController).averageVelocity, ((Component)__instance).transform.position - ((VehicleController)v55VehicleController).mainRigidbody.position) < 80f) { RoundManager.Instance.DestroyTreeOnLocalClient(((Component)__instance).transform.position); bool dealDamage = (Object)(object)((Component)__instance).transform.parent != (Object)null && ((Component)((Component)__instance).transform.parent).CompareTag("Wood"); v55VehicleController.CarReactToObstacle(((VehicleController)v55VehicleController).mainRigidbody.position - ((Component)__instance).transform.position, ((Component)__instance).transform.position, Vector3.zero, (CarObstacleType)2, 1f, null, dealDamage); } return false; } } [HarmonyPatch(typeof(Utilities))] public class UtilitiesPatches { [HarmonyPatch("ShouldAllowSightForVehicle")] [HarmonyPrefix] private static bool ShouldAllowSightForVehicle_Prefix(ref PlayerControllerB player, ref EnemyAI enemy, ref bool __result) { if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if (!((Object)(object)((VehicleController)truckController).currentDriver == (Object)(object)player) && !((Object)(object)((VehicleController)truckController).currentPassenger == (Object)(object)player)) { return true; } __result = true; return false; } } [HarmonyPatch(typeof(VehicleController))] public static class VehicleControllerPatches { [HarmonyPatch("AddEngineOil")] [HarmonyPrefix] private static bool AddEngineOil_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.AddEngineOil(); return false; } [HarmonyPatch("AddTurboBoost")] [HarmonyPrefix] private static bool AddTurboBoost_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.AddTurboBoost(); return false; } [HarmonyPatch("StartMagneting")] [HarmonyPrefix] private static bool StartMagneting_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController)) { return true; } return false; } [HarmonyPatch("CollectItemsInTruck")] [HarmonyPrefix] private static bool CollectItemsInTruck_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.CollectItemsInTruck(); return false; } [HarmonyPatch("DestroyCar")] [HarmonyPrefix] private static bool DestroyCar_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.DestroyCar(); return false; } [HarmonyPatch("ExitDriverSideSeat")] [HarmonyPrefix] private static bool ExitDriverSideSeat_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } if (v55VehicleController.isInteriorRHD) { v55VehicleController.ExitFrontRightSideSeat(); } else { v55VehicleController.ExitFrontLeftSideSeat(); } return false; } [HarmonyPatch("ExitPassengerSideSeat")] [HarmonyPrefix] private static bool ExitPassengerSideSeat_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } if (v55VehicleController.isInteriorRHD) { v55VehicleController.ExitFrontLeftSideSeat(); } else { v55VehicleController.ExitFrontRightSideSeat(); } 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 v55VehicleController v55VehicleController)) { return true; } v55VehicleController.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 = default(Vector3)) { //IL_0025: Unknown result type (might be due to invalid IL or missing references) if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.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 v55VehicleController v55VehicleController)) { return true; } ((VehicleController)v55VehicleController).DamagePlayerInVehicle(vel, magnitude); return false; } [HarmonyPatch("SetInternalStress")] [HarmonyPrefix] private static bool SetInternalStress_Prefix(VehicleController __instance, bool __runOriginal, float carStressIncrease) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.SetInternalStress(carStressIncrease); return false; } [HarmonyPatch("ToggleHeadlightsLocalClient")] [HarmonyPrefix] private static bool ToggleHeadlightsLocalClient_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.ToggleHeadlightsLocalClient(); return false; } [HarmonyPatch("SetHeadlightMaterial")] [HarmonyPrefix] private static bool SetHeadlightMaterial_Prefix(VehicleController __instance, bool __runOriginal, bool on) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } ((VehicleController)v55VehicleController).SetHeadlightMaterial(on); return false; } [HarmonyPatch("SpringDriverSeatLocalClient")] [HarmonyPrefix] private static bool SpringDriverSeatLocalClient_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController)) { return true; } __instance.SpringDriverSeatLocalClient(); 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 v55VehicleController v55VehicleController)) { return true; } v55VehicleController.SetRadioOnLocalClient(on, setClip); return false; } [HarmonyPatch("SwitchRadio")] [HarmonyPrefix] private static bool SwitchRadio_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.SwitchRadio(); return false; } [HarmonyPatch("ChangeRadioStation")] [HarmonyPrefix] private static bool ChangeRadioStation_Prefix(VehicleController __instance, bool __runOriginal) { if (!__runOriginal) { return false; } if (!(__instance is v55VehicleController v55VehicleController)) { return true; } v55VehicleController.ChangeRadioStation(); return false; } } } namespace v55Cruiser.Compatibility { public 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) { if ((Object)(object)References.truckController == (Object)null) { return true; } v55VehicleController truckController = References.truckController; if (PlayerUtils.isPlayerInStorage) { __result = true; return false; } return true; } } public class LethalElementsCompatibility { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void PatchAllCompatibilityMethods(Harmony harmony) { ApplyElementsPatch(harmony); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPrefix] public static void ApplyElementsPatch(Harmony harmony) { //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Expected O, but got Unknown //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Expected O, but got Unknown //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Expected O, but got Unknown //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Expected O, but got Unknown //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Expected O, but got Unknown //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(HeatwavePatches), "CheckConditionsForHeatingStop", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(HeatwavePatches), "CheckConditionsForHeatingPause", (Type[])null, (Type[])null); MethodInfo methodInfo3 = AccessTools.Method(typeof(PlayerEffectsManager), "SetPlayerTemperature", (Type[])null, (Type[])null); MethodInfo methodInfo4 = AccessTools.Method(typeof(BlizzardWeather), "Update", (Type[])null, (Type[])null); MethodInfo methodInfo5 = AccessTools.Method(typeof(SnowfallVFXManager), "Update", (Type[])null, (Type[])null); MethodInfo methodInfo6 = AccessTools.Method(typeof(BlizzardWeather), "SetColdZoneState", (Type[])null, (Type[])null); MethodInfo methodInfo7 = AccessTools.Method(typeof(SnowfallWeather), "SetColdZoneState", (Type[])null, (Type[])null); MethodInfo methodInfo8 = AccessTools.Method(typeof(v55VehicleController), "Start", (Type[])null, (Type[])null); MethodInfo methodInfo9 = AccessTools.Method(typeof(v55VehicleController), "FixedUpdate", (Type[])null, (Type[])null); MethodInfo methodInfo10 = AccessTools.Method(typeof(LethalElementsCompatibility), "CheckConditionsForHeatingStop_Prefix", (Type[])null, (Type[])null); MethodInfo methodInfo11 = AccessTools.Method(typeof(LethalElementsCompatibility), "CheckConditionsForHeatingPause_Prefix", (Type[])null, (Type[])null); MethodInfo methodInfo12 = AccessTools.Method(typeof(LethalElementsCompatibility), "SetPlayerTemperature_Heatwave", (Type[])null, (Type[])null); MethodInfo methodInfo13 = AccessTools.Method(typeof(LethalElementsCompatibility), "Update_Prefix", (Type[])null, (Type[])null); MethodInfo methodInfo14 = AccessTools.Method(typeof(LethalElementsCompatibility), "VFXUpdate_Postfix", (Type[])null, (Type[])null); MethodInfo methodInfo15 = AccessTools.Method(typeof(LethalElementsCompatibility), "SetColdZoneState_Prefix", (Type[])null, (Type[])null); MethodInfo methodInfo16 = AccessTools.Method(typeof(LethalElementsCompatibility), "SetBaseColdZoneState_Prefix", (Type[])null, (Type[])null); MethodInfo methodInfo17 = AccessTools.Method(typeof(LethalElementsCompatibility), "VehicleSnowTracksPatch_Prefix", (Type[])null, (Type[])null); MethodInfo methodInfo18 = AccessTools.Method(typeof(LethalElementsCompatibility), "VehicleSnowTracksFixedUpdatePatch_Prefix", (Type[])null, (Type[])null); harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo10), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo2, new HarmonyMethod(methodInfo11), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo3, new HarmonyMethod(methodInfo12), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo4, new HarmonyMethod(methodInfo13), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo5, (HarmonyMethod)null, new HarmonyMethod(methodInfo14), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo6, new HarmonyMethod(methodInfo15), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo7, new HarmonyMethod(methodInfo16), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo8, new HarmonyMethod(methodInfo17), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); harmony.Patch((MethodBase)methodInfo9, new HarmonyMethod(methodInfo18), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } public static void SetPlayerTemperature_Heatwave(PlayerEffectsManager __instance, float temperatureDelta) { if ((Object)(object)HeatwaveWeather.Instance == (Object)null || !((BaseWeather)HeatwaveWeather.Instance).IsActive || (Object)(object)References.truckController == (Object)null || (!PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage)) { return; } v55VehicleController truckController = References.truckController; bool flag = !truckController.liftGateOpen; bool flag2 = PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; bool flag3 = (Object)(object)localPlayerController.currentAudioTrigger != (Object)null && localPlayerController.currentAudioTrigger.insideLighting; if (PlayerUtils.seatedInTruck) { PlayerEffectsManager.heatTransferRate = (((VehicleController)truckController).windshieldBroken ? 0.9f : 0.2f); } else if (PlayerUtils.isPlayerInStorage && flag) { if (!flag3) { PlayerEffectsManager.heatTransferRate = 0.75f; } else { PlayerEffectsManager.heatTransferRate = 1f; } } else { PlayerEffectsManager.heatTransferRate = 1f; } if (flag2) { PlayerEffectsManager.heatTransferRate = 1f; } } public static void VehicleSnowTracksPatch_Prefix(v55VehicleController __instance) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) SnowTrackersManager.AddFootprintTracker((MonoBehaviour)(object)__instance, 6f, 0.75f, 1f, new Vector3(0f, 0f, -1f)); } public static void VehicleSnowTracksFixedUpdatePatch_Prefix(v55VehicleController __instance) { if (SnowPatches.IsSnowActive()) { bool flag = ((VehicleController)__instance).FrontLeftWheel.isGrounded || ((VehicleController)__instance).FrontRightWheel.isGrounded || ((VehicleController)__instance).BackLeftWheel.isGrounded || ((VehicleController)__instance).BackRightWheel.isGrounded; SnowTrackersManager.UpdateFootprintTracker((MonoBehaviour)(object)__instance, flag); } } public static void VFXUpdate_Postfix() { if (!((Object)(object)References.truckController == (Object)null) && (PlayerUtils.isPlayerOnTruck || PlayerUtils.seatedInTruck || PlayerUtils.isPlayerInStorage) && (PlayerUtils.seatedInTruck || PlayerUtils.isPlayerInStorage)) { PlayerEffectsManager.isUnderSnow = false; SnowfallVFXManager.snowMovementHindranceMultiplier = 1f; } } public static bool SetColdZoneState_Prefix(BlizzardWeather __instance) { if ((Object)(object)References.truckController == (Object)null) { return true; } if (PlayerUtils.isPlayerOnTruck || PlayerUtils.seatedInTruck || PlayerUtils.isPlayerInStorage) { return false; } return true; } public static bool SetBaseColdZoneState_Prefix(SnowfallWeather __instance) { if ((Object)(object)BlizzardWeather.Instance == (Object)null) { return true; } if ((Object)(object)References.truckController == (Object)null) { return true; } if (!PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage) { return true; } v55VehicleController truckController = References.truckController; bool flag = !truckController.liftGateOpen; bool flag2 = PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; bool flag3 = (Object)(object)localPlayerController.currentAudioTrigger != (Object)null && localPlayerController.currentAudioTrigger.insideLighting; if (PlayerUtils.seatedInTruck) { PlayerEffectsManager.isInColdZone = IsWindAllowedVehicle(localPlayerController, truckController) && BlizzardWeather.Instance.isLocalPlayerInWind; return false; } if (PlayerUtils.isPlayerInStorage) { if (flag) { PlayerEffectsManager.isInColdZone = !flag3; } else { PlayerEffectsManager.isInColdZone = IsWindAllowedVehicle(localPlayerController, truckController) && BlizzardWeather.Instance.isLocalPlayerInWind; } return false; } if (flag2) { PlayerEffectsManager.isInColdZone = IsWindAllowedVehicle(localPlayerController, truckController) && BlizzardWeather.Instance.isLocalPlayerInWind; return false; } return true; } public static bool Update_Prefix(BlizzardWeather __instance) { if ((Object)(object)References.truckController == (Object)null) { return true; } if (!PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage) { return true; } v55VehicleController truckController = References.truckController; bool flag = !truckController.liftGateOpen; bool flag2 = PlayerUtils.seatedInTruck || PlayerUtils.isPlayerInStorage; bool flag3 = PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; bool flag4 = (Object)(object)localPlayerController.currentAudioTrigger != (Object)null && localPlayerController.currentAudioTrigger.insideLighting; SnowfallWeather instance = SnowfallWeather.Instance; if (instance != null) { instance.Update(); } if (flag2) { PlayerEffectsManager.heatTransferRate = 0.75f; } if (flag3) { PlayerEffectsManager.heatTransferRate = 1f; __instance.isPlayerInBlizzard = __instance.isLocalPlayerInWind; } return false; } public static bool IsWindAllowedVehicle(PlayerControllerB localPlayer, v55VehicleController controller) { if ((Object)(object)localPlayer.currentAudioTrigger != (Object)null && localPlayer.currentAudioTrigger.insideLighting) { return false; } bool flag = !controller.liftGateOpen; bool flag2 = PlayerUtils.isPlayerOnTruck || PlayerUtils.seatedInTruck; if (PlayerUtils.isPlayerInStorage && !flag) { return true; } if (flag2) { return true; } return false; } public static bool CheckConditionsForHeatingStop_Prefix(PlayerControllerB playerController, ref bool __result) { if ((Object)(object)References.truckController == (Object)null) { return true; } if (!PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage) { return true; } v55VehicleController truckController = References.truckController; bool flag = !truckController.liftGateOpen; bool flag2 = PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage; bool flag3 = (Object)(object)playerController.currentAudioTrigger != (Object)null && playerController.currentAudioTrigger.insideLighting; if (PlayerUtils.isPlayerInStorage && flag) { __result = true; } else { __result = (flag3 ? true : false); } if (flag2) { __result = (flag3 ? true : false); } return false; } public static bool CheckConditionsForHeatingPause_Prefix(PlayerControllerB playerController, ref bool __result) { if ((Object)(object)References.truckController == (Object)null) { return true; } if (!PlayerUtils.isPlayerOnTruck && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerInStorage) { return true; } __result = false; return false; } } public 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(v55VehicleCollisionTrigger), "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_003b: 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_0091: 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_00a8: Unknown result type (might be due to invalid IL or missing references) v55VehicleController v55VehicleController = default(v55VehicleController); if (((Component)__instance).TryGetComponent(ref v55VehicleController)) { __instance.controller = (VehicleController)(object)v55VehicleController; __instance.PointsRegion = v55VehicleController.collisionTrigger.insideTruckNavMeshBounds; __instance.PikminCheckRegion = v55VehicleController.storageCompartment; __instance.PikminWarpPoint = new GameObject("Pikmin Warp Point").transform; __instance.PikminWarpPoint.SetParent(((Component)__instance).transform); __instance.PikminWarpPoint.localPosition = new Vector3(0f, -2f, -5f); __instance.PikminWarpPoint.localScale = new Vector3(1f, 1f, 1f); __instance.OriginalWTLocalPosition = __instance.PikminWarpPoint.localPosition; return false; } return true; } public static bool OnTriggerEnter_Prefix(v55VehicleCollisionTrigger __instance, ref 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 CruiserXLCollisionTrigger.OnTriggerEnterPrefix: {arg}"); return true; } return true; } } } namespace v55Cruiser.Behaviour { [MovedFrom("v55Cruiser.MonoBehaviours.Vehicles.v55Cruiser")] public class TruckPlayerZone : MonoBehaviour { public v55VehicleController controller = null; public bool hasLocalPlayer; public int priority; public float checkInterval; public void OnTriggerStay(Collider other) { if ((Object)(object)controller == (Object)null || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null || (Object)(object)((Component)GameNetworkManager.Instance.localPlayerController).gameObject == (Object)null || (Object)(object)((Component)other).gameObject != (Object)(object)((Component)GameNetworkManager.Instance.localPlayerController).gameObject || PlayerUtils.seatedInTruck) { return; } switch (priority) { case 1: if (!PlayerUtils.isPlayerInStorage) { PlayerUtils.isPlayerOnTruck = true; ResetTimer(hasPlayer: true); } break; case 2: PlayerUtils.isPlayerOnTruck = true; PlayerUtils.isPlayerInStorage = true; ResetTimer(hasPlayer: true); break; } } private void ResetTimer(bool hasPlayer) { checkInterval = 0f; hasLocalPlayer = hasPlayer; } private void Update() { if (PlayerUtils.seatedInTruck) { checkInterval = 0f; if (priority == 1) { hasLocalPlayer = true; } else { hasLocalPlayer = false; } } else if (PlayerUtils.isPlayerInStorage && priority == 1) { ResetTimer(hasPlayer: true); } else { if (!hasLocalPlayer) { return; } if (checkInterval <= 0.2f) { checkInterval += Time.deltaTime; return; } ResetTimer(hasPlayer: false); if (priority == 1) { PlayerUtils.isPlayerOnTruck = false; } else { PlayerUtils.isPlayerInStorage = false; } } } } [MovedFrom("v55Cruiser.MonoBehaviours.Vehicles.v55Cruiser")] public class v55InteriorType : MonoBehaviour { public Animator gearStickAnimator = null; public Animator verticalColumnAnimator = null; public VehiclePlayerSeat driverSeat = null; public VehiclePlayerSeat passengerSeat = null; public InteractTrigger driverSeatTrigger = null; public InteractTrigger passengerSeatTrigger = null; public Transform windWiper1 = null; public Transform windWiper2 = null; public Animator driverSeatSpringAnimator = null; public Animator ejectorButtonAnimator = null; public float cameraLookAngle; } public class VehiclePlayerPusher : MonoBehaviour { public v55VehicleController thisController = null; public void OnTriggerStay(Collider other) { //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: 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_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: 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_0106: 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_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) if (((Vector3)(ref ((VehicleController)thisController).averageVelocity)).magnitude > 8f) { return; } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null || (Object)(object)((Component)other).gameObject != (Object)(object)((Component)localPlayerController).gameObject || localPlayerController.isFallingFromJump || localPlayerController.isFallingNoJump) { return; } Transform physicsTransform = ((VehicleController)thisController).physicsRegion.physicsTransform; if (!((Object)(object)localPlayerController.physicsParent == (Object)(object)physicsTransform) && !((Object)(object)localPlayerController.overridePhysicsParent == (Object)(object)physicsTransform) && !PlayerUtils.seatedInTruck && !PlayerUtils.isPlayerOnTruck) { Vector3 val = ((Component)localPlayerController).transform.position - ((VehicleController)thisController).mainRigidbody.position; float num = Vector3.Angle(Vector3.Normalize(((VehicleController)thisController).averageVelocity * 1000f), Vector3.Normalize(val * 1000f)); if (!(num > 70f) && ((Vector3)(ref localPlayerController.externalForceAutoFade)).sqrMagnitude < ((Vector3)(ref ((VehicleController)thisController).averageVelocity)).sqrMagnitude) { localPlayerController.externalForceAutoFade = ((VehicleController)thisController).averageVelocity; } } } } public class VehiclePlayerSeat : MonoBehaviour { public RuntimeAnimatorController cachedPlayerAnimatorController = null; public Animator thisPlayerAnimator = null; public void ReplacePlayerAnimator(PlayerControllerB playerController, bool isLocalPlayer, InteractTrigger seatTrigger) { if (!((Object)(object)playerController == (Object)null) && !playerController.isPlayerDead && playerController.isPlayerControlled) { if (isLocalPlayer) { UncrouchPlayer(playerController); } PlayerUtils.ResetPlayerData(playerController); cachedPlayerAnimatorController = null; cachedPlayerAnimatorController = Object.Instantiate(playerController.playerBodyAnimator.runtimeAnimatorController); ((Object)cachedPlayerAnimatorController).name = "metarig"; thisPlayerAnimator = playerController.playerBodyAnimator; if (isLocalPlayer) { PlayerUtils.StoreParameters(playerController.playerBodyAnimator); } playerController.playerBodyAnimator.runtimeAnimatorController = References.truckPlayerAnimator; if (!isLocalPlayer) { playerController.playerBodyAnimator.ResetTrigger(PlayerUtils.stopAnimationID); playerController.playerBodyAnimator.ResetTrigger(seatTrigger.animationString); playerController.playerBodyAnimator.SetTrigger(seatTrigger.animationString); } } } public void ReturnPlayerAnimator(PlayerControllerB playerController, bool isLocalPlayer, InteractTrigger seatTrigger) { if ((Object)(object)playerController == (Object)null) { return; } if ((Object)(object)cachedPlayerAnimatorController != (Object)null) { playerController.playerBodyAnimator.runtimeAnimatorController = cachedPlayerAnimatorController; if (isLocalPlayer) { PlayerUtils.RestoreParameters(playerController.playerBodyAnimator); } } else if (isLocalPlayer) { playerController.playerBodyAnimator.runtimeAnimatorController = StartOfRound.Instance.localClientAnimatorController; } else { playerController.playerBodyAnimator.runtimeAnimatorController = StartOfRound.Instance.otherClientsAnimatorController; } if (isLocalPlayer) { playerController.playerBodyAnimator.ResetTrigger(PlayerUtils.stopAnimationID); UncrouchPlayer(playerController); } PlayerUtils.ResetPlayerData(playerController); cachedPlayerAnimatorController = null; thisPlayerAnimator = null; } public static void UncrouchPlayer(PlayerControllerB player) { player.isCrouching = false; player.playerBodyAnimator.SetBool("crouching", false); } } } 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 scandal.v55cruiser.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }