Decompiled source of Company Hauler v1.0.3

CompanyHauler/glojam.CompanyHauler.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using CompanyHauler.Scripts;
using GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.UI;
using glojam.CompanyHauler.NetcodePatcher;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: IgnoresAccessChecksTo("ClientNetworkTransform")]
[assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")]
[assembly: IgnoresAccessChecksTo("DissonanceVoip")]
[assembly: IgnoresAccessChecksTo("EasyTextEffects")]
[assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")]
[assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")]
[assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")]
[assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")]
[assembly: IgnoresAccessChecksTo("Unity.Burst")]
[assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")]
[assembly: IgnoresAccessChecksTo("Unity.Collections")]
[assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem")]
[assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")]
[assembly: IgnoresAccessChecksTo("Unity.Jobs")]
[assembly: IgnoresAccessChecksTo("Unity.Mathematics")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")]
[assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")]
[assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")]
[assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")]
[assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")]
[assembly: IgnoresAccessChecksTo("Unity.Services.QoS")]
[assembly: IgnoresAccessChecksTo("Unity.Services.Relay")]
[assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")]
[assembly: IgnoresAccessChecksTo("Unity.Timeline")]
[assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")]
[assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")]
[assembly: IgnoresAccessChecksTo("UnityEngine.UI")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("glojam.CompanyHauler")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: AssemblyInformationalVersion("1.0.3+793ba572e7df88cbf47a6a6693cafab58ba5f0ac")]
[assembly: AssemblyProduct("CompanyHauler")]
[assembly: AssemblyTitle("glojam.CompanyHauler")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.3.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
	}
}
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;
		}
	}
}
namespace CompanyHauler
{
	[BepInPlugin("glojam.CompanyHauler", "CompanyHauler", "1.0.3")]
	public class CompanyHauler : BaseUnityPlugin
	{
		public static CompanyHauler Instance { get; private set; }

		internal static ManualLogSource Logger { get; private set; }

		internal static Harmony? Harmony { get; set; }

		internal static HaulerConfig BoundConfig { get; private set; }

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			BoundConfig = new HaulerConfig(((BaseUnityPlugin)this).Config);
			NetcodePatcher();
			Patch();
			Logger.LogInfo((object)"glojam.CompanyHauler v1.0.3 has loaded!");
		}

		internal static void Patch()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			if (Harmony == null)
			{
				Harmony = new Harmony("glojam.CompanyHauler");
			}
			Logger.LogDebug((object)"Patching...");
			Harmony.PatchAll();
			Logger.LogDebug((object)"Finished patching!");
		}

		internal static void Unpatch()
		{
			Logger.LogDebug((object)"Unpatching...");
			Harmony? harmony = Harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
			Logger.LogDebug((object)"Finished unpatching!");
		}

		private void NetcodePatcher()
		{
			Type[] types = Assembly.GetExecutingAssembly().GetTypes();
			Type[] array = types;
			foreach (Type type in array)
			{
				MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic);
				MethodInfo[] array2 = methods;
				foreach (MethodInfo methodInfo in array2)
				{
					object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false);
					if (customAttributes.Length != 0)
					{
						methodInfo.Invoke(null, null);
					}
				}
			}
		}
	}
	internal class HaulerConfig
	{
		public readonly ConfigEntry<bool> haulerMirror;

		public HaulerConfig(ConfigFile cfg)
		{
			cfg.SaveOnConfigSet = false;
			haulerMirror = cfg.Bind<bool>("General", "MirrorOn", true, "Enable rendering for the side mirrors (may impact performance for low end hardware)");
			ClearOrphanedEntries(cfg);
			cfg.Save();
			cfg.SaveOnConfigSet = true;
		}

		private static void ClearOrphanedEntries(ConfigFile cfg)
		{
			PropertyInfo propertyInfo = AccessTools.Property(typeof(ConfigFile), "OrphanedEntries");
			Dictionary<ConfigDefinition, string> dictionary = (Dictionary<ConfigDefinition, string>)propertyInfo.GetValue(cfg);
			dictionary.Clear();
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "glojam.CompanyHauler";

		public const string PLUGIN_NAME = "CompanyHauler";

		public const string PLUGIN_VERSION = "1.0.3";
	}
}
namespace CompanyHauler.Scripts
{
	public class HaulerController : VehicleController
	{
		[CompilerGenerated]
		private sealed class <AlertHorde>d__110 : IEnumerator<object>, IEnumerator, IDisposable
		{
			private int <>1__state;

			private object <>2__current;

			public HaulerController <>4__this;

			private int <i>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <AlertHorde>d__110(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_003e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0060: Unknown result type (might be due to invalid IL or missing references)
				//IL_006a: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<i>5__1 = 0;
					break;
				case 1:
					<>1__state = -1;
					<i>5__1++;
					break;
				}
				if (<i>5__1 < 50)
				{
					RoundManager.Instance.PlayAudibleNoise(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, 1050f, 1050f, 0, false, 19027);
					<>2__current = (object)new WaitForSeconds(0.1f);
					<>1__state = 1;
					return true;
				}
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		public bool localPlayerInBLSeat;

		public bool localPlayerInBRSeat;

		public PlayerControllerB currentBL;

		public PlayerControllerB currentBR;

		public InteractTrigger BLSeatTrigger;

		public InteractTrigger BRSeatTrigger;

		public Transform[] BL_ExitPoints;

		public Transform[] BR_ExitPoints;

		public AnimatedObjectTrigger BLSideDoor;

		public AnimatedObjectTrigger BRSideDoor;

		public InteractTrigger BLSideDoorTrigger;

		public InteractTrigger BRSideDoorTrigger;

		public AudioClip chimeSound;

		public AudioClip chimeSoundCritical;

		public AudioSource ChimeAudio;

		public bool doorChimeDebounce = false;

		public bool cablightToggle = false;

		private bool cabinLightBoolean = false;

		public Material cabinLightOnMat;

		public Material cabinLightOffMat;

		public GameObject screensContainer;

		public TextMeshProUGUI dotMatrix;

		public MeshRenderer leftDial;

		public MeshRenderer rightDial;

		public Transform leftDialTransform;

		public Transform rightDialTransform;

		public GameObject checkEngineLight;

		public GameObject tractionControlLight;

		public Material dialOnMat;

		public Material dialOffMat;

		public Image leftDialTickmarks;

		public Image rightDialTickmarks;

		private bool lastKeyInIgnition = false;

		private bool checkEngineWasAlarmed = false;

		private bool tractionLightWasAlarmed = false;

		public AnimationClip cruiserGearShiftClip;

		public AnimationClip haulerColumnShiftClip;

		public AnimationClip cruiserGearShiftIdleClip;

		public AnimationClip cruiserSteeringClip;

		private RuntimeAnimatorController originalController = null;

		private AnimatorOverrideController overrideController = null;

		private RuntimeAnimatorController originalController_pass = null;

		private AnimatorOverrideController overrideController_pass = null;

		private bool passReplaced;

		public AnimationClip cruiserKeyInsertClip;

		public AnimationClip cruiserKeyInsertAgainClip;

		public AnimationClip cruiserKeyRemoveClip;

		public AnimationClip cruiserKeyUntwistClip;

		public AnimationClip haulerKeyInsertClip;

		public AnimationClip haulerKeyInsertAgainClip;

		public AnimationClip haulerKeyRemoveClip;

		public AnimationClip haulerKeyUntwistClip;

		public AnimationClip haulerPassengerSitClip;

		public AudioClip TrainHornAudioClip;

		public AudioSource TrainHornAudio;

		public AudioSource TrainHornAudioDistant;

		private float superHornCooldownTime;

		public float superHornCooldownAmount;

		public InteractTrigger redButtonTrigger;

		public AudioSource roofRainAudio;

		public List<GameObject> haulerObjectsToDestroy;

		public GameObject mirrorsContainer;

		public void OnBLExit()
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			BLSeatTrigger.interactable = true;
			localPlayerInBLSeat = false;
			currentBL = null;
			((VehicleController)this).SetVehicleCollisionForPlayer(true, GameNetworkManager.Instance.localPlayerController);
			BL_LeaveVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position);
		}

		public void ExitBLSideSeat()
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if (localPlayerInBLSeat)
			{
				int num = CanExitBackSeats(isLeftSeat: true);
				if (num != -1)
				{
					GameNetworkManager.Instance.localPlayerController.TeleportPlayer(BL_ExitPoints[num].position, false, 0f, false, true);
				}
				else
				{
					GameNetworkManager.Instance.localPlayerController.TeleportPlayer(BL_ExitPoints[1].position, false, 0f, false, true);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void BL_LeaveVehicleServerRpc(int playerId, Vector3 exitPoint)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: 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 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3346102628u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3346102628u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					BL_LeaveVehicleClientRpc(playerId, exitPoint);
				}
			}
		}

		[ClientRpc]
		public void BL_LeaveVehicleClientRpc(int playerId, Vector3 exitPoint)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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 != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4221573439u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4221573439u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
			if (!((Object)(object)val3 == (Object)(object)GameNetworkManager.Instance.localPlayerController))
			{
				val3.TeleportPlayer(exitPoint, false, 0f, false, true);
				currentBL = null;
				if (!((NetworkBehaviour)this).IsOwner)
				{
					((VehicleController)this).SetVehicleCollisionForPlayer(true, GameNetworkManager.Instance.localPlayerController);
				}
				BLSeatTrigger.interactable = true;
			}
		}

		public void SetBLPassengerInCar(PlayerControllerB player)
		{
			if (BLSideDoor.boolValue)
			{
				BLSideDoor.SetBoolOnClientOnly(false);
			}
			if ((Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				localPlayerInBLSeat = true;
				int passengerId = (int)player.playerClientId;
				SetVehicleCollisionForPlayerServerRPC(setEnabled: false, passengerId);
			}
			else
			{
				BLSeatTrigger.interactable = false;
			}
			currentBL = player;
		}

		public void OnBRExit()
		{
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			BRSeatTrigger.interactable = true;
			localPlayerInBRSeat = false;
			currentBR = null;
			((VehicleController)this).SetVehicleCollisionForPlayer(true, GameNetworkManager.Instance.localPlayerController);
			BR_LeaveVehicleServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position);
		}

		public void ExitBRSideSeat()
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if (localPlayerInBRSeat)
			{
				int num = CanExitBackSeats(isLeftSeat: false);
				if (num != -1)
				{
					GameNetworkManager.Instance.localPlayerController.TeleportPlayer(BR_ExitPoints[num].position, false, 0f, false, true);
				}
				else
				{
					GameNetworkManager.Instance.localPlayerController.TeleportPlayer(BR_ExitPoints[1].position, false, 0f, false, true);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void BR_LeaveVehicleServerRpc(int playerId, Vector3 exitPoint)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: 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 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(859868781u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 859868781u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					BR_LeaveVehicleClientRpc(playerId, exitPoint);
				}
			}
		}

		[ClientRpc]
		public void BR_LeaveVehicleClientRpc(int playerId, Vector3 exitPoint)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: 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 != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2071180717u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, playerId);
				((FastBufferWriter)(ref val2)).WriteValueSafe(ref exitPoint);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2071180717u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
			if (!((Object)(object)val3 == (Object)(object)GameNetworkManager.Instance.localPlayerController))
			{
				val3.TeleportPlayer(exitPoint, false, 0f, false, true);
				currentBR = null;
				if (!((NetworkBehaviour)this).IsOwner)
				{
					((VehicleController)this).SetVehicleCollisionForPlayer(true, GameNetworkManager.Instance.localPlayerController);
				}
				BRSeatTrigger.interactable = true;
			}
		}

		public void SetBRPassengerInCar(PlayerControllerB player)
		{
			if (BRSideDoor.boolValue && BRSideDoor.boolValue)
			{
				BRSideDoor.SetBoolOnClientOnly(false);
			}
			if ((Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				localPlayerInBRSeat = true;
				int passengerId = (int)player.playerClientId;
				SetVehicleCollisionForPlayerServerRPC(setEnabled: false, passengerId);
			}
			else
			{
				BRSeatTrigger.interactable = false;
			}
			currentBR = player;
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetVehicleCollisionForPlayerServerRPC(bool setEnabled, int passengerId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2392284497u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setEnabled, default(ForPrimitives));
					BytePacker.WriteValueBitPacked(val2, passengerId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2392284497u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetVehicleCollisionForPlayerClientRPC(setEnabled, passengerId);
				}
			}
		}

		[ClientRpc]
		public void SetVehicleCollisionForPlayerClientRPC(bool setEnabled, int passengerId)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1982025495u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setEnabled, default(ForPrimitives));
					BytePacker.WriteValueBitPacked(val2, passengerId);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1982025495u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[passengerId];
					((VehicleController)this).SetVehicleCollisionForPlayer(setEnabled, val3);
				}
			}
		}

		public void SetPassengerInCar(PlayerControllerB player)
		{
			((VehicleController)this).SetPassengerInCar(player);
			if ((Object)(object)player == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				int passengerId = (int)player.playerClientId;
				SetVehicleCollisionForPlayerServerRPC(setEnabled: false, passengerId);
			}
		}

		public int CanExitBackSeats(bool isLeftSeat)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			Transform[] array = (isLeftSeat ? BL_ExitPoints : BR_ExitPoints);
			for (int i = 0; i < array.Length; i++)
			{
				if (!Physics.Linecast(((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position, array[i].position, base.exitCarLayerMask, (QueryTriggerInteraction)1))
				{
					return i;
				}
			}
			return -1;
		}

		[ClientRpc]
		public void CarBumpClientRpc(Vector3 vel)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: 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 != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3541446256u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref vel);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3541446256u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && (Object)(object)base.physicsRegion.physicsTransform == (Object)(object)GameNetworkManager.Instance.localPlayerController.physicsParent && ((!base.localPlayerInControl && !base.localPlayerInPassengerSeat && !localPlayerInBLSeat && !localPlayerInBRSeat) || !(((Vector3)(ref vel)).magnitude < 50f)))
				{
					PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
					localPlayerController.externalForceAutoFade += vel;
				}
			}
		}

		public void Update()
		{
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Invalid comparison between Unknown and I4
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Invalid comparison between Unknown and I4
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Invalid comparison between Unknown and I4
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			((VehicleController)this).Update();
			if (base.carDestroyed || base.destroyNextFrame)
			{
				return;
			}
			if (!redButtonTrigger.interactable)
			{
				if (superHornCooldownTime <= 0f)
				{
					redButtonTrigger.interactable = true;
					return;
				}
				redButtonTrigger.disabledHoverTip = $"[Recharging: {(int)superHornCooldownTime} sec.]";
				superHornCooldownTime -= Time.deltaTime;
			}
			BLSideDoorTrigger.interactable = Time.realtimeSinceStartup - base.timeSinceSpringingDriverSeat > 1.6f;
			BRSideDoorTrigger.interactable = Time.realtimeSinceStartup - base.timeSinceSpringingDriverSeat > 1.6f;
			if (lastKeyInIgnition != base.keyIsInIgnition)
			{
				setDashDials();
				lastKeyInIgnition = base.keyIsInIgnition;
			}
			if (base.tireSparks.isEmitting && !tractionLightWasAlarmed && base.keyIsInIgnition)
			{
				tractionLightWasAlarmed = true;
				tractionControlLight.SetActive(true);
			}
			else if (!base.tireSparks.isEmitting && tractionLightWasAlarmed)
			{
				tractionLightWasAlarmed = false;
				tractionControlLight.SetActive(false);
			}
			bool flag = (int)TimeOfDay.Instance.currentLevelWeather == 1 || (int)TimeOfDay.Instance.currentLevelWeather == 4 || (int)TimeOfDay.Instance.currentLevelWeather == 2;
			if (flag && !roofRainAudio.isPlaying)
			{
				roofRainAudio.Play();
			}
			else if (!flag && roofRainAudio.isPlaying)
			{
				roofRainAudio.Stop();
			}
			if ((float)base.carHP / (float)base.baseCarHP < 0.5f && !checkEngineWasAlarmed && base.keyIsInIgnition)
			{
				checkEngineWasAlarmed = true;
				checkEngineLight.SetActive(true);
				ChimeAudio.PlayOneShot(chimeSoundCritical);
			}
			else if ((float)base.carHP / (float)base.baseCarHP > 0.5f && checkEngineWasAlarmed)
			{
				checkEngineWasAlarmed = false;
				checkEngineLight.SetActive(false);
			}
			if (base.keyIsInIgnition)
			{
				((TMP_Text)dotMatrix).text = ((TMP_Text)HUDManager.Instance.clockNumber).text.Trim().Replace("\n", " ");
			}
			if ((Object)(object)base.FrontLeftWheel != (Object)null)
			{
				leftDialTransform.localEulerAngles = new Vector3(Mathf.Lerp(-219f, -10f, Mathf.Abs(base.EngineRPM) / (base.MaxEngineRPM / 2.5f)) + (base.ignitionStarted ? 25f : 0f), 90f, 90f);
				rightDialTransform.localEulerAngles = new Vector3(Mathf.Lerp(11f, -203f, Mathf.Abs(base.FrontLeftWheel.rotationSpeed) / 5000f), 270f, -90f);
			}
		}

		public void Start()
		{
			((VehicleController)this).Start();
			setDashDials();
			checkEngineLight.SetActive(false);
			tractionControlLight.SetActive(false);
			mirrorsContainer.SetActive(CompanyHauler.BoundConfig.haulerMirror.Value);
		}

		public void Awake()
		{
			((VehicleController)this).Awake();
			redButtonTrigger.interactable = false;
			superHornCooldownTime = superHornCooldownAmount;
		}

		public void setDashDials()
		{
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			screensContainer.SetActive(base.keyIsInIgnition);
			((Renderer)leftDial).materials = (Material[])(object)((!base.keyIsInIgnition) ? new Material[1] { dialOffMat } : new Material[1] { dialOnMat });
			((Renderer)rightDial).materials = (Material[])(object)((!base.keyIsInIgnition) ? new Material[1] { dialOffMat } : new Material[1] { dialOnMat });
			((Graphic)leftDialTickmarks).color = (base.keyIsInIgnition ? new Color(0.33f, 0.84f, 0.83f) : new Color(0.11f, 0.33f, 0.33f));
			((Graphic)rightDialTickmarks).color = (base.keyIsInIgnition ? new Color(0.33f, 0.84f, 0.83f) : new Color(0.11f, 0.33f, 0.33f));
		}

		public void DestroyCar()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			if (!base.carDestroyed && (localPlayerInBLSeat || localPlayerInBRSeat))
			{
				GameNetworkManager.Instance.localPlayerController.KillPlayer(Vector3.up * 27f + 20f * Random.insideUnitSphere, true, (CauseOfDeath)3, 6, Vector3.up * 1.5f);
			}
			((VehicleController)this).DestroyCar();
		}

		public void DamagePlayerInVehicle(Vector3 vel, float magnitude)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			bool flag = localPlayerInBLSeat || localPlayerInBRSeat;
			bool localPlayerInPassengerSeat = base.localPlayerInPassengerSeat;
			if (flag)
			{
				base.localPlayerInPassengerSeat = true;
			}
			((VehicleController)this).DamagePlayerInVehicle(vel, magnitude);
			base.localPlayerInPassengerSeat = localPlayerInPassengerSeat;
		}

		public void OnDisable()
		{
			bool flag = localPlayerInBLSeat || localPlayerInBRSeat;
			bool localPlayerInPassengerSeat = base.localPlayerInPassengerSeat;
			if (flag)
			{
				base.localPlayerInPassengerSeat = true;
			}
			((VehicleController)this).OnDisable();
			base.localPlayerInPassengerSeat = localPlayerInPassengerSeat;
		}

		public void PushTruckWithArms()
		{
			bool flag = localPlayerInBLSeat || localPlayerInBRSeat;
			bool localPlayerInPassengerSeat = base.localPlayerInPassengerSeat;
			if (flag)
			{
				base.localPlayerInPassengerSeat = true;
			}
			((VehicleController)this).PushTruckWithArms();
			base.localPlayerInPassengerSeat = localPlayerInPassengerSeat;
		}

		public void AddTurboBoost()
		{
		}

		public void StartTryCarIgnition()
		{
			TryChimeSoundServerRpc();
			((VehicleController)this).StartTryCarIgnition();
		}

		public void RemoveKeyFromIgnition()
		{
			EndDoorChimeDebounceServerRpc();
			((VehicleController)this).RemoveKeyFromIgnition();
		}

		[ServerRpc(RequireOwnership = false)]
		public void TryChimeSoundServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2480605085u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2480605085u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TryChimeSoundClientRpc();
				}
			}
		}

		[ClientRpc]
		public void TryChimeSoundClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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 != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3859271256u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3859271256u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !doorChimeDebounce)
				{
					ChimeAudio.PlayOneShot(chimeSound);
					doorChimeDebounce = true;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void EndDoorChimeDebounceServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3753933383u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3753933383u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					EndDoorChimeDebounceClientRpc();
				}
			}
		}

		[ClientRpc]
		public void EndDoorChimeDebounceClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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 != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(72706516u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 72706516u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					doorChimeDebounce = false;
				}
			}
		}

		public void CabinLightToggle()
		{
			SetFrontCabinLightOnServerRpc();
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetFrontCabinLightOnServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3100567487u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3100567487u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetFrontCabinLightOnClientRpc();
				}
			}
		}

		[ClientRpc]
		public void SetFrontCabinLightOnClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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 != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2645430700u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2645430700u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					cabinLightBoolean = !cabinLightBoolean;
					((VehicleController)this).SetFrontCabinLightOn(!cabinLightBoolean);
				}
			}
		}

		public void ReplaceGearshiftAnimLocalClient()
		{
			int playerId = (int)GameNetworkManager.Instance.localPlayerController.playerClientId;
			ReplaceGearshiftAnimServerRpc(playerId);
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReplaceGearshiftAnimServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(670417316u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 670417316u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ReplaceGearshiftAnimClientRpc(playerId);
				}
			}
		}

		[ClientRpc]
		public void ReplaceGearshiftAnimClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Expected O, but got Unknown
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2926781773u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2926781773u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
					originalController = val3.playerBodyAnimator.runtimeAnimatorController;
					overrideController = new AnimatorOverrideController(originalController);
					val3.playerBodyAnimator.SetBool("SA_JumpInCar", true);
					overrideController["PullGearstick"] = haulerColumnShiftClip;
					overrideController["SitAndSteerRightHandOnGearstick"] = cruiserSteeringClip;
					overrideController["Key_Insert"] = haulerKeyInsertClip;
					overrideController["Key_InsertAgain"] = haulerKeyInsertAgainClip;
					overrideController["Key_Remove"] = haulerKeyRemoveClip;
					overrideController["Key_Untwist"] = haulerKeyUntwistClip;
					val3.playerBodyAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)overrideController;
					CompanyHauler.Logger.LogDebug((object)"Replaced geasrhifter animation clip.");
				}
			}
		}

		public void ReturnGearshiftAnimLocalClient()
		{
			int playerId = (int)GameNetworkManager.Instance.localPlayerController.playerClientId;
			ReturnGearshiftAnimServerRpc(playerId);
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReturnGearshiftAnimServerRpc(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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(712965948u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 712965948u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ReturnGearshiftAnimClientRpc(playerId);
				}
			}
		}

		[ClientRpc]
		public void ReturnGearshiftAnimClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2616983444u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerId);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2616983444u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[playerId];
					val3.playerBodyAnimator.runtimeAnimatorController = originalController;
					val3.playerBodyAnimator.SetBool("SA_Truck", true);
					val3.playerBodyAnimator.SetBool("SA_JumpInCar", true);
					CompanyHauler.Logger.LogDebug((object)"Reverted to the original gearshift animation clip.");
				}
			}
		}

		public void ReplacePassengerAnimLocalClient()
		{
			int passenger = (int)GameNetworkManager.Instance.localPlayerController.playerClientId;
			ReplacePassengerAnimServerRpc(passenger);
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReplacePassengerAnimServerRpc(int passenger)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3147724555u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, passenger);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3147724555u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ReplacePassengerAnimClientRpc(passenger);
				}
			}
		}

		[ClientRpc]
		public void ReplacePassengerAnimClientRpc(int passenger)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011a: Expected O, but got Unknown
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2132574258u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, passenger);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2132574258u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && !passReplaced)
				{
					PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[passenger];
					val3.playerBodyAnimator.SetBool("SA_JumpInCar", true);
					originalController_pass = val3.playerBodyAnimator.runtimeAnimatorController;
					overrideController_pass = new AnimatorOverrideController(originalController_pass);
					overrideController_pass["SitAndSteerNoHands"] = haulerPassengerSitClip;
					val3.playerBodyAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)overrideController_pass;
					CompanyHauler.Logger.LogDebug((object)"Replaced passenger animation clip.");
					passReplaced = true;
				}
			}
		}

		public void ReturnPassengerAnimLocalClient()
		{
			int passenger = (int)GameNetworkManager.Instance.localPlayerController.playerClientId;
			ReturnPassengerAnimServerRpc(passenger);
		}

		[ServerRpc(RequireOwnership = false)]
		public void ReturnPassengerAnimServerRpc(int passenger)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1207295023u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, passenger);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1207295023u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					ReturnPassengerAnimClientRpc(passenger);
				}
			}
		}

		[ClientRpc]
		public void ReturnPassengerAnimClientRpc(int passenger)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: 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)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2382241268u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, passenger);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2382241268u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					PlayerControllerB val3 = StartOfRound.Instance.allPlayerScripts[passenger];
					val3.playerBodyAnimator.runtimeAnimatorController = originalController_pass;
					val3.playerBodyAnimator.SetBool("SA_Truck", true);
					val3.playerBodyAnimator.SetBool("SA_JumpInCar", true);
					CompanyHauler.Logger.LogDebug((object)"Reverted to the original passenger animation clip.");
					passReplaced = false;
				}
			}
		}

		public void TrainHornLocalClient()
		{
			TrainHornServerRpc();
		}

		[ServerRpc(RequireOwnership = false)]
		public void TrainHornServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: 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 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3831216548u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3831216548u, val, (RpcDelivery)0);
				}
				if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TrainHornClientRpc();
				}
			}
		}

		[ClientRpc]
		public void TrainHornClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(882620626u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 882620626u, val, (RpcDelivery)0);
			}
			if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				TrainHornAudio.Play();
				TrainHornAudioDistant.Play();
				superHornCooldownTime = superHornCooldownAmount;
				redButtonTrigger.interactable = false;
				WalkieTalkie.TransmitOneShotAudio(TrainHornAudio, TrainHornAudioClip, 1f);
				float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position);
				if (num < 20f)
				{
					HUDManager.Instance.ShakeCamera((ScreenShakeType)3);
				}
				((MonoBehaviour)this).StartCoroutine(AlertHorde());
			}
		}

		[IteratorStateMachine(typeof(<AlertHorde>d__110))]
		public IEnumerator AlertHorde()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <AlertHorde>d__110(0)
			{
				<>4__this = this
			};
		}

		protected override void __initializeVariables()
		{
			((VehicleController)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_HaulerController()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Expected O, but got Unknown
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0087: Expected O, but got Unknown
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Expected O, but got Unknown
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Expected O, but got Unknown
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_010e: Expected O, but got Unknown
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Expected O, but got Unknown
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0144: Expected O, but got Unknown
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Expected O, but got Unknown
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_017a: Expected O, but got Unknown
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Expected O, but got Unknown
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Expected O, but got Unknown
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Expected O, but got Unknown
			//IL_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Expected O, but got Unknown
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Expected O, but got Unknown
			//IL_0212: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Expected O, but got Unknown
			//IL_022d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Expected O, but got Unknown
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_0252: Expected O, but got Unknown
			//IL_0263: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3346102628u, new RpcReceiveHandler(__rpc_handler_3346102628));
			NetworkManager.__rpc_func_table.Add(4221573439u, new RpcReceiveHandler(__rpc_handler_4221573439));
			NetworkManager.__rpc_func_table.Add(859868781u, new RpcReceiveHandler(__rpc_handler_859868781));
			NetworkManager.__rpc_func_table.Add(2071180717u, new RpcReceiveHandler(__rpc_handler_2071180717));
			NetworkManager.__rpc_func_table.Add(2392284497u, new RpcReceiveHandler(__rpc_handler_2392284497));
			NetworkManager.__rpc_func_table.Add(1982025495u, new RpcReceiveHandler(__rpc_handler_1982025495));
			NetworkManager.__rpc_func_table.Add(3541446256u, new RpcReceiveHandler(__rpc_handler_3541446256));
			NetworkManager.__rpc_func_table.Add(2480605085u, new RpcReceiveHandler(__rpc_handler_2480605085));
			NetworkManager.__rpc_func_table.Add(3859271256u, new RpcReceiveHandler(__rpc_handler_3859271256));
			NetworkManager.__rpc_func_table.Add(3753933383u, new RpcReceiveHandler(__rpc_handler_3753933383));
			NetworkManager.__rpc_func_table.Add(72706516u, new RpcReceiveHandler(__rpc_handler_72706516));
			NetworkManager.__rpc_func_table.Add(3100567487u, new RpcReceiveHandler(__rpc_handler_3100567487));
			NetworkManager.__rpc_func_table.Add(2645430700u, new RpcReceiveHandler(__rpc_handler_2645430700));
			NetworkManager.__rpc_func_table.Add(670417316u, new RpcReceiveHandler(__rpc_handler_670417316));
			NetworkManager.__rpc_func_table.Add(2926781773u, new RpcReceiveHandler(__rpc_handler_2926781773));
			NetworkManager.__rpc_func_table.Add(712965948u, new RpcReceiveHandler(__rpc_handler_712965948));
			NetworkManager.__rpc_func_table.Add(2616983444u, new RpcReceiveHandler(__rpc_handler_2616983444));
			NetworkManager.__rpc_func_table.Add(3147724555u, new RpcReceiveHandler(__rpc_handler_3147724555));
			NetworkManager.__rpc_func_table.Add(2132574258u, new RpcReceiveHandler(__rpc_handler_2132574258));
			NetworkManager.__rpc_func_table.Add(1207295023u, new RpcReceiveHandler(__rpc_handler_1207295023));
			NetworkManager.__rpc_func_table.Add(2382241268u, new RpcReceiveHandler(__rpc_handler_2382241268));
			NetworkManager.__rpc_func_table.Add(3831216548u, new RpcReceiveHandler(__rpc_handler_3831216548));
			NetworkManager.__rpc_func_table.Add(882620626u, new RpcReceiveHandler(__rpc_handler_882620626));
		}

		private static void __rpc_handler_3346102628(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 exitPoint = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).BL_LeaveVehicleServerRpc(playerId, exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_4221573439(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 exitPoint = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).BL_LeaveVehicleClientRpc(playerId, exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_859868781(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 exitPoint = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).BR_LeaveVehicleServerRpc(playerId, exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2071180717(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				Vector3 exitPoint = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).BR_LeaveVehicleClientRpc(playerId, exitPoint);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2392284497(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool setEnabled = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref setEnabled, default(ForPrimitives));
				int passengerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref passengerId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).SetVehicleCollisionForPlayerServerRPC(setEnabled, passengerId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1982025495(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				bool setEnabled = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref setEnabled, default(ForPrimitives));
				int passengerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref passengerId);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).SetVehicleCollisionForPlayerClientRPC(setEnabled, passengerId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3541446256(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				Vector3 vel = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref vel);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).CarBumpClientRpc(vel);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2480605085(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).TryChimeSoundServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3859271256(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).TryChimeSoundClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3753933383(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).EndDoorChimeDebounceServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_72706516(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).EndDoorChimeDebounceClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3100567487(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).SetFrontCabinLightOnServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2645430700(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).SetFrontCabinLightOnClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_670417316(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).ReplaceGearshiftAnimServerRpc(playerId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2926781773(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).ReplaceGearshiftAnimClientRpc(playerId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_712965948(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).ReturnGearshiftAnimServerRpc(playerId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2616983444(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerId = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerId);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).ReturnGearshiftAnimClientRpc(playerId);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3147724555(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int passenger = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref passenger);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).ReplacePassengerAnimServerRpc(passenger);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2132574258(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int passenger = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref passenger);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).ReplacePassengerAnimClientRpc(passenger);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_1207295023(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int passenger = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref passenger);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).ReturnPassengerAnimServerRpc(passenger);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2382241268(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int passenger = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref passenger);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).ReturnPassengerAnimClientRpc(passenger);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_3831216548(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((HaulerController)(object)target).TrainHornServerRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_882620626(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((HaulerController)(object)target).TrainHornClientRpc();
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "HaulerController";
		}
	}
	public class SunroofSnipper : MonoBehaviour
	{
		public AudioSource snipAudio;

		public AudioClip snipClip;

		private void OnTriggerEnter(Collider other)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			if (((Component)other).gameObject.CompareTag("Player"))
			{
				PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
				if (!((Object)(object)component == (Object)null) && (Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController)
				{
					component.KillPlayer(Vector3.up * 5f, true, (CauseOfDeath)17, 7, default(Vector3));
					snipAudio.PlayOneShot(snipClip);
				}
			}
		}
	}
}
namespace CompanyHauler.Patches
{
	[HarmonyPatch(typeof(ForestGiantAI))]
	[HarmonyPatch("OnCollideWithPlayer")]
	public static class ForestGiantCollisionPatch
	{
		private static bool Prefix(Collider other, ForestGiantAI __instance)
		{
			PlayerControllerB val = ((EnemyAI)__instance).MeetsStandardPlayerCollisionConditions(other, __instance.inEatingPlayerAnimation, false);
			if (!((Object)(object)val != (Object)null) || !((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController))
			{
				return true;
			}
			HaulerController haulerController = Object.FindObjectOfType<HaulerController>();
			if ((Object)(object)haulerController != (Object)null && (Object)(object)val.physicsParent != (Object)null && (Object)(object)val.physicsParent == (Object)(object)((Component)haulerController).transform)
			{
				if ((Object)(object)val == (Object)(object)((VehicleController)haulerController).currentDriver && ((VehicleController)haulerController).driverSideDoor.boolValue)
				{
					CompanyHauler.Logger.LogDebug((object)"player is Driver and their door is open. Eating them!");
					return true;
				}
				if ((Object)(object)val == (Object)(object)((VehicleController)haulerController).currentPassenger && ((VehicleController)haulerController).passengerSideDoor.boolValue)
				{
					CompanyHauler.Logger.LogDebug((object)"player is Passenger and their door is open. Eating them!");
					return true;
				}
				if ((Object)(object)val == (Object)(object)haulerController.currentBL && haulerController.BLSideDoor.boolValue)
				{
					CompanyHauler.Logger.LogDebug((object)"player is BL and their door is open. Eating them!");
					return true;
				}
				if ((Object)(object)val == (Object)(object)haulerController.currentBR && haulerController.BRSideDoor.boolValue)
				{
					CompanyHauler.Logger.LogDebug((object)"player is BR and their door is open. Eating them!");
					return true;
				}
				CompanyHauler.Logger.LogDebug((object)"player is in Hauler, but their door is closed. Aborting!");
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(SprayPaintItem))]
	[HarmonyPatch("TrySprayingWeedKillerBottle")]
	public static class TrySprayingWeedKillerBottlePatch
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Expected O, but got Unknown
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Expected O, but got Unknown
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Expected O, but got Unknown
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Expected O, but got Unknown
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Expected O, but got Unknown
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Expected O, but got Unknown
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Expected O, but got Unknown
			//IL_0164: Unknown result type (might be due to invalid IL or missing references)
			//IL_016a: Expected O, but got Unknown
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Expected O, but got Unknown
			CodeMatcher val = new CodeMatcher(instructions, generator);
			val.Start();
			val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[5]
			{
				new CodeMatch((OpCode?)OpCodes.Ldloc_1, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldfld, (object)AccessTools.Field(typeof(VehicleController), "carHP"), (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldloc_1, (object)null, (string)null),
				new CodeMatch((OpCode?)OpCodes.Ldfld, (object)AccessTools.Field(typeof(VehicleController), "baseCarHP"), (string)null),
				new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction instruction) => instruction.opcode == OpCodes.Blt_S || instruction.opcode == OpCodes.Blt), (string)null)
			});
			val.Advance(4);
			if (!(val.Instruction.operand is Label label) || 1 == 0)
			{
				CompanyHauler.Logger.LogDebug((object)(val.Instruction.operand.ToString() + "; transpilation failed for SprayPaintItemPatch"));
				return val.InstructionEnumeration();
			}
			val.Advance(1);
			val.Insert((CodeInstruction[])(object)new CodeInstruction[5]
			{
				new CodeInstruction(OpCodes.Ldloc_1, (object)null),
				new CodeInstruction(OpCodes.Isinst, (object)typeof(HaulerController)),
				new CodeInstruction(OpCodes.Ldnull, (object)null),
				new CodeInstruction(OpCodes.Ceq, (object)null),
				new CodeInstruction(OpCodes.Brfalse_S, (object)label)
			});
			return val.InstructionEnumeration();
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("SetFrontCabinLightOn")]
	public static class CabinLightPatch
	{
		private static void Prefix(bool setOn, VehicleController __instance)
		{
			HaulerController haulerController = __instance as HaulerController;
			if ((Object)(object)haulerController != (Object)null)
			{
				Material[] materials = ((Renderer)((VehicleController)haulerController).mainBodyMesh).materials;
				materials[3] = (setOn ? haulerController.cabinLightOnMat : haulerController.cabinLightOffMat);
				((Renderer)((VehicleController)haulerController).mainBodyMesh).materials = materials;
				haulerController.cablightToggle = !haulerController.cablightToggle;
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("SetIgnition")]
	public static class SetIgnitionPatch
	{
		private static void Prefix(bool started, VehicleController __instance)
		{
			HaulerController haulerController = __instance as HaulerController;
			if ((Object)(object)haulerController != (Object)null && started && started != __instance.ignitionStarted)
			{
				haulerController.ChimeAudio.Play();
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("DisableVehicleCollisionForAllPlayers")]
	public static class DisableVehicleCollisionForAllPlayersPatch
	{
		private static bool Prefix(VehicleController __instance)
		{
			if (__instance is HaulerController)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("EnableVehicleCollisionForAllPlayers")]
	public static class EnableVehicleCollisionForAllPlayersPatch
	{
		private static bool Prefix(VehicleController __instance)
		{
			if (__instance is HaulerController)
			{
				return false;
			}
			return true;
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("TakeControlOfVehicle")]
	public static class TakeControlOfVehiclePatch
	{
		private static void Postfix(VehicleController __instance)
		{
			if (__instance is HaulerController haulerController)
			{
				haulerController.ReplaceGearshiftAnimLocalClient();
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("LoseControlOfVehicle")]
	public static class LoseControlOfVehiclePatch
	{
		private static void Prefix(VehicleController __instance)
		{
			if (__instance is HaulerController haulerController)
			{
				if (!((Object)(object)((VehicleController)haulerController).currentDriver != (Object)(object)GameNetworkManager.Instance.localPlayerController))
				{
					((VehicleController)haulerController).SetVehicleCollisionForPlayer(true, GameNetworkManager.Instance.localPlayerController);
				}
				haulerController.ReturnGearshiftAnimLocalClient();
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("SetPassengerInCar")]
	public static class SetPassengerInCarPatch
	{
		private static void Postfix(VehicleController __instance)
		{
			HaulerController haulerController = __instance as HaulerController;
			if (haulerController == null)
			{
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("OnPassengerExit")]
	public static class OnPassengerExitPatch
	{
		private static void Prefix(VehicleController __instance)
		{
			HaulerController haulerController = __instance as HaulerController;
			if (haulerController == null)
			{
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("SetHeadlightMaterial")]
	public static class SetHeadlightMaterialPatch
	{
		private static void Postfix(bool on, VehicleController __instance)
		{
			if (__instance is HaulerController haulerController)
			{
				Material[] materials = ((Renderer)((VehicleController)haulerController).mainBodyMesh).materials;
				materials[1] = (on ? ((VehicleController)haulerController).headlightsOnMat : ((VehicleController)haulerController).headlightsOffMat);
				((Renderer)((VehicleController)haulerController).lod1Mesh).materials = materials;
				((Renderer)((VehicleController)haulerController).lod2Mesh).materials = materials;
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("DestroyCar")]
	public static class DestroyCarPatch
	{
		private static void Postfix(VehicleController __instance)
		{
			if (!(__instance is HaulerController haulerController))
			{
				return;
			}
			foreach (GameObject item in haulerController.haulerObjectsToDestroy)
			{
				item.SetActive(false);
			}
		}
	}
	[HarmonyPatch(typeof(VehicleController))]
	[HarmonyPatch("Update")]
	public static class VehicleControllerUpdatePatch
	{
		private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator generator)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Expected O, but got Unknown
			//IL_0087: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00aa: Expected O, but got Unknown
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Expected O, but got Unknown
			//IL_0144: Unknown resul