Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Vandal Electronics Scanvan v1.8.10
BepInEx/plugins/scanvan/RadioBrowser.dll
Decompiled 15 hours agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Linq; using System.Net; using System.Net.Http; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Threading.Tasks; using System.Web; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using RadioBrowser.Api; using RadioBrowser.Internals; using RadioBrowser.Internals.JsonConverters; using RadioBrowser.Models; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("bt")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCopyright("(c) 2020 by bt, GPL v3")] [assembly: AssemblyDescription("Radio Browser API wrapper")] [assembly: AssemblyFileVersion("0.7.0.0")] [assembly: AssemblyInformationalVersion("0.7.0")] [assembly: AssemblyProduct("RadioBrowser")] [assembly: AssemblyTitle("RadioBrowser")] [assembly: AssemblyMetadata("RepositoryUrl", "https://git.sr.ht/youkai/RadioBrowser.NET")] [assembly: AssemblyVersion("0.7.0.0")] namespace RadioBrowser { public interface IRadioBrowserClient { Search Search { get; } Lists Lists { get; } Stations Stations { get; } RadioBrowser.Internals.HttpClient HttpClient { get; } Modify Modify { get; } } public class RadioBrowserClient : IRadioBrowserClient { public Search Search { get; } public Lists Lists { get; } public Stations Stations { get; } public RadioBrowser.Internals.HttpClient HttpClient { get; } public Modify Modify { get; } public RadioBrowserClient(string apiUrl = null, string customUserAgent = null) { Converters converters = new Converters(); HttpClient = new RadioBrowser.Internals.HttpClient(apiUrl, customUserAgent); Search = new Search(HttpClient, converters); Lists = new Lists(HttpClient, converters); Stations = new Stations(HttpClient, converters); Modify = new Modify(HttpClient, converters); } } } namespace RadioBrowser.Models { public class ActionResult { public bool Ok { get; set; } public string Message { get; set; } } public class AddStationResult : ActionResult { public Guid Uuid { get; set; } } public class AdvancedSearchOptions { public string Name { get; set; } public string NameExact { get; set; } public string Country { get; set; } public bool? CountryExact { get; set; } public string Countrycode { get; set; } public string State { get; set; } public bool? StateExact { get; set; } public string Language { get; set; } public string LanguageExact { get; set; } public bool? TagExact { get; set; } public string TagList { get; set; } public string Codec { get; set; } public uint? BitrateMin { get; set; } public uint? BitrateMax { get; set; } public string Order { get; set; } public bool? Reverse { get; set; } public uint? Offset { get; set; } public uint? Limit { get; set; } } public class ClickResult : ActionResult { public Guid StationUuid { get; set; } public string Name { get; set; } public Uri Url { get; set; } } public class NameAndCount { public string Name { get; set; } public uint Stationcount { get; set; } } public class NewStation { public string Name { get; set; } public Uri Url { get; set; } public Uri Homepage { get; set; } public Uri Favicon { get; set; } public string Country { get; set; } public string CountryCode { get; set; } public string State { get; set; } public string Language { get; set; } public string Tags { get; set; } } public class State : NameAndCount { public string Country { get; set; } } public class StationInfo { public Guid ChangeUuid { get; set; } public Guid StationUuid { get; set; } public string Name { get; set; } [JsonConverter(typeof(UriConverter))] public Uri Url { get; set; } [JsonProperty("url_resolved")] [JsonConverter(typeof(UriConverter))] public Uri UrlResolved { get; set; } [JsonConverter(typeof(UriConverter))] public Uri Homepage { get; set; } [JsonConverter(typeof(UriConverter))] public Uri Favicon { get; set; } [JsonConverter(typeof(ListConverter))] public List<string> Tags { get; set; } public string CountryCode { get; set; } [JsonConverter(typeof(ListConverter))] public List<string> Language { get; set; } public int Votes { get; set; } [JsonConverter(typeof(DateTimeConverter))] public DateTime LastChangeTime { get; set; } public string Codec { get; set; } public int Bitrate { get; set; } [JsonConverter(typeof(BoolConverter))] public bool Hls { get; set; } [JsonConverter(typeof(BoolConverter))] public bool LastCheckOk { get; set; } [JsonConverter(typeof(DateTimeConverter))] public DateTime LastCheckTime { get; set; } [JsonConverter(typeof(DateTimeConverter))] public DateTime LastCheckOkTime { get; set; } [JsonConverter(typeof(DateTimeConverter))] public DateTime LastLocalCheckTime { get; set; } [JsonConverter(typeof(DateTimeConverter))] public DateTime ClickTimestamp { get; set; } public int ClickCount { get; set; } public int ClickTrend { get; set; } } } namespace RadioBrowser.Internals { internal class Converters { private readonly JsonSerializerSettings _jsonSerializerSettings; internal Converters() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //IL_0030: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown _jsonSerializerSettings = new JsonSerializerSettings { ContractResolver = (IContractResolver)new DefaultContractResolver { NamingStrategy = (NamingStrategy)new CamelCaseNamingStrategy { ProcessDictionaryKeys = true, OverrideSpecifiedNames = false } }, NullValueHandling = (NullValueHandling)1 }; } internal List<StationInfo> ToStationsList(string json) { return JsonConvert.DeserializeObject<List<StationInfo>>(json, _jsonSerializerSettings); } internal List<NameAndCount> ToNameAndCountList(string json) { return JsonConvert.DeserializeObject<List<NameAndCount>>(json, _jsonSerializerSettings); } internal List<State> ToStatesList(string json) { return JsonConvert.DeserializeObject<List<State>>(json, _jsonSerializerSettings); } internal ActionResult ToActionResult(string json) { return JsonConvert.DeserializeObject<ActionResult>(json, _jsonSerializerSettings); } internal ClickResult ToClickResult(string json) { return JsonConvert.DeserializeObject<ClickResult>(json, _jsonSerializerSettings); } internal AddStationResult ToAddStationResult(string json) { return JsonConvert.DeserializeObject<AddStationResult>(json, _jsonSerializerSettings); } internal static string GetQueryString(object obj) { IEnumerable<string> source = from p in obj.GetType().GetProperties() where p.GetValue(obj, null) != null select char.ToLowerInvariant(p.Name[0]) + p.Name.Substring(1) + "=" + HttpUtility.UrlEncode(Convert.ToString(p.GetValue(obj, null))); return string.Join("&", source.ToArray()); } } public class HttpClient { private readonly System.Net.Http.HttpClient _httpClient; public string ApiUrl { get; } public string UserAgent { get; } internal HttpClient(string apiUrl, string userAgent) { ApiUrl = apiUrl ?? GetRadioBrowserApiUrl(); UserAgent = userAgent ?? "RadioBrowser.NET Library/0.4"; _httpClient = new System.Net.Http.HttpClient(); _httpClient.DefaultRequestHeaders.Add("User-Agent", UserAgent); } private static string GetRadioBrowserApiUrl() { IPAddress[] hostAddresses = Dns.GetHostAddresses("all.api.radio-browser.info"); long num = long.MaxValue; string text = "de1.api.radio-browser.info"; IPAddress[] array = hostAddresses; foreach (IPAddress iPAddress in array) { try { PingReply pingReply = new Ping().Send(iPAddress); if (pingReply != null && pingReply.RoundtripTime < num) { num = pingReply.RoundtripTime; text = iPAddress.ToString(); } } catch (SocketException) { } } IPHostEntry hostEntry = Dns.GetHostEntry(text); if (!string.IsNullOrEmpty(hostEntry.HostName)) { text = hostEntry.HostName; } return text; } internal async Task<string> GetAsync(string endpoint) { HttpResponseMessage httpResponseMessage = await _httpClient.GetAsync("https://" + ApiUrl + "/json/" + endpoint); return (!httpResponseMessage.IsSuccessStatusCode) ? null : (await httpResponseMessage.Content.ReadAsStringAsync()); } } } namespace RadioBrowser.Internals.JsonConverters { public class BoolConverter : JsonConverter { public override bool CanConvert(Type objectType) { return objectType == typeof(bool); } public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I4 //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) JsonToken tokenType = reader.TokenType; if ((int)tokenType != 7) { if ((int)tokenType == 9) { return reader.Value.ToString() == "1"; } JsonToken tokenType2 = reader.TokenType; throw new JsonSerializationException("Unexpected token type: " + ((object)(JsonToken)(ref tokenType2)).ToString()); } return Convert.ToInt32(reader.Value) == 1; } public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { throw new NotSupportedException(); } } public class DateTimeConverter : JsonConverter<DateTime> { public override DateTime ReadJson(JsonReader reader, Type objectType, DateTime existingValue, bool hasExistingValue, JsonSerializer serializer) { try { return DateTime.ParseExact((string)reader.Value, "yyyy-MM-dd HH:mm:ss", CultureInfo.CurrentCulture); } catch (FormatException) { return new DateTime(0L); } } public override void WriteJson(JsonWriter writer, DateTime value, JsonSerializer serializer) { throw new NotSupportedException(); } } public class ListConverter : JsonConverter<List<string>> { public override List<string> ReadJson(JsonReader reader, Type objectType, List<string> existingValue, bool hasExistingValue, JsonSerializer serializer) { return (from s in ((string)reader.Value)?.Split(',') select s.Trim()).ToList(); } public override void WriteJson(JsonWriter writer, List<string> value, JsonSerializer serializer) { throw new NotSupportedException(); } } public class UriConverter : JsonConverter<Uri> { public override Uri ReadJson(JsonReader reader, Type objectType, Uri existingValue, bool hasExistingValue, JsonSerializer serializer) { try { return new Uri((string)reader.Value); } catch (UriFormatException) { return null; } } public override void WriteJson(JsonWriter writer, Uri value, JsonSerializer serializer) { throw new NotSupportedException(); } } } namespace RadioBrowser.Api { public class Lists { private readonly Converters _converters; private readonly RadioBrowser.Internals.HttpClient _httpClient; internal Lists(RadioBrowser.Internals.HttpClient httpClient, Converters converters) { _httpClient = httpClient; _converters = converters; } public async Task<List<StationInfo>> GetAllStationsAsync() { Converters converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync("stations")); } public async Task<List<NameAndCount>> GetCountriesAsync(string filter = null) { List<NameAndCount> result; if (filter == null) { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("countries")); } else { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("countries/" + filter)); } return result; } public async Task<List<NameAndCount>> GetCountriesCodesAsync(string filter = null) { List<NameAndCount> result; if (filter == null) { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("countrycodes")); } else { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("countrycodes/" + filter)); } return result; } public async Task<List<NameAndCount>> GetCodecsAsync(string filter = null) { List<NameAndCount> result; if (filter == null) { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("codecs")); } else { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("codecs/" + filter)); } return result; } public async Task<List<State>> GetStatesAsync(string filter = null) { List<State> result; if (filter == null) { Converters converters = _converters; result = converters.ToStatesList(await _httpClient.GetAsync("states")); } else { Converters converters = _converters; result = converters.ToStatesList(await _httpClient.GetAsync("states/" + filter)); } return result; } public async Task<List<NameAndCount>> GetLanguagesAsync(string filter = null) { List<NameAndCount> result; if (filter == null) { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("languages")); } else { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("languages/" + filter)); } return result; } public async Task<List<NameAndCount>> GetTagsAsync(string filter = null) { List<NameAndCount> result; if (filter == null) { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("tags")); } else { Converters converters = _converters; result = converters.ToNameAndCountList(await _httpClient.GetAsync("tags/" + filter)); } return result; } } public class Modify { private readonly Converters _converters; private readonly RadioBrowser.Internals.HttpClient _httpClient; internal Modify(RadioBrowser.Internals.HttpClient httpClient, Converters converters) { _httpClient = httpClient; _converters = converters; } public async Task<ClickResult> ClickAsync(Guid uuid) { string json = await _httpClient.GetAsync($"/url/{uuid}"); return _converters.ToClickResult(json); } public async Task<ActionResult> VoteAsync(Guid uuid) { string json = await _httpClient.GetAsync($"/vote/{uuid}"); return _converters.ToActionResult(json); } public async Task<AddStationResult> AddStationAsync(NewStation newStation) { string json = await _httpClient.GetAsync("json/add/" + Converters.GetQueryString(newStation)); return _converters.ToAddStationResult(json); } } public class Search { private readonly Converters _converters; private readonly RadioBrowser.Internals.HttpClient _httpClient; internal Search(RadioBrowser.Internals.HttpClient httpClient, Converters converters) { _httpClient = httpClient; _converters = converters; } public async Task<List<StationInfo>> AdvancedAsync(AdvancedSearchOptions searchOptions) { string json = await _httpClient.GetAsync("stations/search?" + Converters.GetQueryString(searchOptions)); return _converters.ToStationsList(json); } public async Task<List<StationInfo>> ByNameAsync(string name) { string json = await _httpClient.GetAsync("stations/search?name=" + name); return _converters.ToStationsList(json); } public async Task<List<StationInfo>> ByUuidAsync(Guid uuid) { string json = await _httpClient.GetAsync("stations/byuuid?uuids=" + uuid); return _converters.ToStationsList(json); } public async Task<List<StationInfo>> ByUrlAsync(string url) { string json = await _httpClient.GetAsync("stations/byurl?url=" + url); return _converters.ToStationsList(json); } } public class Stations { private readonly Converters _converters; private readonly RadioBrowser.Internals.HttpClient _httpClient; internal Stations(RadioBrowser.Internals.HttpClient httpClient, Converters converters) { _httpClient = httpClient; _converters = converters; } public async Task<List<StationInfo>> GetByClicksAsync(uint limit = 0u) { Converters converters; if (limit == 0) { converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync("stations/topclick")); } converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync($"stations/topclick/{limit}")); } public async Task<List<StationInfo>> GetByVotesAsync(uint limit = 0u) { Converters converters; if (limit == 0) { converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync("stations/topvote")); } converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync($"stations/topvote/{limit}")); } public async Task<List<StationInfo>> GetByRecentClickAsync(uint limit = 0u) { Converters converters; if (limit == 0) { converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync("stations/lastclick")); } converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync($"stations/lastclick/{limit}")); } public async Task<List<StationInfo>> GetByLastChangesAsync(uint limit = 0u) { Converters converters; if (limit == 0) { converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync("stations/lastchange")); } converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync($"stations/lastchange/{limit}")); } public async Task<List<StationInfo>> GetByCodecAsync(string codec, uint limit = 0u) { Converters converters; if (limit == 0) { converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync("stations/bycodec/" + codec)); } converters = _converters; return converters.ToStationsList(await _httpClient.GetAsync($"stations/bycodec/{codec}/{limit}")); } } }
BepInEx/plugins/scanvan/scandal.scanvan.dll
Decompiled 15 hours ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using System.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks.CompilerServices; using FirstPersonView; using GameNetcodeStuff; using HarmonyLib; using LethalCompanyInputUtils.Api; using LethalMin; using Microsoft.CodeAnalysis; using NAudio.Wave; using RadioBrowser; using RadioBrowser.Models; using ScanVan; using ScanVan.Behaviour; using ScanVan.ClipLoading; using ScanVan.Compatibility; using ScanVan.Managers; using ScanVan.Networking; using ScanVan.Patches; using ScanVan.Patches.Enemies; using ScanVan.Patches.InternalUtils; using ScanVan.Scripts; using ScanVan.Utils; using ScandalLib.Patches; using ScandalLib.Scripts; using ScandalsTweaks.Compatibility; using ScandalsTweaks.Patches; using ScandalsTweaks.Patches.Enemies; using ScandalsTweaks.Utils; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; using UnityEngine.UI; using VoxxWeatherPlugin.Patches; using VoxxWeatherPlugin.Utils; using VoxxWeatherPlugin.Weathers; using Woecust.ImmersiveVisor; using scandal.scanvan.NetcodePatcher; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("FirstPersonView")] [assembly: IgnoresAccessChecksTo("ImmersiveVisor")] [assembly: IgnoresAccessChecksTo("NoteBoxz.LethalMin")] [assembly: IgnoresAccessChecksTo("scandal.scandallib")] [assembly: IgnoresAccessChecksTo("scandal.scandalstweaks")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("voxx.LethalElementsPlugin")] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("scandal.scanvan")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.8.10.0")] [assembly: AssemblyInformationalVersion("1.8.10+2de0f016b85d87204cb338c436b6aa02cc42a6e6")] [assembly: AssemblyProduct("ScanVan")] [assembly: AssemblyTitle("scandal.scanvan")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.8.10.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class CruiserXLCollisionTrigger : MonoBehaviour { public CruiserXLController mainScript = null; public BoxCollider insideTruckNavMeshBounds = null; public EnemyAI[] enemiesLastHit = null; private float timeSinceHittingPlayer; private float timeSinceHittingEnemy; private int enemyIndex; public void Start() { enemiesLastHit = (EnemyAI[])(object)new EnemyAI[3]; } public void OnTriggerEnter(Collider other) { //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0461: Unknown result type (might be due to invalid IL or missing references) //IL_0466: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_034d: Unknown result type (might be due to invalid IL or missing references) //IL_0358: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0595: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05ab: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05ce: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_0697: Unknown result type (might be due to invalid IL or missing references) //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06b5: Expected I4, but got Unknown //IL_06c6: Unknown result type (might be due to invalid IL or missing references) //IL_06cb: Unknown result type (might be due to invalid IL or missing references) //IL_06d3: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_0709: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0737: Unknown result type (might be due to invalid IL or missing references) //IL_073f: Unknown result type (might be due to invalid IL or missing references) if (!((VehicleController)mainScript).hasBeenSpawned || (((VehicleController)mainScript).magnetedToShip && ((VehicleController)mainScript).magnetTime > 0.8f)) { return; } if (((Component)other).CompareTag("Player")) { PlayerControllerB val = default(PlayerControllerB); if (!((Component)other).TryGetComponent<PlayerControllerB>(ref val) || Time.realtimeSinceStartup - timeSinceHittingPlayer < 0.25f) { return; } Transform physicsTransform = ((VehicleController)mainScript).physicsRegion.physicsTransform; if ((Object)(object)val.physicsParent == (Object)(object)physicsTransform || (Object)(object)val.overridePhysicsParent == (Object)(object)physicsTransform || Time.realtimeSinceStartup - timeSinceHittingPlayer < 0.25f) { return; } float num = ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude; if (num < 2f) { return; } Vector3 val2 = ((Component)val).transform.position - ((VehicleController)mainScript).mainRigidbody.position; float num2 = Vector3.Angle(Vector3.Normalize(((VehicleController)mainScript).averageVelocity * 1000f), Vector3.Normalize(val2 * 1000f)); if (num2 > 70f) { return; } if (num2 < 30f && mainScript.wheelRPM > 400f) { num += 6f; } if ((((Component)val.gameplayCamera).transform.position - ((VehicleController)mainScript).mainRigidbody.position).y < -0.1f) { num *= 2f; } timeSinceHittingPlayer = Time.realtimeSinceStartup; Vector3 val3 = Vector3.ClampMagnitude(((VehicleController)mainScript).averageVelocity, 40f); if ((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController) { if (num > 20f) { GameNetworkManager.Instance.localPlayerController.KillPlayer(val3, true, (CauseOfDeath)8, 9, default(Vector3), false); } else { int num3 = 0; if (num > 15f) { num3 = 80; } else if (num > 12f) { num3 = 60; } else if (num > 8f) { num3 = 40; } if (num3 > 0) { GameNetworkManager.Instance.localPlayerController.DamagePlayer(num3, true, true, (CauseOfDeath)8, 0, false, val3); } } if (!GameNetworkManager.Instance.localPlayerController.isPlayerDead && ((Vector3)(ref GameNetworkManager.Instance.localPlayerController.externalForceAutoFade)).sqrMagnitude < ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).sqrMagnitude) { GameNetworkManager.Instance.localPlayerController.externalForceAutoFade = ((VehicleController)mainScript).averageVelocity; } } else if (((NetworkBehaviour)mainScript).IsOwner && ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude > 1.8f) { mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, ((Component)val).transform.position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)0); } } else { EnemyAICollisionDetect val4 = default(EnemyAICollisionDetect); if (!((Component)other).gameObject.CompareTag("Enemy") || Time.realtimeSinceStartup - timeSinceHittingEnemy < 0.25f || !((Component)other).TryGetComponent<EnemyAICollisionDetect>(ref val4) || (Object)(object)val4.mainScript == (Object)null || val4.mainScript.isEnemyDead) { return; } if (val4.mainScript is SandWormAI) { timeSinceHittingEnemy = Time.realtimeSinceStartup; ((VehicleController)mainScript).mainRigidbody.AddExplosionForce(((VehicleController)mainScript).mainRigidbody.mass * 100f, ((Component)mainScript).transform.position + ((Component)mainScript).transform.forward + Vector3.up * 1.5f, 12f, 3f, (ForceMode)1); } else { if (val4.mainScript is BushWolfEnemy) { return; } EnemyAI obj = val4.mainScript; FlowerSnakeEnemy val5 = (FlowerSnakeEnemy)(object)((obj is FlowerSnakeEnemy) ? obj : null); if ((val5 != null && Object.op_Implicit((Object)(object)val5.clingingToPlayer)) || val4.mainScript is BushWolfEnemy) { return; } EnemyAI obj2 = val4.mainScript; MouthDogAI val6 = (MouthDogAI)(object)((obj2 is MouthDogAI) ? obj2 : null); if (((!((Object)(object)val6 != (Object)null) || !Object.op_Implicit((Object)(object)val6) || val6.suspicionLevel <= 8) && !((VehicleController)mainScript).ignitionStarted) || Vector3.Angle(((VehicleController)mainScript).averageVelocity, ((Component)val4.mainScript).transform.position - ((Component)this).transform.position) > 130f || ((Collider)insideTruckNavMeshBounds).ClosestPoint(((Component)val4.mainScript).transform.position) == ((Component)val4.mainScript).transform.position || ((Collider)insideTruckNavMeshBounds).ClosestPoint(val4.mainScript.agent.destination) == val4.mainScript.agent.destination) { return; } bool dealDamage = false; for (int i = 0; i < enemiesLastHit.Length; i++) { if ((Object)(object)enemiesLastHit[i] == (Object)(object)val4.mainScript && (Time.realtimeSinceStartup - timeSinceHittingEnemy < 0.6f || ((Vector3)(ref ((VehicleController)mainScript).averageVelocity)).magnitude < 4f)) { dealDamage = true; } } timeSinceHittingEnemy = Time.realtimeSinceStartup; Vector3 position = ((Component)val4).transform.position; bool flag = false; EnemySize enemySize = val4.mainScript.enemyType.EnemySize; EnemySize val7 = enemySize; switch ((int)val7) { case 0: flag = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 1f, val4.mainScript, dealDamage); break; case 1: flag = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 3f, val4.mainScript, dealDamage); break; case 2: flag = mainScript.CarReactToObstacle(((VehicleController)mainScript).averageVelocity, position, ((VehicleController)mainScript).averageVelocity, (CarObstacleType)1, 2f, val4.mainScript, dealDamage); break; } if (flag) { enemyIndex = (enemyIndex + 1) % 3; enemiesLastHit[enemyIndex] = val4.mainScript; return; } for (int j = 0; j < enemiesLastHit.Length; j++) { if ((Object)(object)enemiesLastHit[j] == (Object)(object)val4.mainScript) { enemiesLastHit[j] = null; } } } } } } public class CruiserXLController : VehicleController { [Header("Gimmicks/Variety")] public EVAModule voiceModule = null; public Material truckMat = null; public Material rareTruckDialsOn = null; public Material rareTruckClusterOn = null; public Material rareTruckRadioOn = null; public Material rareHeaterOn = null; public Material rareWindowOn = null; public Texture2D defaultTruckTex = null; public Texture2D rareTruckTex = null; public Light radioLightCol = null; public Light heaterLightCol = null; public Light clusterLightCol = null; public Light leftWindowLightCol = null; public Light rightWindowLightCol = null; public float specialVariantChance; public bool isSpecialVariant; [Header("Physics")] public List<WheelCollider> wheels = null; public AnimationCurve steeringWheelCurve = null; public CruiserXLCollisionTrigger collisionTrigger = null; public Rigidbody playerPhysicsBody = null; public AnimationCurve engineCurve = null; public AnimationCurve enginePowerCurve = null; public Vector3 lastVelocity; private WheelHit[] wheelHits = (WheelHit[])(object)new WheelHit[4]; public Vector3 previousVehiclePosition; public Quaternion previousVehicleRotation; private float timeSinceLastCollision; public bool hasDeliveredVehicle; public bool frontWheelsGrounded; public bool backWheelsGrounded; public bool allWheelsAirborne; public bool allWheelsGrounded; private float timeSinceUntethered; public bool usingSwitchIgnition; public bool engineStalled = false; public bool handbrakeEngaged; public bool inReverse; public bool inNeutral; public bool clutchPedalPressed; public bool lastClutchPedalPressed; public float brakeInput; public float clutchInput; public float gasInput; public float throttleInput; public float clutchSpeed; public float minClutchReturnSpeed; public float clutchReturnSpeed; public float stallTimer; public float clutchFriction; public float clutchSlip; public float clutchEngagement; public float throttleReleaseSpeed; public float maxThrottleSpeed; public float throttleSpeed; public float inclineCompensation; public float minInclineCompensation = 1.78f; public float maxInclineCompensation = 4.1f; public float maxInclineCompensationAngle = 32f; public float forwardWheelSpeed; public float reverseWheelSpeed; public float frontWheelRPM; public float backWheelRPM; public float wheelRPM; private float maxAutoCenterSpeed = 8f; private float steeringAngle; private float steeringDecay = 1f; private float forwardsSlip; public float baseForwardStiffness = 1f; public float baseSidewaysStiffness = 0.75f; public float currentMotorTorque; public float currentBrakeTorque; public float maxBrakingPower; public float enginePower; public float engineReversePower; public float timeAtLastGearboxDamage; public int baseTransmissionHP = 20; public int syncedTransmissionHP; public int transmissionHP; public float[] gearRatios = null; public float diffRatio; public int currentGear; [Header("Networking/Player")] private bool receivedSyncData; public VanPhysicsRegion vanZone = null; public VanPlayerZone vanCabinZone = null; public VanPlayerZone vanStorageZone = null; public Collider itemSafetyBounds = null; public Collider vehicleBounds = null; public CapsuleCollider cabinPoint = null; public Collider storageCompartment = null; public PlayerControllerB lastDriver = null; public PlayerControllerB playerWhoShifted = null; public VanSeatAnimator frontLeftSeat = null; public VanSeatAnimator frontMiddleSeat = null; public VanSeatAnimator frontRightSeat = null; public PlayerControllerB currentMiddlePassenger = null; public InteractTrigger middlePassengerSeatTrigger = null; public InteractTrigger driversSideWindow = null; public InteractTrigger passengersSideWindow = null; public AnimatedObjectTrigger driversSideWindowTrigger = null; public AnimatedObjectTrigger passengersSideWindowTrigger = null; public Vector3 playerPositionOffset; public Vector3 seatNodePositionOffset; public Vector2 syncedMoveInputVector; public bool localPlayerInMiddlePassengerSeat; public float syncedSteeringWheelRotation; public float syncedFrontWheelRPM; public float syncedBackWheelRPM; public float syncedWheelRPM; public float syncedEngineRPM; public float syncedCurrentMotorTorque; public float syncedCurrentBrakeTorque; public int syncedCarHP; public bool syncedDrivePedalPressed; public bool syncedBrakePedalPressed; public bool syncedClutchPedalPressed; public float syncedTyreStress; public bool syncedTyreSlipping; public float syncEffectsInterval; public float syncTorqueInterval; public float syncDrivetrainInterval; [Header("VFX")] public GameObject heaterDirectionLever = null; public GameObject heaterTempLever = null; public GameObject fanSpeedLever = null; public MeshRenderer heaterBaseMesh = null; public MeshRenderer windshieldMesh = null; public GameObject[] disableOnDestroy = null; public GameObject[] enableOnDestroy = null; public GameObject windshieldObject = null; public InteractTrigger pushTruckTrigger = null; public MeshRenderer leftBrakeMesh = null; public MeshRenderer rightBrakeMesh = null; public MeshRenderer backLeftBrakeMesh = null; public MeshRenderer backRightBrakeMesh = null; public Collider[] weatherEffectBlockers = null; public Collider ignitionCollider = null; public Animator handbrakeAnimator = null; public ScanNodeProperties scanNode = null; public GameObject blinkerLightsContainer = null; public GameObject sideDoorContainer = null; public Animator leftDoorAnimator = null; public Animator rightDoorAnimator = null; public Coroutine dashboardSweepCoroutine = null; public Light hazardWarningLight = null; public Light leftSignalLight = null; public Light rightSignalLight = null; public SpriteRenderer hazardWarningSymbol = null; public SpriteRenderer leftSignalSymbol = null; public SpriteRenderer rightSignalSymbol = null; public Light vehicleDisplayLight = null; public SpriteRenderer vehicleDisplay = null; public Light parkingBrakeLight = null; public Light checkEngineLight = null; public Light alertLight = null; public Light seatBeltLight = null; public Light oilLevelLight = null; public Light batteryLight = null; public Light coolantLevelLight = null; public Light dippedBeamLight = null; public Light highBeamLight = null; public Light immobiliserLight = null; public SpriteRenderer parkingBrakeSymbol = null; public SpriteRenderer checkEngineLightSymbol = null; public SpriteRenderer alertLightSymbol = null; public SpriteRenderer seatbeltLightSymbol = null; public SpriteRenderer oilLevelLightSymbol = null; public SpriteRenderer batteryLightSymbol = null; public SpriteRenderer coolantLevelLightSymbol = null; public SpriteRenderer dippedBeamLightSymbol = null; public SpriteRenderer highBeamLightSymbol = null; public SpriteRenderer immobiliserSymbol = null; public Animator ignitionAnimator = null; public GameObject carKeyContainer = null; public GameObject carKeyInHand = null; public Transform ignitionKeyPosition = null; public GameObject headlightSwitch = null; public MeshRenderer lowBeamMesh = null; public MeshRenderer highBeamMesh = null; public GameObject highBeamContainer = null; public GameObject clusterLightsContainer = null; public MeshRenderer leftDoorMesh = null; public MeshRenderer rightDoorMesh = null; public MeshRenderer radioMesh = null; public MeshRenderer radioPowerDial = null; public MeshRenderer radioVolumeDial = null; public GameObject radioLight = null; public GameObject heaterLight = null; public GameObject leftWindowLight = null; public GameObject rightWindowLight = null; public TextMeshPro radioTime = null; public TextMeshPro radioFrequency = null; public GameObject sideLightsContainer = null; public MeshRenderer sideTopLightsMesh = null; public AnimationCurve oilPressureNeedleCurve = null; public AnimationCurve turboPressureNeedleCurve = null; public MeshRenderer interiorMesh = null; public MeshRenderer speedometerMesh = null; public MeshRenderer tachometerMesh = null; public MeshRenderer oilPressureMesh = null; public MeshRenderer lowBeamMeshLod = null; public MeshRenderer highBeamMeshLod = null; public MeshRenderer backLightsMeshLod = null; public MeshRenderer sideTopLightsMeshLod = null; public MeshRenderer leftBlinkerMeshLod = null; public MeshRenderer rightBlinkerMeshLod = null; public MeshRenderer leftBlinkerMesh = null; public MeshRenderer rightBlinkerMesh = null; public Transform speedometerTransform = null; public Transform tachometerTransform = null; public Transform oilPressureTransform = null; public VanWindow frontLeftWindow = null; public VanWindow frontRightWindow = null; public InteractTrigger domeLightTrigger = null; public Animator headlampSwitchAnimator = null; public Animator hvacAnimator = null; private Coroutine blinkersCoroutine = null; public InteractTrigger windscreenWipersTrigger = null; public InteractTrigger startIgnitionTrigger = null; public GameObject reverseLightsContainer = null; public MeshRenderer reverseLightsMesh = null; public Transform tempPushTransform = null; public bool treatingPlayerInfection; public string[] upShiftString = null; public string[] downShiftString = null; public bool smoothRotation; public bool heaterOn; public int heaterTemperature; public int heaterSpeed; public float steeringWheelAnimValue; public float steeringSpeed; public bool inIgnitionAnimation; public bool isHeaterCold; public bool isHeaterWarm; private readonly float handbrakePullSpeed = 70f; private float handbrakeAnimValue; private float timeAtLastHandbrakePull; private Vector3 ignitionKeyScale = Vector3.one; private Vector3 LHD_Pos_Local = new Vector3(0.0489f, 0.1371f, -0.1566f); private Vector3 LHD_Pos_Server = new Vector3(0.0366f, 0.1023f, -0.1088f); private Vector3 LHD_Rot_Local = new Vector3(-3.446f, 3.193f, 172.642f); private Vector3 LHD_Rot_Server = new Vector3(-191.643f, 174.051f, -7.768005f); public int currentSweepStage; public bool hasSweepedDashboard; public bool hazardsBlinking; public bool hazardsOn; public bool reverseLightsOn; private float speedometerFloat; private float tachometerFloat; public float headlampSwitchAnimFloat; public float hvacFanSpeedAnimFloat; public float hvacFanDirectionAnimFloat; public float hvacFanTemperatureAnimFloat; public bool disableAnimations; public bool lowBeamsOn; public bool highBeamsOn; public bool overrideCabinLightSwitch; public bool cabinLightSwitchEnabled = true; private float oilPressureFloat; private float turboPressureFloat; public bool overdriveSwitchEnabled; public bool twistingKey; public bool ignitionOn; public bool isCabinLightOn; public bool liftGateOpen; public bool sideDoorOpen; private readonly string STEERING_WHEEL_SPEED = "steeringWheelTurnSpeed"; private readonly string ANIMATION_SPEED = "animationSpeed"; private readonly string REMOVE_IN_IGNITION = "SA_RemoveInIgnition"; private readonly string IGNITION_ANIM = "SAIgnition_Anim"; private readonly string CAR_ANIM = "SA_CarAnim"; private readonly string JUMP_WHILE_IN_CAR = "SA_JumpInCar"; private readonly string CAR_HANDBRAKE_ON_ENGAGEMENT = "SA_CarHandbrakeOn"; private readonly string CAR_HANDBRAKE_OFF_ENGAGEMENT = "SA_CarHandbrakeOff"; private readonly string HANDBRAKE_ENGAGEMENT = "engagement"; private readonly string UPPER_BODY_RADIO_ON = "U_Radio_TurnOn_LHD"; private readonly string LEFT_ARM_RADIO_ON = "L_Radio_TurnOn_LHD"; private readonly string RIGHT_ARM_RADIO_ON = "R_Radio_TurnOn_LHD"; private readonly string UPPER_BODY_HANDBRAKE_ON = "U_EngageHandbrake"; private readonly string LEFT_ARM_HANDBRAKE_ON = "L_EngageHandbrake"; private readonly string RIGHT_ARM_HANDBRAKE_ON = "R_EngageHandbrake"; private readonly string UPPER_BODY_HANDBRAKE_OFF = "U_DisengageHandbrake"; private readonly string LEFT_ARM_HANDBRAKE_OFF = "L_DisengageHandbrake"; private readonly string RIGHT_ARM_HANDBRAKE_OFF = "R_DisengageHandbrake"; private readonly string HVAC_TEMPERATURE = "temperature"; private readonly string HVAC_FAN_SPEED = "fanSpeed"; private readonly string HVAC_DIRECTION = "direction"; private readonly string DOOR_ELECTRIC_MIRROR_STATE = "mirrorOpen"; private readonly string HEADLAMP_SWITCH_DIRECTION = "switch"; private readonly string DOMELIGHT_IGNITION_HOVERTIP = "Switch cabin light : [LMB]"; private readonly string DOMELIGHT_OFF_HOVERTIP = "Switch cabin light : [LMB] (Off)"; private readonly string DOMELIGHT_ON_HOVERTIP = "Switch cabin light : [LMB] (On)"; private readonly string DOOR_ENTER_HOVERTIP = "Use door : [LMB]"; private readonly string DOOR_EXIT_HOVERTIP = "Exit : [LMB]"; private readonly string WINDOW_DISABLED_HOLDTIP = "[ No ignition power ]"; private readonly string UNTWIST_KEY_HOVERTIP = "Untwist key : [LMB]"; private readonly string UNTWIST_KEY_HOLDTIP = "[ Untwisting key ]"; private readonly string TRYIGNITION_KEY_HOVERTIP = "Try ignition : [LMB] (Hold)"; private readonly string TRYIGNITION_KEY_HOLDTIP = "[ Trying ignition ]"; private readonly string REMOVE_KEY_HOVERTIP = "Remove key : [LMB]"; private readonly string REMOVE_KEY_HOLDTIP = "[ Removing key ]"; private readonly string PLAYER_MOVEMENT = "Move"; [Header("Audio")] public RadioBehaviour liveRadioController = null; public AudioSource[] allVehicleAudios = null; public AudioClip[] streamerRadioClips = null; public AudioSource roofAudio = null; public AudioSource cabinLightSwitchAudio = null; public AudioClip cabinLightSwitchToggle = null; public AudioSource handbrakeAudio = null; public AudioClip handbrakeOn = null; public AudioClip handbrakeOff = null; public AudioClip[] clutchInClips = null; public AudioClip[] clutchOutClips = null; public AudioSource engineAudio4 = null; public AudioSource engineAudio3 = null; public AudioClip stallEngine = null; public AudioClip blinkOn = null; public AudioClip blinkOff = null; public AudioClip[] gearCrunchSounds = null; public AudioClip[] shiftSounds = null; public AudioSource roofRainAudio = null; public AudioSource carKeySounds = null; public AudioSource wiperAudio = null; public AudioSource backUpBeeperAudio = null; private Coroutine vanAlarmCoroutine = null; public AudioSource alarmAudio = null; public AudioSource heaterAudio = null; public bool roofRainAudioActive; public bool engineKnockingAudioActive; public float engineKnockSpeed; private float timeSinceTogglingRadio; public bool alarmDebounce; private float timeAtLastAlarmPing; private float timeAtLastEVAPing; private float lastSongTime; public float minFrequency = 75.55f; public float maxFrequency = 255.5f; public bool isFmRadio = false; private float syncedSongTime; private float timeLastSyncedRadio; private float radioPingTimestamp; [Header("Materials")] public Material blinkerOnMat = null; public Material clusterDialsOffMat = null; public Material clusterDialsOnMat = null; public Material heaterOffMat = null; public Material heaterOnMat = null; public Material greyLightOffMat = null; public Material redLightOffMat = null; public Material clusterOffMaterial = null; public Material clusterOnMaterial = null; public Material radioOffMaterial = null; public Material radioOnMaterial = null; public Material windowOffMaterial = null; public Material windowOnMaterial = null; public Material windshieldMat = null; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); if (((NetworkBehaviour)this).IsServer && !StartOfRound.Instance.inShipPhase) { Random random = new Random(StartOfRound.Instance.randomMapSeed); isSpecialVariant = random.NextDouble() < (double)specialVariantChance; if (random.Next(100) < 37) { voiceModule.randomServiceAlert = random.Next(18, 21); } if (random.Next(100) < 10) { voiceModule.useAltAudio = true; voiceModule.voiceAudioClips[4] = voiceModule.keysAlertAlt; voiceModule.voiceAudioClips[6] = voiceModule.doorAlertAlt; voiceModule.voiceAudioClips[7] = voiceModule.doorAlertAlt; voiceModule.voiceAudioClips[8] = voiceModule.doorAlertAlt; voiceModule.voiceAudioClips[9] = voiceModule.doorAlertAlt; voiceModule.clusterTexts[4] = "dont forget your keys"; voiceModule.clusterTexts[6] = "a door is ajar"; voiceModule.clusterTexts[7] = "a door is ajar"; voiceModule.clusterTexts[8] = "a door is ajar"; voiceModule.clusterTexts[9] = "a door is ajar"; } SetSpecialVariantRpc(isSpecialVariant); InitializeVanRpc(voiceModule.randomServiceAlert, voiceModule.useAltAudio); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetSpecialVariantRpc(bool special) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4283610501u, val3, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref special, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4283610501u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isSpecialVariant = special; SetVariant(isSpecialVariant); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void InitializeVanRpc(int serviceAlert, bool useAlt) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2934651884u, val3, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, serviceAlert); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref useAlt, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2934651884u, val3, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; voiceModule.randomServiceAlert = serviceAlert; voiceModule.useAltAudio = useAlt; if (useAlt) { voiceModule.voiceAudioClips[4] = voiceModule.keysAlertAlt; voiceModule.voiceAudioClips[6] = voiceModule.doorAlertAlt; voiceModule.voiceAudioClips[7] = voiceModule.doorAlertAlt; voiceModule.voiceAudioClips[8] = voiceModule.doorAlertAlt; voiceModule.voiceAudioClips[9] = voiceModule.doorAlertAlt; voiceModule.clusterTexts[4] = "dont forget your keys"; voiceModule.clusterTexts[6] = "a door is ajar"; voiceModule.clusterTexts[7] = "a door is ajar"; voiceModule.clusterTexts[8] = "a door is ajar"; voiceModule.clusterTexts[9] = "a door is ajar"; } } } public void SetVariant(bool isJenson) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) truckMat.mainTexture = (Texture)(object)(isJenson ? rareTruckTex : defaultTruckTex); if (isJenson) { radioLightCol.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)170, byte.MaxValue)); leftWindowLightCol.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)170, byte.MaxValue)); rightWindowLightCol.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)170, byte.MaxValue)); heaterLightCol.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)170, byte.MaxValue)); clusterLightCol.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)222, byte.MaxValue)); voiceModule.clusterLight.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)222, byte.MaxValue)); vehicleDisplay.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)222, byte.MaxValue)); vehicleDisplayLight.color = Color32.op_Implicit(new Color32((byte)250, (byte)254, (byte)222, byte.MaxValue)); clusterDialsOnMat = rareTruckDialsOn; clusterOnMaterial = rareTruckClusterOn; radioOnMaterial = rareTruckRadioOn; heaterOnMat = rareHeaterOn; windowOnMaterial = rareWindowOn; ((Graphic)radioTime).color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)204, (byte)51, byte.MaxValue)); ((Graphic)radioFrequency).color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)204, (byte)51, byte.MaxValue)); ((Graphic)voiceModule.clusterScreen).color = Color32.op_Implicit(new Color32(byte.MaxValue, (byte)204, (byte)51, byte.MaxValue)); voiceModule.clusterTexts[0] = "sys status: [ok]"; voiceModule.clusterTexts[15] = "high temp!"; voiceModule.clusterTexts[13] = "error: wd606"; } } public void OnEnable() { VehicleUtils.vanController = this; } public void Awake() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) base.ragdollPhysicsBody.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody1.interpolation = (RigidbodyInterpolation)1; base.windwiperPhysicsBody2.interpolation = (RigidbodyInterpolation)1; playerPhysicsBody.interpolation = (RigidbodyInterpolation)0; playerPhysicsBody.freezeRotation = true; base.backDoorOpen = true; ((VehicleController)this).Awake(); base.physicsRegion.priority = 1; base.syncedPosition = ((Component)this).transform.position; base.syncedRotation = ((Component)this).transform.rotation; Transform transform = ((Component)base.driverSeatTrigger.playerPositionNode).transform; transform.localPosition += seatNodePositionOffset; Transform transform2 = ((Component)middlePassengerSeatTrigger.playerPositionNode).transform; transform2.localPosition += seatNodePositionOffset; Transform transform3 = ((Component)base.passengerSeatTrigger.playerPositionNode).transform; transform3.localPosition += seatNodePositionOffset; usingSwitchIgnition = false; InitializeVan(); } private void InitializeVan() { //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) base.carTooltips = new string[4] { "Gas pedal : [W]", "Brake pedal : [S]", "Clutch pedal : [Shift]", "Switch action : [LMB]" }; transmissionHP = baseTransmissionHP; syncedTransmissionHP = baseTransmissionHP; if (!StartOfRound.Instance.inShipPhase) { base.carHP = base.baseCarHP; syncedCarHP = base.baseCarHP; } SetWheelFriction(); base.mainRigidbody.maxLinearVelocity = base.carMaxSpeed; base.mainRigidbody.maxAngularVelocity = 4f; base.FrontLeftWheel.mass = 150f; base.FrontRightWheel.mass = 150f; base.BackLeftWheel.mass = 150f; base.BackRightWheel.mass = 150f; base.mainRigidbody.automaticCenterOfMass = false; base.mainRigidbody.centerOfMass = new Vector3(0f, -0.26f, 0.25f); base.mainRigidbody.automaticInertiaTensor = false; JointSpring suspensionSpring = new JointSpring { spring = 18000f, damper = 3800f, targetPosition = 0.7f }; base.FrontLeftWheel.sprungMass = 228.2732f; base.FrontRightWheel.sprungMass = 228.2732f; base.BackLeftWheel.sprungMass = 271.7272f; base.BackRightWheel.sprungMass = 271.7272f; base.FrontRightWheel.forceAppPointDistance = 0.47f; base.FrontLeftWheel.forceAppPointDistance = 0.47f; base.BackRightWheel.forceAppPointDistance = 0.4f; base.BackLeftWheel.forceAppPointDistance = 0.4f; base.FrontRightWheel.suspensionSpring = suspensionSpring; base.FrontLeftWheel.suspensionSpring = suspensionSpring; base.BackRightWheel.suspensionSpring = suspensionSpring; base.BackLeftWheel.suspensionSpring = suspensionSpring; base.FrontRightWheel.wheelDampingRate = 3.1f; base.FrontLeftWheel.wheelDampingRate = 3.1f; base.BackRightWheel.wheelDampingRate = 3.1f; base.BackLeftWheel.wheelDampingRate = 3.1f; base.FrontRightWheel.suspensionDistance = 0.4f; base.FrontLeftWheel.suspensionDistance = 0.4f; base.BackRightWheel.suspensionDistance = 0.4f; base.BackLeftWheel.suspensionDistance = 0.4f; } private void SetWheelFriction() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_007a: 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_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) WheelFrictionCurve val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 1f; ((WheelFrictionCurve)(ref val)).extremumValue = 0.6f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 0.5f; ((WheelFrictionCurve)(ref val)).stiffness = baseForwardStiffness; WheelFrictionCurve forwardFriction = val; base.FrontRightWheel.forwardFriction = forwardFriction; base.FrontLeftWheel.forwardFriction = forwardFriction; base.BackRightWheel.forwardFriction = forwardFriction; base.BackLeftWheel.forwardFriction = forwardFriction; val = default(WheelFrictionCurve); ((WheelFrictionCurve)(ref val)).extremumSlip = 0.7f; ((WheelFrictionCurve)(ref val)).extremumValue = 1f; ((WheelFrictionCurve)(ref val)).asymptoteSlip = 0.8f; ((WheelFrictionCurve)(ref val)).asymptoteValue = 1f; ((WheelFrictionCurve)(ref val)).stiffness = baseSidewaysStiffness; WheelFrictionCurve sidewaysFriction = val; base.FrontRightWheel.sidewaysFriction = sidewaysFriction; base.FrontLeftWheel.sidewaysFriction = sidewaysFriction; base.BackRightWheel.sidewaysFriction = sidewaysFriction; base.BackLeftWheel.sidewaysFriction = sidewaysFriction; } public void Start() { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)this).StartCoroutine(SetRainCollision()); base.FrontLeftWheel.brakeTorque = maxBrakingPower; base.FrontRightWheel.brakeTorque = maxBrakingPower; base.BackLeftWheel.brakeTorque = maxBrakingPower; base.BackRightWheel.brakeTorque = maxBrakingPower; base.currentRadioClip = 0; base.decals = (DecalProjector[])(object)new DecalProjector[24]; if (StartOfRound.Instance.inShipPhase) { base.loadedVehicleFromSave = true; base.mainRigidbody.isKinematic = true; ((Component)this).transform.position = StartOfRound.Instance.magnetPoint.position + StartOfRound.Instance.magnetPoint.forward * 7f; base.magnetedToShip = true; base.inDropshipAnimation = false; hasDeliveredVehicle = true; base.hasBeenSpawned = true; StartMagneting(); } } public IEnumerator SetRainCollision() { yield return (object)new WaitForSeconds(4f); ParticleSystem[] particleTriggers = (ParticleSystem[])(object)new ParticleSystem[13] { References.rainParticles, References.rainHitParticles, References.stormyRainParticles, References.stormyRainHitParticles, References.wesleyHurricaneRainParticles, References.wesleyHurricaneRainHitParticles, References.wesleyHurricaneSandParticles, References.wesleyForsakenRainParticles, References.wesleyForsakenRainHitParticles, References.kenjiAcidRainParticles, References.kenjiAcidRainHitParticles, References.kenjiAcidStormyRainParticles, References.kenjiAcidStormyRainHitParticles }; for (int i = 0; i < particleTriggers.Length; i++) { if ((Object)(object)particleTriggers[i] == (Object)null) { Plugin.LogDebug("Weather particle or Trigger is null."); continue; } TriggerModule trigger = particleTriggers[i].trigger; for (int j = 0; j < weatherEffectBlockers.Length; j++) { int index = ((TriggerModule)(ref trigger)).colliderCount + j; ((TriggerModule)(ref trigger)).SetCollider(index, (Component)(object)weatherEffectBlockers[j]); } trigger = default(TriggerModule); } } public void SendClientSyncData() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (base.magnetedToShip) { Vector3 eulerAngles = ((Quaternion)(ref base.magnetTargetRotation)).eulerAngles; MagnetCarRpc(base.magnetTargetPosition, eulerAngles, base.magnetStartPosition, base.magnetStartRotation, RoundManager.Instance.tempTransform.eulerAngles, base.averageVelocityAtMagnetStart); } if (base.turboBoosts > 0) { AddTurboBoostRpc(base.turboBoosts); } SyncClientDataRpc(base.carHP, base.steeringWheelAnimFloat, base.ignitionStarted, isSpecialVariant, voiceModule.randomServiceAlert, voiceModule.useAltAudio); } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncClientDataRpc(int carHealth, float wheelRot, bool setStarted, bool isJenson, int serviceAlert, bool useAltVoices) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1322991716u, val3, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, carHealth); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref wheelRot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setStarted, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isJenson, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, serviceAlert); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref useAltVoices, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1322991716u, val3, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!receivedSyncData) { receivedSyncData = true; isSpecialVariant = isJenson; SetVariant(isSpecialVariant); base.carHP = carHealth; syncedCarHP = carHealth; syncedSteeringWheelRotation = wheelRot; base.steeringWheelAnimFloat = wheelRot; disableAnimations = !setStarted; inIgnitionAnimation = !setStarted; ignitionOn = setStarted; ignitionOn = setStarted; base.keyIsInIgnition = setStarted; voiceModule.randomServiceAlert = serviceAlert; voiceModule.useAltAudio = useAltVoices; SetIgnitionValues(trying: false, keyInHand: false, setStarted); SetIgnition(setStarted, setStarted); SetFrontCabinLightOn(setStarted); SetIgnitionTrigger(); if (setStarted) { dashboardSweepCoroutine = ((MonoBehaviour)this).StartCoroutine(DashboardSweepCoroutine()); leftDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, setStarted); rightDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, setStarted); } SetSymbolActive(vehicleDisplay, vehicleDisplayLight, setStarted); SetWindowTriggers(setStarted); ignitionCollider.enabled = setStarted; ignitionAnimator.SetInteger(IGNITION_ANIM, setStarted ? 1 : 0); } } public void SetBackDoorOpen(bool open) { liftGateOpen = open; } public void SetSideDoorOpen(bool open) { sideDoorOpen = open; } public void SetCabinLightSwitchLocalClient() { SetCabinLightSwitchOwnerRpc(); } [Rpc(/*Could not decode attribute arguments.*/)] private void SetCabinLightSwitchOwnerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1187453226u, val3, val, (SendTo)0, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1187453226u, val3, val, (SendTo)0, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!overrideCabinLightSwitch && !cabinLightSwitchEnabled) { overrideCabinLightSwitch = true; cabinLightSwitchEnabled = true; roofAudio.PlayOneShot(cabinLightSwitchToggle); base.frontCabinLightContainer.SetActive(true); ((Renderer)base.frontCabinLightMesh).material = base.headlightsOnMat; string dOMELIGHT_ON_HOVERTIP = DOMELIGHT_ON_HOVERTIP; domeLightTrigger.hoverTip = dOMELIGHT_ON_HOVERTIP; SetCabinLightSwitchRpc(switchState: true, cabLightOn: true, setOverride: true, dOMELIGHT_ON_HOVERTIP); } else if (overrideCabinLightSwitch) { overrideCabinLightSwitch = false; cabinLightSwitchEnabled = true; roofAudio.PlayOneShot(cabinLightSwitchToggle); bool flag = isCabinLightOn && base.keyIsInIgnition && ignitionOn && cabinLightSwitchEnabled; base.frontCabinLightContainer.SetActive(flag); ((Renderer)base.frontCabinLightMesh).material = (Material)(flag ? ((object)base.headlightsOnMat) : ((object)greyLightOffMat)); string dOMELIGHT_ON_HOVERTIP = DOMELIGHT_IGNITION_HOVERTIP; domeLightTrigger.hoverTip = dOMELIGHT_ON_HOVERTIP; SetCabinLightSwitchRpc(switchState: true, flag, setOverride: false, dOMELIGHT_ON_HOVERTIP); } else { overrideCabinLightSwitch = false; cabinLightSwitchEnabled = false; roofAudio.PlayOneShot(cabinLightSwitchToggle); base.frontCabinLightContainer.SetActive(false); ((Renderer)base.frontCabinLightMesh).material = greyLightOffMat; string dOMELIGHT_ON_HOVERTIP = DOMELIGHT_OFF_HOVERTIP; domeLightTrigger.hoverTip = dOMELIGHT_ON_HOVERTIP; SetCabinLightSwitchRpc(switchState: false, cabLightOn: false, setOverride: false, dOMELIGHT_ON_HOVERTIP); } } } [Rpc(/*Could not decode attribute arguments.*/)] private void SetCabinLightSwitchRpc(bool switchState, bool cabLightOn, bool setOverride, string setMessage) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_0142: 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_0114: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(396020993u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref switchState, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref cabLightOn, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setOverride, default(ForPrimitives)); bool flag = setMessage != null; ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(setMessage, false); } ((NetworkBehaviour)this).__endSendRpc(ref val2, 396020993u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; overrideCabinLightSwitch = setOverride; cabinLightSwitchEnabled = switchState; roofAudio.PlayOneShot(cabinLightSwitchToggle); base.frontCabinLightContainer.SetActive(cabLightOn); ((Renderer)base.frontCabinLightMesh).material = (Material)(cabLightOn ? ((object)base.headlightsOnMat) : ((object)greyLightOffMat)); domeLightTrigger.hoverTip = setMessage; } } public void SetFrontCabinLightOn(bool setOn) { isCabinLightOn = setOn; if (overrideCabinLightSwitch) { if (!base.frontCabinLightContainer.activeSelf) { base.frontCabinLightContainer.SetActive(true); ((Renderer)base.frontCabinLightMesh).material = base.headlightsOnMat; } } else if (cabinLightSwitchEnabled) { base.frontCabinLightContainer.SetActive(setOn); ((Renderer)base.frontCabinLightMesh).material = (Material)(setOn ? ((object)base.headlightsOnMat) : ((object)greyLightOffMat)); } else { base.frontCabinLightContainer.SetActive(false); ((Renderer)base.frontCabinLightMesh).material = greyLightOffMat; } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetFrontCabinLightRpc(bool setOn) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2820477147u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2820477147u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetFrontCabinLightOn(setOn); } } } public void ToggleHandbrake() { if (((Object)(object)base.currentDriver != (Object)null && !base.localPlayerInControl) || (base.localPlayerInControl && Time.realtimeSinceStartup - timeAtLastHandbrakePull < 0.78f)) { return; } timeAtLastHandbrakePull = Time.realtimeSinceStartup; handbrakeEngaged = !handbrakeEngaged; if (base.ignitionStarted) { if (handbrakeEngaged) { PlayCombinedOccupantAnimation(base.currentDriver, UPPER_BODY_HANDBRAKE_ON, LEFT_ARM_HANDBRAKE_ON, RIGHT_ARM_HANDBRAKE_ON, 0.075f); } else { PlayCombinedOccupantAnimation(base.currentDriver, UPPER_BODY_HANDBRAKE_OFF, LEFT_ARM_HANDBRAKE_OFF, RIGHT_ARM_HANDBRAKE_OFF, 0.075f); } } if (handbrakeEngaged) { handbrakeAudio.PlayOneShot(handbrakeOn); } else { handbrakeAudio.PlayOneShot(handbrakeOff); } SetHandbrakeRpc(handbrakeEngaged); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetHandbrakeRpc(bool setHandbrake) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1779906441u, val3, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setHandbrake, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1779906441u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (handbrakeEngaged == setHandbrake) { return; } timeAtLastHandbrakePull = Time.realtimeSinceStartup; handbrakeEngaged = setHandbrake; if (base.ignitionStarted) { if (handbrakeEngaged) { PlayCombinedOccupantAnimation(base.currentDriver, UPPER_BODY_HANDBRAKE_ON, LEFT_ARM_HANDBRAKE_ON, RIGHT_ARM_HANDBRAKE_ON, 0.075f); } else { PlayCombinedOccupantAnimation(base.currentDriver, UPPER_BODY_HANDBRAKE_OFF, LEFT_ARM_HANDBRAKE_OFF, RIGHT_ARM_HANDBRAKE_OFF, 0.075f); } } if (handbrakeEngaged) { handbrakeAudio.PlayOneShot(handbrakeOn); } else { handbrakeAudio.PlayOneShot(handbrakeOff); } } public void SetWindowTriggers(bool isIgnitionOn) { driversSideWindow.holdInteraction = !isIgnitionOn; passengersSideWindow.holdInteraction = !isIgnitionOn; if (!isIgnitionOn) { driversSideWindow.holdTip = WINDOW_DISABLED_HOLDTIP; passengersSideWindow.holdTip = WINDOW_DISABLED_HOLDTIP; } else { driversSideWindow.holdTip = null; passengersSideWindow.holdTip = null; } } public void SetIgnitionTrigger() { if (base.localPlayerInControl || !((Object)(object)base.currentDriver != (Object)null)) { if (base.ignitionStarted) { startIgnitionTrigger.hoverTip = UNTWIST_KEY_HOVERTIP; startIgnitionTrigger.holdTip = UNTWIST_KEY_HOLDTIP; startIgnitionTrigger.timeToHold = 0.5f; startIgnitionTrigger.timeToHoldSpeedMultiplier = 1f; } else if (base.keyIsInIgnition) { bool flag = usingSwitchIgnition || (Object)(object)base.currentDriver == (Object)null; startIgnitionTrigger.hoverTip = (flag ? REMOVE_KEY_HOVERTIP : TRYIGNITION_KEY_HOVERTIP); startIgnitionTrigger.holdTip = (flag ? REMOVE_KEY_HOLDTIP : TRYIGNITION_KEY_HOLDTIP); startIgnitionTrigger.timeToHold = (flag ? 0.5f : 1f); startIgnitionTrigger.timeToHoldSpeedMultiplier = (flag ? 1f : 0f); } else { startIgnitionTrigger.hoverTip = TRYIGNITION_KEY_HOVERTIP; startIgnitionTrigger.holdTip = TRYIGNITION_KEY_HOLDTIP; startIgnitionTrigger.timeToHold = 1f; startIgnitionTrigger.timeToHoldSpeedMultiplier = 0f; } } } public void StartTryCarIgnition() { if (!usingSwitchIgnition && base.localPlayerInControl && !base.ignitionStarted && !inIgnitionAnimation && (!inIgnitionAnimation || !startIgnitionTrigger.isBeingHeldByPlayer)) { CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; TryIgnitionRpc(base.keyIsInIgnition, isCabinLightOn, engineStalled); SetIgnitionTrigger(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: true)); } } private IEnumerator TryIgnition(bool isLocalDriver) { if ((Object)(object)base.currentDriver == (Object)null) { base.keyIgnitionCoroutine = null; yield break; } if (base.keyIsInIgnition) { base.currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, engineStalled ? 9 : 12); int animIndex = base.currentDriver.playerBodyAnimator.GetInteger(CAR_ANIM); if (animIndex == 9) { animIndex = 12; } ignitionAnimator.SetInteger(IGNITION_ANIM, animIndex); SetIgnitionTrigger(); engineStalled = false; SetIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.02f); carKeySounds.PlayOneShot(base.twistKey); SetIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.1467f); } else { base.currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 2); ignitionAnimator.SetInteger(IGNITION_ANIM, 2); SetIgnitionTrigger(); SetIgnitionValues(trying: false, keyInHand: true, keyInSlot: false); yield return (object)new WaitForSeconds(0.6f); carKeySounds.PlayOneShot(base.insertKey); SetIgnitionValues(trying: false, keyInHand: true, keyInSlot: true); SetIgnitionTrigger(); yield return (object)new WaitForSeconds(0.2f); carKeySounds.PlayOneShot(base.twistKey); SetIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.185f); } if (!isLocalDriver) { yield break; } bool clutchInterlock = clutchPedalPressed && clutchEngagement <= 0.31f; TryStartIgnitionRpc(clutchInterlock); SetIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); ignitionOn = true; SetFrontCabinLightOn(ignitionOn); SetIgnitionTrigger(); SetWindowTriggers(ignitionOn); if (dashboardSweepCoroutine == null && !hasSweepedDashboard) { dashboardSweepCoroutine = ((MonoBehaviour)this).StartCoroutine(DashboardSweepCoroutine()); } leftDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); rightDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); SetSymbolActive(vehicleDisplay, vehicleDisplayLight, active: true); if (!clutchInterlock) { yield break; } PlayIgnitionAudio(); yield return (object)new WaitForSeconds(Random.Range(0.8f, 2f)); if ((float)Random.Range(0, 100) < base.chanceToStartIgnition && clutchInterlock) { CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); disableAnimations = false; inIgnitionAnimation = false; ignitionOn = true; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } SetIgnitionValues(trying: false, keyInHand: false, keyInSlot: true); SetIgnition(setStarted: true, setCabinLight: true); SetFrontCabinLightOn(base.keyIsInIgnition); startIgnitionTrigger.StopInteraction(); SetIgnitionTrigger(); startIgnitionTrigger.StopInteraction(); startIgnitionTrigger.currentCooldownValue = 1f; StartIgnitionRpc(setTriggers: false); } else { base.chanceToStartIgnition += 22f; base.chanceToStartIgnition = Mathf.Clamp(base.chanceToStartIgnition, 0f, 99f); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryIgnitionRpc(bool setKeyInSlot, bool cabLightActive, bool hasStalled) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(3540053645u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref cabLightActive, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref hasStalled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 3540053645u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; SetIgnitionValues(trying: false, keyInHand: false, setKeyInSlot); if (!isCabinLightOn && cabLightActive) { SetFrontCabinLightOn(cabLightActive); } engineStalled = hasStalled; base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(TryIgnition(isLocalDriver: false)); } } [Rpc(/*Could not decode attribute arguments.*/)] public void TryStartIgnitionRpc(bool shiftInterlock) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2290489169u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref shiftInterlock, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2290489169u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); ignitionOn = true; SetFrontCabinLightOn(ignitionOn); SetWindowTriggers(ignitionOn); if (dashboardSweepCoroutine == null && !hasSweepedDashboard) { dashboardSweepCoroutine = ((MonoBehaviour)this).StartCoroutine(DashboardSweepCoroutine()); } leftDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); rightDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); SetSymbolActive(vehicleDisplay, vehicleDisplayLight, active: true); if (shiftInterlock) { PlayIgnitionAudio(); } } } public void PlayIgnitionAudio() { base.engineAudio1.Stop(); base.engineAudio1.clip = base.revEngineStart; base.engineAudio1.volume = 0.7f; base.engineAudio1.PlayOneShot(base.engineRev); base.engineAudio1.pitch = 1f; base.carEngine1AudioActive = true; } public void CancelTryCarIgnition() { if (!usingSwitchIgnition && base.localPlayerInControl && !base.ignitionStarted && inIgnitionAnimation && (inIgnitionAnimation || !startIgnitionTrigger.isBeingHeldByPlayer)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; int integer = localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM); if (integer == 0 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 13); } else if ((integer == 2 || integer == 9 || integer == 12) && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 3); } else { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } int integer2 = localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM); CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; SetIgnitionTrigger(); int num = integer2; if (integer == 13) { num = 3; } ignitionAnimator.SetInteger(IGNITION_ANIM, num); CancelTryIgnitionRpc(base.keyIsInIgnition, isCabinLightOn, ignitionOn, integer2, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelTryIgnitionRpc(bool setKeyInSlot, bool cabinLightOn, bool isIgnitionOn, int playerAnimIndex, int ignitionAnimIndex) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(191059047u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref cabinLightOn, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref isIgnitionOn, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerAnimIndex); BytePacker.WriteValueBitPacked(val2, ignitionAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val2, 191059047u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, playerAnimIndex); } ignitionAnimator.SetInteger(IGNITION_ANIM, ignitionAnimIndex); if (setKeyInSlot && !base.keyIsInIgnition) { carKeySounds.PlayOneShot(base.insertKey); } SetIgnitionValues(trying: false, keyInHand: false, setKeyInSlot); if (!setKeyInSlot) { return; } if (cabinLightOn && !isCabinLightOn) { SetFrontCabinLightOn(cabinLightOn); } if (isIgnitionOn && !ignitionOn) { ignitionOn = true; SetWindowTriggers(ignitionOn); if (dashboardSweepCoroutine == null && !hasSweepedDashboard) { dashboardSweepCoroutine = ((MonoBehaviour)this).StartCoroutine(DashboardSweepCoroutine()); } leftDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); rightDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); } } [Rpc(/*Could not decode attribute arguments.*/)] public void StartIgnitionRpc(bool setTriggers) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(4118721524u, val3, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref setTriggers, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val2, 4118721524u, val3, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); disableAnimations = false; inIgnitionAnimation = false; ignitionOn = true; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } SetIgnitionValues(trying: false, keyInHand: false, keyInSlot: true); SetIgnition(setStarted: true, setCabinLight: true); SetFrontCabinLightOn(base.keyIsInIgnition); if (setTriggers) { SetIgnitionTrigger(); } } } public void SetIgnition(bool setStarted, bool setCabinLight) { SetFrontCabinLightOn(setCabinLight); base.carEngine1AudioActive = setStarted; if (setStarted) { disableAnimations = false; inIgnitionAnimation = false; ignitionOn = true; if (setStarted != base.ignitionStarted) { base.ignitionStarted = true; base.carExhaustParticle.Play(); base.engineAudio1.Stop(); base.engineAudio1.PlayOneShot(base.engineStartSuccessful); base.engineAudio1.clip = base.engineRun; } } else { base.ignitionStarted = false; base.carExhaustParticle.Stop(true, (ParticleSystemStopBehavior)1); } } public void UntwistKeyInIgnition() { if ((!base.keyIsInIgnition || base.ignitionStarted || usingSwitchIgnition) && (!((Object)(object)base.currentDriver != (Object)null) || base.localPlayerInControl) && base.ignitionStarted && !inIgnitionAnimation) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(UntwistKey()); SetIgnitionTrigger(); UntwistKeyInIgnitionRpc(); } } private IEnumerator UntwistKey() { disableAnimations = true; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 7); } ignitionAnimator.SetInteger(IGNITION_ANIM, 7); yield return (object)new WaitForSeconds(0.08f); if (dashboardSweepCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dashboardSweepCoroutine); dashboardSweepCoroutine = null; StopDashboardSweepCoroutine(); } carKeySounds.PlayOneShot(base.twistKey); SetIgnitionValues(trying: false, keyInHand: false, keyInSlot: true); SetIgnition(setStarted: false, setCabinLight: true); engineAudio3.volume = 0.775f; engineAudio3.PlayOneShot(stallEngine); SetIgnitionTrigger(); yield return (object)new WaitForSeconds(0.08f); base.keyIgnitionCoroutine = null; } [Rpc(/*Could not decode attribute arguments.*/)] public void UntwistKeyInIgnitionRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(1677604189u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 1677604189u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(UntwistKey()); } } } public void RemoveKeyFromIgnition() { if ((!base.keyIsInIgnition || usingSwitchIgnition || !base.localPlayerInControl) && (!((Object)(object)base.currentDriver != (Object)null) || base.localPlayerInControl) && !base.ignitionStarted && base.keyIsInIgnition && !inIgnitionAnimation) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); SetIgnitionTrigger(); usingSwitchIgnition = false; base.chanceToStartIgnition = 20f; RemoveKeyFromIgnitionRpc(); } } private IEnumerator RemoveKey() { disableAnimations = true; inIgnitionAnimation = false; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null && currentDriver.playerBodyAnimator.GetInteger(CAR_ANIM) == 0) { PlayerControllerB currentDriver2 = base.currentDriver; if (currentDriver2 != null) { currentDriver2.playerBodyAnimator.SetTrigger(REMOVE_IN_IGNITION); } } else { PlayerControllerB currentDriver3 = base.currentDriver; if (currentDriver3 != null) { currentDriver3.playerBodyAnimator.SetInteger(CAR_ANIM, 8); } } ignitionAnimator.SetInteger(IGNITION_ANIM, 0); engineStalled = false; yield return (object)new WaitForSeconds(base.ignitionStarted ? 0.18f : 0.26f); if (dashboardSweepCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(dashboardSweepCoroutine); dashboardSweepCoroutine = null; StopDashboardSweepCoroutine(); } carKeySounds.PlayOneShot(base.removeKey); SetIgnitionValues(trying: false, keyInHand: true, keyInSlot: false); SetIgnition(setStarted: false, setCabinLight: false); ignitionOn = false; SetWindowTriggers(ignitionOn); leftDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); rightDoorAnimator.SetBool(DOOR_ELECTRIC_MIRROR_STATE, ignitionOn); SetSymbolActive(vehicleDisplay, vehicleDisplayLight, active: false); SetIgnitionTrigger(); yield return (object)new WaitForSeconds(0.73f); SetIgnitionValues(trying: false, keyInHand: false, keyInSlot: false); base.keyIgnitionCoroutine = null; } [Rpc(/*Could not decode attribute arguments.*/)] public void RemoveKeyFromIgnitionRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(2078953510u, val3, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val2, 2078953510u, val3, val, (SendTo)5, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); } } } public IEnumerator DashboardSweepCoroutine() { SetSymbolActive(dippedBeamLightSymbol, dippedBeamLight, active: true); SetSymbolActive(highBeamLightSymbol, highBeamLight, active: true); SetSymbolActive(parkingBrakeSymbol, parkingBrakeLight, active: true); SetSymbolActive(seatbeltLightSymbol, seatBeltLight, active: true); SetSymbolActive(oilLevelLightSymbol, oilLevelLight, active: true); SetSymbolActive(batteryLightSymbol, batteryLight, active: true); SetSymbolActive(coolantLevelLightSymbol, coolantLevelLight, active: true); SetSymbolActive(alertLightSymbol, alertLight, active: true); SetSymbolActive(checkEngineLightSymbol, checkEngineLight, active: true); currentSweepStage = 1; yield return (object)new WaitForSeconds(1f); SetSymbolActive(dippedBeamLightSymbol, dippedBeamLight, lowBeamsOn); SetSymbolActive(highBeamLightSymbol, highBeamLight, highBeamsOn); currentSweepStage = 2; yield return (object)new WaitForSeconds(1f); SetSymbolActive(seatbeltLightSymbol, seatBeltLight, active: false); SetSymbolActive(parkingBrakeSymbol, parkingBrakeLight, handbrakeEngaged); currentSweepStage = 3; yield return (object)new WaitForSeconds(1f); SetSymbolActive(oilLevelLightSymbol, oilLevelLight, base.carHP <= 25); SetSymbolActive(batteryLightSymbol, batteryLight, !base.ignitionStarted || base.carHP <= 22); SetSymbolActive(coolantLevelLightSymbol, coolantLevelLight, base.carHP <= 30); SetSymbolActive(alertLightSymbol, alertLight, base.carHP <= 16); SetSymbolActive(checkEngineLightSymbol, checkEngineLight, base.carHP <= 38); currentSweepStage = 4; hasSweepedDashboard = true; } private void StopDashboardSweepCoroutine() { hasSweepedDashboard = false; currentSweepStage = 0; SetSymbolActive(dippedBeamLightSymbol, dippedBeamLight, active: false); SetSymbolActive(highBeamLightSymbol, highBeamLight, active: false); SetSymbolActive(parkingBrakeSymbol, parkingBrakeLight, active: false); SetSymbolActive(seatbeltLightSymbol, seatBeltLight, active: false); SetSymbolActive(oilLevelLightSymbol, oilLevelLight, active: false); SetSymbolActive(batteryLightSymbol, batteryLight, active: false); SetSymbolActive(coolantLevelLightSymbol, coolantLevelLight, active: false); SetSymbolActive(alertLightSymbol, alertLight, active: false); SetSymbolActive(checkEngineLightSymbol, checkEngineLight, active: false); } public void CancelIgnitionAnimation(bool ignitionOn, bool setIgnitionAnim) { CancelIgnitionCoroutine(); base.keyIsInDriverHand = false; twistingKey = false; base.carEngine1AudioActive = ignitionOn; if (setIgnitionAnim) { ignitionAnimator.SetInteger(IGNITION_ANIM, ignitionOn ? 1 : 0); } } private void CancelIgnitionCoroutine() { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } } public void SetIgnitionValues(bool trying, bool keyInHand, bool keyInSlot) { twistingKey = trying; base.keyIsInDriverHand = keyInHand; base.keyIsInIgnition = keyInSlot; } public void SetDoorInteractTrigger(InteractTrigger trigger, string tip, bool setHoldInteract = false) { trigger.hoverTip = tip; trigger.holdInteraction = setHoldInteract; } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelSetPlayerInVehicleRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val3 = default(RpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendRpc(39759947u, val3, val, (SendTo)6, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val2, 39759947u, val3, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)GameNetworkManager