Decompiled source of BaseCamp v0.1.4
BaseCamp.dll
Decompiled 24 minutes ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Versioning; using System.Text; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using DixiecaptShared; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using cakeslice; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace DixiecaptShared { internal static class SaveBlock { private sealed class Move { internal int from; internal int to; internal string what; internal bool doubled; } internal const int TableSize = 2048; internal const int Shift = 1000; internal const int OldFirst = 210; internal const int OldLast = 251; internal const int BlockFirst = 1200; internal const int BlockLast = 1399; internal const string MarkPrefix = "Dixiecapt.SaveBlock."; internal const string BackupSuffix = ".before-save-numbers"; private static readonly List<Move> Moves = new List<Move>(); private static readonly List<string> Early = new List<string>(); private static ManualLogSource Log; private static string Owner = "mod"; private static bool _patched; private static FieldInfo _tableField; internal static string Mark => "Dixiecapt.SaveBlock." + Owner; internal static bool Ready => _patched; internal static ConfigEntry<int> Adopted(ConfigFile cfg, string section, string oldKey, int oldDefault, string what, string building, Func<int, int> fixOld = null) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown int num = cfg.Bind<int>(section, oldKey, oldDefault, new ConfigDescription("The number this building had before Sailwind Farming 0.28.0 and the Martello Tower 0.8.0 - kept so a save made before then is found, and so an older version still finds its own. Leave it as it is.", (AcceptableValueBase)(object)new AcceptableValueRange<int>(210, 251), new object[1] { new ConfigurationManagerAttributes { Browsable = false } })).Value; if (fixOld != null) { num = fixOld(num); } int num2 = oldDefault + 1000; ConfigEntry<int> val = cfg.Bind<int>(section, oldKey + " (new)", num2, new ConfigDescription(Describe(what), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1200, 1399), Array.Empty<object>())); if (num != oldDefault && num >= 210 && num <= 251 && val.Value == num2 && num + 1000 != num2) { val.Value = num + 1000; Note("'" + oldKey + "' (" + building + ") was " + num + " - its new number is " + val.Value); } switch (num) { case 210: case 211: case 212: case 213: case 214: case 215: case 216: case 217: case 218: case 219: case 220: case 221: case 222: case 223: case 224: case 225: case 226: case 227: case 228: case 229: case 230: case 231: case 232: case 233: case 234: case 235: case 236: case 237: case 238: case 239: case 240: case 247: case 248: case 249: case 250: case 251: Register(num, val.Value, building); break; } return val; } internal static ConfigEntry<int> Fresh(ConfigFile cfg, string section, string key, int number, string what) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown return cfg.Bind<int>(section, key, number, new ConfigDescription(Describe(what), (AcceptableValueBase)(object)new AcceptableValueRange<int>(1200, 1399), Array.Empty<object>())); } internal static string Describe(string what) { return "The " + what + "'s place in the game's table of saved things, above every ship mod's numbers (since Sailwind Farming 0.28.0 and the Martello Tower 0.8.0; a save made before is renumbered as it loads, with everything kept in it). Change it only if another mod claims the same one (1200 to 1399): what was stored under the old number is lost (the save still loads)."; } private static void Note(string s) { if (Log != null) { Say(s); } else { Early.Add(s); } } private static void Register(int from, int to, string what) { foreach (Move move in Moves) { if (move.from == from) { if (move.to != to) { Note("WARNING: old number " + from + " is claimed by both " + move.what + " and " + what + " - kept for " + move.what); } return; } } Moves.Add(new Move { from = from, to = to, what = what }); } internal static void Install(Harmony h, ManualLogSource log, string owner) { //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Expected O, but got Unknown //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Expected O, but got Unknown //IL_0237: Expected O, but got Unknown //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Expected O, but got Unknown //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown Log = log; Owner = owner; foreach (string item in Early) { Say(item); } Early.Clear(); if (_patched) { return; } try { _tableField = AccessTools.Field(typeof(SaveLoadManager), "currentObjects"); MethodInfo methodInfo = AccessTools.Method(typeof(SaveLoadManager), "Awake", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(SaveLoadManager), "LoadGame", (Type[])null, (Type[])null); MethodInfo methodInfo3 = AccessTools.Method(typeof(SaveLoadManager), "LoadNeeds", (Type[])null, (Type[])null); MethodInfo methodInfo4 = AccessTools.Method(typeof(SaveLoadManager), "SaveModData", (Type[])null, (Type[])null); MethodInfo methodInfo5 = AccessTools.Method(typeof(SaveLoadManager), "SaveGame", (Type[])null, (Type[])null); if (_tableField == null || methodInfo == null || methodInfo2 == null || methodInfo3 == null || methodInfo4 == null) { if (Log != null) { Log.LogError((object)("Save numbers: the game's save code is not as expected (" + ((_tableField == null) ? "currentObjects " : "") + ((methodInfo == null) ? "Awake " : "") + ((methodInfo2 == null) ? "LoadGame " : "") + ((methodInfo3 == null) ? "LoadNeeds " : "") + ((methodInfo4 == null) ? "SaveModData" : "") + ") - an older save will NOT be renumbered: do not load one with this version.")); } return; } h.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(typeof(SaveBlock), "AfterAwake", (Type[])null) { priority = 0 }, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); h.Patch((MethodBase)methodInfo2, new HarmonyMethod(typeof(SaveBlock), "BeforeLoad", (Type[])null) { priority = 600 }, new HarmonyMethod(typeof(SaveBlock), "AfterLoad", (Type[])null) { priority = 800 }, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); h.Patch((MethodBase)methodInfo3, new HarmonyMethod(typeof(SaveBlock), "BeforeNeeds", (Type[])null) { priority = 900 }, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); h.Patch((MethodBase)methodInfo4, new HarmonyMethod(typeof(SaveBlock), "BeforeSaveModData", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); if (methodInfo5 != null) { h.Patch((MethodBase)methodInfo5, new HarmonyMethod(typeof(SaveBlock), "BeforeSave", (Type[])null) { priority = 800 }, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } _patched = true; StringBuilder stringBuilder = new StringBuilder(); foreach (Move move in Moves) { stringBuilder.Append((stringBuilder.Length > 0) ? ", " : "").Append(move.what).Append(' ') .Append(move.from) .Append("->") .Append(move.to); } Say("the table of saved things is made " + 2048 + " long; this mod's buildings sit above every ship mod's numbers (an older save is renumbered as it loads: " + ((stringBuilder.Length > 0) ? stringBuilder.ToString() : "nothing to move") + ")"); } catch (Exception ex) { if (Log != null) { Log.LogError((object)("Save numbers: not set up - " + ex.Message + " - an older save will NOT be renumbered: do not load one with this version.")); } } } private static SaveableObject[] Table() { if (!((Object)(object)SaveLoadManager.instance != (Object)null)) { return null; } return SaveLoadManager.instance.GetCurrentObjects(); } internal static void EnsureTable() { try { SaveLoadManager instance = SaveLoadManager.instance; if ((Object)(object)instance == (Object)null) { return; } SaveableObject[] currentObjects = instance.GetCurrentObjects(); if (currentObjects != null && currentObjects.Length >= 2048) { return; } if (_tableField == null) { _tableField = AccessTools.Field(typeof(SaveLoadManager), "currentObjects"); } if (!(_tableField == null)) { SaveableObject[] array = _tableField.GetValue(instance) as SaveableObject[]; if (array == null || array.Length < 2048) { int num = ((array != null) ? array.Length : 0); Array.Resize(ref array, 2048); _tableField.SetValue(instance, array); Say("the table of saved things stretched from " + num + " to " + 2048 + " places"); } } } catch (Exception ex) { Warn("stretching the table - " + ex.Message); } } private static void AfterAwake() { EnsureTable(); } private static bool Ours(SaveableObject so) { if ((Object)(object)so == (Object)null) { return false; } PurchasableBoat component = ((Component)so).GetComponent<PurchasableBoat>(); if ((Object)(object)component != (Object)null && component.isHouse) { return (Object)(object)((Component)so).GetComponent<BoatLocalItems>() != (Object)null; } return false; } private static void Undouble() { SaveableObject[] array = Table(); if (array == null) { return; } for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i] != (Object)null && array[i].sceneIndex != i && Ours(array[i])) { array[i] = null; } } foreach (Move move in Moves) { move.doubled = false; } } private static void BeforeLoad(int backupIndex) { SaveContainer c = null; bool flag = false; try { Undouble(); EnsureTable(); string text = ((backupIndex != 0) ? SaveSlots.GetBackupPath(SaveSlots.currentSlot, backupIndex) : SaveSlots.GetCurrentSavePath()); if (string.IsNullOrEmpty(text) || !File.Exists(text)) { return; } RenumberFile(text, Renumber, out c, out var note); if (note != null) { Say(note); } flag = true; } catch (Exception ex) { Warn("renumbering the save file - " + ex.Message + " - it is renumbered as it loads instead."); } if (flag) { return; } try { SaveableObject[] array = Table(); if (array == null || (c != null && c.modData != null && c.modData.ContainsKey(Mark))) { return; } foreach (Move move in Moves) { if (move.from > 0 && move.from < array.Length && move.to < array.Length && (c == null || HasPlainEntry(c, move.from)) && (Object)(object)array[move.from] == (Object)null && Ours(array[move.to])) { array[move.from] = array[move.to]; move.doubled = true; } } } catch (Exception ex2) { Warn("before the load - " + ex2.Message); } } internal static int RenumberFile(string path, Func<SaveContainer, int> renumber, out SaveContainer c, out string note) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown note = null; BinaryFormatter binaryFormatter = new BinaryFormatter(); using (FileStream serializationStream = File.OpenRead(path)) { c = (SaveContainer)binaryFormatter.Deserialize(serializationStream); } if (c == null || c.savedObjects == null) { return 0; } if (c.modData != null && c.modData.ContainsKey(Mark)) { return 0; } int num = renumber(c); if (num <= 0) { return 0; } string text = path + ".before-save-numbers"; string text2 = path + ".renumbering"; if (!File.Exists(text)) { File.Copy(path, text); } using (FileStream serializationStream2 = File.Create(text2)) { binaryFormatter.Serialize(serializationStream2, c); } File.Copy(text2, path, overwrite: true); File.Delete(text2); note = "this save file renumbered for " + num + " building(s) - a copy of it as it was: " + Path.GetFileName(text); return num; } private static void AfterLoad() { try { Undouble(); } catch (Exception) { } } private static void BeforeSave() { try { Undouble(); } catch (Exception) { } } private static void BeforeNeeds(SaveContainer save) { try { Undouble(); } catch (Exception ex) { Warn("emptying the old places - " + ex.Message); } try { if (save != null && save.savedObjects != null && (save.modData == null || !save.modData.ContainsKey(Mark))) { Renumber(save); } } catch (Exception ex2) { Warn("renumbering this save - " + ex2.Message); } try { SaveableObject[] t = Table(); if (save == null || t == null) { return; } HashSet<int> old = new HashSet<int>(); foreach (Move move in Moves) { old.Add(move.from); } Func<int, bool> func = (int i) => ((i >= 1200 && i <= 1399) || old.Contains(i)) && (i >= t.Length || (Object)(object)t[i] == (Object)null); int num = 0; int num2 = 0; List<string> list = new List<string>(); if (save.savedObjects != null) { for (int num3 = save.savedObjects.Count - 1; num3 >= 0; num3--) { SaveObjectData val = save.savedObjects[num3]; if (val != null && func(val.sceneIndex)) { list.Add(val.sceneIndex.ToString(CultureInfo.InvariantCulture)); num++; save.savedObjects.RemoveAt(num3); } } } if (save.savedPrefabs != null) { for (int num4 = save.savedPrefabs.Count - 1; num4 >= 0; num4--) { SavePrefabData val2 = save.savedPrefabs[num4]; if (val2 != null && val2.itemParentObject > 0 && func(val2.itemParentObject)) { num2++; save.savedPrefabs.RemoveAt(num4); } } } if (num > 0 || num2 > 0) { Warn("the save held " + num + " entr" + ((num == 1) ? "y" : "ies") + " (number " + string.Join(", ", list.ToArray()) + ") that nothing in this game holds, and " + num2 + " thing(s) kept in them - dropped, so the save loads (a building switched off, or its mod taken out)."); } } catch (Exception ex3) { Warn("checking the save's entries - " + ex3.Message); } } private static int Renumber(SaveContainer save) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0025: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) if (save == null || save.savedObjects == null) { return 0; } SaveableObject[] array = Table(); if (array == null) { return 0; } Vector3 val = (((Object)(object)FloatingOriginManager.instance != (Object)null) ? FloatingOriginManager.instance.outCurrentOffset : Vector3.zero); int num = 0; foreach (Move move in Moves) { try { if (move.from >= array.Length || move.to >= array.Length || !HasEntry(save, move.from)) { continue; } SaveableObject val2 = array[move.to]; if (!Ours(val2)) { Say(move.what + ": the save has an entry under its old number " + move.from + ", but the building is not made in this game - left as it was"); continue; } Vector3 val3 = ((Component)val2).transform.position - val; SaveableObject val4 = (((Object)(object)array[move.from] != (Object)null && (Object)(object)array[move.from] != (Object)(object)val2) ? array[move.from] : null); float oX = 0f; float oZ = 0f; if ((Object)(object)val4 != (Object)null) { Vector3 val5 = ((Component)val4).transform.position - val; oX = val5.x; oZ = val5.z; } if (MoveInSave(save, move.from, move.to, val3.x, val3.z, (Object)(object)val4 != (Object)null, oX, oZ, out var items, out var pets, out var bought, out var dist, out var why) > 0) { num++; Say(move.what + " - renumbered from " + move.from + " to " + move.to + ": its entry (" + (bought ? "BOUGHT" : "not bought") + ", saved " + dist.ToString("F0", CultureInfo.InvariantCulture) + " m from where it stands)" + ((items > 0) ? (" and " + items + " thing(s) kept in it") : ", nothing kept in it") + ((pets > 0) ? ", and the pets' note of it" : "") + (((Object)(object)val4 != (Object)null) ? (" ('" + ((Object)val4).name + "' holds " + move.from + " in this game and starts afresh)") : "")); } else { Say(move.what + " - its old number " + move.from + " is not moved: " + why); } } catch (Exception ex) { Warn(move.what + ": renumbering - " + ex.Message); } } if (save.modData != null) { save.modData[Mark] = "1"; } return num; } private static bool HasEntry(SaveContainer save, int n) { foreach (SaveObjectData savedObject in save.savedObjects) { if (savedObject != null && savedObject.sceneIndex == n) { return true; } } return false; } private static bool HasPlainEntry(SaveContainer save, int n) { foreach (SaveObjectData savedObject in save.savedObjects) { if (savedObject != null && savedObject.sceneIndex == n && savedObject.customization == null) { return true; } } return false; } internal static int MoveInSave(SaveContainer save, int from, int to, float atX, float atZ, bool otherHolds, float oX, float oZ, out int items, out int pets, out bool bought, out float dist, out string why) { items = 0; pets = 0; bought = false; dist = 0f; why = null; if (save == null || save.savedObjects == null) { why = "the save has no entries"; return 0; } if (HasEntry(save, to)) { why = "the save has an entry under " + to + " already"; return 0; } SaveObjectData val = null; float num = float.MaxValue; int num2 = 0; foreach (SaveObjectData savedObject in save.savedObjects) { if (savedObject == null || savedObject.sceneIndex != from) { continue; } if (savedObject.customization != null) { num2++; continue; } float num3 = savedObject.position.x - atX; float num4 = savedObject.position.z - atZ; float num5 = (float)Math.Sqrt(num3 * num3 + num4 * num4); if (num5 < num) { num = num5; val = savedObject; } } if (val == null) { why = ((num2 > 0) ? ("the only entry under " + from + " is a ship's") : ("no entry under " + from)); return 0; } if (otherHolds) { float num6 = val.position.x - oX; float num7 = val.position.z - oZ; if (Math.Sqrt(num6 * num6 + num7 * num7) <= (double)num) { why = "its entry was saved nearer what holds " + from + " in this game now (" + num.ToString("F0", CultureInfo.InvariantCulture) + " m from the building) - left to it"; return 0; } } val.sceneIndex = to; bought = val.extraSetting; dist = num; if (save.savedPrefabs != null) { foreach (SavePrefabData savedPrefab in save.savedPrefabs) { if (savedPrefab != null && savedPrefab.itemParentObject == from) { savedPrefab.itemParentObject = to; items++; } } } pets = MovePets(save.modData, from, to); return 1; } internal static int MovePets(Dictionary<string, string> md, int from, int to) { if (md == null) { return 0; } int num = 0; string text = from.ToString(CultureInfo.InvariantCulture); string text2 = to.ToString(CultureInfo.InvariantCulture); string[] array = new string[2] { "FurstMate.dog", "FurstMate.cat" }; foreach (string key in array) { if (md.TryGetValue(key, out var value) && !string.IsNullOrEmpty(value) && value.StartsWith("2|")) { string[] array2 = value.Split(new char[1] { '|' }); if (array2.Length > 1 && array2[1] == text) { array2[1] = text2; md[key] = string.Join("|", array2); num++; } } } array = new string[2] { "FurstMate.spots", "FurstMate.homes" }; foreach (string key2 in array) { if (!md.TryGetValue(key2, out var value2) || string.IsNullOrEmpty(value2)) { continue; } string[] array3 = value2.Split(new char[1] { ';' }); bool flag = false; bool flag2 = false; string[] array4 = array3; for (int j = 0; j < array4.Length; j++) { if (array4[j].StartsWith(text2 + ":")) { flag = true; } } if (flag) { continue; } for (int k = 0; k < array3.Length; k++) { if (array3[k].StartsWith(text + ":")) { array3[k] = text2 + array3[k].Substring(text.Length); flag2 = true; } } if (flag2) { md[key2] = string.Join(";", array3); num++; } } return num; } private static void BeforeSaveModData() { try { if (GameState.modData != null) { GameState.modData[Mark] = "1"; } } catch (Exception) { } } private static void Say(string s) { if (Log != null) { Log.LogInfo((object)("Save numbers: " + s + ".")); } } private static void Warn(string s) { if (Log != null) { Log.LogWarning((object)("Save numbers: " + s)); } } } internal sealed class ConfigurationManagerAttributes { public bool? Browsable; } internal sealed class IndoorWeatherZone : MonoBehaviour { private void OnEnable() { IndoorWeather.Track((Component)(object)this); } private void OnDisable() { IndoorWeather.Untrack((Component)(object)this); } } internal sealed class IndoorWeather : MonoBehaviour { private static readonly List<Component> _owners = new List<Component>(); private static readonly Dictionary<Component, Collider[]> _cols = new Dictionary<Component, Collider[]>(); private static IndoorWeather _me; internal static Action<string> Log; internal static int Removed; private static readonly List<ParticleSystem> _extra = new List<ParticleSystem>(); private readonly List<Collider> _near = new List<Collider>(); private readonly List<ParticleSystem> _falls = new List<ParticleSystem>(); private readonly Dictionary<ParticleSystem, Particle[]> _buf = new Dictionary<ParticleSystem, Particle[]>(); private Bounds _nearBox; private float _nextNear; private float _nextFind; private bool _toldFound; private bool _toldWork; private Type _bsType; private bool _bsLooked; private FieldInfo _rainsField; internal static void Track(Component owner) { if (!((Object)(object)owner == (Object)null)) { _cols[owner] = owner.GetComponents<Collider>(); if (!_owners.Contains(owner)) { _owners.Add(owner); } } } internal static void Untrack(Component owner) { if (!((Object)(object)owner == (Object)null)) { _owners.Remove(owner); _cols.Remove(owner); } } internal static void AddFall(ParticleSystem ps) { if ((Object)(object)ps != (Object)null && !_extra.Contains(ps)) { _extra.Add(ps); } if ((Object)(object)_me != (Object)null) { _me._nextFind = 0f; } } internal static void Ensure(GameObject host, Action<string> log) { if (!((Object)(object)_me != (Object)null) && !((Object)(object)host == (Object)null)) { Log = log; _me = host.GetComponent<IndoorWeather>() ?? host.AddComponent<IndoorWeather>(); } } private void LateUpdate() { try { Work(); } catch (Exception ex) { if (!_toldWork) { _toldWork = true; if (Log != null) { Log("indoor weather - " + ex.Message); } } } } private void Work() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: 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_022a: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Invalid comparison between Unknown and I4 //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_0261: Unknown result type (might be due to invalid IL or missing references) //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0294: Unknown result type (might be due to invalid IL or missing references) if (_owners.Count == 0 || !GameState.playing) { return; } Camera main = Camera.main; if ((Object)(object)main == (Object)null) { return; } Vector3 position = ((Component)main).transform.position; if (Time.unscaledTime >= _nextNear) { _nextNear = Time.unscaledTime + 0.5f; _near.Clear(); bool flag = false; for (int num = _owners.Count - 1; num >= 0; num--) { Component val = _owners[num]; Collider[] value; if ((Object)(object)val == (Object)null) { _owners.RemoveAt(num); } else if (_cols.TryGetValue(val, out value) && value != null) { Collider[] array = value; foreach (Collider val2 in array) { if ((Object)(object)val2 == (Object)null || !val2.enabled || !((Component)val2).gameObject.activeInHierarchy) { continue; } Bounds bounds = val2.bounds; if (!(((Bounds)(ref bounds)).SqrDistance(position) > 3600f)) { _near.Add(val2); if (!flag) { _nearBox = bounds; flag = true; } else { ((Bounds)(ref _nearBox)).Encapsulate(bounds); } } } } } } if (_near.Count == 0) { return; } if (Time.unscaledTime >= _nextFind) { _nextFind = Time.unscaledTime + 3f; FindFalls(); } foreach (ParticleSystem fall in _falls) { if ((Object)(object)fall == (Object)null || !((Component)fall).gameObject.activeInHierarchy) { continue; } int particleCount = fall.particleCount; if (particleCount == 0) { continue; } if (!_buf.TryGetValue(fall, out var value2) || value2.Length < particleCount) { int num2 = particleCount; MainModule main2 = fall.main; value2 = (Particle[])(object)new Particle[Mathf.Max(num2, ((MainModule)(ref main2)).maxParticles)]; _buf[fall] = value2; } particleCount = fall.GetParticles(value2); MainModule main3 = fall.main; Transform val3 = null; if ((int)((MainModule)(ref main3)).simulationSpace == 0) { val3 = ((Component)fall).transform; } else if ((int)((MainModule)(ref main3)).simulationSpace == 2) { val3 = ((MainModule)(ref main3)).customSimulationSpace; } int num3 = 0; for (int j = 0; j < particleCount; j++) { Vector3 val4 = ((Particle)(ref value2[j])).position; if ((Object)(object)val3 != (Object)null) { val4 = val3.TransformPoint(val4); } if (!((Bounds)(ref _nearBox)).Contains(val4) || !InsideAny(val4)) { if (num3 != j) { value2[num3] = value2[j]; } num3++; } } if (num3 < particleCount) { fall.SetParticles(value2, num3); Removed += particleCount - num3; } } } private bool InsideAny(Vector3 p) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) foreach (Collider item in _near) { if ((Object)(object)item == (Object)null) { continue; } Bounds bounds = item.bounds; if (!((Bounds)(ref bounds)).Contains(p)) { continue; } BoxCollider val = (BoxCollider)(object)((item is BoxCollider) ? item : null); if ((Object)(object)val != (Object)null) { Vector3 val2 = ((Component)val).transform.InverseTransformPoint(p) - val.center; Vector3 val3 = val.size * 0.5f; if (Mathf.Abs(val2.x) <= val3.x && Mathf.Abs(val2.y) <= val3.y && Mathf.Abs(val2.z) <= val3.z) { return true; } continue; } MeshCollider val4 = (MeshCollider)(object)((item is MeshCollider) ? item : null); if (!((Object)(object)val4 != (Object)null) || val4.convex) { Vector3 val5 = item.ClosestPoint(p) - p; if (((Vector3)(ref val5)).sqrMagnitude < 1E-06f) { return true; } } } return false; } private void FindFalls() { _falls.Clear(); Rain[] array = Object.FindObjectsOfType<Rain>(); foreach (Rain obj in array) { if (_rainsField == null) { _rainsField = typeof(Rain).GetField("rains", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } ParticleSystem[] array2 = ((_rainsField != null) ? (_rainsField.GetValue(obj) as ParticleSystem[]) : null); if (array2 == null) { continue; } ParticleSystem[] array3 = array2; foreach (ParticleSystem val in array3) { if ((Object)(object)val != (Object)null && !_falls.Contains(val)) { _falls.Add(val); } } } if (!_bsLooked) { _bsLooked = true; Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { try { Type type = assembly.GetType("BetterStorm.IndoorPrecipitationExclusion", throwOnError: false); if (type != null) { _bsType = type; break; } } catch (Exception) { } } } if (_bsType != null) { Object[] array4 = Object.FindObjectsOfType(_bsType); foreach (Object obj2 in array4) { Component val2 = (Component)(object)((obj2 is Component) ? obj2 : null); ParticleSystem val3 = (((Object)(object)val2 != (Object)null) ? val2.GetComponent<ParticleSystem>() : null); if ((Object)(object)val3 != (Object)null && !_falls.Contains(val3)) { _falls.Add(val3); } } } _extra.RemoveAll((ParticleSystem p) => (Object)(object)p == (Object)null); foreach (ParticleSystem item in _extra) { if (!_falls.Contains(item)) { _falls.Add(item); } } List<ParticleSystem> list = new List<ParticleSystem>(); foreach (ParticleSystem key in _buf.Keys) { if ((Object)(object)key == (Object)null || !_falls.Contains(key)) { list.Add(key); } } foreach (ParticleSystem item2 in list) { _buf.Remove(item2); } if (!_toldFound && Log != null) { _toldFound = true; Log("indoor weather: near one of our rooms - " + _falls.Count + " falling weather system(s) kept out of " + _near.Count + " indoor zone(s) here (the game's rain" + ((_bsType != null) ? ", Better Storms' snow and rain" : "; Better Storms not in") + ")."); } } } } namespace BaseCamp { [BepInPlugin("com.dixiecapt.sailwind.basecamp", "Base Camp - A Portable Wall Tent", "0.1.4")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class BaseCampPlugin : BaseUnityPlugin { internal sealed class CampMb { internal static List<Object> Own; private readonly List<Vector3> _v = new List<Vector3>(); private readonly List<Vector3> _n = new List<Vector3>(); private readonly List<Vector2> _uv = new List<Vector2>(); private readonly List<int> _t = new List<int>(); private readonly float _tile; private readonly float _tileV; private readonly bool _turned; public int Count => _v.Count; public CampMb(float tileMetres) { _tile = tileMetres; _tileV = tileMetres; _turned = false; } public CampMb(float tileU, float tileV, bool turned) { _tile = tileU; _tileV = tileV; _turned = turned; } private Vector2 Uv(Vector3 p, Vector3 u, Vector3 v) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) Vector2 val = (_turned ? new Vector2(Vector3.Dot(p, v), Vector3.Dot(p, u)) : new Vector2(Vector3.Dot(p, u), Vector3.Dot(p, v))); return new Vector2(val.x / _tile, val.y / _tileV); } public void Timber(Vector3 lo, Vector3 hi) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: 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) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0290: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Unknown result type (might be due to invalid IL or missing references) //IL_02a2: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.Min(lo, hi); Vector3 val2 = Vector3.Max(lo, hi); Vector3 val3 = val2 - val; if (val3.x < 0.001f || val3.y < 0.001f || val3.z < 0.001f) { return; } Vector3 L = ((val3.x >= val3.y && val3.x >= val3.z) ? Vector3.right : ((val3.y >= val3.z) ? Vector3.up : Vector3.forward)); Func<Vector3, Vector3> U = delegate(Vector3 n) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) if (!(Mathf.Abs(Vector3.Dot(n, L)) > 0.5f)) { return L; } return (!(Mathf.Abs(n.y) > 0.5f)) ? Vector3.up : Vector3.right; }; Action<Vector3, Vector3, Vector3, Vector3, Vector3> obj = delegate(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 n) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: 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_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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) Vector3 val4 = U(n); Quad(p0, p1, p2, p3, n, val4, Vector3.Cross(n, val4)); }; obj(new Vector3(val.x, val2.y, val.z), new Vector3(val.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val.z), Vector3.up); obj(new Vector3(val.x, val.y, val.z), new Vector3(val.x, val.y, val2.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val.y, val.z), Vector3.down); obj(new Vector3(val2.x, val.y, val.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val.z), Vector3.right); obj(new Vector3(val.x, val.y, val.z), new Vector3(val.x, val.y, val2.z), new Vector3(val.x, val2.y, val2.z), new Vector3(val.x, val2.y, val.z), Vector3.left); obj(new Vector3(val.x, val.y, val2.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val.x, val2.y, val2.z), Vector3.forward); obj(new Vector3(val.x, val.y, val.z), new Vector3(val2.x, val.y, val.z), new Vector3(val2.x, val2.y, val.z), new Vector3(val.x, val2.y, val.z), Vector3.back); } public void Box(Vector3 lo, Vector3 hi) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: 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_00af: 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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0246: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0289: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: 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) Vector3 val = Vector3.Min(lo, hi); Vector3 val2 = Vector3.Max(lo, hi); if (!(val2.x - val.x < 0.001f) && !(val2.y - val.y < 0.001f) && !(val2.z - val.z < 0.001f)) { Quad(new Vector3(val.x, val2.y, val.z), new Vector3(val.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val.z), Vector3.up, Vector3.right, Vector3.forward); Quad(new Vector3(val.x, val.y, val.z), new Vector3(val.x, val.y, val2.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val.y, val.z), Vector3.down, Vector3.right, Vector3.forward); Quad(new Vector3(val2.x, val.y, val.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val.z), Vector3.right, Vector3.forward, Vector3.up); Quad(new Vector3(val.x, val.y, val.z), new Vector3(val.x, val.y, val2.z), new Vector3(val.x, val2.y, val2.z), new Vector3(val.x, val2.y, val.z), Vector3.left, Vector3.forward, Vector3.up); Quad(new Vector3(val.x, val.y, val2.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val.x, val2.y, val2.z), Vector3.forward, Vector3.right, Vector3.up); Quad(new Vector3(val.x, val.y, val.z), new Vector3(val2.x, val.y, val.z), new Vector3(val2.x, val2.y, val.z), new Vector3(val.x, val2.y, val.z), Vector3.back, Vector3.right, Vector3.up); } } public void BoxLong(Vector3 lo, Vector3 hi) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0035: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: 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_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0124: 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0265: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02ae: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02f9: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Unknown result type (might be due to invalid IL or missing references) //IL_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_030e: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.Min(lo, hi); Vector3 val2 = Vector3.Max(lo, hi); if (val2.z - val.z <= val2.x - val.x) { Box(lo, hi); } else if (!(val2.x - val.x < 0.001f) && !(val2.y - val.y < 0.001f) && !(val2.z - val.z < 0.001f)) { Quad(new Vector3(val.x, val2.y, val.z), new Vector3(val.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val.z), Vector3.up, Vector3.forward, Vector3.right); Quad(new Vector3(val.x, val.y, val.z), new Vector3(val.x, val.y, val2.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val.y, val.z), Vector3.down, Vector3.forward, Vector3.right); Quad(new Vector3(val2.x, val.y, val.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val2.x, val2.y, val.z), Vector3.right, Vector3.forward, Vector3.up); Quad(new Vector3(val.x, val.y, val.z), new Vector3(val.x, val.y, val2.z), new Vector3(val.x, val2.y, val2.z), new Vector3(val.x, val2.y, val.z), Vector3.left, Vector3.forward, Vector3.up); Quad(new Vector3(val.x, val.y, val2.z), new Vector3(val2.x, val.y, val2.z), new Vector3(val2.x, val2.y, val2.z), new Vector3(val.x, val2.y, val2.z), Vector3.forward, Vector3.right, Vector3.up); Quad(new Vector3(val.x, val.y, val.z), new Vector3(val2.x, val.y, val.z), new Vector3(val2.x, val2.y, val.z), new Vector3(val.x, val2.y, val.z), Vector3.back, Vector3.right, Vector3.up); } } public void Sheet(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, float thick) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: 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_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0066: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0102: 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) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.Cross(p1 - p0, p3 - p0); Vector3 val2 = ((Vector3)(ref val)).normalized; if (val2.y < 0f) { val2 = -val2; } val = p3 - p0; Vector3 normalized = ((Vector3)(ref val)).normalized; val = p1 - p0; Vector3 normalized2 = ((Vector3)(ref val)).normalized; Vector3 val3 = val2 * thick; Quad(p0, p1, p2, p3, val2, normalized, normalized2); Quad(p0 - val3, p1 - val3, p2 - val3, p3 - val3, -val2, normalized, normalized2); Vector3[] array = (Vector3[])(object)new Vector3[4] { p0, p1, p2, p3 }; for (int i = 0; i < 4; i++) { Vector3 val4 = array[i]; Vector3 val5 = array[(i + 1) % 4]; val = val5 - val4; Vector3 normalized3 = ((Vector3)(ref val)).normalized; Vector3 val6 = Vector3.Cross(normalized3, val2); if (Vector3.Dot(val6, val4 - (p0 + p2) * 0.5f) < 0f) { val6 = -val6; } Quad(val4, val5, val5 - val3, val4 - val3, val6, normalized3, val2); } } private void Quad(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 normal, Vector3 u, Vector3 v) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0079: 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_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) int count = _v.Count; Vector3[] array = (Vector3[])(object)new Vector3[4] { p0, p1, p2, p3 }; foreach (Vector3 val in array) { _v.Add(val); _n.Add(normal); _uv.Add(Uv(val, u, v)); } if (Vector3.Dot(Vector3.Cross(p1 - p0, p2 - p0), normal) > 0f) { _t.Add(count); _t.Add(count + 1); _t.Add(count + 2); _t.Add(count); _t.Add(count + 2); _t.Add(count + 3); } else { _t.Add(count); _t.Add(count + 2); _t.Add(count + 1); _t.Add(count); _t.Add(count + 3); _t.Add(count + 2); } } public void Face(Vector3 p0, Vector3 p1, Vector3 p2, Vector3 p3, Vector3 normal, Vector3 u, Vector3 v) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: 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_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) Quad(p0, p1, p2, p3, normal, u, v); } public void Poly(Vector3[] p, Vector3 normal, Vector3 u, Vector3 v) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004a: 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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0073: 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_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) if (p == null || p.Length < 3) { return; } int count = _v.Count; foreach (Vector3 val in p) { _v.Add(val); _n.Add(normal); _uv.Add(Uv(val, u, v)); } bool flag = Vector3.Dot(Vector3.Cross(p[1] - p[0], p[2] - p[0]), normal) > 0f; for (int j = 1; j + 1 < p.Length; j++) { if (flag) { _t.Add(count); _t.Add(count + j); _t.Add(count + j + 1); } else { _t.Add(count); _t.Add(count + j + 1); _t.Add(count + j); } } } public void Log(Vector3 a, Vector3 b, float r, int sides, CampMb caps) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_003d: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_0050: 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_0052: 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_0058: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: 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_00af: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_020f: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_03e9: Unknown result type (might be due to invalid IL or missing references) //IL_03f2: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) Vector3 val = b - a; if (((Vector3)(ref val)).sqrMagnitude < 0.0001f || sides < 3) { return; } ((Vector3)(ref val)).Normalize(); Vector3 val2 = Vector3.Cross(val, (Mathf.Abs(val.y) > 0.9f) ? Vector3.right : Vector3.up); Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = Vector3.Cross(val, normalized); Vector3[] array = (Vector3[])(object)new Vector3[sides]; Vector3[] array2 = (Vector3[])(object)new Vector3[sides]; for (int i = 0; i < sides; i++) { float num = ((float)i + 0.5f) * 2f * (float)Math.PI / (float)sides; Vector3 val4 = (normalized * Mathf.Cos(num) + val3 * Mathf.Sin(num)) * r; array[i] = a + val4; array2[i] = b + val4; } float num2 = (float)Math.PI * 2f * r; val2 = b - a; float magnitude = ((Vector3)(ref val2)).magnitude; float num3 = Mathf.Repeat(a.x * 1.37f + a.y * 2.11f + a.z * 0.73f, 50f); float num4 = Mathf.Repeat(a.x * 0.61f + a.z * 1.29f, 7f); int count = _v.Count; for (int j = 0; j <= sides; j++)