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.4.1
BepInEx/plugins/v55/scandal.v55cruiser.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.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 GameNetcodeStuff; using HarmonyLib; using LethalMin; using Microsoft.CodeAnalysis; using ScandalsTweaks.Patches; using ScandalsTweaks.Scripts; 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.Scripts; using v55Cruiser.Utils; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ImmersiveVisor")] [assembly: IgnoresAccessChecksTo("NoteBoxz.LethalMin")] [assembly: IgnoresAccessChecksTo("scandal.scandalstweaks")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("voxx.LethalElementsPlugin")] [assembly: AssemblyCompany("scandal.v55cruiser")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.4.1.0")] [assembly: AssemblyInformationalVersion("1.4.1+9ca65b399502caf978de31f57e0dfb9b3cbfb6f1")] [assembly: AssemblyProduct("v55Cruiser")] [assembly: AssemblyTitle("scandal.v55cruiser")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.4.1.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class v55VehicleCollisionTrigger : MonoBehaviour { public v55VehicleController mainScript = null; public BoxCollider insideTruckNavMeshBounds = null; public EnemyAI[] enemiesLastHit = null; private float timeSinceHittingPlayer; private float timeSinceHittingEnemy; private int enemyIndex; public void Start() { enemiesLastHit = (EnemyAI[])(object)new EnemyAI[3]; } public void OnTriggerEnter(Collider other) { //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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_043e: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_0458: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04c5: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) //IL_04d5: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0549: Unknown result type (might be due to invalid IL or missing references) //IL_055a: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_034a: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_060e: 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_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_0639: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Expected I4, but got Unknown //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06d8: 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 && (((Collider)insideTruckNavMeshBounds).ClosestPoint(((Component)val4.mainScript).transform.position) == ((Component)val4.mainScript).transform.position || ((Collider)insideTruckNavMeshBounds).ClosestPoint(val4.mainScript.agent.destination) == val4.mainScript.agent.destination))) { return; } bool dealDamage = false; for (int i = 0; i < enemiesLastHit.Length; i++) { if ((Object)(object)enemiesLastHit[i] == (Object)(object)val4.mainScript && (Time.realtimeSinceStartup - timeSinceHittingEnemy < 0.6f || ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude < 4f)) { dealDamage = true; } } timeSinceHittingEnemy = Time.realtimeSinceStartup; Vector3 position = ((Component)val4).transform.position; bool enemyDamageByCar = false; if (!ReactToInvidiualEnemies(val4, out enemyDamageByCar, position, dealDamage)) { NavSizeLimit sizeLimit = val4.mainScript.enemyType.SizeLimit; NavSizeLimit val6 = sizeLimit; switch ((int)val6) { 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_0024: 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0089: 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 = null; public v55InteriorType RHDInterior = null; public v55InteriorType currentInterior = null; public Transform v55HealthMeter = null; public Transform v56HealthMeter = null; public GameObject v55EngineBay = null; public GameObject v56EngineBay = null; public int interiorType; public bool isInteriorRHD; [Header("Pre-V55 Beta")] public MeshFilter mainBodyAltMeshFilter = null; public MeshFilter mainBodyAltLODMeshFilter = null; public MeshFilter mainBodyMeshFilter = null; public MeshFilter mainBodyLOD1MeshFilter = null; public MeshFilter mainBodyLOD2MeshFilter = null; [Header("Physics")] public List<WheelCollider> wheels = null; public v55VehicleCollisionTrigger collisionTrigger = null; public Rigidbody playerPhysicsBody = null; public WheelCollider backRightWheel = null; public WheelCollider centerRightWheel = null; public WheelCollider backLeftWheel = null; public WheelCollider frontRightWheel = null; public WheelCollider frontLeftWheel = null; public WheelCollider centerFrontWheel = null; 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")] public v55PhysicsRegion vehicleZone = null; public v55PlayerZone vehicleStorageZone = null; public Collider vehicleBounds = null; public Collider storageCompartment = null; public PlayerControllerB lastDriver = null; public PlayerControllerB playerWhoShifted = null; public Vector3 playerPositionOffset; public Vector3 seatNodePositionOffset; public Vector2 syncedMoveInputVector; public float syncedPlayerSteeringAnim; public float syncedWheelRotation; public float syncedSteeringInput; public float syncedFrontWheelRPM; public float syncedBackWheelRPM; public float syncedWheelRPM; public float syncedEngineRPM; public float syncedMotorTorque; public float syncedBrakeTorque; public int syncedCarHP; public bool syncedDrivePedalPressed; public bool syncedBrakePedalPressed; public 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; public bool preBetaMode; private float syncedSongTime; 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"; [Header("VFX")] public InteractTrigger pushTruckTrigger = null; public Collider[] weatherEffectBlockers = null; public ParticleSystem frontTireSparks = null; public AnimationCurve engineAudio1Curve = null; public AnimationCurve engineAudio2Curve = null; public GameObject destroyedTruckMeshAlt = null; public GameObject windshieldMesh = null; public GameObject carKeyInHand = null; public MeshRenderer radarMapIcon = null; public MeshRenderer radarMapDestroyedIcon = null; public InteractTrigger startIgnitionTrigger = null; public InteractTrigger stopIgnitionTrigger = null; public Animator ignitionAnimator = null; public GameObject carKeyContainer = null; public Animator verticalColumnAnimator = null; public Animator ejectorButtonAnimator = null; public GameObject ejectorButtonContainer = null; public Transform ignitionKeyPosition = null; private Transform leftHandServerItemTarget = null; public MeshRenderer frontLeftDoorMesh = null; public MeshRenderer frontRightDoorMesh = null; public MeshRenderer steeringWheelMesh = null; public Material destroyedTruckMaterial = null; public Material greyLightOffMat = null; public Material redLightOffMat = null; 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.01708288f, 0.1665026f, -0.1157278f); private Vector3 RHD_Pos_Server = new Vector3(-0.0194879f, 0.1340649f, -0.1071167f); private Vector3 RHD_Rot_Local = new Vector3(21.592f, -11.63f, -158.578f); private Vector3 RHD_Rot_Server = new Vector3(-9.158f, -18.16f, -162.445f); public bool isCabLightOn; public bool liftGateOpen; public bool disableAnimations; public bool inIgnitionAnimation; public float playerSteeringWheelAnimFloat; public float ignitionRotSpeed = 45f; [Header("Destruction")] public GameObject[] disableOnDestroy = null; public GameObject mainBodyContainer = null; public GameObject hoodDoorContainer = null; [Header("Audio")] public AudioSource carKeyAudio = null; public AudioSource ejectorButtonAudio = null; public AudioSource reverseWhineAudio = null; public AudioSource verticalColumnAudio = null; public AudioClip dashboardButton = null; public AudioClip engineRev1 = null; public AudioClip revEngineStart1 = null; public AudioClip radio_BabyFace = null; public float timeLastSyncedRadio; public float radioPingTimestamp; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (!((NetworkBehaviour)this).IsServer || StartOfRound.Instance.inShipPhase) { return; } int num = 0; bool value = UserConfig.PostBeta.Value; bool noTree = UserConfig.NoTreeDestruction.Value; bool value2 = UserConfig.BabyFaceRadio.Value; if (!value) { if (UserConfig.RightHandedWheel.Value) { num = new Random(StartOfRound.Instance.randomMapSeed).Next(0, 2); } preBetaMode = false; noTree = false; } SetAndSyncCruiserDataRpc(num, value, noTree, value2); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetAndSyncCruiserDataRpc(int interiorType, bool postBetaMode, bool noTree, bool babyFace) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3603618885u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, interiorType); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref postBetaMode, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref noTree, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref babyFace, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3603618885u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetInteriorType(interiorType); SetPostBetaMode(postBetaMode); canDestroyTrees = !noTree; SetBabyFace(babyFace); base.hasBeenSpawned = true; } } } public void SetInteriorType(int interiorType) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_009b: 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_00ba: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0336: 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_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03e6: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_044f: Unknown result type (might be due to invalid IL or missing references) //IL_0474: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) inBetaMode = postBetaMode; if (inBetaMode) { JointSpring val = default(JointSpring); val.spring = 2700f; val.damper = 500f; val.targetPosition = 0.5f; JointSpring suspensionSpring = val; base.FrontLeftWheel.suspensionSpring = suspensionSpring; base.FrontRightWheel.suspensionSpring = suspensionSpring; base.BackRightWheel.suspensionSpring = suspensionSpring; base.BackLeftWheel.suspensionSpring = suspensionSpring; base.FrontLeftWheel.sprungMass = 8.976847f; base.FrontRightWheel.sprungMass = 8.976847f; base.BackLeftWheel.sprungMass = 33.38108f; base.BackRightWheel.sprungMass = 33.38108f; } else { JointSpring val = default(JointSpring); val.spring = 6200f; val.damper = 500f; val.targetPosition = 0.8f; JointSpring suspensionSpring = val; 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; } } public void SetBabyFace(bool babyFace) { if (babyFace) { base.radioClips = CollectionExtensions.AddToArray<AudioClip>(base.radioClips, radio_BabyFace); } } public void OnEnable() { References.truckController = this; } public void Awake() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) 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; SetTruckStats(); } private void SetTruckStats() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: 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_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) WheelFrictionCurve val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 0.2f; ((WheelFrictionCurve)(ref val)).extremumValue = 1f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 0.4f; ((WheelFrictionCurve)(ref val)).stiffness = 2.7f; base.FrontLeftWheel.forwardFriction = val; base.FrontRightWheel.forwardFriction = val; ((WheelFrictionCurve)(ref val)).stiffness = 0.75f; base.BackLeftWheel.forwardFriction = val; base.BackRightWheel.forwardFriction = val; ((WheelFrictionCurve)(ref val)).stiffness = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 0.75f; ((WheelFrictionCurve)(ref val)).extremumSlip = 0.7f; base.FrontLeftWheel.sidewaysFriction = val; base.FrontRightWheel.sidewaysFriction = val; base.BackLeftWheel.sidewaysFriction = val; base.BackRightWheel.sidewaysFriction = val; } public void Start() { //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StartCoroutine(SetCarRainCollisions()); base.currentRadioClip = new Random(StartOfRound.Instance.randomMapSeed).Next(0, base.radioClips.Length); base.radioAudio.clip = base.radioClips[base.currentRadioClip]; base.decals = (DecalProjector[])(object)new DecalProjector[24]; if (StartOfRound.Instance.inShipPhase) { base.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 SetCarRainCollisions() { yield return (object)new WaitForSeconds(4f); ParticleSystem[] particleTriggers = (ParticleSystem[])(object)new ParticleSystem[9] { GlobalReferences.rainParticles, GlobalReferences.rainHitParticles, GlobalReferences.stormyRainParticles, GlobalReferences.stormyRainHitParticles, GlobalReferences.wesleyHurricaneRainParticles, GlobalReferences.wesleyHurricaneRainHitParticles, GlobalReferences.wesleyHurricaneSandParticles, GlobalReferences.wesleyForsakenRainParticles, GlobalReferences.wesleyForsakenRainHitParticles }; for (int i = 0; i < particleTriggers.Length; i++) { if ((Object)(object)particleTriggers[i] == (Object)null) { Plugin.Logger.LogDebug((object)"V55: Weather particle (or trigger) is null!"); continue; } TriggerModule trigger = particleTriggers[i].trigger; for (int j = 0; j < weatherEffectBlockers.Length; j++) { int index = ((TriggerModule)(ref trigger)).colliderCount + j; ((TriggerModule)(ref trigger)).SetCollider(index, (Component)(object)weatherEffectBlockers[j]); } trigger = default(TriggerModule); } } public void SendClientSyncData() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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_0038: 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) 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; } bool value = UserConfig.PostBeta.Value; bool noTree = UserConfig.NoTreeDestruction.Value; if (!value) { noTree = false; } bool value2 = UserConfig.BabyFaceRadio.Value; SetAndSyncCruiserDataRpc(interiorType, value, noTree, value2); } public void SetBackDoorOpen(bool open) { liftGateOpen = open; } public void SetFrontCabinLightOn(bool setOn) { isCabLightOn = setOn; if (!preBetaMode) { base.frontCabinLightContainer.SetActive(setOn); ((Renderer)base.frontCabinLightMesh).material = (setOn ? base.headlightsOnMat : base.headlightsOffMat); } } public void StartTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted) { 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); if (base.currentDriver.playerBodyAnimator.GetInteger(CAR_ANIM) == 3) { base.currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 2); } else { base.currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 12); } int animIndex = base.currentDriver.playerBodyAnimator.GetInteger(CAR_ANIM); ignitionAnimator.SetInteger(IGNITION_ANIM, animIndex); 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 { PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 2); } ignitionAnimator.SetInteger(IGNITION_ANIM, 2); SetKeyIgnitionValues(keyInHand: true, keyInSlot: false); 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, 99f); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryIgnitionRpc(bool setKeyInSlot, bool cabLightActive) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2843149083u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref cabLightActive, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2843149083u, val2, 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(41763978u, val2, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 41763978u, val2, 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; if ((Object)(object)base.engineAudio1.clip == (Object)(object)revEngineStart1) { base.engineAudio1.pitch = 1f; } } public void CancelTryCarIgnition() { if (base.localPlayerInControl && !base.ignitionStarted && base.keyIgnitionCoroutine != null && (base.keyIgnitionCoroutine != null || !startIgnitionTrigger.isBeingHeldByPlayer)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM) == 2 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 3); } else if (localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM) == 12 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 3); } else { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; int integer = localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM); int num = integer; if (integer == 13) { num = 3; } ignitionAnimator.SetInteger(IGNITION_ANIM, num); CancelTryIgnitionRpc(base.keyIsInIgnition, isCabLightOn, integer, 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3795050472u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref cabLightActive, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val3, playerAnimIndex); BytePacker.WriteValueBitPacked(val3, ignitionAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3795050472u, val2, 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3842753156u, val2, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3842753156u, val2, 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()); base.chanceToStartIgnition = 20f; 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(488072872u, val2, val, (SendTo)1, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 488072872u, val2, 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; } public void SetDriverInCar() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) SetDriverInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetDriverInCarServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2045075206u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2045075206u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val3 == (Object)null) && !val3.isPlayerDead && val3.isPlayerControlled && !((Object)(object)base.currentDriver != (Object)null)) { base.currentDriver = val3; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(rpcParams.Receive.SenderClientId); SetDriverInCarOwnerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetDriverInCarOwnerRpc(NetworkBehaviourReference playerNetObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1327850510u, val2, val, (SendTo)0, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkBehaviourReference>(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1327850510u, val2, val, (SendTo)0, (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.Logger.LogError((object)"V55: SetDriverIntoCarOwnerRpc failed to find player object reference from network behaviour!"); return; } PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)currentInterior.driverSeat).SetLocalPlayerIntoSeat(); ActivateControl(); InteractTrigger trigger = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); AnimatedObjectTrigger val5 = (isInteriorRHD ? base.passengerSideDoor : base.driverSideDoor); SetTriggerHoverTip(trigger, "Exit : [LMB]"); 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 (val5.boolValue) { val5.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } SetDriverInCarNotOwnerRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val4), isCabLightOn, base.keyIsInIgnition, base.ignitionStarted, integer); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarNotOwnerRpc(NetworkBehaviourReference playerNetObjRef, bool setCabLight, bool setKeyInSlot, bool engineStarted, int currentAnimIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2406511531u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkBehaviourReference>(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setCabLight, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref engineStarted, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val3, currentAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2406511531u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet<PlayerControllerB>(ref val4, (NetworkManager)null)) { Plugin.Logger.LogError((object)"V55: SetDriverIntoCarNotOwnerRpc failed to find player object reference from network behaviour!"); return; } base.currentDriver = val4; ((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(engineStarted, setCabLight); base.keyIsInIgnition = setKeyInSlot; val4.playerBodyAnimator.SetInteger(CAR_ANIM, currentAnimIndex); } } public void OnDriverExitCar() { //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening) { PlayerUtils.disableAnimationSync = false; base.localPlayerInControl = false; InteractTrigger trigger = (isInteriorRHD ? base.passengerSideDoorTrigger : base.driverSideDoorTrigger); SetTriggerHoverTip(trigger, "Use door : [LMB]"); disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); GlobalUtilities.ResetHUDToolTips(GameNetworkManager.Instance.localPlayerController); if ((Object)(object)base.currentDriver != (Object)(object)GameNetworkManager.Instance.localPlayerController) { HUDManager.Instance.DisplayTip("Err?", "This state should not occur! aborting!", false, false, "LC_Tip1"); return; } DisableControl(); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, isCabLightOn); base.chanceToStartIgnition = 10f; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; OnDriverExitCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), base.syncedPosition, base.syncedRotation, base.drivePedalPressed, base.brakePedalPressed, base.keyIsInIgnition, base.ignitionStarted, isCabLightOn); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverExitCarRpc(NetworkBehaviourReference playerNetObjRef, Vector3 carLocation, Quaternion carRotation, bool gasFloored, bool brakeFloored, bool setKeyInSlot, bool engineStarted, bool accessoriesActive) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: 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_01bd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3401388119u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkBehaviourReference>(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carLocation); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref carRotation); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref gasFloored, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref brakeFloored, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref engineStarted, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref accessoriesActive, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3401388119u, val2, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)this).IsServer) { ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(0uL); } PlayerControllerB val4 = default(PlayerControllerB); if (!((NetworkBehaviourReference)(ref playerNetObjRef)).TryGet<PlayerControllerB>(ref val4, (NetworkManager)null)) { Plugin.Logger.LogError((object)"V55: OnDriverExitRpc failed to find player object reference from network behaviour!"); return; } base.syncedPosition = carLocation; base.syncedRotation = carRotation; base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = null; ((VehicleSeatAnimator)currentInterior.driverSeat).ReturnPlayerAnimations(val4, false); base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = engineStarted; if (base.ignitionStarted && !base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Play(); } else if (!base.ignitionStarted && base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; startIgnitionTrigger.isBeingHeldByPlayer = false; stopIgnitionTrigger.isBeingHeldByPlayer = false; CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, accessoriesActive); base.chanceToStartIgnition = 10f; } public void SetPassengerInCar() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) SetPassengerInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInCarServerRpc(int playerId, RpcParams rpcParams = default(RpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3097541392u, rpcParams, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3097541392u, rpcParams, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val3 == (Object)null) && !val3.isPlayerDead && val3.isPlayerControlled && !((Object)(object)base.currentPassenger != (Object)null)) { base.currentPassenger = val3; SetPassengerInCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)val3)); } } } [Rpc(/*Could not decode attribute arguments.*/)] protected void SetPassengerInCarRpc(NetworkBehaviourReference playerNetObjRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2563769890u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkBehaviourReference>(ref playerNetObjRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2563769890u, val2, 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.Logger.LogError((object)"V55: SetPassengerInCarRpc failed to find player object reference from network behaviour!"); return; } if ((Object)(object)val4 == (Object)(object)GameNetworkManager.Instance.localPlayerController) { PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)currentInterior.passengerSeat).SetLocalPlayerIntoSeat(); base.localPlayerInPassengerSeat = true; InteractTrigger trigger = (isInteriorRHD ? base.driverSideDoorTrigger : base.passengerSideDoorTrigger); AnimatedObjectTrigger val5 = (isInteriorRHD ? base.driverSideDoor : base.passengerSideDoor); SetTriggerHoverTip(trigger, "Exit : [LMB]"); if (val5.boolValue) { val5.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } } else { ((VehicleSeatAnimator)currentInterior.passengerSeat).SetPlayerAnimations(val4, false); } base.currentPassenger = val4; val4.playerBodyAnimator.SetFloat(ANIMATION_SPEED, 0.5f); } public void OnPassengerExitCar() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening) { PlayerUtils.disableAnimationSync = false; base.localPlayerInPassengerSeat = false; InteractTrigger trigger = (isInteriorRHD ? base.driverSideDoorTrigger : base.passengerSideDoorTrigger); SetTriggerHoverTip(trigger, "Use door : [LMB]"); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); base.currentPassenger = null; OnPassengerExitCarRpc(NetworkBehaviourReference.op_Implicit((NetworkBehaviour)(object)GameNetworkManager.Instance.localPlayerController), ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnPassengerExitCarRpc(NetworkBehaviourReference playerNetObjRef, Vector3 exitPoint) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1712975515u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<NetworkBehaviourReference>(ref playerNetObjRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val3)).WriteValueSafe(ref exitPoint); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1712975515u, val2, 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.Logger.LogError((object)"V55: OnPassengerExitCarRpc 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; } } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelSetPlayerInVehicleClientRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1393046261u, val2, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1393046261u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((int)GameNetworkManager.Instance.localPlayerController.playerClientId == playerId) { HUDManager.Instance.DisplayTip("Kicked from vehicle", "You have been forcefully kicked to prevent a softlock!", false, false, "LC_Tip1"); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverLeaveGameServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(922548461u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 922548461u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null)) { ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(StartOfRound.Instance.allPlayerScripts[0].actualClientId); OnDriverLeave(val4, base.ignitionStarted, base.keyIsInIgnition, base.drivePedalPressed, base.brakePedalPressed, isCabLightOn); OnDriverLeaveGameRpc(playerId, base.syncedPosition, base.syncedRotation, base.ignitionStarted, base.keyIsInIgnition, base.drivePedalPressed, base.brakePedalPressed, isCabLightOn); } } } public void OnDriverLeave(PlayerControllerB playerController, bool setIgnitionState, bool setKeyInSlot, bool gasFloored, bool brakeFloored, bool setCabLight) { //IL_00c3: Unknown result type (might be due to invalid IL or missing references) base.drivePedalPressed = false; base.brakePedalPressed = false; base.currentDriver = null; base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = setIgnitionState; if (base.ignitionStarted && !base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Play(); } else if (!base.ignitionStarted && base.carExhaustParticle.isEmitting) { base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } disableAnimations = !base.ignitionStarted; inIgnitionAnimation = false; base.startKeyIgnitionTrigger.GetComponent<InteractTrigger>().isBeingHeldByPlayer = false; base.removeKeyIgnitionTrigger.GetComponent<InteractTrigger>().isBeingHeldByPlayer = false; ((VehicleSeatAnimator)currentInterior.driverSeat).ReturnPlayerAnimations(playerController, false); playerController.TeleportPlayer(Vector3.zero, false, 0f, false, true); CancelIgnitionAnimation(base.ignitionStarted, setIgnitionAnim: true); SetIgnition(base.ignitionStarted, setCabLight); } [Rpc(/*Could not decode attribute arguments.*/)] public void OnDriverLeaveGameRpc(int playerId, Vector3 carLocation, Quaternion carRotation, bool setIgnitionState, bool setKeyInSlot, bool gasFloored, bool brakeFloored, bool preIgnition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (migh