Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Version55 Company Cruiser v1.5.12
BepInEx/plugins/v55/scandal.v55cruiser.dll
Decompiled 7 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using FirstPersonView; using GameNetcodeStuff; using HarmonyLib; using LethalMin; using Microsoft.CodeAnalysis; using ScandalLib.Patches; using ScandalLib.Scripts; using ScandalsTweaks.Compatibility; using ScandalsTweaks.Patches.Enemies; using ScandalsTweaks.Utils; using Unity.Netcode; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.Rendering.HighDefinition; using VoxxWeatherPlugin.Patches; using VoxxWeatherPlugin.Utils; using VoxxWeatherPlugin.Weathers; using Woecust.ImmersiveVisor; using scandal.v55cruiser.NetcodePatcher; using v55Cruiser; using v55Cruiser.Compatibility; using v55Cruiser.Networking; using v55Cruiser.Patches; using v55Cruiser.Patches.Enemies; using v55Cruiser.Patches.InternalUtils; using v55Cruiser.Scripts; using v55Cruiser.Utils; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("FirstPersonView")] [assembly: IgnoresAccessChecksTo("ImmersiveVisor")] [assembly: IgnoresAccessChecksTo("NoteBoxz.LethalMin")] [assembly: IgnoresAccessChecksTo("scandal.scandallib")] [assembly: IgnoresAccessChecksTo("scandal.scandalstweaks")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("voxx.LethalElementsPlugin")] [assembly: AssemblyCompany("scandal.v55cruiser")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.5.12.0")] [assembly: AssemblyInformationalVersion("1.5.12+e5762e028649536ac218fe658db9e0c1248bd2fe")] [assembly: AssemblyProduct("v55Cruiser")] [assembly: AssemblyTitle("scandal.v55cruiser")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.5.12.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class v55VehicleCollisionTrigger : MonoBehaviour { public v55VehicleController mainScript; public BoxCollider insideTruckNavMeshBounds; public EnemyAI[] enemiesLastHit; private float timeSinceHittingPlayer; private float timeSinceHittingEnemy; private int enemyIndex; public void Start() { enemiesLastHit = (EnemyAI[])(object)new EnemyAI[3]; } public void OnTriggerEnter(Collider other) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_036c: 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_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Unknown result type (might be due to invalid IL or missing references) //IL_0385: 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_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_03c2: 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_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: 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_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_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: 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_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_0487: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0496: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04b5: Unknown result type (might be due to invalid IL or missing references) //IL_04b7: Unknown result type (might be due to invalid IL or missing references) //IL_04ca: Expected I4, but got Unknown //IL_04db: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04e8: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0207: 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_0260: Unknown result type (might be due to invalid IL or missing references) if (!((VehicleController)mainScript).hasBeenSpawned || (((VehicleController)mainScript).magnetedToShip && ((VehicleController)mainScript).magnetTime > 0.8f)) { return; } if (((Component)other).CompareTag("Player")) { PlayerControllerB val = default(PlayerControllerB); if (!((Component)other).TryGetComponent<PlayerControllerB>(ref val) || Time.realtimeSinceStartup - timeSinceHittingPlayer < 0.25f) { return; } Transform physicsTransform = ((VehicleController)mainScript).physicsRegion.physicsTransform; if ((Object)(object)val.overridePhysicsParent == (Object)(object)physicsTransform) { return; } float num = ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude; if (num < 2f) { return; } Vector3 val2 = ((Component)val).transform.position - ((VehicleController)mainScript).mainRigidbody.position; float num2 = Vector3.Angle(Vector3.Normalize(((VehicleController)mainScript).averageVelocity * 1000f), Vector3.Normalize(val2 * 1000f)); if (num2 > 70f) { return; } if (num2 < 30f && mainScript.wheelRPM > 400f) { num += 6f; } if ((((Component)val.gameplayCamera).transform.position - ((VehicleController)mainScript).mainRigidbody.position).y < -0.1f) { num *= 2f; } timeSinceHittingPlayer = Time.realtimeSinceStartup; Vector3 val3 = Vector3.ClampMagnitude(((VehicleController)mainScript).averageVelocity, 40f); if ((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { if ((Object)(object)physicsTransform == (Object)(object)GameNetworkManager.Instance.localPlayerController.physicsParent) { return; } if (num > 20f) { GameNetworkManager.Instance.localPlayerController.KillPlayer(val3, true, (CauseOfDeath)8, 0, default(Vector3), false); } else { int num3 = 0; if (num > 15f) { num3 = 80; } else if (num > 12f) { num3 = 60; } else if (num > 8f) { num3 = 40; } if (num3 > 0) { GameNetworkManager.Instance.localPlayerController.DamagePlayer(num3, true, true, (CauseOfDeath)8, 0, false, val3); } } if (!GameNetworkManager.Instance.localPlayerController.isPlayerDead && ((Vector3)(ref GameNetworkManager.Instance.localPlayerController.externalForceAutoFade)).sqrMagnitude < ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).sqrMagnitude) { GameNetworkManager.Instance.localPlayerController.externalForceAutoFade = ((VehicleController)mainScript).averageVelocity; } } else if (((NetworkBehaviour)mainScript).IsOwner && ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude > 1.8f) { mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, ((Component)val).transform.position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)0); } } else { EnemyAICollisionDetect val4 = default(EnemyAICollisionDetect); if (!((Component)other).gameObject.CompareTag("Enemy") || Time.realtimeSinceStartup - timeSinceHittingEnemy < 0.25f || !((Component)other).TryGetComponent<EnemyAICollisionDetect>(ref val4) || (Object)(object)val4.mainScript == (Object)null || val4.mainScript.isEnemyDead) { return; } if (val4.mainScript is SandWormAI) { timeSinceHittingEnemy = Time.realtimeSinceStartup; ((VehicleController)mainScript).mainRigidbody.AddExplosionForce(((VehicleController)mainScript).mainRigidbody.mass * 100f, ((Component)mainScript).transform.position + ((Component)mainScript).transform.forward + Vector3.up * 1.5f, 12f, 3f, (ForceMode)1); return; } EnemyAI obj = val4.mainScript; FlowerSnakeEnemy val5 = (FlowerSnakeEnemy)(object)((obj is FlowerSnakeEnemy) ? obj : null); if ((val5 != null && Object.op_Implicit((Object)(object)val5.clingingToPlayer)) || Vector3.Angle(((VehicleController)mainScript).averageVelocity, ((Component)val4.mainScript).transform.position - ((Component)this).transform.position) > 130f || (!mainScript.liftGateOpen && VehicleUtils.IsEnemyInTruck(val4.mainScript, insideTruckNavMeshBounds))) { 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 enemyDamageByCar = false; if (!ReactToInvidiualEnemies(val4, out enemyDamageByCar, position, dealDamage)) { NavSizeLimit sizeLimit = val4.mainScript.enemyType.SizeLimit; switch ((int)sizeLimit) { case 0: enemyDamageByCar = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 1f, val4.mainScript, dealDamage); break; case 1: enemyDamageByCar = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 3f, val4.mainScript, dealDamage); break; case 2: enemyDamageByCar = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 2f, val4.mainScript, dealDamage); break; } } if (enemyDamageByCar) { 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 bool ReactToInvidiualEnemies(EnemyAICollisionDetect enemyAIcollision, out bool enemyDamageByCar, Vector3 enemyPos, bool dealDamage) { //IL_001d: 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_0029: 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_0070: 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) enemyDamageByCar = false; if (enemyAIcollision.mainScript is BushWolfEnemy) { enemyDamageByCar = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, enemyPos, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 3f, enemyAIcollision.mainScript, dealDamage); return true; } if (enemyAIcollision.mainScript is BaboonBirdAI || enemyAIcollision.mainScript is MaskedPlayerEnemy) { enemyDamageByCar = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, enemyPos, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 2f, enemyAIcollision.mainScript, dealDamage); return true; } return false; } } public class v55VehicleController : VehicleController { [Header("Gimmicks/Variety")] public v55InteriorType LHDInterior; public v55InteriorType RHDInterior; public v55InteriorType currentInterior; public Transform v55HealthMeter; public Transform v56HealthMeter; public GameObject v55EngineBay; public GameObject v56EngineBay; public int interiorType; public bool isInteriorRHD; [Header("Pre-V55 Beta")] public MeshFilter mainBodyAltMeshFilter; public MeshFilter mainBodyAltLODMeshFilter; public MeshFilter mainBodyMeshFilter; public MeshFilter mainBodyLOD1MeshFilter; public MeshFilter mainBodyLOD2MeshFilter; [Header("Physics")] public List<WheelCollider> wheels; public v55VehicleCollisionTrigger collisionTrigger; public Rigidbody playerPhysicsBody; public WheelCollider backRightWheel; public WheelCollider centerRightWheel; public WheelCollider backLeftWheel; public WheelCollider frontRightWheel; public WheelCollider frontLeftWheel; public WheelCollider centerFrontWheel; public AnimationCurve steeringCurve; public bool useSteeringCurve; private WheelHit[] wheelHits = (WheelHit[])(object)new WheelHit[4]; public Vector3 previousVehiclePosition; public Quaternion previousVehicleRotation; public bool inBetaMode; public float tyreSteeringAngle; public float steeringAngle; public float currentMotorTorque; public float currentBrakeTorque = 2000f; public float maxBrakingTorque = 2000f; public float forwardWheelSpeed; public float reverseWheelSpeed; public float wheelsRPM; public float wheelRPM; public float frontWheelRPM; public float backWheelRPM; public bool backWheelsGrounded; public bool allWheelsAirborne; public float forwardsSlip; public float sidewaysSlip; public bool hasDeliveredVehicle; [Header("Networking/Player")] private bool receivedSyncData; public v55PhysicsRegion vehicleZone; public v55PlayerZone vehicleStorageZone; public Collider vehicleBounds; public Collider storageCompartment; public PlayerControllerB lastDriver; public PlayerControllerB playerWhoShifted; 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 bool forwardSlipping; public bool sidewaySlipping; public bool psuedoSlipping; public float tyreStress; public bool wheelSlipping; public float syncCarEffectsInterval; public float syncWheelTorqueInterval; public float syncCarDrivetrainInterval; public bool canDestroyTrees; private float syncedSongTime; [Header("VFX")] public InteractTrigger pushTruckTrigger; public Collider[] weatherEffectBlockers; public ParticleSystem frontTireSparks; public AnimationCurve engineAudio1Curve; public AnimationCurve engineAudio2Curve; public GameObject destroyedTruckMeshAlt; public MeshRenderer windshieldMesh; public GameObject windshieldObject; public GameObject carKeyInHand; public MeshRenderer radarMapIcon; public MeshRenderer radarMapDestroyedIcon; public InteractTrigger startIgnitionTrigger; public InteractTrigger stopIgnitionTrigger; public Animator ignitionAnimator; public GameObject carKeyContainer; public Animator verticalColumnAnimator; public Animator ejectorButtonAnimator; public GameObject ejectorButtonContainer; public Transform ignitionKeyPosition; private Transform leftHandServerItemTarget; public MeshRenderer frontLeftDoorMeshLOD; public MeshRenderer frontRightDoorMeshLOD; public MeshRenderer frontLeftDoorMesh; public MeshRenderer frontRightDoorMesh; public MeshRenderer steeringWheelMesh; public Material destroyedTruckMaterial; public Material greyLightOffMat; public Material redLightOffMat; public Transform tempPushTransform; public Light leftHeadlight; public Light rightHeadlight; private Vector3 ignitionKeyScale = Vector3.one; 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.02776055f, 0.1709576f, -0.1114562f); private Vector3 RHD_Pos_Server = new Vector3(-0.02314448f, 0.1360526f, -0.108739f); private Vector3 RHD_Rot_Local = new Vector3(22.679f, -8.263f, -158.794f); private Vector3 RHD_Rot_Server = new Vector3(9.026f, -18.147f, -162.389f); public bool isCabLightOn; public bool liftGateOpen; public bool disableAnimations; public bool inIgnitionAnimation; public float playerSteeringWheelAnimFloat; public float ignitionRotSpeed = 45f; private string STEERING_WHEEL_SPEED = "steeringWheelTurnSpeed"; private string ANIMATION_SPEED = "animationSpeed"; private string IGNITION_ANIM = "SAIgnition_Anim"; private string CAR_ANIM = "SA_CarAnim"; private string JUMP_WHILE_IN_CAR = "SA_JumpInCar"; private string CAR_MOTION_TIME = "SA_CarMotionTime"; private readonly string DOOR_ENTER_HOVERTIP = "Use door : [LMB]"; private readonly string DOOR_EXIT_HOVERTIP = "Exit : [LMB]"; private readonly string PLAYER_MOVEMENT = "Move"; [Header("Destruction")] public GameObject[] disableOnDestroy; public GameObject mainBodyContainer; public GameObject hoodDoorContainer; [Header("Audio")] public AudioSource carKeyAudio; public AudioSource ejectorButtonAudio; public AudioSource reverseWhineAudio; public AudioSource verticalColumnAudio; public AudioClip dashboardButton; public AudioClip engineRev1; public AudioClip revEngineStart1; public bool hasAdditionalMusic; public AudioClip radioBabyFace; public AudioClip radio1; public float timeLastSyncedRadio; public float radioPingTimestamp; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (!((NetworkBehaviour)this).NetworkManager.IsServer || StartOfRound.Instance.inShipPhase) { return; } int num = 0; bool value = UserConfig.PostBeta.Value; bool noTree = UserConfig.NoTreeDestruction.Value; bool value2 = UserConfig.AdditionalRadioMusic.Value; bool useAltSteering = UserConfig.AlternateSteering.Value && !value; if (!value) { if (UserConfig.RightHandedWheel.Value) { num = new Random(StartOfRound.Instance.randomMapSeed).Next(0, 2); } noTree = false; } SyncClientDataRpc(num, value, noTree, value2, useAltSteering); } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncClientDataRpc(int interiorType, bool postBetaMode, bool noTree, bool addExtraMusic, bool useAltSteering) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3614373412u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, interiorType); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref postBetaMode, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref noTree, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref addExtraMusic, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref useAltSteering, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3614373412u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!receivedSyncData) { receivedSyncData = true; useSteeringCurve = useAltSteering; SetInteriorType(interiorType); SetPostBetaMode(postBetaMode); canDestroyTrees = !noTree; hasAdditionalMusic = addExtraMusic; AddExtraRadioTracks(addExtraMusic); base.hasBeenSpawned = true; } } } public void SetInteriorType(int interiorType) { //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_00b1: 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_00eb: 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_011a: 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_0139: 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_0173: 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_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_022d: 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_0290: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0366: 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_03a0: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Unknown result type (might be due to invalid IL or missing references) 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)carKeyAudio).transform.localPosition = new Vector3(-0.5525f, ((Component)carKeyAudio).transform.localPosition.y, ((Component)carKeyAudio).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); ((Component)verticalColumnAnimator).transform.localPosition = new Vector3(-1.42f, 0.095f, 2.55f); ejectorButtonContainer.transform.localPosition = new Vector3(-0.3385f, -0.02501607f, 2.508915f); 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)carKeyAudio).transform.localPosition = new Vector3(0.5525f, ((Component)carKeyAudio).transform.localPosition.y, ((Component)carKeyAudio).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); ((Component)verticalColumnAnimator).transform.localPosition = new Vector3(1.42f, 0.095f, 2.55f); ejectorButtonContainer.transform.localPosition = new Vector3(0.3385f, -0.02501607f, 2.508915f); break; } v55InteriorType v55InteriorType = currentInterior; base.driverSeatTrigger = v55InteriorType.driverSeatTrigger; base.passengerSeatTrigger = v55InteriorType.passengerSeatTrigger; base.driverSeatSpringAnimator = v55InteriorType.driverSeatSpringAnimator; base.gearStickAnimator = v55InteriorType.gearStickAnimator; } public void SetPostBetaMode(bool postBetaMode) { //IL_00b3: 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_00de: 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_00f1: 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_0109: 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_003e: 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_0046: 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_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) inBetaMode = postBetaMode; if (inBetaMode) { JointSpring suspensionSpring = new JointSpring { spring = 2700f, damper = 500f, targetPosition = 0.5f }; base.FrontLeftWheel.suspensionSpring = suspensionSpring; base.FrontRightWheel.suspensionSpring = suspensionSpring; base.BackRightWheel.suspensionSpring = suspensionSpring; base.BackLeftWheel.suspensionSpring = suspensionSpring; base.FrontLeftWheel.sprungMass = 8.976847f; base.FrontRightWheel.sprungMass = 8.976847f; base.BackLeftWheel.sprungMass = 33.38108f; base.BackRightWheel.sprungMass = 33.38108f; } else { JointSpring suspensionSpring = new JointSpring { spring = 6200f, damper = 500f, targetPosition = 0.8f }; base.FrontLeftWheel.suspensionSpring = suspensionSpring; base.FrontRightWheel.suspensionSpring = suspensionSpring; base.BackRightWheel.suspensionSpring = suspensionSpring; base.BackLeftWheel.suspensionSpring = suspensionSpring; base.FrontLeftWheel.sprungMass = 15f; base.FrontRightWheel.sprungMass = 15f; base.BackLeftWheel.sprungMass = 55f; base.BackRightWheel.sprungMass = 55f; SetHeadlightMaterial(base.headlightsContainer.activeSelf); SetHeadlightShadows(setOn: true); } } public void SetHeadlightShadows(bool setOn = false) { leftHeadlight.shadows = (LightShadows)(setOn ? 2 : 0); rightHeadlight.shadows = (LightShadows)(setOn ? 2 : 0); } public void AddExtraRadioTracks(bool addExtraMusic) { if (addExtraMusic) { AudioClip[] array = (AudioClip[])(object)new AudioClip[base.radioClips.Length + 2]; array[0] = base.radioClips[0]; array[1] = radio1; array[2] = base.radioClips[1]; array[3] = base.radioClips[2]; array[4] = radioBabyFace; array[5] = base.radioClips[3]; base.radioClips = array; } } public void OnEnable() { VehicleUtils.truckController = this; } public void Awake() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.itemShip == (Object)null && (Object)(object)References.itemShip != (Object)null) { base.itemShip = References.itemShip; } base.ragdollPhysicsBody.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody1.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody2.interpolation = (RigidbodyInterpolation)1; playerPhysicsBody.interpolation = (RigidbodyInterpolation)0; playerPhysicsBody.freezeRotation = true; base.backDoorOpen = true; ((VehicleController)this).Awake(); base.physicsRegion.priority = 1; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; seatNodePositionOffset = Vector3.zero; playerPositionOffset = Vector3.zero; InitializeTruck(); } private void InitializeTruck() { //IL_0002: 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_022b: 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_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) base.gear = (CarGearShift)3; base.MaxEngineRPM = 300f; base.MinEngineRPM = 100f; base.engineIntensityPercentage = 180f; base.EngineTorque = 1100f; base.carAcceleration = 250f; base.idleSpeed = 15f; forwardWheelSpeed = 10000f; reverseWheelSpeed = -10000f; backRightWheel.sprungMass = 32.32506f; centerRightWheel.sprungMass = 21.03854f; backLeftWheel.sprungMass = 30.04548f; frontRightWheel.sprungMass = 9.794424f; frontLeftWheel.sprungMass = 18.06794f; centerFrontWheel.sprungMass = 4.012677f; base.mainRigidbody.drag = 0f; base.mainRigidbody.angularDrag = 0.5f; 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; currentBrakeTorque = maxBrakingTorque; base.pushForceMultiplier = 27f; base.pushVerticalOffsetAmount = 1f; base.steeringWheelTurnSpeed = 4f; base.torqueForce = 2.5f; SetWheelFriction(); base.FrontLeftWheel.brakeTorque = maxBrakingTorque; base.FrontRightWheel.brakeTorque = maxBrakingTorque; base.BackLeftWheel.brakeTorque = maxBrakingTorque; base.BackRightWheel.brakeTorque = maxBrakingTorque; 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; v55EngineBay.SetActive(true); v56EngineBay.SetActive(false); ((Component)v55HealthMeter).gameObject.SetActive(true); ((Component)v56HealthMeter).gameObject.SetActive(false); ((Component)base.turboMeter).gameObject.SetActive(false); if (((Component)v55HealthMeter).gameObject.activeSelf) { base.healthMeter = v55HealthMeter; } else { base.healthMeter = v56HealthMeter; } } private void SetWheelFriction() { //IL_0002: 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_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_00b6: 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_00ce: 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_009e: 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_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_00db: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StartCoroutine(SetRainCollision()); base.currentRadioClip = new Random(StartOfRound.Instance.randomMapSeed).Next(0, base.radioClips.Length); base.radioAudio.clip = base.radioClips[base.currentRadioClip]; base.decals = (DecalProjector[])(object)new DecalProjector[24]; if (StartOfRound.Instance.inShipPhase) { base.magnetedToShip = true; base.loadedVehicleFromSave = true; hasDeliveredVehicle = true; base.inDropshipAnimation = false; base.hasBeenSpawned = true; SetVehicleKinematic(setKinematic: true); ((Component)this).transform.position = StartOfRound.Instance.magnetPoint.position + StartOfRound.Instance.magnetPoint.forward * 7f; ((Component)this).transform.rotation = Quaternion.Euler(0f, 90f, 0f); StartMagneting(); } } public IEnumerator SetRainCollision() { yield return (object)new WaitForSeconds(4f); ParticleSystem[] array = (ParticleSystem[])(object)new ParticleSystem[13] { References.rainParticles, References.rainHitParticles, References.stormyRainParticles, References.stormyRainHitParticles, References.wesleyHurricaneRainParticles, References.wesleyHurricaneRainHitParticles, References.wesleyHurricaneSandParticles, References.wesleyForsakenRainParticles, References.wesleyForsakenRainHitParticles, References.kenjiAcidRainParticles, References.kenjiAcidRainHitParticles, References.kenjiAcidStormyRainParticles, References.kenjiAcidStormyRainHitParticles }; for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i] == (Object)null) { Plugin.LogDebug("Weather particle (or trigger) is null!"); continue; } TriggerModule trigger = array[i].trigger; for (int j = 0; j < weatherEffectBlockers.Length; j++) { int num = ((TriggerModule)(ref trigger)).colliderCount + j; ((TriggerModule)(ref trigger)).SetCollider(num, (Component)(object)weatherEffectBlockers[j]); } } } public void SendClientSyncData() { //IL_000e: 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_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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0032: 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) 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, inBetaMode, !canDestroyTrees, hasAdditionalMusic, useSteeringCurve); } public void SetBackDoorOpen(bool open) { liftGateOpen = open; } public void SetFrontCabinLightOn(bool setOn) { isCabLightOn = setOn; base.frontCabinLightContainer.SetActive(setOn); ((Renderer)base.frontCabinLightMesh).material = (setOn ? base.headlightsOnMat : base.headlightsOffMat); } public void StartTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted && !inIgnitionAnimation && (!inIgnitionAnimation || !startIgnitionTrigger.isBeingHeldByPlayer)) { CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: true)); TryIgnitionRpc(base.keyIsInIgnition, 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); base.currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 12); ignitionAnimator.SetInteger(IGNITION_ANIM, 12); if (inBetaMode) { yield return (object)new WaitForSeconds(0.035f); } else { yield return (object)new WaitForSeconds(0.02f); } carKeyAudio.PlayOneShot(base.twistKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.1467f); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); } else { SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 2); } ignitionAnimator.SetInteger(IGNITION_ANIM, 2); if (inBetaMode) { yield return (object)new WaitForSeconds(0.66f); carKeyAudio.PlayOneShot(base.insertKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); yield return (object)new WaitForSeconds(0.2f); carKeyAudio.PlayOneShot(base.twistKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); yield return (object)new WaitForSeconds(0.1f); } else { yield return (object)new WaitForSeconds(0.6f); carKeyAudio.PlayOneShot(base.insertKey); SetKeyIgnitionValues(keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.2f); carKeyAudio.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) { CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); disableAnimations = false; inIgnitionAnimation = false; PlayerControllerB currentDriver2 = base.currentDriver; if (currentDriver2 != null) { currentDriver2.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } SetKeyIgnitionValues(keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(base.keyIsInIgnition); StartIgnitionRpc(); } else { base.chanceToStartIgnition += 15f; base.chanceToStartIgnition = Mathf.Clamp(base.chanceToStartIgnition, 0f, 101f); } } [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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2843149083u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref cabLightActive, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2843149083u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionCoroutine(); 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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(41763978u, val3, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 41763978u, val3, val, (SendTo)1, (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; } public void CancelTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted && inIgnitionAnimation && (inIgnitionAnimation || !startIgnitionTrigger.isBeingHeldByPlayer)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; int integer = localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM); if (integer == 0 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 13); } else if ((integer == 2 || integer == 12) && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 3); } else { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } int integer2 = localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM); CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; int num = integer2; if (integer == 13) { num = 3; } ignitionAnimator.SetInteger(IGNITION_ANIM, num); CancelTryIgnitionRpc(base.keyIsInIgnition, isCabLightOn, integer2, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelTryIgnitionRpc(bool setKeyInSlot, bool cabLightActive, int playerAnimIndex, int ignitionAnimIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3795050472u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref cabLightActive, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerAnimIndex); BytePacker.WriteValueBitPacked(val2, ignitionAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3795050472u, val3, val, (SendTo)1, (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(CAR_ANIM, playerAnimIndex); } ignitionAnimator.SetInteger(IGNITION_ANIM, ignitionAnimIndex); if (!inBetaMode && setKeyInSlot && !base.keyIsInIgnition) { carKeyAudio.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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3842753156u, val3, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3842753156u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); disableAnimations = false; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } SetKeyIgnitionValues(keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(base.keyIsInIgnition); } } 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) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); RemoveKeyFromIgnitionRpc(); } } private IEnumerator RemoveKey() { disableAnimations = true; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 6); } ignitionAnimator.SetInteger(IGNITION_ANIM, 6); yield return (object)new WaitForSeconds(0.26f); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); carKeyAudio.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 val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(488072872u, val3, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 488072872u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.ignitionStarted) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); } } } public void CancelIgnitionAnimation(bool ignitionOn, bool setIgnitionAnim) { CancelIgnitionCoroutine(); base.carEngine1AudioActive = ignitionOn; base.keyIsInDriverHand = false; if (setIgnitionAnim) { ignitionAnimator.SetInteger(IGNITION_ANIM, ignitionOn ? 1 : 0); } } private void CancelIgnitionCoroutine() { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } } 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; } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelSetPlayerInVehicleRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3234968899u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3234968899u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)(object)val4)) { InteractTriggerPatches.CancelVehicleSeatInteraction(); } } } public void SetDriverInVehicle() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) SetDriverInVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetDriverInVehicleServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(654436887u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 654436887u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled || (Object)(object)base.currentDriver != (Object)null) { CancelSetPlayerInVehicleRpc(playerId); return; } base.currentDriver = val3; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(rpcParams.Receive.SenderClientId); SetDriverInVehicleOwnerRpc(); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInVehicleOwnerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1768221808u, val3, val, (SendTo)0, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1768221808u, val3, val, (SendTo)0, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((VehicleSeatAnimator)currentInterior.driverSeat).SetLocalPlayerIntoSeat(); ActivateControl(); InteractTrigger trigger = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); AnimatedObjectTrigger val4 = (isInteriorRHD ? base.passengerSideDoor : base.driverSideDoor); SetTriggerHoverTip(trigger, DOOR_EXIT_HOVERTIP); startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionCoroutine(); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetFloat(ANIMATION_SPEED, 0.5f); playerSteeringWheelAnimFloat = 0.5f; syncedPlayerSteeringAnim = 0.5f; if (isCabLightOn && !base.keyIsInIgnition) { SetFrontCabinLightOn(setOn: false); } if (base.keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } else if (base.ignitionStarted) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } else { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } int integer = GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM); if (val4.boolValue) { val4.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } SetDriverInVehicleNotOwnerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, isCabLightOn, base.keyIsInIgnition, base.ignitionStarted, integer); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInVehicleNotOwnerRpc(int playerId, bool setCabinLight, bool setKeyInSlot, bool setStarted, int playerAnimIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3977993951u, val3, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setCabinLight, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setStarted, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3977993951u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val4 == (Object)null) { Plugin.LogError("SetDriverInVehicleNotOwnerRpc failed to find player object reference from player client id!"); return; } base.currentDriver = val4; disableAnimations = !setStarted; inIgnitionAnimation = false; ((VehicleSeatAnimator)currentInterior.driverSeat).SetPlayerAnimations(val4, false); startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionCoroutine(); val4.playerBodyAnimator.SetFloat(ANIMATION_SPEED, 0.5f); playerSteeringWheelAnimFloat = 0.5f; syncedPlayerSteeringAnim = 0.5f; SetIgnition(setStarted, setCabinLight); base.keyIsInIgnition = setKeyInSlot; val4.playerBodyAnimator.SetInteger(CAR_ANIM, playerAnimIndex); InteractTrigger val5 = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); val5.interactable = false; } } public void OnDriverExitVehicle() { //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening && !((Object)(object)base.currentDriver != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { base.localPlayerInControl = false; InteractTrigger trigger = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); SetTriggerHoverTip(trigger, DOOR_ENTER_HOVERTIP); disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); 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; OnDriverExitVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, base.syncedPosition, base.syncedRotation, base.drivePedalPressed, base.brakePedalPressed, base.keyIsInIgnition, base.ignitionStarted, isCabLightOn); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitVehicleServerRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setGasPedal, bool setBrakePedal, bool setKeyInSlot, bool setStarted, bool setCabinLight) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_0107: 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_0121: 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_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(360937913u, val3, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setGasPedal, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setBrakePedal, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setStarted, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setCabinLight, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 360937913u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OnDriverExitVehicleRpc(playerId, carLocation, carRotation, setGasPedal, setBrakePedal, setKeyInSlot, setStarted, setCabinLight); ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(0uL); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitVehicleRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setGasPedal, bool setBrakePedal, bool setKeyInSlot, bool setStarted, bool setCabinLight) { //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_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2999731395u, val3, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setGasPedal, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setBrakePedal, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setStarted, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setCabinLight, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2999731395u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val4 == (Object)null) { Plugin.LogError("OnDriverExitVehicleRpc failed to find player object reference from player client id!"); return; } if ((Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)(object)val4) { Plugin.LogDebug("OnDriverExitVehicleRpc player argument was the previous occupant!"); return; } base.syncedPosition = carLocation; base.syncedRotation = carRotation; base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = null; ((VehicleSeatAnimator)currentInterior.driverSeat).ReturnPlayerAnimations(val4, false); base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = setStarted; if (base.ignitionStarted && !base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Play(); } else if (!base.ignitionStarted && base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, setCabinLight); InteractTrigger val5 = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); val5.interactable = true; } public void SetPassengerInVehicle() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) SetPassengerInVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInVehicleServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(584257588u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 584257588u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if ((Object)(object)val3 == (Object)null || val3.isPlayerDead || !val3.isPlayerControlled || (Object)(object)base.currentPassenger != (Object)null) { CancelSetPlayerInVehicleRpc(playerId); return; } base.currentPassenger = val3; SetPassengerInVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInVehicleRpc(NetworkBehaviourReference playerNetObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1770646454u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1770646454u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet<PlayerControllerB>(ref val4, (NetworkManager)null)) { Plugin.LogError("SetPassengerInVehicleRpc failed to find player object reference from network behaviour!"); return; } val4.playerBodyAnimator.SetInteger(CAR_ANIM, 0); InteractTrigger val5 = (isInteriorRHD ? base.driverSideDoorTrigger : base.passengerSideDoorTrigger); if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { ((VehicleSeatAnimator)currentInterior.passengerSeat).SetLocalPlayerIntoSeat(); base.localPlayerInPassengerSeat = true; AnimatedObjectTrigger val6 = (isInteriorRHD ? base.driverSideDoor : base.passengerSideDoor); SetTriggerHoverTip(val5, DOOR_EXIT_HOVERTIP); if (val6.boolValue) { val6.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)currentInterior.passengerSeat).SetPlayerAnimations(val4, false); val5.interactable = false; } base.currentPassenger = val4; val4.playerBodyAnimator.SetFloat(ANIMATION_SPEED, 0.5f); } public void OnPassengerExitVehicle() { //IL_0094: 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) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening && !((Object)(object)base.currentPassenger != (Object)(object)GameNetworkManager.Instance.localPlayerController)) { base.localPlayerInPassengerSeat = false; InteractTrigger trigger = (isInteriorRHD ? base.driverSideDoorTrigger : base.passengerSideDoorTrigger); SetTriggerHoverTip(trigger, DOOR_ENTER_HOVERTIP); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); base.currentPassenger = null; OnPassengerExitVehicleRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnPassengerExitVehicleRpc(NetworkBehaviourReference playerNetObjRef, Vector3 exitPoint) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(330444899u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkBehaviourReference>(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendRpc(ref val2, 330444899u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet<PlayerControllerB>(ref val4, (NetworkManager)null)) { Plugin.LogError("OnPassengerExitVehicleRpc failed to find player object reference from network behaviour!"); return; } ((VehicleSeatAnimator)currentInterior.passengerSeat).ReturnPlayerAnimations(val4, false); val4.playerBodyAnimator.SetInteger(CAR_ANIM, 0); val4.TeleportPlayer(exitPoint, false, 0f, false, true); base.currentPassenger = null; InteractTrigger val5 = (isInteriorRHD ? base.driverSideDoorTrigger : base.passengerSideDoorTrigger); val5.interactable = true; } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverLeaveGameServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(922548461u, val3, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 922548461u, val3, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(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 setCabLight) { //IL_00b2: 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.startKe