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.6.5
BepInEx/plugins/scanvan/RadioBrowser.dll
Decompiled a week 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 a week 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 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.Scripts; using ScanVan.Utils; using ScandalsTweaks.Patches; using ScandalsTweaks.Scripts; 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("ImmersiveVisor")] [assembly: IgnoresAccessChecksTo("NoteBoxz.LethalMin")] [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.6.5.0")] [assembly: AssemblyInformationalVersion("1.6.5+57fd1df4b1d28b3ffb44f465ec736e8eb6d9803a")] [assembly: AssemblyProduct("ScanVan")] [assembly: AssemblyTitle("scandal.scanvan")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.6.5.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class 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_052c: Unknown result type (might be due to invalid IL or missing references) //IL_053d: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_0580: Unknown result type (might be due to invalid IL or missing references) //IL_0591: 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_05af: Unknown result type (might be due to invalid IL or missing references) //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05c5: 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_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_0667: Unknown result type (might be due to invalid IL or missing references) //IL_066c: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_0686: Unknown result type (might be due to invalid IL or missing references) //IL_0688: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Expected I4, but got Unknown //IL_06ac: Unknown result type (might be due to invalid IL or missing references) //IL_06b1: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_06ef: Unknown result type (might be due to invalid IL or missing references) //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_071d: Unknown result type (might be due to invalid IL or missing references) //IL_0725: 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); 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 specialChance; public bool isSpecial; public Light jcJensonLight = null; public SpriteRenderer jcJensonSymbol = null; public GameObject jcJensonSymbolObj = null; [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 baseSteeringWheelTurnSpeed; 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; public float extraWeight = 0f; [Header("Networking/Player")] 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 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; private string STEERING_WHEEL_SPEED = "steeringWheelTurnSpeed"; private string ANIMATION_SPEED = "animationSpeed"; private string REMOVE_IN_IGNITION = "SA_RemoveInIgnition"; private string IGNITION_ANIM = "SAIgnition_Anim"; private string CAR_ANIM = "SA_CarAnim"; private string JUMP_WHILE_IN_CAR = "SA_JumpInCar"; private string CAR_HANDBRAKE_ON_ENGAGEMENT = "SA_CarHandbrakeOn"; private string CAR_HANDBRAKE_OFF_ENGAGEMENT = "SA_CarHandbrakeOff"; private string HANDBRAKE_ENGAGEMENT = "engagement"; private string UPPER_BODY_RADIO_ON = "U_Radio_TurnOn_LHD"; private string LEFT_ARM_RADIO_ON = "L_Radio_TurnOn_LHD"; private string RIGHT_ARM_RADIO_ON = "R_Radio_TurnOn_LHD"; private string UPPER_BODY_HANDBRAKE_ON = "U_EngageHandbrake"; private string LEFT_ARM_HANDBRAKE_ON = "L_EngageHandbrake"; private string RIGHT_ARM_HANDBRAKE_ON = "R_EngageHandbrake"; private string UPPER_BODY_HANDBRAKE_OFF = "U_DisengageHandbrake"; private string LEFT_ARM_HANDBRAKE_OFF = "L_DisengageHandbrake"; private string RIGHT_ARM_HANDBRAKE_OFF = "R_DisengageHandbrake"; [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 GameObject leftElectricMirror = null; public GameObject rightElectricMirror = null; public Coroutine dashboardSymbolPreStartup = 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; private Coroutine blinkersCoroutine = null; public InteractTrigger windscreenWipersTrigger = null; public InteractTrigger startIgnitionTrigger = null; public InteractTrigger stopIgnitionTrigger = null; public GameObject reverseLightsContainer = null; public MeshRenderer reverseLightsMesh = null; public Animator manualShiftAnimator = null; public bool treatingPlayerInfection; public string[] upShiftString = null; public string[] downShiftString = null; public float mirrorAngleFloat; public float lightSwitchFloat; public float heatSpeedFloat; public float heatDirectionFloat; public float heatPositionFloat; public bool smoothRotation; public bool heaterOn; public float heaterTemp; public float heaterSpeed; public float steeringWheelAnimValue; public float steeringSpeed; public bool inIgnitionAnimation; public bool isHeaterCold; public bool isHeaterWarm; private float handbrakePullSpeed = 68f; 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 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 accessoryMode; public bool isCabLightOn; public bool liftGateOpen; public bool sideDoorOpen; [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 truckAlarmCoroutine = 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 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 (!StartOfRound.Instance.inShipPhase && ((NetworkBehaviour)this).IsServer) { specialChance = 0.09f; Random random = new Random(StartOfRound.Instance.randomMapSeed); isSpecial = random.NextDouble() < (double)specialChance; SetSpecialVariantRpc(isSpecial); } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4283610501u, val2, val, (SendTo)6, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref special, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4283610501u, val2, val, (SendTo)6, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; isSpecial = special; SetVariant(isSpecial); } } } public void SetVariant(bool isJenson) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00de: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) if (isJenson) { truckMat.mainTexture = (Texture)(object)rareTruckTex; 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)); 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"; } else { truckMat.mainTexture = (Texture)(object)defaultTruckTex; } } public void OnEnable() { References.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; SetTruckStats(); } private void SetTruckStats() { //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02e9: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Unknown result type (might be due to invalid IL or missing references) base.idleSpeed = 80f; base.pushForceMultiplier = 162f; base.carTooltips = new string[4] { "Gas pedal: [W]", "Brake pedal: [S]", "Clutch pedal: [L-Shift]", "Switch action: [LMB]" }; base.turboBoostForce = 11100f; base.turboBoostUpwardForce = 25000f; steeringSpeed = 8f; baseSteeringWheelTurnSpeed = 4.2f; base.steeringWheelTurnSpeed = baseSteeringWheelTurnSpeed; handbrakeEngaged = true; inNeutral = true; throttleSpeed = 1f; maxThrottleSpeed = 2f; throttleReleaseSpeed = 3f; base.minimalBumpForce = 12500f; base.mediumBumpForce = 51000f; base.maximumBumpForce = 98000f; minInclineCompensation = 1.78f; maxInclineCompensation = 4.1f; maxInclineCompensationAngle = 32f; baseTransmissionHP = 20; transmissionHP = baseTransmissionHP; syncedTransmissionHP = baseTransmissionHP; clutchSpeed = 4f; clutchReturnSpeed = 1.5f; minClutchReturnSpeed = 0.5f; base.jumpForce = 4450f; base.brakeSpeed = 10000f; maxBrakingPower = 12000f; base.speed = 60f; base.stability = 0.4f; backUpBeeperAudio.volume = 0.95f; backUpBeeperAudio.dopplerLevel = 0.25f; heaterTemp = 1f; isHeaterWarm = true; base.torqueForce = 1.6f; base.carMaxSpeed = 60f; base.pushVerticalOffsetAmount = 1.25f; base.baseCarHP = 48; if (!StartOfRound.Instance.inShipPhase) { base.carHP = base.baseCarHP; syncedCarHP = base.baseCarHP; } base.MinEngineRPM = 800f; base.MaxEngineRPM = 5000f; base.engineIntensityPercentage = base.MaxEngineRPM; base.carAcceleration = 350f; base.EngineTorque = 100f; engineReversePower = 6100f; SetWheelFriction(); base.mainRigidbody.maxLinearVelocity = base.carMaxSpeed; base.mainRigidbody.maxAngularVelocity = 4f; base.chanceToStartIgnition = Random.Range(12, 45); 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 val = default(JointSpring); val.spring = 18000f; val.damper = 3800f; val.targetPosition = 0.7f; JointSpring suspensionSpring = val; 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(SetCarRainCollisions()); 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 SetCarRainCollisions() { yield return (object)new WaitForSeconds(4f); ParticleSystem[] particleTriggers = (ParticleSystem[])(object)new ParticleSystem[9] { GlobalReferences.rainParticles, GlobalReferences.rainHitParticles, GlobalReferences.stormyRainParticles, GlobalReferences.stormyRainHitParticles, GlobalReferences.wesleyHurricaneRainParticles, GlobalReferences.wesleyHurricaneRainHitParticles, GlobalReferences.wesleyHurricaneSandParticles, GlobalReferences.wesleyForsakenRainParticles, GlobalReferences.wesleyForsakenRainHitParticles }; for (int i = 0; i < particleTriggers.Length; i++) { if ((Object)(object)particleTriggers[i] == (Object)null) { Plugin.Logger.LogDebug((object)"ScanVan: 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, isSpecial); } [Rpc(/*Could not decode attribute arguments.*/)] public void SyncClientDataRpc(int carHealth, float wheelRot, bool ignOn, bool isJenson) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_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_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = default(RpcAttributeParams); RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(718438838u, val2, val, (SendTo)3, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, carHealth); ((FastBufferWriter)(ref val3)).WriteValueSafe<float>(ref wheelRot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref ignOn, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref isJenson, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 718438838u, val2, val, (SendTo)3, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (!((NetworkBehaviour)this).IsHost) { isSpecial = isJenson; SetVariant(isSpecial); base.carHP = carHealth; syncedCarHP = carHealth; syncedSteeringWheelRotation = wheelRot; base.steeringWheelAnimFloat = wheelRot; disableAnimations = !ignOn; inIgnitionAnimation = !ignOn; accessoryMode = ignOn; accessoryMode = ignOn; base.keyIsInIgnition = ignOn; SetKeyIgnitionValues(trying: false, keyInHand: false, ignOn); SetIgnition(ignOn, ignOn); SetFrontCabinLightOn(ignOn); TrySetCarIgnitionTriggers(); if (ignOn) { dashboardSymbolPreStartup = ((MonoBehaviour)this).StartCoroutine(PreIgnitionSymbolCheck()); } SetSymbolActive(vehicleDisplay, vehicleDisplayLight, ignOn); driversSideWindow.interactable = ignOn; passengersSideWindow.interactable = ignOn; ignitionCollider.enabled = ignOn; ignitionAnimator.SetInteger("SAIgnition_Anim", ignOn ? 1 : 0); } } public void SetBackDoorOpen(bool open) { liftGateOpen = open; } public void SetSideDoorOpen(bool open) { sideDoorOpen = open; } public void SetCabinLightSwitchLocalClient() { if (!overrideCabinLightSwitch && !cabinLightSwitchEnabled) { overrideCabinLightSwitch = true; cabinLightSwitchEnabled = true; roofAudio.PlayOneShot(cabinLightSwitchToggle); base.frontCabinLightContainer.SetActive(true); ((Renderer)base.frontCabinLightMesh).material = base.headlightsOnMat; SetCabinLightSwitchRpc(switchState: true, cabLightOn: true, setOverride: true); } else if (overrideCabinLightSwitch) { overrideCabinLightSwitch = false; cabinLightSwitchEnabled = true; roofAudio.PlayOneShot(cabinLightSwitchToggle); bool flag = isCabLightOn && base.keyIsInIgnition && accessoryMode && cabinLightSwitchEnabled; base.frontCabinLightContainer.SetActive(flag); ((Renderer)base.frontCabinLightMesh).material = (Material)(flag ? ((object)base.headlightsOnMat) : ((object)greyLightOffMat)); SetCabinLightSwitchRpc(switchState: true, flag, setOverride: false); } else { cabinLightSwitchEnabled = false; roofAudio.PlayOneShot(cabinLightSwitchToggle); base.frontCabinLightContainer.SetActive(false); ((Renderer)base.frontCabinLightMesh).material = greyLightOffMat; SetCabinLightSwitchRpc(switchState: false, cabLightOn: false, setOverride: false); } } [Rpc(/*Could not decode attribute arguments.*/)] private void SetCabinLightSwitchRpc(bool switchState, bool cabLightOn, bool setOverride) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2915638757u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref switchState, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref cabLightOn, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setOverride, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2915638757u, val2, 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)); } } } public void SetFrontCabinLightOn(bool setOn) { isCabLightOn = 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2820477147u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setOn, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2820477147u, val2, 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1779906441u, val2, val, (SendTo)5, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setHandbrake, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1779906441u, val2, 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 TrySetCarIgnitionTriggers() { if (base.localPlayerInControl || !((Object)(object)base.currentDriver != (Object)null)) { if (base.ignitionStarted) { startIgnitionTrigger.hoverTip = "Untwist key : [LMB]"; startIgnitionTrigger.holdTip = "[ Untwisting key ]"; startIgnitionTrigger.timeToHold = 0.75f; startIgnitionTrigger.timeToHoldSpeedMultiplier = 1f; } else if (base.keyIsInIgnition) { bool flag = usingSwitchIgnition || (Object)(object)base.currentDriver == (Object)null; startIgnitionTrigger.hoverTip = (flag ? "Remove key : [LMB]" : "Try ignition : [LMB] (Hold)"); startIgnitionTrigger.holdTip = (flag ? "[ Removing Key ]" : "[ Trying ignition ]"); startIgnitionTrigger.timeToHold = (flag ? 0.75f : 1f); startIgnitionTrigger.timeToHoldSpeedMultiplier = (flag ? 1f : 0f); } else { startIgnitionTrigger.hoverTip = "Try ignition : [LMB] (Hold)"; startIgnitionTrigger.holdTip = "[ Trying ignition ]"; startIgnitionTrigger.timeToHold = 1f; startIgnitionTrigger.timeToHoldSpeedMultiplier = 0f; } } } public void StartTryCarIgnition() { if (!usingSwitchIgnition && base.localPlayerInControl && !base.ignitionStarted) { CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; TryIgnitionRpc(base.keyIsInIgnition, isCabLightOn, engineStalled); TrySetCarIgnitionTriggers(); 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) { if (engineStalled) { PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 9); } } else { PlayerControllerB currentDriver2 = base.currentDriver; if (currentDriver2 != null && currentDriver2.playerBodyAnimator.GetInteger(CAR_ANIM) == 3) { PlayerControllerB currentDriver3 = base.currentDriver; if (currentDriver3 != null) { currentDriver3.playerBodyAnimator.SetInteger(CAR_ANIM, 2); } } else { PlayerControllerB currentDriver4 = base.currentDriver; if (currentDriver4 != null) { currentDriver4.playerBodyAnimator.SetInteger(CAR_ANIM, 12); } } } int animIndex = base.currentDriver.playerBodyAnimator.GetInteger(CAR_ANIM); if (animIndex == 9) { animIndex = 12; } ignitionAnimator.SetInteger(IGNITION_ANIM, animIndex); TrySetCarIgnitionTriggers(); engineStalled = false; SetKeyIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.02f); carKeySounds.PlayOneShot(base.twistKey); SetKeyIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); yield return (object)new WaitForSeconds(0.1467f); } else { PlayerControllerB currentDriver5 = base.currentDriver; if (currentDriver5 != null) { currentDriver5.playerBodyAnimator.SetInteger(CAR_ANIM, 2); } ignitionAnimator.SetInteger(IGNITION_ANIM, 2); TrySetCarIgnitionTriggers(); SetKeyIgnitionValues(trying: false, keyInHand: true, keyInSlot: false); yield return (object)new WaitForSeconds(0.6f); carKeySounds.PlayOneShot(base.insertKey); SetKeyIgnitionValues(trying: false, keyInHand: true, keyInSlot: true); TrySetCarIgnitionTriggers(); yield return (object)new WaitForSeconds(0.2f); carKeySounds.PlayOneShot(base.twistKey); SetKeyIgnitionValues(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); SetKeyIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); accessoryMode = true; SetFrontCabinLightOn(accessoryMode); TrySetCarIgnitionTriggers(); driversSideWindow.interactable = accessoryMode; passengersSideWindow.interactable = accessoryMode; if (dashboardSymbolPreStartup == null && !hasSweepedDashboard) { dashboardSymbolPreStartup = ((MonoBehaviour)this).StartCoroutine(PreIgnitionSymbolCheck()); } 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; accessoryMode = true; PlayerControllerB currentDriver6 = base.currentDriver; if (currentDriver6 != null) { currentDriver6.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } SetKeyIgnitionValues(trying: false, keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(base.keyIsInIgnition); startIgnitionTrigger.StopInteraction(); TrySetCarIgnitionTriggers(); 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3540053645u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref cabLightActive, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref hasStalled, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3540053645u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionCoroutine(); disableAnimations = true; inIgnitionAnimation = true; SetKeyIgnitionValues(trying: false, keyInHand: false, setKeyInSlot); if (!isCabLightOn && 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2290489169u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref shiftInterlock, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2290489169u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetKeyIgnitionValues(trying: true, keyInHand: true, keyInSlot: true); accessoryMode = true; SetFrontCabinLightOn(accessoryMode); driversSideWindow.interactable = accessoryMode; passengersSideWindow.interactable = accessoryMode; if (dashboardSymbolPreStartup == null && !hasSweepedDashboard) { dashboardSymbolPreStartup = ((MonoBehaviour)this).StartCoroutine(PreIgnitionSymbolCheck()); } 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 && base.keyIgnitionCoroutine != null && (base.keyIgnitionCoroutine != null || !startIgnitionTrigger.isBeingHeldByPlayer)) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM) == 2 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 3); } else if (localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM) == 12 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 3); } else if (localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM) == 9 && base.keyIsInIgnition) { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 3); } else { localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } CancelIgnitionAnimation(ignitionOn: false, setIgnitionAnim: false); disableAnimations = true; inIgnitionAnimation = false; TrySetCarIgnitionTriggers(); int integer = localPlayerController.playerBodyAnimator.GetInteger(CAR_ANIM); int num = integer; if (integer == 13) { num = 3; } ignitionAnimator.SetInteger(IGNITION_ANIM, num); CancelTryIgnitionRpc(base.keyIsInIgnition, isCabLightOn, accessoryMode, integer, num); } } [Rpc(/*Could not decode attribute arguments.*/)] public void CancelTryIgnitionRpc(bool setKeyInSlot, bool cabinLightOn, bool accessoriesActive, 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(191059047u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref cabinLightOn, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref accessoriesActive, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val3, playerAnimIndex); BytePacker.WriteValueBitPacked(val3, ignitionAnimIndex); ((NetworkBehaviour)this).__endSendRpc(ref val3, 191059047u, val2, 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); } SetKeyIgnitionValues(trying: false, keyInHand: false, setKeyInSlot); if (!base.keyIsInIgnition) { return; } if (cabinLightOn && !isCabLightOn) { SetFrontCabinLightOn(cabinLightOn); } if (accessoriesActive && !accessoryMode) { accessoryMode = true; driversSideWindow.interactable = accessoryMode; passengersSideWindow.interactable = accessoryMode; if (dashboardSymbolPreStartup == null && !hasSweepedDashboard) { dashboardSymbolPreStartup = ((MonoBehaviour)this).StartCoroutine(PreIgnitionSymbolCheck()); } } } [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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(4118721524u, val2, val, (SendTo)1, (RpcDelivery)0); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setTriggers, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 4118721524u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; CancelIgnitionAnimation(ignitionOn: true, setIgnitionAnim: true); disableAnimations = false; inIgnitionAnimation = false; accessoryMode = true; PlayerControllerB currentDriver = base.currentDriver; if (currentDriver != null) { currentDriver.playerBodyAnimator.SetInteger("SA_CarAnim", 1); } SetKeyIgnitionValues(trying: false, keyInHand: false, keyInSlot: true); SetIgnition(started: true, cabLightOn: true); SetFrontCabinLightOn(base.keyIsInIgnition); if (setTriggers) { TrySetCarIgnitionTriggers(); } } } public void SetIgnition(bool started, bool cabLightOn) { SetFrontCabinLightOn(cabLightOn); base.carEngine1AudioActive = started; if (started) { disableAnimations = false; inIgnitionAnimation = false; accessoryMode = true; if (started != 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 && base.keyIgnitionCoroutine == null) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(UntwistKey()); TrySetCarIgnitionTriggers(); 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 (dashboardSymbolPreStartup != null) { ((MonoBehaviour)this).StopCoroutine(dashboardSymbolPreStartup); dashboardSymbolPreStartup = null; StopPreIgnitionChecks(); } carKeySounds.PlayOneShot(base.twistKey); SetKeyIgnitionValues(trying: false, keyInHand: false, keyInSlot: true); SetIgnition(started: false, cabLightOn: true); engineAudio3.volume = 0.775f; engineAudio3.PlayOneShot(stallEngine); TrySetCarIgnitionTriggers(); 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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(1677604189u, val2, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 1677604189u, val2, 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 && base.keyIgnitionCoroutine == null) { CancelIgnitionCoroutine(); base.keyIgnitionCoroutine = ((MonoBehaviour)this).StartCoroutine(RemoveKey()); TrySetCarIgnitionTriggers(); 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 (dashboardSymbolPreStartup != null) { ((MonoBehaviour)this).StopCoroutine(dashboardSymbolPreStartup); dashboardSymbolPreStartup = null; StopPreIgnitionChecks(); } carKeySounds.PlayOneShot(base.removeKey); SetKeyIgnitionValues(trying: false, keyInHand: true, keyInSlot: false); SetIgnition(started: false, cabLightOn: false); accessoryMode = false; SetSymbolActive(vehicleDisplay, vehicleDisplayLight, active: false); driversSideWindow.interactable = false; passengersSideWindow.interactable = false; TrySetCarIgnitionTriggers(); yield return (object)new WaitForSeconds(0.73f); SetKeyIgnitionValues(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 val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2078953510u, val2, val, (SendTo)5, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2078953510u, val2, 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 PreIgnitionSymbolCheck() { 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 StopPreIgnitionChecks() { 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("SAIgnition_Anim", ignitionOn ? 1 : 0); } } private void CancelIgnitionCoroutine() { if (base.keyIgnitionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(base.keyIgnitionCoroutine); base.keyIgnitionCoroutine = null; } } public void SetKeyIgnitionValues(bool trying, bool keyInHand, bool keyInSlot) { twistingKey = trying; base.keyIsInDriverHand = keyInHand; base.keyIsInIgnition = keyInSlot; } public void SetTriggerHoverTip(InteractTrigger trigger, string tip) { trigger.hoverTip = tip; } public void SetDriverInCar() { SetDriverInCarServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(3762133933u, val2, val, (SendTo)2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((NetworkBehaviour)this).__endSendRpc(ref val3, 3762133933u, val2, val, (SendTo)2, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerControllerB val4 = StartOfRound.Instance.allPlayerScripts[playerId]; if (!((Object)(object)val4 == (Object)null) && !val4.isPlayerDead && val4.isPlayerControlled && !((Object)(object)base.currentDriver != (Object)null)) { base.currentDriver = StartOfRound.Instance.allPlayerScripts[playerId]; ((NetworkBehaviour)this).NetworkObject.ChangeOwnership(StartOfRound.Instance.allPlayerScripts[playerId].actualClientId); SetDriverInCarOwnerRpc(); } } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarOwnerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(437116846u, val2, val, (SendTo)0, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendRpc(ref val3, 437116846u, val2, val, (SendTo)0, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PlayerUtils.disableAnimationSync = true; ((VehicleSeatAnimator)frontLeftSeat).SetLocalPlayerIntoSeat(); ActivateControl(); SetTriggerHoverTip(base.driverSideDoorTrigger, "Exit : [LMB]"); ignitionCollider.enabled = true; startIgnitionTrigger.isBeingHeldByPlayer = false; engineStalled = false; TrySetCarIgnitionTriggers(); GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetFloat(ANIMATION_SPEED, 0.5f); if (base.keyIsInIgnition) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } if (base.ignitionStarted) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } if (base.driverSideDoor.boolValue) { base.driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } SetDriverInCarClientsRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId, base.keyIsInIgnition, base.ignitionStarted); } } [Rpc(/*Could not decode attribute arguments.*/)] public void SetDriverInCarClientsRpc(int playerId, bool setKeyInSlot, bool setStarted) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1) { RpcAttributeParams val = new RpcAttributeParams { RequireOwnership = false }; RpcParams val2 = default(RpcParams); FastBufferWriter val3 = ((NetworkBehaviour)this).__beginSendRpc(2358374295u, val2, val, (SendTo)1, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val3, playerId); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setKeyInSlot, default(ForPrimitives)); ((FastBufferWriter)(ref val3)).WriteValueSafe<bool>(ref setStarted, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendRpc(ref val3, 2358374295u, val2, val, (SendTo)1, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.currentDriver = StartOfRound.Instance.allPlayerScripts[playerId]; ignitionCollider.enabled = false; startIgnitionTrigger.isBeingHeldByPlayer = false; engineStalled = false; ((VehicleSeatAnimator)frontLeftSeat).SetPlayerAnimations(StartOfRound.Instance.allPlayerScripts[playerId], false); base.keyIsInIgnition = setKeyInSlot; base.ignitionStarted = setStarted; if (setKeyInSlot) { base.currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 0); } if (setStarted) { base.currentDriver.playerBodyAnimator.SetInteger(CAR_ANIM, 1); } } } public void ExitDriverSideSeat() { //IL_00ae: 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) if (base.localPlayerInControl) { GameNetworkManager.Instance.localPlayerController.playerBodyAnimator.SetInteger(CAR_ANIM, 0); int num = CanExitCar(passengerSide: false); if (num == 0 && !base.driverSideDoor.boolValue) { base.driverSideDoor.TriggerAnimation(GameNetworkManager.Instance.localPlayerController); } if (num != -1) { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(base.driverSideExitPoints[num].position, false, 0f, false, true); } else { GameNetworkManager.Instance.localPlayerController.TeleportPlayer(base.driverSideExitPoints[1].position, false, 0f, false, true); } } } public void OnDriverExit() { //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: 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_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsSpawned && !((Object)(object)((NetworkBehaviour)this).NetworkManager == (Object)null) && ((NetworkBehaviour)this).NetworkManager.IsListening) { PlayerUtils.disableAnimationSync = false;