using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net.Http; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Logging; using Concentus.Enums; using Concentus.Structs; using Discord; using Gravity; using HarmonyLib; using PluginConfig.API; using PluginConfig.API.Decorators; using PluginConfig.API.Fields; using PluginConfig.API.Functionals; using Polarite; using Polarite.Debugging; using Polarite.Multiplayer; using Polarite.Networking; using Polarite.Networking.Extensions; using Polarite.Networking.Skins; using Polarite.Networking.Sockets; using Polarite.Patches; using Polarite.SamTTS; using Polarite.VoiceChat; using Polarite.Web; using Randomness; using Steamworks; using Steamworks.Data; using TMPro; using ULTRAKILL.Cheats; using ULTRAKILL.Enemy; using ULTRAKILL.Portal; using UnityEngine; using UnityEngine.AI; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; using UnityEngine.Video; using plog; using plog.Models; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("JaketLite")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("JaketLite")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("1f807cb4-4d22-4300-adf4-c04802f7ab19")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] public enum BulletType { Revolver, RevolverSuper, Coin, RevolverSharp, Slab, SlabSuper, SlabSharp, ShotgunMain, ShotgunCore, Nail, NailSad, NailHeated, Saw, SawSad, SawHeated, RailBlue, RailGreen, RailRed, Rocket, Cannonball, Oil, Magnet, GrenadeBeam, JackCore, JackhammerPump, JackhammerLight, JackhammerMedium, JackhammerHeavy } public class BinaryPacketReader { private byte[] buffer; private int index; private int length; public BinaryPacketReader(byte[] data, int len) { buffer = data; index = 0; length = len; } public byte ReadByte() { if (index >= buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } return buffer[index++]; } public bool ReadBool() { return buffer[index++] == 1; } public int ReadInt() { if (index + 4 > buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } int result = BitConverter.ToInt32(buffer, index); index += 4; return result; } public ushort ReadUShort() { if (index + 2 > buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } ushort result = BitConverter.ToUInt16(buffer, index); index += 2; return result; } public float ReadFloat() { if (index + 4 > buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } float result = BitConverter.ToSingle(buffer, index); index += 4; return result; } public ulong ReadULong() { if (index + 8 > buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } ulong result = BitConverter.ToUInt64(buffer, index); index += 8; return result; } public string ReadString() { int num = ReadInt(); if (num < 0 || index + num > buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } string result = Encoding.UTF8.GetString(buffer, index, num); index += num; return result; } public Vector3 ReadVector3() { //IL_0019: 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_0021: Unknown result type (might be due to invalid IL or missing references) float num = ReadFloat(); float num2 = ReadFloat(); float num3 = ReadFloat(); return new Vector3(num, num2, num3); } public Quaternion ReadQuaternion() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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) float num = ReadFloat(); float num2 = ReadFloat(); float num3 = ReadFloat(); float num4 = ReadFloat(); return new Quaternion(num, num2, num3, num4); } public Color ReadColor() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: 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) float num = ReadFloat(); float num2 = ReadFloat(); float num3 = ReadFloat(); float num4 = ReadFloat(); return new Color(num, num2, num3, num4); } public Texture2D ReadTexture2D() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown int num = ReadInt(); int num2 = ReadInt(); byte[] array = ReadBytes(); Texture2D val = new Texture2D(num, num2); ImageConversion.LoadImage(val, array); return val; } public Skin ReadSkin() { //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_000e: 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_0015: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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_004f: 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_0057: 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_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_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) Color val = ReadColor(); Color light = ReadColor(); Color wingLight = ReadColor(); Color metal = ReadColor(); float shinyness = ReadFloat(); ulong iD = ReadULong(); string nameplate = ReadString(); Color nameplateColor = ReadColor(); return new Skin { Base = val, Light = light, WingLight = wingLight, Metal = metal, Shinyness = shinyness, ID = iD, Nameplate = nameplate, NameplateColor = nameplateColor }; } public Sam ReadSam() { int speed = ReadInt(); int pitch = ReadInt(); int mouth = ReadInt(); int throat = ReadInt(); return new Sam(speed, pitch, mouth, throat); } public int[] ReadIntArray() { int num = ReadInt(); if (num < 0) { return new int[0]; } int[] array = new int[num]; for (int i = 0; i < num; i++) { array[i] = ReadInt(); } return array; } public float[] ReadFloatArray() { int num = ReadInt(); if (num < 0) { return new float[0]; } float[] array = new float[num]; for (int i = 0; i < num; i++) { array[i] = ReadFloat(); } return array; } public byte[] ReadByteArray() { int num = ReadInt(); if (num < 0) { return new byte[0]; } if (index + num > buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } byte[] array = new byte[num]; System.Buffer.BlockCopy(buffer, index, array, 0, num); index += num; return array; } public string[] ReadStringArray() { int num = ReadInt(); if (num < 0) { return new string[0]; } string[] array = new string[num]; for (int i = 0; i < num; i++) { array[i] = ReadString(); } return array; } public T ReadEnum() where T : Enum { return (T)Enum.Parse(typeof(T), ReadString()); } public byte[] ReadBytes() { int num = ReadInt(); if (num < 0) { return new byte[0]; } if (index + num > buffer.Length) { throw new IndexOutOfRangeException("Attempted to read past end of buffer"); } byte[] array = new byte[num]; Array.Copy(buffer, index, array, 0, num); index += num; return array; } public byte[] ReadBytes(int length) { byte[] array = new byte[length]; Array.Copy(buffer, index, array, 0, length); index += length; return array; } } public class Buffer { private List Data; public Buffer() { Data = new List(); } public int[] Get() { return Data.ToArray(); } public int GetSize() { return Data.Count; } public void Set(int position, int data) { while (position >= Data.Count) { Data.Add(0); } Data[position] = data; } public float[] GetFloats() { float[] array = new float[GetSize()]; for (int i = 0; i < Data.Count; i++) { array[i] = (float)(Data[i] - 127) / 255f; } return array; } } public static class UnitySAM { private static readonly int[] tab36376 = new int[108] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 130, 0, 0, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 192, 168, 176, 172, 192, 160, 184, 160, 192, 188, 160, 172, 168, 172, 192, 160, 160, 172, 180, 164, 192, 168, 168, 176, 192, 188, 0, 0, 0, 2, 0, 32, 32, 155, 32, 192, 185, 32, 205, 163, 76, 138, 142 }; private static readonly int[] rules = new int[4076] { 93, 193, 32, 40, 65, 46, 41, 61, 69, 72, 52, 89, 46, 160, 40, 65, 41, 32, 61, 65, 200, 32, 40, 65, 82, 69, 41, 32, 61, 65, 65, 210, 32, 40, 65, 82, 41, 79, 61, 65, 88, 210, 40, 65, 82, 41, 35, 61, 69, 72, 52, 210, 32, 94, 40, 65, 83, 41, 35, 61, 69, 89, 52, 211, 40, 65, 41, 87, 65, 61, 65, 216, 40, 65, 87, 41, 61, 65, 79, 181, 32, 58, 40, 65, 78, 89, 41, 61, 69, 72, 52, 78, 73, 217, 40, 65, 41, 94, 43, 35, 61, 69, 89, 181, 35, 58, 40, 65, 76, 76, 89, 41, 61, 85, 76, 73, 217, 32, 40, 65, 76, 41, 35, 61, 85, 204, 40, 65, 71, 65, 73, 78, 41, 61, 65, 88, 71, 69, 72, 52, 206, 35, 58, 40, 65, 71, 41, 69, 61, 73, 72, 202, 40, 65, 41, 94, 37, 61, 69, 217, 40, 65, 41, 94, 43, 58, 35, 61, 65, 197, 32, 58, 40, 65, 41, 94, 43, 32, 61, 69, 89, 180, 32, 40, 65, 82, 82, 41, 61, 65, 88, 210, 40, 65, 82, 82, 41, 61, 65, 69, 52, 210, 32, 94, 40, 65, 82, 41, 32, 61, 65, 65, 53, 210, 40, 65, 82, 41, 61, 65, 65, 53, 210, 40, 65, 73, 82, 41, 61, 69, 72, 52, 210, 40, 65, 73, 41, 61, 69, 89, 180, 40, 65, 89, 41, 61, 69, 89, 181, 40, 65, 85, 41, 61, 65, 79, 180, 35, 58, 40, 65, 76, 41, 32, 61, 85, 204, 35, 58, 40, 65, 76, 83, 41, 32, 61, 85, 76, 218, 40, 65, 76, 75, 41, 61, 65, 79, 52, 203, 40, 65, 76, 41, 94, 61, 65, 79, 204, 32, 58, 40, 65, 66, 76, 69, 41, 61, 69, 89, 52, 66, 85, 204, 40, 65, 66, 76, 69, 41, 61, 65, 88, 66, 85, 204, 40, 65, 41, 86, 79, 61, 69, 89, 180, 40, 65, 78, 71, 41, 43, 61, 69, 89, 52, 78, 202, 40, 65, 84, 65, 82, 73, 41, 61, 65, 72, 84, 65, 65, 52, 82, 73, 217, 40, 65, 41, 84, 79, 77, 61, 65, 197, 40, 65, 41, 84, 84, 73, 61, 65, 197, 32, 40, 65, 84, 41, 32, 61, 65, 69, 212, 32, 40, 65, 41, 84, 61, 65, 200, 40, 65, 41, 61, 65, 197, 93, 194, 32, 40, 66, 41, 32, 61, 66, 73, 89, 180, 32, 40, 66, 69, 41, 94, 35, 61, 66, 73, 200, 40, 66, 69, 73, 78, 71, 41, 61, 66, 73, 89, 52, 73, 72, 78, 216, 32, 40, 66, 79, 84, 72, 41, 32, 61, 66, 79, 87, 52, 84, 200, 32, 40, 66, 85, 83, 41, 35, 61, 66, 73, 72, 52, 218, 40, 66, 82, 69, 65, 75, 41, 61, 66, 82, 69, 89, 53, 203, 40, 66, 85, 73, 76, 41, 61, 66, 73, 72, 52, 204, 40, 66, 41, 61, 194, 93, 195, 32, 40, 67, 41, 32, 61, 83, 73, 89, 180, 32, 40, 67, 72, 41, 94, 61, 203, 94, 69, 40, 67, 72, 41, 61, 203, 40, 67, 72, 65, 41, 82, 35, 61, 75, 69, 72, 181, 40, 67, 72, 41, 61, 67, 200, 32, 83, 40, 67, 73, 41, 35, 61, 83, 65, 89, 180, 40, 67, 73, 41, 65, 61, 83, 200, 40, 67, 73, 41, 79, 61, 83, 200, 40, 67, 73, 41, 69, 78, 61, 83, 200, 40, 67, 73, 84, 89, 41, 61, 83, 73, 72, 84, 73, 217, 40, 67, 41, 43, 61, 211, 40, 67, 75, 41, 61, 203, 40, 67, 79, 77, 77, 79, 68, 79, 82, 69, 41, 61, 75, 65, 65, 52, 77, 65, 72, 68, 79, 72, 210, 40, 67, 79, 77, 41, 61, 75, 65, 72, 205, 40, 67, 85, 73, 84, 41, 61, 75, 73, 72, 212, 40, 67, 82, 69, 65, 41, 61, 75, 82, 73, 89, 69, 217, 40, 67, 41, 61, 203, 93, 196, 32, 40, 68, 41, 32, 61, 68, 73, 89, 180, 32, 40, 68, 82, 46, 41, 32, 61, 68, 65, 65, 52, 75, 84, 69, 210, 35, 58, 40, 68, 69, 68, 41, 32, 61, 68, 73, 72, 196, 46, 69, 40, 68, 41, 32, 61, 196, 35, 58, 94, 69, 40, 68, 41, 32, 61, 212, 32, 40, 68, 69, 41, 94, 35, 61, 68, 73, 200, 32, 40, 68, 79, 41, 32, 61, 68, 85, 215, 32, 40, 68, 79, 69, 83, 41, 61, 68, 65, 72, 218, 40, 68, 79, 78, 69, 41, 32, 61, 68, 65, 72, 53, 206, 40, 68, 79, 73, 78, 71, 41, 61, 68, 85, 87, 52, 73, 72, 78, 216, 32, 40, 68, 79, 87, 41, 61, 68, 65, 215, 35, 40, 68, 85, 41, 65, 61, 74, 85, 215, 35, 40, 68, 85, 41, 94, 35, 61, 74, 65, 216, 40, 68, 41, 61, 196, 93, 197, 32, 40, 69, 41, 32, 61, 73, 89, 73, 89, 180, 35, 58, 40, 69, 41, 32, 189, 39, 58, 94, 40, 69, 41, 32, 189, 32, 58, 40, 69, 41, 32, 61, 73, 217, 35, 40, 69, 68, 41, 32, 61, 196, 35, 58, 40, 69, 41, 68, 32, 189, 40, 69, 86, 41, 69, 82, 61, 69, 72, 52, 214, 40, 69, 41, 94, 37, 61, 73, 89, 180, 40, 69, 82, 73, 41, 35, 61, 73, 89, 52, 82, 73, 217, 40, 69, 82, 73, 41, 61, 69, 72, 52, 82, 73, 200, 35, 58, 40, 69, 82, 41, 35, 61, 69, 210, 40, 69, 82, 82, 79, 82, 41, 61, 69, 72, 52, 82, 79, 72, 210, 40, 69, 82, 65, 83, 69, 41, 61, 73, 72, 82, 69, 89, 53, 211, 40, 69, 82, 41, 35, 61, 69, 72, 210, 40, 69, 82, 41, 61, 69, 210, 32, 40, 69, 86, 69, 78, 41, 61, 73, 89, 86, 69, 72, 206, 35, 58, 40, 69, 41, 87, 189, 64, 40, 69, 87, 41, 61, 85, 215, 40, 69, 87, 41, 61, 89, 85, 215, 40, 69, 41, 79, 61, 73, 217, 35, 58, 38, 40, 69, 83, 41, 32, 61, 73, 72, 218, 35, 58, 40, 69, 41, 83, 32, 189, 35, 58, 40, 69, 76, 89, 41, 32, 61, 76, 73, 217, 35, 58, 40, 69, 77, 69, 78, 84, 41, 61, 77, 69, 72, 78, 212, 40, 69, 70, 85, 76, 41, 61, 70, 85, 72, 204, 40, 69, 69, 41, 61, 73, 89, 180, 40, 69, 65, 82, 78, 41, 61, 69, 82, 53, 206, 32, 40, 69, 65, 82, 41, 94, 61, 69, 82, 181, 40, 69, 65, 68, 41, 61, 69, 72, 196, 35, 58, 40, 69, 65, 41, 32, 61, 73, 89, 65, 216, 40, 69, 65, 41, 83, 85, 61, 69, 72, 181, 40, 69, 65, 41, 61, 73, 89, 181, 40, 69, 73, 71, 72, 41, 61, 69, 89, 180, 40, 69, 73, 41, 61, 73, 89, 180, 32, 40, 69, 89, 69, 41, 61, 65, 89, 180, 40, 69, 89, 41, 61, 73, 217, 40, 69, 85, 41, 61, 89, 85, 87, 181, 40, 69, 81, 85, 65, 76, 41, 61, 73, 89, 52, 75, 87, 85, 204, 40, 69, 41, 61, 69, 200, 93, 198, 32, 40, 70, 41, 32, 61, 69, 72, 52, 198, 40, 70, 85, 76, 41, 61, 70, 85, 72, 204, 40, 70, 82, 73, 69, 78, 68, 41, 61, 70, 82, 69, 72, 53, 78, 196, 40, 70, 65, 84, 72, 69, 82, 41, 61, 70, 65, 65, 52, 68, 72, 69, 210, 40, 70, 41, 70, 189, 40, 70, 41, 61, 198, 93, 199, 32, 40, 71, 41, 32, 61, 74, 73, 89, 180, 40, 71, 73, 86, 41, 61, 71, 73, 72, 53, 214, 32, 40, 71, 41, 73, 94, 61, 199, 40, 71, 69, 41, 84, 61, 71, 69, 72, 181, 83, 85, 40, 71, 71, 69, 83, 41, 61, 71, 74, 69, 72, 52, 211, 40, 71, 71, 41, 61, 199, 32, 66, 35, 40, 71, 41, 61, 199, 40, 71, 41, 43, 61, 202, 40, 71, 82, 69, 65, 84, 41, 61, 71, 82, 69, 89, 52, 212, 40, 71, 79, 78, 41, 69, 61, 71, 65, 79, 53, 206, 35, 40, 71, 72, 41, 189, 32, 40, 71, 78, 41, 61, 206, 40, 71, 41, 61, 199, 93, 200, 32, 40, 72, 41, 32, 61, 69, 89, 52, 67, 200, 32, 40, 72, 65, 86, 41, 61, 47, 72, 65, 69, 54, 214, 32, 40, 72, 69, 82, 69, 41, 61, 47, 72, 73, 89, 210, 32, 40, 72, 79, 85, 82, 41, 61, 65, 87, 53, 69, 210, 40, 72, 79, 87, 41, 61, 47, 72, 65, 215, 40, 72, 41, 35, 61, 47, 200, 40, 72, 41, 189, 93, 201, 32, 40, 73, 78, 41, 61, 73, 72, 206, 32, 40, 73, 41, 32, 61, 65, 89, 180, 40, 73, 41, 32, 61, 65, 217, 40, 73, 78, 41, 68, 61, 65, 89, 53, 206, 83, 69, 77, 40, 73, 41, 61, 73, 217, 32, 65, 78, 84, 40, 73, 41, 61, 65, 217, 40, 73, 69, 82, 41, 61, 73, 89, 69, 210, 35, 58, 82, 40, 73, 69, 68, 41, 32, 61, 73, 89, 196, 40, 73, 69, 68, 41, 32, 61, 65, 89, 53, 196, 40, 73, 69, 78, 41, 61, 73, 89, 69, 72, 206, 40, 73, 69, 41, 84, 61, 65, 89, 52, 69, 200, 40, 73, 39, 41, 61, 65, 89, 181, 32, 58, 40, 73, 41, 94, 37, 61, 65, 89, 181, 32, 58, 40, 73, 69, 41, 32, 61, 65, 89, 180, 40, 73, 41, 37, 61, 73, 217, 40, 73, 69, 41, 61, 73, 89, 180, 32, 40, 73, 68, 69, 65, 41, 61, 65, 89, 68, 73, 89, 53, 65, 200, 40, 73, 41, 94, 43, 58, 35, 61, 73, 200, 40, 73, 82, 41, 35, 61, 65, 89, 210, 40, 73, 90, 41, 37, 61, 65, 89, 218, 40, 73, 83, 41, 37, 61, 65, 89, 218, 73, 94, 40, 73, 41, 94, 35, 61, 73, 200, 43, 94, 40, 73, 41, 94, 43, 61, 65, 217, 35, 58, 94, 40, 73, 41, 94, 43, 61, 73, 200, 40, 73, 41, 94, 43, 61, 65, 217, 40, 73, 82, 41, 61, 69, 210, 40, 73, 71, 72, 41, 61, 65, 89, 180, 40, 73, 76, 68, 41, 61, 65, 89, 53, 76, 196, 32, 40, 73, 71, 78, 41, 61, 73, 72, 71, 206, 40, 73, 71, 78, 41, 32, 61, 65, 89, 52, 206, 40, 73, 71, 78, 41, 94, 61, 65, 89, 52, 206, 40, 73, 71, 78, 41, 37, 61, 65, 89, 52, 206, 40, 73, 67, 82, 79, 41, 61, 65, 89, 52, 75, 82, 79, 200, 40, 73, 81, 85, 69, 41, 61, 73, 89, 52, 203, 40, 73, 41, 61, 73, 200, 93, 202, 32, 40, 74, 41, 32, 61, 74, 69, 89, 180, 40, 74, 41, 61, 202, 93, 203, 32, 40, 75, 41, 32, 61, 75, 69, 89, 180, 32, 40, 75, 41, 78, 189, 40, 75, 41, 61, 203, 93, 204, 32, 40, 76, 41, 32, 61, 69, 72, 52, 204, 40, 76, 79, 41, 67, 35, 61, 76, 79, 215, 76, 40, 76, 41, 189, 35, 58, 94, 40, 76, 41, 37, 61, 85, 204, 40, 76, 69, 65, 68, 41, 61, 76, 73, 89, 196, 32, 40, 76, 65, 85, 71, 72, 41, 61, 76, 65, 69, 52, 198, 40, 76, 41, 61, 204, 93, 205, 32, 40, 77, 41, 32, 61, 69, 72, 52, 205, 32, 40, 77, 82, 46, 41, 32, 61, 77, 73, 72, 52, 83, 84, 69, 210, 32, 40, 77, 83, 46, 41, 61, 77, 73, 72, 53, 218, 32, 40, 77, 82, 83, 46, 41, 32, 61, 77, 73, 72, 52, 83, 73, 88, 218, 40, 77, 79, 86, 41, 61, 77, 85, 87, 52, 214, 40, 77, 65, 67, 72, 73, 78, 41, 61, 77, 65, 72, 83, 72, 73, 89, 53, 206, 77, 40, 77, 41, 189, 40, 77, 41, 61, 205, 93, 206, 32, 40, 78, 41, 32, 61, 69, 72, 52, 206, 69, 40, 78, 71, 41, 43, 61, 78, 202, 40, 78, 71, 41, 82, 61, 78, 88, 199, 40, 78, 71, 41, 35, 61, 78, 88, 199, 40, 78, 71, 76, 41, 37, 61, 78, 88, 71, 85, 204, 40, 78, 71, 41, 61, 78, 216, 40, 78, 75, 41, 61, 78, 88, 203, 32, 40, 78, 79, 87, 41, 32, 61, 78, 65, 87, 180, 78, 40, 78, 41, 189, 40, 78, 79, 78, 41, 69, 61, 78, 65, 72, 52, 206, 40, 78, 41, 61, 206, 93, 207, 32, 40, 79, 41, 32, 61, 79, 72, 52, 215, 40, 79, 70, 41, 32, 61, 65, 72, 214, 32, 40, 79, 72, 41, 32, 61, 79, 87, 181, 40, 79, 82, 79, 85, 71, 72, 41, 61, 69, 82, 52, 79, 215, 35, 58, 40, 79, 82, 41, 32, 61, 69, 210, 35, 58, 40, 79, 82, 83, 41, 32, 61, 69, 82, 218, 40, 79, 82, 41, 61, 65, 79, 210, 32, 40, 79, 78, 69, 41, 61, 87, 65, 72, 206, 35, 40, 79, 78, 69, 41, 32, 61, 87, 65, 72, 206, 40, 79, 87, 41, 61, 79, 215, 32, 40, 79, 86, 69, 82, 41, 61, 79, 87, 53, 86, 69, 210, 80, 82, 40, 79, 41, 86, 61, 85, 87, 180, 40, 79, 86, 41, 61, 65, 72, 52, 214, 40, 79, 41, 94, 37, 61, 79, 87, 181, 40, 79, 41, 94, 69, 78, 61, 79, 215, 40, 79, 41, 94, 73, 35, 61, 79, 87, 181, 40, 79, 76, 41, 68, 61, 79, 87, 52, 204, 40, 79, 85, 71, 72, 84, 41, 61, 65, 79, 53, 212, 40, 79, 85, 71, 72, 41, 61, 65, 72, 53, 198, 32, 40, 79, 85, 41, 61, 65, 215, 72, 40, 79, 85, 41, 83, 35, 61, 65, 87, 180, 40, 79, 85, 83, 41, 61, 65, 88, 211, 40, 79, 85, 82, 41, 61, 79, 72, 210, 40, 79, 85, 76, 68, 41, 61, 85, 72, 53, 196, 40, 79, 85, 41, 94, 76, 61, 65, 72, 181, 40, 79, 85, 80, 41, 61, 85, 87, 53, 208, 40, 79, 85, 41, 61, 65, 215, 40, 79, 89, 41, 61, 79, 217, 40, 79, 73, 78, 71, 41, 61, 79, 87, 52, 73, 72, 78, 216, 40, 79, 73, 41, 61, 79, 89, 181, 40, 79, 79, 82, 41, 61, 79, 72, 53, 210, 40, 79, 79, 75, 41, 61, 85, 72, 53, 203, 70, 40, 79, 79, 68, 41, 61, 85, 87, 53, 196, 76, 40, 79, 79, 68, 41, 61, 65, 72, 53, 196, 77, 40, 79, 79, 68, 41, 61, 85, 87, 53, 196, 40, 79, 79, 68, 41, 61, 85, 72, 53, 196, 70, 40, 79, 79, 84, 41, 61, 85, 72, 53, 212, 40, 79, 79, 41, 61, 85, 87, 181, 40, 79, 39, 41, 61, 79, 200, 40, 79, 41, 69, 61, 79, 215, 40, 79, 41, 32, 61, 79, 215, 40, 79, 65, 41, 61, 79, 87, 180, 32, 40, 79, 78, 76, 89, 41, 61, 79, 87, 52, 78, 76, 73, 217, 32, 40, 79, 78, 67, 69, 41, 61, 87, 65, 72, 52, 78, 211, 40, 79, 78, 39, 84, 41, 61, 79, 87, 52, 78, 212, 67, 40, 79, 41, 78, 61, 65, 193, 40, 79, 41, 78, 71, 61, 65, 207, 32, 58, 94, 40, 79, 41, 78, 61, 65, 200, 73, 40, 79, 78, 41, 61, 85, 206, 35, 58, 40, 79, 78, 41, 61, 85, 206, 35, 94, 40, 79, 78, 41, 61, 85, 206, 40, 79, 41, 83, 84, 61, 79, 215, 40, 79, 70, 41, 94, 61, 65, 79, 52, 198, 40, 79, 84, 72, 69, 82, 41, 61, 65, 72, 53, 68, 72, 69, 210, 82, 40, 79, 41, 66, 61, 82, 65, 193, 94, 82, 40, 79, 41, 58, 35, 61, 79, 87, 181, 40, 79, 83, 83, 41, 32, 61, 65, 79, 53, 211, 35, 58, 94, 40, 79, 77, 41, 61, 65, 72, 205, 40, 79, 41, 61, 65, 193, 93, 208, 32, 40, 80, 41, 32, 61, 80, 73, 89, 180, 40, 80, 72, 41, 61, 198, 40, 80, 69, 79, 80, 76, 41, 61, 80, 73, 89, 53, 80, 85, 204, 40, 80, 79, 87, 41, 61, 80, 65, 87, 180, 40, 80, 85, 84, 41, 32, 61, 80, 85, 72, 212, 40, 80, 41, 80, 189, 40, 80, 41, 83, 189, 40, 80, 41, 78, 189, 40, 80, 82, 79, 70, 46, 41, 61, 80, 82, 79, 72, 70, 69, 72, 52, 83, 69, 210, 40, 80, 41, 61, 208, 93, 209, 32, 40, 81, 41, 32, 61, 75, 89, 85, 87, 180, 40, 81, 85, 65, 82, 41, 61, 75, 87, 79, 72, 53, 210, 40, 81, 85, 41, 61, 75, 215, 40, 81, 41, 61, 203, 93, 210, 32, 40, 82, 41, 32, 61, 65, 65, 53, 210, 32, 40, 82, 69, 41, 94, 35, 61, 82, 73, 217, 40, 82, 41, 82, 189, 40, 82, 41, 61, 210, 93, 211, 32, 40, 83, 41, 32, 61, 69, 72, 52, 211, 40, 83, 72, 41, 61, 83, 200, 35, 40, 83, 73, 79, 78, 41, 61, 90, 72, 85, 206, 40, 83, 79, 77, 69, 41, 61, 83, 65, 72, 205, 35, 40, 83, 85, 82, 41, 35, 61, 90, 72, 69, 210, 40, 83, 85, 82, 41, 35, 61, 83, 72, 69, 210, 35, 40, 83, 85, 41, 35, 61, 90, 72, 85, 215, 35, 40, 83, 83, 85, 41, 35, 61, 83, 72, 85, 215, 35, 40, 83, 69, 68, 41, 61, 90, 196, 35, 40, 83, 41, 35, 61, 218, 40, 83, 65, 73, 68, 41, 61, 83, 69, 72, 196, 94, 40, 83, 73, 79, 78, 41, 61, 83, 72, 85, 206, 40, 83, 41, 83, 189, 46, 40, 83, 41, 32, 61, 218, 35, 58, 46, 69, 40, 83, 41, 32, 61, 218, 35, 58, 94, 35, 40, 83, 41, 32, 61, 211, 85, 40, 83, 41, 32, 61, 211, 32, 58, 35, 40, 83, 41, 32, 61, 218, 35, 35, 40, 83, 41, 32, 61, 218, 32, 40, 83, 67, 72, 41, 61, 83, 203, 40, 83, 41, 67, 43, 189, 35, 40, 83, 77, 41, 61, 90, 85, 205, 35, 40, 83, 78, 41, 39, 61, 90, 85, 205, 40, 83, 84, 76, 69, 41, 61, 83, 85, 204, 40, 83, 41, 61, 211, 93, 212, 32, 40, 84, 41, 32, 61, 84, 73, 89, 180, 32, 40, 84, 72, 69, 41, 32, 35, 61, 68, 72, 73, 217, 32, 40, 84, 72, 69, 41, 32, 61, 68, 72, 65, 216, 40, 84, 79, 41, 32, 61, 84, 85, 216, 32, 40, 84, 72, 65, 84, 41, 61, 68, 72, 65, 69, 212, 32, 40, 84, 72, 73, 83, 41, 32, 61, 68, 72, 73, 72, 211, 32, 40, 84, 72, 69, 89, 41, 61, 68, 72, 69, 217, 32, 40, 84, 72, 69, 82, 69, 41, 61, 68, 72, 69, 72, 210, 40, 84, 72, 69, 82, 41, 61, 68, 72, 69, 210, 40, 84, 72, 69, 73, 82, 41, 61, 68, 72, 69, 72, 210, 32, 40, 84, 72, 65, 78, 41, 32, 61, 68, 72, 65, 69, 206, 32, 40, 84, 72, 69, 77, 41, 32, 61, 68, 72, 65, 69, 206, 40, 84, 72, 69, 83, 69, 41, 32, 61, 68, 72, 73, 89, 218, 32, 40, 84, 72, 69, 78, 41, 61, 68, 72, 69, 72, 206, 40, 84, 72, 82, 79, 85, 71, 72, 41, 61, 84, 72, 82, 85, 87, 180, 40, 84, 72, 79, 83, 69, 41, 61, 68, 72, 79, 72, 218, 40, 84, 72, 79, 85, 71, 72, 41, 32, 61, 68, 72, 79, 215, 40, 84, 79, 68, 65, 89, 41, 61, 84, 85, 88, 68, 69, 217, 40, 84, 79, 77, 79, 41, 82, 82, 79, 87, 61, 84, 85, 77, 65, 65, 181, 40, 84, 79, 41, 84, 65, 76, 61, 84, 79, 87, 181, 32, 40, 84, 72, 85, 83, 41, 61, 68, 72, 65, 72, 52, 211, 40, 84, 72, 41, 61, 84, 200, 35, 58, 40, 84, 69, 68, 41, 61, 84, 73, 88, 196, 83, 40, 84, 73, 41, 35, 78, 61, 67, 200, 40, 84, 73, 41, 79, 61, 83, 200, 40, 84, 73, 41, 65, 61, 83, 200, 40, 84, 73, 69, 78, 41, 61, 83, 72, 85, 206, 40, 84, 85, 82, 41, 35, 61, 67, 72, 69, 210, 40, 84, 85, 41, 65, 61, 67, 72, 85, 215, 32, 40, 84, 87, 79, 41, 61, 84, 85, 215, 38, 40, 84, 41, 69, 78, 32, 189, 40, 84, 41, 61, 212, 93, 213, 32, 40, 85, 41, 32, 61, 89, 85, 87, 180, 32, 40, 85, 78, 41, 73, 61, 89, 85, 87, 206, 32, 40, 85, 78, 41, 61, 65, 72, 206, 32, 40, 85, 80, 79, 78, 41, 61, 65, 88, 80, 65, 79, 206, 64, 40, 85, 82, 41, 35, 61, 85, 72, 52, 210, 40, 85, 82, 41, 35, 61, 89, 85, 72, 52, 210, 40, 85, 82, 41, 61, 69, 210, 40, 85, 41, 94, 32, 61, 65, 200, 40, 85, 41, 94, 94, 61, 65, 72, 181, 40, 85, 89, 41, 61, 65, 89, 181, 32, 71, 40, 85, 41, 35, 189, 71, 40, 85, 41, 37, 189, 71, 40, 85, 41, 35, 61, 215, 35, 78, 40, 85, 41, 61, 89, 85, 215, 64, 40, 85, 41, 61, 85, 215, 40, 85, 41, 61, 89, 85, 215, 93, 214, 32, 40, 86, 41, 32, 61, 86, 73, 89, 180, 40, 86, 73, 69, 87, 41, 61, 86, 89, 85, 87, 181, 40, 86, 41, 61, 214, 93, 215, 32, 40, 87, 41, 32, 61, 68, 65, 72, 52, 66, 85, 76, 89, 85, 215, 32, 40, 87, 69, 82, 69, 41, 61, 87, 69, 210, 40, 87, 65, 41, 83, 72, 61, 87, 65, 193, 40, 87, 65, 41, 83, 84, 61, 87, 69, 217, 40, 87, 65, 41, 83, 61, 87, 65, 200, 40, 87, 65, 41, 84, 61, 87, 65, 193, 40, 87, 72, 69, 82, 69, 41, 61, 87, 72, 69, 72, 210, 40, 87, 72, 65, 84, 41, 61, 87, 72, 65, 72, 212, 40, 87, 72, 79, 76, 41, 61, 47, 72, 79, 87, 204, 40, 87, 72, 79, 41, 61, 47, 72, 85, 215, 40, 87, 72, 41, 61, 87, 200, 40, 87, 65, 82, 41, 35, 61, 87, 69, 72, 210, 40, 87, 65, 82, 41, 61, 87, 65, 79, 210, 40, 87, 79, 82, 41, 94, 61, 87, 69, 210, 40, 87, 82, 41, 61, 210, 40, 87, 79, 77, 41, 65, 61, 87, 85, 72, 205, 40, 87, 79, 77, 41, 69, 61, 87, 73, 72, 205, 40, 87, 69, 65, 41, 82, 61, 87, 69, 200, 40, 87, 65, 78, 84, 41, 61, 87, 65, 65, 53, 78, 212, 65, 78, 83, 40, 87, 69, 82, 41, 61, 69, 210, 40, 87, 41, 61, 215, 93, 216, 32, 40, 88, 41, 32, 61, 69, 72, 52, 75, 211, 32, 40, 88, 41, 61, 218, 40, 88, 41, 61, 75, 211, 93, 217, 32, 40, 89, 41, 32, 61, 87, 65, 89, 180, 40, 89, 79, 85, 78, 71, 41, 61, 89, 65, 72, 78, 216, 32, 40, 89, 79, 85, 82, 41, 61, 89, 79, 72, 210, 32, 40, 89, 79, 85, 41, 61, 89, 85, 215, 32, 40, 89, 69, 83, 41, 61, 89, 69, 72, 211, 32, 40, 89, 41, 61, 217, 70, 40, 89, 41, 61, 65, 217, 80, 83, 40, 89, 67, 72, 41, 61, 65, 89, 203, 35, 58, 94, 40, 89, 41, 61, 73, 217, 35, 58, 94, 40, 89, 41, 73, 61, 73, 217, 32, 58, 40, 89, 41, 32, 61, 65, 217, 32, 58, 40, 89, 41, 35, 61, 65, 217, 32, 58, 40, 89, 41, 94, 43, 58, 35, 61, 73, 200, 32, 58, 40, 89, 41, 94, 35, 61, 65, 217, 40, 89, 41, 61, 73, 200, 93, 218, 32, 40, 90, 41, 32, 61, 90, 73, 89, 180, 40, 90, 41, 61, 218, 234 }; private static readonly int[] rules2 = new int[447] { 40, 65, 41, 189, 40, 33, 41, 61, 174, 40, 34, 41, 32, 61, 45, 65, 72, 53, 78, 75, 87, 79, 87, 84, 173, 40, 34, 41, 61, 75, 87, 79, 87, 52, 84, 173, 40, 35, 41, 61, 32, 78, 65, 72, 52, 77, 66, 69, 210, 40, 36, 41, 61, 32, 68, 65, 65, 52, 76, 69, 210, 40, 37, 41, 61, 32, 80, 69, 82, 83, 69, 72, 52, 78, 212, 40, 38, 41, 61, 32, 65, 69, 78, 196, 40, 39, 41, 189, 40, 42, 41, 61, 32, 65, 69, 52, 83, 84, 69, 82, 73, 72, 83, 203, 40, 43, 41, 61, 32, 80, 76, 65, 72, 52, 211, 40, 44, 41, 61, 172, 32, 40, 45, 41, 32, 61, 173, 40, 45, 41, 189, 40, 46, 41, 61, 32, 80, 79, 89, 78, 212, 40, 47, 41, 61, 32, 83, 76, 65, 69, 52, 83, 200, 40, 48, 41, 61, 32, 90, 73, 89, 52, 82, 79, 215, 32, 40, 49, 83, 84, 41, 61, 70, 69, 82, 52, 83, 212, 32, 40, 49, 48, 84, 72, 41, 61, 84, 69, 72, 52, 78, 84, 200, 40, 49, 41, 61, 32, 87, 65, 72, 52, 206, 32, 40, 50, 78, 68, 41, 61, 83, 69, 72, 52, 75, 85, 78, 196, 40, 50, 41, 61, 32, 84, 85, 87, 180, 32, 40, 51, 82, 68, 41, 61, 84, 72, 69, 82, 52, 196, 40, 51, 41, 61, 32, 84, 72, 82, 73, 89, 180, 40, 52, 41, 61, 32, 70, 79, 72, 52, 210, 32, 40, 53, 84, 72, 41, 61, 70, 73, 72, 52, 70, 84, 200, 40, 53, 41, 61, 32, 70, 65, 89, 52, 214, 32, 40, 54, 52, 41, 32, 61, 83, 73, 72, 52, 75, 83, 84, 73, 89, 32, 70, 79, 72, 210, 40, 54, 41, 61, 32, 83, 73, 72, 52, 75, 211, 40, 55, 41, 61, 32, 83, 69, 72, 52, 86, 85, 206, 32, 40, 56, 84, 72, 41, 61, 69, 89, 52, 84, 200, 40, 56, 41, 61, 32, 69, 89, 52, 212, 40, 57, 41, 61, 32, 78, 65, 89, 52, 206, 40, 58, 41, 61, 174, 40, 59, 41, 61, 174, 40, 60, 41, 61, 32, 76, 69, 72, 52, 83, 32, 68, 72, 65, 69, 206, 40, 61, 41, 61, 32, 73, 89, 52, 75, 87, 85, 76, 218, 40, 62, 41, 61, 32, 71, 82, 69, 89, 52, 84, 69, 82, 32, 68, 72, 65, 69, 206, 40, 63, 41, 61, 191, 40, 64, 41, 61, 32, 65, 69, 54, 212, 40, 94, 41, 61, 32, 75, 65, 69, 52, 82, 73, 88, 212, 93, 193 }; private static readonly int[] tab37489 = new int[26] { 0, 149, 247, 162, 57, 197, 6, 126, 199, 38, 55, 78, 145, 241, 85, 161, 254, 36, 69, 45, 167, 54, 83, 46, 71, 218 }; private static readonly int[] tab37515 = new int[26] { 125, 126, 126, 127, 128, 129, 130, 130, 130, 132, 132, 132, 132, 132, 133, 135, 135, 136, 136, 137, 138, 139, 139, 140, 140, 140 }; private static int A; private static int X; private static int Y; private static int[] inputtemp; private static readonly int[] tab48426 = new int[5] { 24, 26, 23, 23, 23 }; private static readonly int[] tab47492 = new int[11] { 0, 0, 224, 230, 236, 243, 249, 0, 6, 12, 6 }; private static readonly int[] amplitudeRescale = new int[17] { 0, 1, 2, 2, 2, 3, 3, 4, 4, 5, 6, 8, 9, 11, 13, 15, 0 }; private static readonly int[] blendRank = new int[80] { 0, 31, 31, 31, 31, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 2, 10, 2, 8, 5, 5, 11, 10, 9, 8, 8, 160, 8, 8, 23, 31, 18, 18, 18, 18, 30, 30, 20, 20, 20, 20, 23, 23, 26, 26, 29, 29, 2, 2, 2, 2, 2, 2, 26, 29, 27, 26, 29, 27, 26, 29, 27, 26, 29, 27, 23, 29, 23, 23, 29, 23, 23, 29, 23, 23, 29, 23, 23, 23 }; private static readonly int[] outBlendLength = new int[80] { 0, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 2, 4, 4, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 0, 1, 0, 1, 0, 5, 5, 5, 5, 5, 4, 4, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 2, 2, 0, 1, 3, 0, 2, 3, 0, 2, 160, 160 }; private static readonly int[] inBlendLength = new int[80] { 0, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 3, 3, 3, 3, 3, 1, 2, 3, 2, 1, 3, 3, 3, 3, 1, 1, 3, 3, 3, 2, 2, 3, 2, 3, 0, 0, 5, 5, 5, 5, 4, 4, 2, 0, 2, 2, 0, 3, 2, 0, 4, 2, 0, 3, 2, 0, 2, 2, 0, 2, 3, 0, 3, 3, 0, 3, 176, 160 }; private static readonly int[] sampledConsonantFlags = new int[80] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 241, 226, 211, 187, 124, 149, 1, 2, 3, 3, 0, 114, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; private static readonly int[] freq1data = new int[80] { 0, 19, 19, 19, 19, 10, 14, 18, 24, 26, 22, 20, 16, 20, 14, 18, 14, 18, 18, 16, 12, 14, 10, 18, 14, 10, 8, 6, 6, 6, 6, 17, 6, 6, 6, 6, 14, 16, 9, 10, 8, 10, 6, 6, 6, 5, 6, 0, 18, 26, 20, 26, 18, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 10, 10, 6, 6, 6, 44, 19 }; private static readonly int[] freq2data = new int[80] { 0, 67, 67, 67, 67, 84, 72, 66, 62, 40, 44, 30, 36, 44, 72, 48, 36, 30, 50, 36, 28, 68, 24, 50, 30, 24, 82, 46, 54, 86, 54, 67, 73, 79, 26, 66, 73, 37, 51, 66, 40, 47, 79, 79, 66, 79, 110, 0, 72, 38, 30, 42, 30, 34, 26, 26, 26, 66, 66, 66, 110, 110, 110, 84, 84, 84, 26, 26, 26, 66, 66, 66, 109, 86, 109, 84, 84, 84, 127, 127 }; private static readonly int[] freq3data = new int[80] { 0, 91, 91, 91, 91, 110, 93, 91, 88, 89, 87, 88, 82, 89, 93, 62, 82, 88, 62, 110, 80, 93, 90, 60, 110, 90, 110, 81, 121, 101, 121, 91, 99, 106, 81, 121, 93, 82, 93, 103, 76, 93, 101, 101, 121, 101, 121, 0, 90, 88, 88, 88, 88, 82, 81, 81, 81, 121, 121, 121, 112, 110, 110, 94, 94, 94, 81, 81, 81, 121, 121, 121, 101, 101, 112, 94, 94, 94, 8, 1 }; private static readonly int[] ampl1data = new int[80] { 0, 0, 0, 0, 0, 13, 13, 14, 15, 15, 15, 15, 15, 12, 13, 12, 15, 15, 13, 13, 13, 14, 13, 12, 13, 13, 13, 12, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 11, 11, 0, 0, 1, 11, 0, 2, 14, 15, 15, 15, 15, 13, 2, 4, 0, 2, 4, 0, 1, 4, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 15, 15 }; private static readonly int[] ampl2data = new int[80] { 0, 0, 0, 0, 0, 10, 11, 13, 14, 13, 12, 12, 11, 9, 11, 11, 12, 12, 12, 8, 8, 12, 8, 10, 8, 8, 10, 3, 9, 6, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 3, 4, 0, 0, 0, 5, 10, 2, 14, 13, 12, 13, 12, 8, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 10, 0, 0, 0 }; private static readonly int[] ampl3data = new int[80] { 0, 0, 0, 0, 0, 8, 7, 8, 8, 1, 1, 0, 1, 0, 7, 5, 1, 0, 6, 1, 0, 7, 0, 5, 1, 0, 8, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 14, 1, 9, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 5, 0, 19, 16 }; private static readonly int[] sinus = new int[256] { 0, 3, 6, 9, 12, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 51, 54, 57, 60, 63, 65, 68, 71, 73, 76, 78, 81, 83, 85, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 107, 109, 111, 112, 113, 115, 116, 117, 118, 120, 121, 122, 122, 123, 124, 125, 125, 126, 126, 126, 127, 127, 127, 127, 127, 127, 127, 126, 126, 126, 125, 125, 124, 123, 122, 122, 121, 120, 118, 117, 116, 115, 113, 112, 111, 109, 107, 106, 104, 102, 100, 98, 96, 94, 92, 90, 88, 85, 83, 81, 78, 76, 73, 71, 68, 65, 63, 60, 57, 54, 51, 49, 46, 43, 40, 37, 34, 31, 28, 25, 22, 19, 16, 12, 9, 6, 3, 0, -3, -6, -9, -12, -16, -19, -22, -25, -28, -31, -34, -37, -40, -43, -46, -49, -51, -54, -57, -60, -63, -65, -68, -71, -73, -76, -78, -81, -83, -85, -88, -90, -92, -94, -96, -98, -100, -102, -104, -106, -107, -109, -111, -112, -113, -115, -116, -117, -118, -120, -121, -122, -122, -123, -124, -125, -125, -126, -126, -126, -127, -127, -127, -127, -127, -127, -127, -126, -126, -126, -125, -125, -124, -123, -122, -122, -121, -120, -118, -117, -116, -115, -113, -112, -111, -109, -107, -106, -104, -102, -100, -98, -96, -94, -92, -90, -88, -85, -83, -81, -78, -76, -73, -71, -68, -65, -63, -60, -57, -54, -51, -49, -46, -43, -40, -37, -34, -31, -28, -25, -22, -19, -16, -12, -9, -6, -3 }; private static readonly int[] rectangle = new int[256] { 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112 }; private static readonly int[] sampleTable = new int[1280] { 56, 132, 107, 25, 198, 99, 24, 134, 115, 152, 198, 177, 28, 202, 49, 140, 199, 49, 136, 194, 48, 152, 70, 49, 24, 198, 53, 12, 202, 49, 12, 198, 33, 16, 36, 105, 18, 194, 49, 20, 196, 113, 8, 74, 34, 73, 171, 106, 168, 172, 73, 81, 50, 213, 82, 136, 147, 108, 148, 34, 21, 84, 210, 37, 150, 212, 80, 165, 70, 33, 8, 133, 107, 24, 196, 99, 16, 206, 107, 24, 140, 113, 25, 140, 99, 53, 12, 198, 51, 153, 204, 108, 181, 78, 162, 153, 70, 33, 40, 130, 149, 46, 227, 48, 156, 197, 48, 156, 162, 177, 156, 103, 49, 136, 102, 89, 44, 83, 24, 132, 103, 80, 202, 227, 10, 172, 171, 48, 172, 98, 48, 140, 99, 16, 148, 98, 177, 140, 130, 40, 150, 51, 152, 214, 181, 76, 98, 41, 165, 74, 181, 156, 198, 49, 20, 214, 56, 156, 75, 180, 134, 101, 24, 174, 103, 28, 166, 99, 25, 150, 35, 25, 132, 19, 8, 166, 82, 172, 202, 34, 137, 110, 171, 25, 140, 98, 52, 196, 98, 25, 134, 99, 24, 196, 35, 88, 214, 163, 80, 66, 84, 74, 173, 74, 37, 17, 107, 100, 137, 74, 99, 57, 138, 35, 49, 42, 234, 162, 169, 68, 197, 18, 205, 66, 52, 140, 98, 24, 140, 99, 17, 72, 102, 49, 157, 68, 51, 29, 70, 49, 156, 198, 177, 12, 205, 50, 136, 196, 115, 24, 134, 115, 8, 214, 99, 88, 7, 129, 224, 240, 60, 7, 135, 144, 60, 124, 15, 199, 192, 192, 240, 124, 30, 7, 128, 128, 0, 28, 120, 112, 241, 199, 31, 192, 12, 254, 28, 31, 31, 14, 10, 122, 192, 113, 242, 131, 143, 3, 15, 15, 12, 0, 121, 248, 97, 224, 67, 15, 131, 231, 24, 249, 193, 19, 218, 233, 99, 143, 15, 131, 131, 135, 195, 31, 60, 112, 240, 225, 225, 227, 135, 184, 113, 14, 32, 227, 141, 72, 120, 28, 147, 135, 48, 225, 193, 193, 228, 120, 33, 131, 131, 195, 135, 6, 57, 229, 195, 135, 7, 14, 28, 28, 112, 244, 113, 156, 96, 54, 50, 195, 30, 60, 243, 143, 14, 60, 112, 227, 199, 143, 15, 15, 14, 60, 120, 240, 227, 135, 6, 240, 227, 7, 193, 153, 135, 15, 24, 120, 112, 112, 252, 243, 16, 177, 140, 140, 49, 124, 112, 225, 134, 60, 100, 108, 176, 225, 227, 15, 35, 143, 15, 30, 62, 56, 60, 56, 123, 143, 7, 14, 60, 244, 23, 30, 60, 120, 242, 158, 114, 73, 227, 37, 54, 56, 88, 57, 226, 222, 60, 120, 120, 225, 199, 97, 225, 225, 176, 240, 240, 195, 199, 14, 56, 192, 240, 206, 115, 115, 24, 52, 176, 225, 199, 142, 28, 60, 248, 56, 240, 225, 193, 139, 134, 143, 28, 120, 112, 240, 120, 172, 177, 143, 57, 49, 219, 56, 97, 195, 14, 14, 56, 120, 115, 23, 30, 57, 30, 56, 100, 225, 241, 193, 78, 15, 64, 162, 2, 197, 143, 129, 161, 252, 18, 8, 100, 224, 60, 34, 224, 69, 7, 142, 12, 50, 144, 240, 31, 32, 73, 224, 248, 12, 96, 240, 23, 26, 65, 170, 164, 208, 141, 18, 130, 30, 30, 3, 248, 62, 3, 12, 115, 128, 112, 68, 38, 3, 36, 225, 62, 4, 78, 4, 28, 193, 9, 204, 158, 144, 33, 7, 144, 67, 100, 192, 15, 198, 144, 156, 193, 91, 3, 226, 29, 129, 224, 94, 29, 3, 132, 184, 44, 15, 128, 177, 131, 224, 48, 65, 30, 67, 137, 131, 80, 252, 36, 46, 19, 131, 241, 124, 76, 44, 201, 13, 131, 176, 181, 130, 228, 232, 6, 156, 7, 160, 153, 29, 7, 62, 130, 143, 112, 48, 116, 64, 202, 16, 228, 232, 15, 146, 20, 63, 6, 248, 132, 136, 67, 129, 10, 52, 57, 65, 198, 227, 28, 71, 3, 176, 184, 19, 10, 194, 100, 248, 24, 249, 96, 179, 192, 101, 32, 96, 166, 140, 195, 129, 32, 48, 38, 30, 28, 56, 211, 1, 176, 38, 64, 244, 11, 195, 66, 31, 133, 50, 38, 96, 64, 201, 203, 1, 236, 17, 40, 64, 250, 4, 52, 224, 112, 76, 140, 29, 7, 105, 3, 22, 200, 4, 35, 232, 198, 154, 11, 26, 3, 224, 118, 6, 5, 207, 30, 188, 88, 49, 113, 102, 0, 248, 63, 4, 252, 12, 116, 39, 138, 128, 113, 194, 58, 38, 6, 192, 31, 5, 15, 152, 64, 174, 1, 127, 192, 7, 255, 0, 14, 254, 0, 3, 223, 128, 3, 239, 128, 27, 241, 194, 0, 231, 224, 24, 252, 224, 33, 252, 128, 60, 252, 64, 14, 126, 0, 63, 62, 0, 15, 254, 0, 31, 255, 0, 62, 240, 7, 252, 0, 126, 16, 63, 255, 0, 63, 56, 14, 124, 1, 135, 12, 252, 199, 0, 62, 4, 15, 62, 31, 15, 15, 31, 15, 2, 131, 135, 207, 3, 135, 15, 63, 192, 7, 158, 96, 63, 192, 3, 254, 0, 63, 224, 119, 225, 192, 254, 224, 195, 224, 1, 223, 248, 3, 7, 0, 126, 112, 0, 124, 56, 24, 254, 12, 30, 120, 28, 124, 62, 14, 31, 30, 30, 62, 0, 127, 131, 7, 219, 135, 131, 7, 199, 7, 16, 113, 255, 0, 63, 226, 1, 224, 193, 195, 225, 0, 127, 192, 5, 240, 32, 248, 240, 112, 254, 120, 121, 248, 2, 63, 12, 143, 3, 15, 159, 224, 193, 199, 135, 3, 195, 195, 176, 225, 225, 193, 227, 224, 113, 240, 0, 252, 112, 124, 12, 62, 56, 14, 28, 112, 195, 199, 3, 129, 193, 199, 231, 0, 15, 199, 135, 25, 9, 239, 196, 51, 224, 193, 252, 248, 112, 240, 120, 248, 240, 97, 199, 0, 31, 248, 1, 124, 248, 240, 120, 112, 60, 124, 206, 14, 33, 131, 207, 8, 7, 143, 8, 193, 135, 143, 128, 199, 227, 0, 7, 248, 224, 239, 0, 57, 247, 128, 14, 248, 225, 227, 248, 33, 159, 192, 255, 3, 248, 7, 192, 31, 248, 196, 4, 252, 196, 193, 188, 135, 240, 15, 192, 127, 5, 224, 37, 236, 192, 62, 132, 71, 240, 142, 3, 248, 3, 251, 192, 25, 248, 7, 156, 12, 23, 248, 7, 224, 31, 161, 252, 15, 252, 1, 240, 63, 0, 254, 3, 240, 31, 0, 253, 0, 255, 136, 13, 249, 1, 255, 0, 112, 7, 192, 62, 66, 243, 13, 196, 127, 128, 252, 7, 240, 94, 192, 63, 0, 120, 63, 129, 255, 1, 248, 1, 195, 232, 12, 228, 100, 143, 228, 15, 240, 7, 240, 194, 31, 0, 127, 192, 111, 128, 126, 3, 248, 7, 240, 63, 192, 120, 15, 130, 7, 254, 34, 119, 112, 2, 118, 3, 254, 0, 254, 103, 0, 124, 199, 241, 142, 198, 59, 224, 63, 132, 243, 25, 216, 3, 153, 252, 9, 184, 15, 248, 0, 157, 36, 97, 249, 13, 0, 253, 3, 240, 31, 144, 63, 1, 248, 31, 208, 15, 248, 55, 1, 248, 7, 240, 15, 192, 63, 0, 254, 3, 248, 15, 192, 63, 0, 250, 3, 240, 15, 128, 255, 1, 184, 7, 240, 1, 252, 1, 188, 128, 19, 30, 0, 127, 225, 64, 127, 160, 127, 176, 0, 63, 192, 31, 192, 56, 15, 240, 31, 128, 255, 1, 252, 3, 241, 126, 1, 254, 1, 240, 255, 0, 127, 192, 29, 7, 240, 15, 192, 126, 6, 224, 7, 224, 15, 248, 6, 193, 254, 1, 252, 3, 224, 15, 0, 252 }; private static int wait1 = 7; private static int wait2 = 6; private static int[] pitches = new int[256]; private static int[] frequency1 = new int[256]; private static int[] frequency2 = new int[256]; private static int[] frequency3 = new int[256]; private static int[] amplitude1 = new int[256]; private static int[] amplitude2 = new int[256]; private static int[] amplitude3 = new int[256]; private static int[] sampledConsonantFlag = new int[256]; private static readonly int[][] timetable = new int[5][] { new int[5] { 162, 167, 167, 127, 128 }, new int[5] { 226, 60, 60, 0, 0 }, new int[5] { 225, 60, 59, 0, 0 }, new int[5] { 200, 0, 0, 54, 55 }, new int[5] { 199, 0, 0, 54, 54 } }; private static int oldtimetableindex = 0; private static Buffer buf; private static readonly int[] stressInputTable = new int[9] { 42, 49, 50, 51, 52, 53, 54, 55, 56 }; private static readonly int[] signInputTable1 = new int[81] { 32, 46, 63, 44, 45, 73, 73, 69, 65, 65, 65, 65, 85, 65, 73, 69, 85, 79, 82, 76, 87, 89, 87, 82, 76, 87, 89, 77, 78, 78, 68, 81, 83, 83, 70, 84, 47, 47, 90, 90, 86, 68, 67, 42, 74, 42, 42, 42, 69, 65, 79, 65, 79, 85, 66, 42, 42, 68, 42, 42, 71, 42, 42, 71, 42, 42, 80, 42, 42, 84, 42, 42, 75, 42, 42, 75, 42, 42, 85, 85, 85 }; private static readonly int[] signInputTable2 = new int[81] { 42, 42, 42, 42, 42, 89, 72, 72, 69, 65, 72, 79, 72, 88, 88, 82, 88, 72, 88, 88, 88, 88, 72, 42, 42, 42, 42, 42, 42, 88, 88, 42, 42, 72, 42, 72, 72, 88, 42, 72, 42, 72, 72, 42, 42, 42, 42, 42, 89, 89, 89, 87, 87, 87, 42, 42, 42, 42, 42, 42, 42, 42, 42, 88, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 88, 42, 42, 76, 77, 78 }; private static readonly int[] flags = new int[81] { 0, 0, 0, 0, 0, 164, 164, 164, 164, 164, 164, 132, 132, 164, 164, 132, 132, 132, 132, 132, 132, 132, 68, 68, 68, 68, 68, 76, 76, 76, 72, 76, 64, 64, 64, 64, 64, 64, 68, 68, 68, 68, 72, 64, 76, 68, 0, 0, 180, 180, 180, 148, 148, 148, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, 128, 193, 193 }; private static readonly int[] flags2 = new int[78] { 128, 193, 193, 193, 193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 16, 16, 16, 8, 12, 8, 4, 64, 36, 32, 32, 36, 0, 0, 36, 32, 32, 36, 32, 32, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0 }; private static readonly int[] phonemeStressedLengthTable = new int[80] { 0, 18, 18, 18, 8, 11, 9, 11, 14, 15, 11, 16, 12, 6, 6, 14, 12, 14, 12, 11, 8, 8, 11, 10, 9, 8, 8, 8, 8, 8, 3, 5, 2, 2, 2, 2, 2, 2, 6, 6, 8, 6, 6, 2, 9, 4, 2, 1, 14, 15, 15, 15, 14, 14, 8, 2, 2, 7, 2, 1, 7, 2, 2, 7, 2, 2, 8, 2, 2, 6, 2, 2, 7, 2, 4, 7, 1, 4, 5, 5 }; private static readonly int[] phonemeLengthTable = new int[80] { 0, 18, 18, 18, 8, 8, 8, 8, 8, 11, 6, 12, 10, 5, 5, 11, 10, 10, 10, 9, 8, 7, 9, 7, 6, 8, 6, 7, 7, 7, 2, 5, 2, 2, 2, 2, 2, 2, 6, 6, 7, 6, 6, 2, 8, 3, 1, 30, 13, 12, 12, 12, 14, 9, 6, 1, 2, 5, 1, 1, 6, 1, 2, 6, 1, 2, 8, 2, 2, 4, 2, 2, 6, 1, 4, 6, 1, 4, 199, 255 }; private static bool debug; private static int[] input = new int[256]; private static int speed = 72; private static int pitch = 64; private static int mouth = 128; private static int throat = 128; private static bool singmode = false; private static int mem39; private static int mem44; private static int mem47; private static int mem49; private static int mem50; private static int mem51; private static int mem53; private static int mem56; private static int mem59 = 0; private static int[] stress = new int[256]; private static int[] phonemeLength = new int[256]; private static int[] phonemeindex = new int[256]; private static int[] phonemeIndexOutput = new int[256]; private static int[] stressOutput = new int[256]; private static int[] phonemeLengthOutput = new int[256]; private static int bufferpos = 0; public static int[] IntArray(string s) { s = s.ToUpper(); int length = s.Length; byte[] bytes = Encoding.UTF8.GetBytes(s); int[] array = new int[256]; for (int i = 0; i < bytes.Length; i++) { array[i] = bytes[i]; } return array; } public static string TextToPhonemes(string s, out int[] ints) { int[] array = IntArray(s); Debug.Log((object)("success = " + TextToPhonemes(ref array))); int[] array2 = (ints = array); byte[] array3 = new byte[array2.Length]; for (int i = 0; i < array2.Length; i++) { if (array2[i] == 0) { int[] array4 = new int[i]; Array.Copy(array2, array4, i); array2 = array4; break; } array3[i] = (byte)array2[i]; } return Encoding.UTF8.GetString(array3); } private static void Code37055(int mem59) { X = mem59; X--; A = inputtemp[X]; Y = A; A = tab36376[Y]; } private static void Code37066(int mem58) { X = mem58; INC8(ref X); A = inputtemp[X]; Y = A; A = tab36376[Y]; } private static int GetRuleByte(int mem62, int Y) { int num = mem62; if (mem62 >= 37541) { num -= 37541; return rules2[num + Y]; } num -= 32000; return rules[num + Y]; } private static void INC8(ref int xxx) { xxx++; xxx &= 255; } private static void DEC8(ref int xxx) { xxx--; xxx &= 255; } private static bool TextToPhonemes(ref int[] input) { int num = 0; int num2 = 0; int num3 = 0; int num4 = 0; int num5 = 0; int num6 = 0; int num7 = 0; int num8 = 0; int num9 = 0; int num10 = 0; int num11 = 0; inputtemp = new int[256]; inputtemp[0] = 32; X = 1; Y = 0; do { A = input[Y] & 0x7F; if (A >= 112) { A &= 95; } else if (A >= 96) { A &= 79; } inputtemp[X] = A; INC8(ref X); INC8(ref Y); } while (Y != 255); printf(inputtemp); X = 255; inputtemp[X] = 27; num6 = 255; A = 255; num = 255; while (true) { INC8(ref num6); X = num6; if (X < inputtemp.Length) { A = inputtemp[X]; num8 = A; if (A == 91) { INC8(ref num); X = num; A = 155; input[X] = 155; INC8(ref X); int[] array = new int[X]; Array.Copy(input, array, X); input = array; return true; } if (A == 46) { INC8(ref X); Y = inputtemp[X]; A = tab36376[Y] & 1; if (A == 0) { INC8(ref num); X = num; A = 46; input[X] = 46; continue; } } } A = num8; Y = A; A = tab36376[A]; num2 = A; if ((A & 2) != 0) { num7 = 37541; } else { A = num2; if (A == 0) { A = 32; if (X >= inputtemp.Length) { return true; } inputtemp[X] = 32; INC8(ref num); X = num; if (X <= 120) { input[X] = A; continue; } input[X] = 155; A = num6; num11 = A; return true; } A = num2 & 0x80; if (A == 0) { break; } X = num8 - 65; num7 = tab37489[X] | (tab37515[X] << 8); } while (true) { IL_0363: Y = 0; do { num7++; A = GetRuleByte(num7, Y); } while ((A & 0x80) == 0); INC8(ref Y); while (true) { A = GetRuleByte(num7, Y); if (A == 40) { break; } INC8(ref Y); } num10 = Y; do { INC8(ref Y); A = GetRuleByte(num7, Y); } while (A != 41); num9 = Y; do { INC8(ref Y); A = GetRuleByte(num7, Y); A &= 127; } while (A != 61); num8 = Y; X = num6; num5 = X; Y = num10; INC8(ref Y); while (true) { num2 = inputtemp[X]; A = GetRuleByte(num7, Y); if (A != num2) { break; } INC8(ref Y); if (Y == num9) { goto IL_04e4; } INC8(ref X); num5 = X; } continue; IL_04e4: A = num6; num4 = num6; while (true) { DEC8(ref num10); Y = num10; A = GetRuleByte(num7, Y); num2 = A; if ((A & 0x80) != 0) { break; } X = A & 0x7F; A = tab36376[X] & 0x80; if (A != 0) { X = num4 - 1; A = inputtemp[X]; if (A != num2) { goto IL_0363; } num4 = X; continue; } A = num2; if (A != 32) { if (A != 35) { if (A != 46) { if (A != 38) { if (A != 64) { if (A != 94) { if (A != 43) { if (A != 58) { return false; } while (true) { Code37055(num4); A &= 32; if (A == 0) { break; } num4 = X; } continue; } X = num4; DEC8(ref X); A = inputtemp[X]; if (A != 69 && A != 73 && A != 89) { goto IL_0363; } } else { Code37055(num4); A &= 32; if (A == 0) { goto IL_0363; } } num4 = X; continue; } Code37055(num4); A &= 4; if (A == 0) { A = inputtemp[X]; if (A != 72 || (A != 84 && A != 67 && A != 83)) { goto IL_0363; } num4 = X; continue; } } else { Code37055(num4); A &= 16; if (A == 0) { A = inputtemp[X]; if (A != 72) { goto IL_0363; } DEC8(ref X); A = inputtemp[X]; if (A != 67 && A != 83) { goto IL_0363; } } } } else { Code37055(num4); A &= 8; if (A == 0) { goto IL_0363; } } num4 = X; continue; } Code37055(num4); A &= 64; if (A == 0) { goto IL_0363; } } else { Code37055(num4); A &= 128; if (A != 0) { goto IL_0363; } } num4 = X; } A = num5; num3 = A; while (true) { Y = num9 + 1; if (Y == num8) { break; } num9 = Y; A = GetRuleByte(num7, Y); num2 = A; X = A; A = tab36376[X] & 0x80; if (A != 0) { X = num3 + 1; A = inputtemp[X]; if (A != num2) { goto IL_0363; } num3 = X; continue; } A = num2; if (A != 32) { if (A != 35) { if (A != 46) { if (A != 38) { if (A != 64) { if (A != 94) { if (A != 43) { if (A != 58) { if (A == 37 || A == 37) { X = num3 + 1; A = inputtemp[X]; if (A == 69) { INC8(ref X); Y = inputtemp[X]; DEC8(ref X); A = tab36376[Y] & 0x80; if (A != 0) { INC8(ref X); A = inputtemp[X]; if (A != 82 && A != 83 && A != 68) { if (A == 76) { INC8(ref X); A = inputtemp[X]; if (A != 89) { goto IL_0363; } } else { if (A != 70) { goto IL_0363; } INC8(ref X); A = inputtemp[X]; if (A != 85) { goto IL_0363; } INC8(ref X); A = inputtemp[X]; if (A != 76) { goto IL_0363; } } } } } else { if (A != 73) { goto IL_0363; } INC8(ref X); A = inputtemp[X]; if (A != 78) { goto IL_0363; } INC8(ref X); A = inputtemp[X]; if (A != 71) { goto IL_0363; } } num3 = X; continue; } return false; } while (true) { Code37066(num3); A &= 32; if (A == 0) { break; } num3 = X; } continue; } X = num3; INC8(ref X); A = inputtemp[X]; if (A != 69 && A != 73 && A != 89) { goto IL_0363; } } else { Code37066(num3); A &= 32; if (A == 0) { goto IL_0363; } } num3 = X; continue; } Code37066(num3); A &= 4; if (A == 0) { A = inputtemp[X]; if (A != 72 || (A != 84 && A != 67 && A != 83)) { goto IL_0363; } num3 = X; continue; } } else { Code37066(num3); A &= 16; if (A == 0) { A = inputtemp[X]; if (A != 72) { goto IL_0363; } INC8(ref X); A = inputtemp[X]; if (A != 67 && A != 83) { goto IL_0363; } } } } else { Code37066(num3); A &= 8; if (A == 0) { goto IL_0363; } } num3 = X; continue; } Code37066(num3); A &= 64; if (A == 0) { goto IL_0363; } } else { Code37066(num3); A &= 128; if (A != 0) { goto IL_0363; } } num3 = X; } break; } Y = num8; num6 = num5; if (debug) { PrintRule(num7); } while (true) { A = GetRuleByte(num7, Y); num2 = A; A &= 127; if (A != 61) { INC8(ref num); X = num; input[X] = A; } if ((num2 & 0x80) != 0) { break; } INC8(ref Y); } } return false; } private static void Output8BitAry(int index, int[] ary5) { bufferpos += timetable[oldtimetableindex][index]; oldtimetableindex = index; for (int i = 0; i < 5; i++) { buf.Set(bufferpos / 50 + i, ary5[i]); } } private static void Output8Bit(int index, int A) { int[] ary = new int[5] { A, A, A, A, A }; Output8BitAry(index, ary); } private static int Read(int p, int Y) { switch (p) { case 168: return pitches[Y]; case 169: return frequency1[Y]; case 170: return frequency2[Y]; case 171: return frequency3[Y]; case 172: return amplitude1[Y]; case 173: return amplitude2[Y]; case 174: return amplitude3[Y]; default: printf("Error reading from tables: p was" + p); return 0; } } private static void Write(int p, int Y, int value) { switch (p) { case 168: pitches[Y] = value; break; case 169: frequency1[Y] = value; break; case 170: frequency2[Y] = value; break; case 171: frequency3[Y] = value; break; case 172: amplitude1[Y] = value; break; case 173: amplitude2[Y] = value; break; case 174: amplitude3[Y] = value; break; default: printf("Error writing to tables: p was" + p); break; } } private static void RenderSample(ref int mem66) { int num = 0; mem49 = Y; A = mem39 & 7; X = A - 1; mem56 = X; mem53 = tab48426[X]; mem47 = X; A = mem39 & 0xF8; if (A == 0) { Y = mem49; A = pitches[mem49] >> 4; int xxx = A ^ 0xFF; Y = mem66; do { mem56 = 8; A = sampleTable[mem47 * 256 + Y]; do { num = A; A <<= 1; if ((num & 0x80) != 0) { X = 26; Output8Bit(3, (X & 0xF) * 16); } else { X = 6; Output8Bit(4, (X & 0xF) * 16); } DEC8(ref mem56); } while (mem56 != 0); INC8(ref Y); INC8(ref xxx); } while (xxx != 0); A = 1; mem44 = 1; mem66 = Y; Y = mem49; return; } Y = A ^ 0xFF; do { mem56 = 8; int num2 = mem47 * 256 + Y; A = sampleTable[num2]; do { num = A; A <<= 1; if ((num & 0x80) == 0) { X = mem53; Output8Bit(1, (X & 0xF) * 16); if (X != 0) { goto IL_0118; } } Output8Bit(2, 80); goto IL_0118; IL_0118: X = 0; DEC8(ref mem56); } while (mem56 != 0); INC8(ref Y); } while (Y != 0); mem44 = 1; Y = mem49; } private static int abs(int x) { if (x < 0) { return -x; } return x; } public static void Render() { int num = 0; int num2 = 0; int num3 = 0; int mem = 0; int num4 = 0; int num5 = 0; int num6 = 0; int num7 = 0; if (phonemeIndexOutput[0] == 255) { return; } A = 0; X = 0; mem44 = 0; do { Y = mem44; A = phonemeIndexOutput[mem44]; mem56 = A; if (A == 255) { break; } if (A == 1) { A = 1; num7 = 1; AddInflection(num7, num); } if (A == 2) { num7 = 255; AddInflection(num7, num); } num = tab47492[stressOutput[Y] + 1]; num2 = phonemeLengthOutput[Y]; Y = mem56; do { frequency1[X] = freq1data[Y]; frequency2[X] = freq2data[Y]; frequency3[X] = freq3data[Y]; amplitude1[X] = ampl1data[Y]; amplitude2[X] = ampl2data[Y]; amplitude3[X] = ampl3data[Y]; sampledConsonantFlag[X] = sampledConsonantFlags[Y]; pitches[X] = pitch + num; INC8(ref X); DEC8(ref num2); } while (num2 != 0); INC8(ref mem44); } while (mem44 != 0); A = 0; mem44 = 0; mem49 = 0; X = 0; while (true) { Y = phonemeIndexOutput[X]; A = phonemeIndexOutput[X + 1]; INC8(ref X); if (A == 255) { break; } X = A; mem56 = blendRank[A]; A = blendRank[Y]; if (A == mem56) { num = outBlendLength[Y]; num2 = outBlendLength[X]; } else if (A < mem56) { num = inBlendLength[X]; num2 = outBlendLength[X]; } else { num = outBlendLength[Y]; num2 = inBlendLength[Y]; } Y = mem44; A = mem49 + phonemeLengthOutput[mem44]; mem49 = A; A += num2; num6 = A; mem47 = 168; num3 = mem49 - num; A = num + num2; num4 = A; X = A; X -= 2; if ((X & 0x80) == 0) { do { num5 = num4; if (mem47 == 168) { int num8 = phonemeLengthOutput[mem44] >> 1; int num9 = phonemeLengthOutput[mem44 + 1] >> 1; num5 = num8 + num9; num9 += mem49; num8 = mem49 - num8; A = Read(mem47, num9); Y = num8; mem53 = A - Read(mem47, num8); } else { A = Read(mem47, num6); Y = num3; mem53 = A - Read(mem47, num3); } int num10 = mem53; mem50 = mem53 & 0x80; int num11 = abs(num10); mem51 = num11 % num5; mem53 = num10 / num5; X = num5; Y = num3; mem56 = 0; while (true) { A = Read(mem47, Y) + mem53; num7 = A; INC8(ref Y); DEC8(ref X); if (X == 0) { break; } mem56 += mem51; if (mem56 >= num5) { mem56 -= num5; if ((mem50 & 0x80) == 0) { if (num7 != 0) { INC8(ref num7); } } else { DEC8(ref num7); } } Write(mem47, Y, num7); } INC8(ref mem47); } while (mem47 != 175); } INC8(ref mem44); X = mem44; } num7 = mem49 + phonemeLengthOutput[mem44]; if (!singmode) { for (int i = 0; i < 256; i++) { pitches[i] -= frequency1[i] >> 1; } } num = 0; num2 = 0; num3 = 0; mem49 = 0; num6 = 72; for (int i = 255; i >= 0; i--) { amplitude1[i] = amplitudeRescale[amplitude1[i]]; amplitude2[i] = amplitudeRescale[amplitude2[i]]; amplitude3[i] = amplitudeRescale[amplitude3[i]]; } Y = 0; A = pitches[0]; mem44 = A; X = A; num4 = A - (A >> 2); if (debug) { } bool flag = false; while (true) { A = sampledConsonantFlag[Y]; mem39 = A; A &= 248; if (A != 0) { RenderSample(ref mem); Y += 2; num7 -= 2; } else { int[] array = new int[5]; int num12 = num * 256; int num13 = num2 * 256; int num14 = num3 * 256; for (int j = 0; j < 5; j++) { int num15 = sinus[0xFF & (num12 >> 8)]; int num16 = sinus[0xFF & (num13 >> 8)]; int num17 = rectangle[0xFF & (num14 >> 8)]; int num18 = num15 * (amplitude1[Y] & 0xF); int num19 = num16 * (amplitude2[Y] & 0xF); int num20 = num17 * (amplitude3[Y] & 0xF); int num21 = num18 + num19 + num20; num21 /= 32; num21 += 128; num21 &= 0xFF; array[j] = num21; num12 += frequency1[Y] * 256 / 4; num13 += frequency2[Y] * 256 / 4; num14 += frequency3[Y] * 256 / 4; } Output8BitAry(0, array); DEC8(ref num6); if (num6 != 0) { goto IL_084a; } INC8(ref Y); DEC8(ref num7); } if (num7 == 0) { break; } num6 = speed; goto IL_084a; IL_084a: DEC8(ref mem44); while (true) { if (mem44 == 0 || flag) { flag = false; A = pitches[Y]; mem44 = A; A -= A >> 2; num4 = A; num = 0; num2 = 0; num3 = 0; break; } DEC8(ref num4); if (num4 != 0 || mem39 == 0) { num += frequency1[Y]; num &= 0xFF; num2 += frequency2[Y]; num2 &= 0xFF; num3 += frequency3[Y]; num3 &= 0xFF; break; } RenderSample(ref mem); flag = true; } } } private static void AddInflection(int mem48, int phase1) { mem49 = X; A = X; int a = A; A -= 30; if (a <= 30) { A = 0; } X = A; while ((A = pitches[X]) == 127) { INC8(ref X); } while (true) { A += mem48; A &= 255; phase1 = A; pitches[X] = A; do { INC8(ref X); if (X == mem49) { return; } } while (pitches[X] == 255); A = phase1; } } private static void SetMouthThroat(int mouth, int throat) { int num = 0; int[] array = new int[30] { 0, 0, 0, 0, 0, 10, 14, 19, 24, 27, 23, 21, 16, 20, 14, 18, 14, 18, 18, 16, 13, 15, 11, 18, 14, 11, 9, 6, 6, 6 }; int[] array2 = new int[30] { 255, 255, 255, 255, 255, 84, 73, 67, 63, 40, 44, 31, 37, 45, 73, 49, 36, 30, 51, 37, 29, 69, 24, 50, 30, 24, 83, 46, 54, 86 }; int[] array3 = new int[6] { 19, 27, 21, 27, 18, 13 }; int[] array4 = new int[6] { 72, 39, 31, 43, 30, 34 }; int xxx = 5; while (xxx != 30) { int num2 = array[xxx]; if (num2 != 0) { num = trans(mouth, num2); } freq1data[xxx] = num; num2 = array2[xxx]; if (num2 != 0) { num = trans(throat, num2); } freq2data[xxx] = num; INC8(ref xxx); } xxx = 48; Y = 0; while (xxx != 54) { int num2 = array3[Y]; num = trans(mouth, num2); freq1data[xxx] = num; num2 = array4[Y]; num = trans(throat, num2); freq2data[xxx] = num; INC8(ref Y); INC8(ref xxx); } } private static int trans(int mem39212, int mem39213) { A = 0; int num = 0; int num2 = 0; X = 8; int num4; int num3; do { num3 = mem39212 & 1; mem39212 >>= 1; if (num3 != 0) { num3 = 0; A = num; num4 = A + mem39213; A += mem39213; if (num4 > 255) { num3 = 1; } num = A; } num4 = num & 1; num = (num >> 1) | ((num3 != 0) ? 128 : 0); num3 = num4; DEC8(ref X); } while (X != 0); num4 = num2 & 0x80; num2 = (num2 << 1) | ((num3 != 0) ? 1 : 0); num3 = num4; num4 = num & 0x80; num = (num << 1) | ((num3 != 0) ? 1 : 0); num3 = num4; return num; } private static void printf(string s) { Debug.Log((object)("Print:'" + s + "'")); } private static void printf(int i) { int[] ia = new int[1] { i }; printf(ia); } private static void printf(int[] ia) { byte[] array = new byte[ia.Length]; for (int i = 0; i < ia.Length; i++) { if (ia[i] == 0) { byte[] array2 = new byte[i]; Array.Copy(array, array2, i); array = array2; break; } array[i] = (byte)ia[i]; } string s = Encoding.UTF8.GetString(array); printf(s); } private static void PrintRule(int offset) { int num = 1; int num2 = 0; string text = "Applying rule: "; do { num2 = GetRuleByte(offset, num); text = (((num2 & 0x7F) != 61) ? (text + $"{(char)(num2 & 0x7F)}") : (text + " -> ")); num++; } while ((num2 & 0x80) == 0); printf(text); } private static void PrintPhonemes(int[] phonemeindex, int[] phonemeLength, int[] stress) { } public static void SetInput(int[] _input) { int num = _input.Length; Debug.Log((object)("SetInput(): " + num)); if (num > 254) { num = 254; } for (int i = 0; i < num; i++) { input[i] = _input[i]; } input[num] = 0; } public static void SetSpeed(int _speed) { speed = _speed; } public static void SetPitch(int _pitch) { pitch = _pitch; } public static void SetMouth(int _mouth) { mouth = _mouth; } public static void SetThroat(int _throat) { throat = _throat; } private static void EnableSingmode() { singmode = true; } private static void Init() { SetMouthThroat(mouth, throat); bufferpos = 0; for (int i = 0; i < 256; i++) { stress[i] = 0; phonemeLength[i] = 0; } for (int j = 0; j < 60; j++) { phonemeIndexOutput[j] = 0; stressOutput[j] = 0; phonemeLengthOutput[j] = 0; } phonemeindex[255] = 255; } public static Buffer SAMMain() { Init(); if (!Parser1()) { return null; } if (debug) { PrintPhonemes(phonemeindex, phonemeLength, stress); } Parser2(); CopyStress(); SetPhonemeLength(); AdjustLengths(); Code41240(); do { A = phonemeindex[X]; if (A > 80) { phonemeindex[X] = 255; break; } INC8(ref X); } while (X != 0); InsertBreath(); if (debug) { PrintPhonemes(phonemeindex, phonemeLength, stress); } PrepareOutput(); return buf; } private static void PrepareOutput() { A = 0; X = 0; Y = 0; buf = new Buffer(); while (true) { A = phonemeindex[X]; if (A == 255) { break; } if (A == 254) { INC8(ref X); int x = X; phonemeIndexOutput[Y] = 255; Render(); X = x; Y = 0; } else if (A == 0) { INC8(ref X); } else { phonemeIndexOutput[Y] = A; phonemeLengthOutput[Y] = phonemeLength[X]; stressOutput[Y] = stress[X]; INC8(ref X); INC8(ref Y); } } A = 255; phonemeIndexOutput[Y] = 255; Render(); } private static void InsertBreath() { int x = 255; INC8(ref X); int num = 0; int xxx = 0; while (true) { X = xxx; int num2 = phonemeindex[X]; if (num2 == 255) { break; } num += phonemeLength[X]; if (num < 232) { if (num2 != 254) { A = flags2[num2] & 1; if (A != 0) { INC8(ref X); num = 0; Insert(X, 254, mem59, 0); INC8(ref xxx); INC8(ref xxx); continue; } } if (num2 == 0) { x = X; } INC8(ref xxx); } else { X = x; phonemeindex[X] = 31; phonemeLength[X] = 4; stress[X] = 0; INC8(ref X); num = 0; Insert(X, 254, mem59, 0); INC8(ref X); xxx = X; } } } private static void CopyStress() { int xxx = 0; while (true) { Y = phonemeindex[xxx]; if (Y == 255) { break; } if ((flags[Y] & 0x40) == 0) { INC8(ref xxx); continue; } Y = phonemeindex[(xxx + 1) & 0xFF]; if (Y == 255) { INC8(ref xxx); continue; } if ((flags[Y] & 0x80) == 0) { INC8(ref xxx); continue; } Y = stress[xxx + 1]; if (Y == 0) { INC8(ref xxx); continue; } if ((Y & 0x80) != 0) { INC8(ref xxx); continue; } stress[xxx] = (Y + 1) & 0xFF; INC8(ref xxx); } } private static void Insert(int position, int mem60, int mem59, int mem58) { position &= 0xFF; mem60 &= 0xFF; mem59 &= 0xFF; mem58 &= 0xFF; for (int num = 253; num >= position; num--) { phonemeindex[(num + 1) & 0xFF] = phonemeindex[num]; phonemeLength[(num + 1) & 0xFF] = phonemeLength[num]; stress[(num + 1) & 0xFF] = stress[num]; } phonemeindex[position] = mem60; phonemeLength[position] = mem59; stress[position] = mem58; } private static bool Parser1() { int xxx = 0; X = 0; A = 0; Y = 0; for (int i = 0; i < 256; i++) { stress[i] = 0; } while (true) { int num = input[X]; if (num == 155) { break; } INC8(ref X); int num2 = input[X]; Y = 0; while (true) { A = signInputTable1[Y]; if (A == num) { A = signInputTable2[Y]; if (A != 42 && A == num2) { phonemeindex[xxx] = Y; INC8(ref xxx); INC8(ref X); break; } } INC8(ref Y); if (Y != 81) { continue; } Y = 0; while (true) { if (signInputTable2[Y] == 42 && signInputTable1[Y] == num) { phonemeindex[xxx] = Y; INC8(ref xxx); break; } INC8(ref Y); if (Y != 81) { continue; } Y = 8; while (num != stressInputTable[Y] && Y > 0) { DEC8(ref Y); } if (Y == 0) { return false; } stress[xxx - 1] = Y; break; } break; } } phonemeindex[xxx] = 255; return true; } private static void SetPhonemeLength() { int xxx = 0; while (phonemeindex[xxx] != 255) { int num = stress[xxx]; if (num == 0 || (num & 0x80) != 0) { phonemeLength[xxx] = phonemeLengthTable[phonemeindex[xxx]]; } else { phonemeLength[xxx] = phonemeStressedLengthTable[phonemeindex[xxx]]; } INC8(ref xxx); } } private static void Code41240() { int xxx = 0; while (phonemeindex[xxx] != 255) { X = xxx; int num = phonemeindex[xxx]; if ((flags[num] & 2) == 0) { INC8(ref xxx); continue; } if ((flags[num] & 1) == 0) { Insert(xxx + 1, num + 1, phonemeLengthTable[num + 1], stress[xxx]); Insert(xxx + 2, num + 2, phonemeLengthTable[num + 2], stress[xxx]); xxx += 3; continue; } do { INC8(ref X); A = phonemeindex[X]; } while (A == 0); if (A != 255) { if ((flags[A] & 8) != 0) { INC8(ref xxx); continue; } if (A == 36 || A == 37) { INC8(ref xxx); continue; } } Insert(xxx + 1, num + 1, phonemeLengthTable[num + 1], stress[xxx]); Insert(xxx + 2, num + 2, phonemeLengthTable[num + 2], stress[xxx]); xxx += 3; } } private static void Parser2() { if (debug) { printf("Parser2\n"); } int xxx = 0; int num = 0; while (true) { X = xxx; A = phonemeindex[xxx]; if (A == 0) { INC8(ref xxx); continue; } if (A == 255) { break; } Y = A; if ((flags[A] & 0x10) != 0) { num = stress[xxx]; A = flags[Y] & 0x20; if (A == 0) { A = 20; } else { A = 21; } if (debug && A == 20) { printf("RULE: insert WX following diphtong NOT ending in IY sound\n"); } if (debug && A == 21) { printf("RULE: insert YX following diphtong ending in IY sound\n"); } Insert(xxx + 1, A, mem59, num); X = xxx; goto IL_06aa; } A = phonemeindex[X]; if (A == 78) { A = 24; if (debug) { printf("RULE: UL -> AX L\n"); } } else if (A == 79) { A = 27; if (debug) { printf("RULE: UM -> AX M\n"); } } else { if (A != 80) { Y = A; A = flags[A] & 0x80; if (A != 0) { A = stress[X]; if (A != 0) { INC8(ref X); A = phonemeindex[X]; if (A == 0) { INC8(ref X); Y = phonemeindex[X]; if (Y == 255) { A = 0; } else { A = flags[Y] & 0x80; } if (A != 0) { A = stress[X]; if (A != 0) { if (debug) { printf("RULE: Insert glottal stop between two stressed vowels with space between them\n"); } Insert(X, 31, mem59, 0); INC8(ref xxx); continue; } } } } } X = xxx; A = phonemeindex[xxx]; if (A == 23) { DEC8(ref X); A = phonemeindex[xxx - 1]; if (A == 69) { if (debug) { printf("RULE: T R -> CH R\n"); } phonemeindex[xxx - 1] = 42; goto IL_073b; } if (A == 57) { phonemeindex[xxx - 1] = 44; if (debug) { printf("RULE: D R -> J R\n"); } goto IL_0793; } A = flags[A] & 0x80; if (debug) { printf("RULE: R -> RX\n"); } if (A != 0) { phonemeindex[xxx] = 18; } INC8(ref xxx); continue; } if (A == 24) { if ((flags[phonemeindex[xxx - 1]] & 0x80) == 0) { INC8(ref xxx); continue; } if (debug) { printf("RULE: L -> LX\n"); } phonemeindex[X] = 19; INC8(ref xxx); continue; } if (A == 32) { if (phonemeindex[xxx - 1] != 60) { INC8(ref xxx); continue; } if (debug) { printf("RULE: G S -> G Z\n"); } phonemeindex[xxx] = 38; INC8(ref xxx); continue; } if (A == 72) { Y = phonemeindex[xxx + 1]; if (Y == 255) { phonemeindex[xxx] = 75; } else { A = flags[Y] & 0x20; if (debug && A == 0) { printf("RULE: K -> KX \n"); } if (A == 0) { phonemeindex[xxx] = 75; } } } else if (A == 60) { int num2 = phonemeindex[xxx + 1]; if (num2 == 255) { INC8(ref xxx); continue; } if ((flags[num2] & 0x20) != 0) { INC8(ref xxx); continue; } if (debug) { printf("RULE: G -> GX \n"); } phonemeindex[xxx] = 63; INC8(ref xxx); continue; } Y = phonemeindex[xxx]; A = flags[Y] & 1; if (A == 0) { goto IL_06aa; } A = phonemeindex[xxx - 1]; if (A != 32) { A = Y; goto IL_07eb; } phonemeindex[xxx] = Y - 12; INC8(ref xxx); continue; } A = 28; if (debug) { printf("RULE: UN -> AX N\n"); } } num = stress[X]; phonemeindex[X] = 13; Insert(X + 1, A, mem59, num); INC8(ref xxx); continue; IL_06aa: A = phonemeindex[X]; if (A == 53) { Y = phonemeindex[X - 1]; A = flags2[Y] & 4; if (A == 0) { INC8(ref xxx); continue; } if (debug) { printf("RULE: UW -> UX\n"); } phonemeindex[X] = 16; INC8(ref xxx); continue; } goto IL_073b; IL_07eb: if (A != 69 && A != 57) { INC8(ref xxx); continue; } if ((flags[phonemeindex[(X - 1) & 0xFF]] & 0x80) == 0) { INC8(ref xxx); continue; } INC8(ref X); A = phonemeindex[X]; if (A != 0) { if ((flags[A] & 0x80) == 0) { INC8(ref xxx); continue; } if (stress[X] != 0) { INC8(ref xxx); continue; } if (debug) { printf("RULE: Soften T or D following vowel or ER and preceding a pause -> DX\n"); } phonemeindex[xxx] = 30; } else { A = phonemeindex[(X + 1) & 0xFF]; if (A == 255) { A = 0; } else { A = flags[A] & 0x80; } if (debug && A != 0) { printf("RULE: Soften T or D following vowel or ER and preceding a pause -> DX\n"); } if (A != 0) { phonemeindex[xxx] = 30; } } INC8(ref xxx); continue; IL_0793: if (A == 44) { if (debug) { printf("J -> J J+1\n"); } Insert(X + 1, A + 1, mem59, stress[X]); INC8(ref xxx); continue; } goto IL_07eb; IL_073b: if (A == 42) { if (debug) { printf("CH -> CH CH+1\n"); } Insert(X + 1, A + 1, mem59, stress[X]); INC8(ref xxx); continue; } goto IL_0793; } } private static void AdjustLengths() { X = 0; int num = 0; while (true) { int num2 = phonemeindex[X]; if (num2 == 255) { break; } if ((flags2[num2] & 1) == 0) { INC8(ref X); continue; } num = X; while (true) { DEC8(ref X); if (X == 0) { break; } num2 = phonemeindex[X]; if (num2 != 255 && (flags[num2] & 0x80) == 0) { continue; } goto IL_00a7; } break; IL_00a7: do { num2 = phonemeindex[X]; if (num2 != 255 && ((flags2[num2] & 0x20) == 0 || (flags[num2] & 4) != 0)) { A = phonemeLength[X]; A = (A >> 1) + A + 1; if (debug) { printf("RULE: Lengthen or between and by 1.5\n"); } if (debug) { printf("PRE\n"); } phonemeLength[X] = A; if (debug) { printf("POST\n"); } } INC8(ref X); } while (X != num); INC8(ref X); } num = 0; while (true) { X = num; int num2 = phonemeindex[X]; if (num2 == 255) { break; } A = flags[num2] & 0x80; if (A != 0) { INC8(ref X); num2 = phonemeindex[X]; if (num2 == 255) { mem56 = 65; } else { mem56 = flags[num2]; } if ((flags[num2] & 0x40) == 0) { if (num2 == 18 || num2 == 19) { INC8(ref X); num2 = phonemeindex[X]; if ((flags[num2] & 0x40) != 0) { if (debug) { printf("RULE: - decrease length by 1\n"); } if (debug) { printf("PRE\n"); } DEC8(ref phonemeLength[num]); if (debug) { printf("POST\n"); } } INC8(ref num); } else { INC8(ref num); } } else if ((mem56 & 4) == 0) { if ((mem56 & 1) == 0) { INC8(ref num); continue; } DEC8(ref X); if (debug) { printf("RULE: - decrease vowel by 1/8th\n"); } if (debug) { printf("PRE\n"); } mem56 = phonemeLength[X] >> 3; phonemeLength[X] -= mem56; if (debug) { printf("POST\n"); } INC8(ref num); } else { if (debug) { printf("RULE: - increase vowel by 1/2 + 1\n"); } if (debug) { printf("PRE\n"); } A = phonemeLength[(X - 1) & 0xFF]; phonemeLength[(X - 1) & 0xFF] = ((A >> 2) + A + 1) & 0xFF; if (debug) { printf("POST\n"); } INC8(ref num); } continue; } if ((flags2[num2] & 8) != 0) { INC8(ref X); num2 = phonemeindex[X]; if (num2 == 255) { A = 0; } else { A = flags[num2] & 2; } if (A != 0) { phonemeLength[X] = 6; phonemeLength[(X - 1) & 0xFF] = 5; } INC8(ref num); continue; } if ((flags[num2] & 2) != 0) { while (true) { INC8(ref X); num2 = phonemeindex[X]; switch (num2) { case 0: continue; case 255: { bool flag = true; INC8(ref num); break; } default: if ((flags[num2] & 2) == 0) { INC8(ref num); break; } phonemeLength[X] = (phonemeLength[X] >> 1) + 1; X = num; phonemeLength[num] = (phonemeLength[num] >> 1) + 1; INC8(ref num); break; } break; } continue; } if ((flags2[num2] & 0x10) != 0) { num2 = phonemeindex[(X - 1) & 0xFF]; if ((flags[num2] & 2) != 0) { phonemeLength[X] -= 2; } } INC8(ref num); } } private static void Code47503(int mem52) { Y = 0; if ((mem53 & 0x80) != 0) { mem53 = -mem53; Y = 128; } mem50 = Y; A = 0; for (X = 8; X > 0; X--) { int num = mem53; mem53 <<= 1; A <<= 1; if (num >= 128) { INC8(ref A); } if (A >= mem52) { A -= mem52; INC8(ref mem53); } } mem51 = A; if ((mem50 & 0x80) != 0) { mem53 = -mem53; } } } public class TextReader : MonoBehaviour { public static string TextOutput; public static void Out(string s) { if (s == null) { TextOutput = ""; return; } string textOutput = TextOutput; textOutput += s; textOutput += "\n"; TextOutput = textOutput; } public static AudioSource SayString(string s, Transform parent = null, bool dontRemove = false, bool freeze = false) { if ((Object)(object)parent == (Object)null) { parent = ((Component)MonoSingleton.Instance).transform; } if (string.IsNullOrEmpty(s)) { return null; } s = s.Trim().ToUpper(); s = Regex.Replace(s, "[^\\u0000-\\u007F]+", ""); s = s.Replace("'", ""); s = s.Replace("\"", ""); s = s.Replace("\n", " "); if (!s.EndsWith(".") && !s.EndsWith("!") && !s.EndsWith("?")) { s += "."; } return PlaySAMChunk(s, parent, dontRemove, freeze); } private static AudioSource PlaySAMChunk(string chunk, Transform parent, bool dontRemove, bool freeze) { //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(chunk)) { return null; } int[] ints = null; try { string text = UnitySAM.TextToPhonemes(chunk, out ints); if (ints == null || ints.Length == 0) { text = UnitySAM.TextToPhonemes("AH", out ints); if (ints == null || ints.Length == 0) { return null; } } UnitySAM.SetInput(ints); Buffer buffer = UnitySAM.SAMMain(); if (buffer == null || buffer.GetSize() <= 0) { return null; } AudioClip val = AudioClip.Create("SAMAudio", buffer.GetSize(), 1, 22050, false); val.SetData(buffer.GetFloats(), 0); bool dontRemove2 = dontRemove; AudioSource val2 = ItePlugin.SpawnSound(val, 1f, parent, 2f, default(Vector3), dontRemove2); if (freeze) { ((Component)val2).transform.SetParent((Transform)null, true); ((Component)val2).transform.position = ((Component)parent).transform.position; } return val2; } catch (Exception ex) { Debug.LogError((object)("SAM chunk failed: " + ex.Message)); return null; } } } namespace Polarite { public class PlayerExplosionId : MonoBehaviour { public string id; public ulong player; } public static class GunSync { public static Dictionary Bullets = new Dictionary { { BulletType.Revolver, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Revolver Beam.prefab" }, { BulletType.RevolverSuper, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Revolver Beam Super.prefab" }, { BulletType.Coin, "Assets/Prefabs/Attacks and Projectiles/Coin.prefab" }, { BulletType.RevolverSharp, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Revolver Beam Sharp.prefab" }, { BulletType.Slab, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Revolver Beam Alternative.prefab" }, { BulletType.SlabSuper, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Revolver Beam Super Alternative.prefab" }, { BulletType.SlabSharp, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Revolver Beam Sharp Alternative.prefab" }, { BulletType.ShotgunMain, "Assets/Prefabs/Attacks and Projectiles/Shotgun Projectile.prefab" }, { BulletType.ShotgunCore, "Assets/Prefabs/Attacks and Projectiles/Grenade.prefab" }, { BulletType.Nail, "Assets/Prefabs/Attacks and Projectiles/Nails/NailFodder.prefab" }, { BulletType.NailSad, "Assets/Prefabs/Attacks and Projectiles/Nails/Nail.prefab" }, { BulletType.NailHeated, "Assets/Prefabs/Attacks and Projectiles/Nails/NailHeated.prefab" }, { BulletType.Saw, "Assets/Prefabs/Attacks and Projectiles/NailAltFodder.prefab" }, { BulletType.SawSad, "Assets/Prefabs/Attacks and Projectiles/NailAlt.prefab" }, { BulletType.SawHeated, "Assets/Prefabs/Attacks and Projectiles/NailAltHeated.prefab" }, { BulletType.Magnet, "Assets/Prefabs/Attacks and Projectiles/Harpoon.prefab" }, { BulletType.RailBlue, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Railcannon Beam.prefab" }, { BulletType.RailGreen, "Assets/Prefabs/Attacks and Projectiles/Harpoon Malicious.prefab" }, { BulletType.RailRed, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Railcannon Beam Malicious.prefab" }, { BulletType.Rocket, "Assets/Prefabs/Attacks and Projectiles/Rocket.prefab" }, { BulletType.Cannonball, "Assets/Prefabs/Attacks and Projectiles/Cannonball.prefab" }, { BulletType.Oil, "Assets/Prefabs/Attacks and Projectiles/GasolineProjectile.prefab" }, { BulletType.GrenadeBeam, "Assets/Prefabs/Attacks and Projectiles/Hitscan Beams/Grenade Beam.prefab" }, { BulletType.JackCore, "Assets/Prefabs/Attacks and Projectiles/Grenade.prefab" }, { BulletType.JackhammerPump, "Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Hammer Weak.prefab" }, { BulletType.JackhammerLight, "Assets/Particles/HammerHitLight.prefab" }, { BulletType.JackhammerMedium, "Assets/Particles/HammerHitMedium.prefab" }, { BulletType.JackhammerHeavy, "Assets/Particles/HammerHitHeavy.prefab" } }; public static Dictionary BulletNoises = new Dictionary { { BulletType.Revolver, "RevNorm" }, { BulletType.RevolverSuper, "RevSuper" }, { BulletType.RevolverSharp, "RevRed" }, { BulletType.Slab, "RevAlt" }, { BulletType.SlabSuper, "RevAltSuper" }, { BulletType.SlabSharp, "RevRed" }, { BulletType.ShotgunMain, "ShotgunFire" }, { BulletType.ShotgunCore, "ShotgunAltFire" }, { BulletType.Nail, "NailgunFire" }, { BulletType.NailSad, "NailgunFire" }, { BulletType.NailHeated, "NailgunFire" }, { BulletType.Saw, "NailgunAltFire" }, { BulletType.SawSad, "NailgunAltFire" }, { BulletType.SawHeated, "NailgunMagFire" }, { BulletType.Magnet, "NailgunMagFire" }, { BulletType.RailBlue, "RailcannonFire" }, { BulletType.RailGreen, "RailcannonFire" }, { BulletType.RailRed, "RailcannonMalFire" }, { BulletType.Rocket, "RocketFire" }, { BulletType.Cannonball, "RocketFire" }, { BulletType.JackCore, "JackAltFire" } }; public static Dictionary> currentPlayed = new Dictionary>(); public static Vector3 Pos => ((Component)MonoSingleton.Instance).transform.position + ((Component)MonoSingleton.Instance).transform.forward; public static Quaternion Rot { get { //IL_0050: 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_002a: 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_0039: 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_0058: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)MonoSingleton.Instance.CurrentTarget != (Object)null && MonoSingleton.Instance.IsAutoAimed) { return Quaternion.LookRotation(MonoSingleton.Instance.CurrentTargetAimPosition - MonoSingleton.Instance.GetDefaultPos()); } return ((Component)MonoSingleton.Instance).transform.rotation; } } public static Vector3 Dir => ((Component)MonoSingleton.Instance).transform.forward; public static Vector3 DirWAutoAim { get { //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_002f: 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_0039: 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) if ((Object)(object)MonoSingleton.Instance.CurrentTarget != (Object)null && MonoSingleton.Instance.IsAutoAimed) { return MonoSingleton.Instance.GetAimDirectionFrom(MonoSingleton.Instance.GetDefaultPos()); } return ((Component)MonoSingleton.Instance).transform.forward; } } public static void Shockwave(Vector3 pos, Vector3 forward, Vector3 up, float force) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_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) GameObject val = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Attacks and Projectiles/PhysicalShockwavePlayer.prefab").WaitForCompletion(), pos, Quaternion.LookRotation(forward, up)); PhysicalShockwave component = val.GetComponent(); component.noDamageToEnemy = true; component.hasHurtPlayer = false; component.force *= force; } public static void Blast(Vector3 pos, ulong player) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) GameObject val = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Wave.prefab").WaitForCompletion(), pos, Quaternion.identity); Explosion componentInChildren = val.GetComponentInChildren(); componentInChildren.damage = (ItePlugin.canBeFriendlyFired.value ? 5 : 0); componentInChildren.friendlyFire = false; componentInChildren.harmless = false; componentInChildren.hasHitPlayer = false; componentInChildren.canHit = (AffectedSubjects)1; AddExpId(val, "blast", player); } public static void ProjBoost(Vector3 pos, ulong player) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: 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) GameObject val = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion.prefab").WaitForCompletion(), pos, Quaternion.identity); Explosion componentInChildren = val.GetComponentInChildren(); componentInChildren.damage = (ItePlugin.canBeFriendlyFired.value ? 10 : 0); componentInChildren.friendlyFire = false; componentInChildren.harmless = false; componentInChildren.hasHitPlayer = false; componentInChildren.canHit = (AffectedSubjects)1; AddExpId(val, "parry", player); } public static void AddExpId(GameObject obj, string id, ulong player) { PlayerExplosionId playerExplosionId = obj.AddComponent(); playerExplosionId.id = id; playerExplosionId.player = player; } public static void AnimShoot(ulong plr) { NetworkPlayer networkPlayer = NetworkPlayer.Find(plr); if ((Object)(object)networkPlayer != (Object)null) { networkPlayer.ShootAnim(); } } public static void Sync(BulletType type, Vector3 pos, Quaternion rot, Vector3 dir, Vector3 vel, int pump = 0, float pow = 0f, int var = 0) { //IL_0030: 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_0074: 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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0062: 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) if (NetworkManager.InLobby) { if (NetworkPlayer.LocalPlayer.testPlayer) { AnimShoot(NetworkManager.Id); } Vector3 v = Vector3.down; Vector3 val = default(Vector3); if (PhysicsExtensions.TryGetCustomGravity(MonoSingleton.Instance.rb, ref val) && PhysicsExtensions.GetCustomGravityMode(MonoSingleton.Instance.rb)) { v = val; } PacketWriter packetWriter = new PacketWriter(); packetWriter.WriteInt((int)type); packetWriter.WriteVector3(pos); packetWriter.WriteQuaternion(rot); packetWriter.WriteInt(pump); packetWriter.WriteVector3(dir); packetWriter.WriteVector3(vel); packetWriter.WriteFloat(pow); packetWriter.WriteInt(var); packetWriter.WriteVector3(v); packetWriter.WriteVector3(Physics.gravity); NetworkManager.Instance.BroadcastPacket(PacketType.Bullet, packetWriter.GetBytes(), 0uL, 0); } } public static void Read(BinaryPacketReader reader, ulong sender) { //IL_0009: 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_0010: 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_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_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_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_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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_0181: 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_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: 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_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_0b29: Unknown result type (might be due to invalid IL or missing references) //IL_0b2a: Unknown result type (might be due to invalid IL or missing references) //IL_0b3c: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_067c: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0696: Unknown result type (might be due to invalid IL or missing references) //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e3: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_084f: Unknown result type (might be due to invalid IL or missing references) //IL_0850: Unknown result type (might be due to invalid IL or missing references) //IL_08b6: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_0781: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_046f: Unknown result type (might be due to invalid IL or missing references) //IL_0a5f: Unknown result type (might be due to invalid IL or missing references) //IL_0a60: Unknown result type (might be due to invalid IL or missing references) //IL_0aa7: Unknown result type (might be due to invalid IL or missing references) //IL_0aa8: Unknown result type (might be due to invalid IL or missing references) //IL_0aec: Unknown result type (might be due to invalid IL or missing references) //IL_0aed: Unknown result type (might be due to invalid IL or missing references) //IL_0213: 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_0221: 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_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_060c: Unknown result type (might be due to invalid IL or missing references) //IL_0616: Unknown result type (might be due to invalid IL or missing references) //IL_082e: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Unknown result type (might be due to invalid IL or missing references) //IL_0817: Unknown result type (might be due to invalid IL or missing references) //IL_08a6: Unknown result type (might be due to invalid IL or missing references) //IL_0879: Unknown result type (might be due to invalid IL or missing references) //IL_0890: Unknown result type (might be due to invalid IL or missing references) //IL_090b: Unknown result type (might be due to invalid IL or missing references) //IL_091f: Unknown result type (might be due to invalid IL or missing references) //IL_0929: Unknown result type (might be due to invalid IL or missing references) //IL_07cc: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_048d: Unknown result type (might be due to invalid IL or missing references) //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_0499: Unknown result type (might be due to invalid IL or missing references) //IL_04a3: Unknown result type (might be due to invalid IL or missing references) //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04ad: Unknown result type (might be due to invalid IL or missing references) //IL_04af: Unknown result type (might be due to invalid IL or missing references) //IL_09aa: Unknown result type (might be due to invalid IL or missing references) //IL_09ab: Unknown result type (might be due to invalid IL or missing references) //IL_097f: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Unknown result type (might be due to invalid IL or missing references) //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_098e: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_05cb: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Unknown result type (might be due to invalid IL or missing references) //IL_076a: Unknown result type (might be due to invalid IL or missing references) //IL_0665: 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_0269: Unknown result type (might be due to invalid IL or missing references) //IL_03d9: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) BulletType bulletType = (BulletType)reader.ReadInt(); Vector3 val = reader.ReadVector3(); Quaternion val2 = reader.ReadQuaternion(); int num = reader.ReadInt(); Vector3 val3 = reader.ReadVector3(); Vector3 val4 = reader.ReadVector3(); float num2 = reader.ReadFloat(); int num3 = reader.ReadInt(); Vector3 val5 = reader.ReadVector3(); Vector3 val6 = reader.ReadVector3(); if (Bullets.TryGetValue(bulletType, out var value)) { GameObject val7 = Addressables.LoadAssetAsync((object)value).WaitForCompletion(); int num4 = 12; bool flag = false; if (num3 == 1) { switch (num) { case 0: num4 = 10; break; case 1: num4 = 16; break; case 2: num4 = 24; break; case 3: num4 = 0; flag = true; break; } } switch (bulletType) { case BulletType.Coin: { GameObject val25 = Object.Instantiate(val7, val, val2); Coin component11 = val25.GetComponent(); PhysicsExtensions.SetCustomGravity(component11.rb, ((Vector3)(ref val5)).normalized * ((Vector3)(ref val6)).magnitude); PhysicsExtensions.SetCustomGravityMode(component11.rb, true); component11.rb.AddForce(val3 * 20f + -((Vector3)(ref val5)).normalized * 15f + val4, (ForceMode)2); component11.power = 0f; BannedModsDetector.AddBullet(val25, sender); break; } case BulletType.ShotgunMain: { AnimShoot(sender); if (flag) { GameObject val29 = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Big.prefab").WaitForCompletion(), val, Quaternion.identity); Explosion componentInChildren = val29.GetComponentInChildren(); componentInChildren.enemy = true; componentInChildren.friendlyFire = false; componentInChildren.damage = 30; componentInChildren.canHit = (AffectedSubjects)1; break; } for (int j = 0; j < num4; j++) { GameObject val30 = Object.Instantiate(val7, val, val2); Projectile component13 = val30.GetComponent(); component13.damage = 0f; component13.friendly = true; if (num3 == 1) { switch (num) { case 0: val30.transform.Rotate(Random.Range(-6.6666665f, 6.6666665f), Random.Range(-6.6666665f, 6.6666665f), Random.Range(-6.6666665f, 6.6666665f)); break; case 1: val30.transform.Rotate(Random.Range(-10f, 10f), Random.Range(-10f, 10f), Random.Range(-10f, 10f)); break; case 2: val30.transform.Rotate(Random.Range(-20f, 20f), Random.Range(-20f, 20f), Random.Range(-20f, 20f)); break; } } else { val30.transform.Rotate(Random.Range(-10f, 10f), Random.Range(-10f, 10f), Random.Range(-10f, 10f)); } CleanProj(val30, sender); BannedModsDetector.AddBullet(val30, sender, shotgun: true); } PlayNoise(bulletType, val, sender); break; } case BulletType.ShotgunCore: { AnimShoot(sender); GameObject val18 = Object.Instantiate(val7, val, val2); Rigidbody component6 = val18.GetComponent(); if ((Object)(object)component6 != (Object)null) { if (val4 != Vector3.zero) { component6.AddForce(val4, (ForceMode)2); } else { component6.AddForce(val3 * (num2 + 10f), (ForceMode)2); } } CleanProj(val18, sender); PlayNoise(bulletType, val, sender); break; } case BulletType.JackCore: { AnimShoot(sender); GameObject val27 = Object.Instantiate(val7, val, Random.rotation); Rigidbody val28 = default(Rigidbody); if (val27.TryGetComponent(ref val28)) { val28.AddForce(val3 * 3f + Vector3.up * 7.5f + val4, (ForceMode)2); } CleanProj(val27, sender); PlayNoise(bulletType, val, sender); break; } case BulletType.Nail: case BulletType.NailSad: case BulletType.Saw: case BulletType.SawSad: { AnimShoot(sender); GameObject val15 = Object.Instantiate(val7, val, val2); Rigidbody component5 = val15.GetComponent(); if ((Object)(object)component5 != (Object)null) { val15.transform.Rotate(Random.Range((0f - num2) / 3f, num2 / 3f), Random.Range((0f - num2) / 3f, num2 / 3f), Random.Range((0f - num2) / 3f, num2 / 3f)); Rigidbody val16 = default(Rigidbody); if (val15.TryGetComponent(ref val16)) { val16.velocity = val15.transform.forward * 200f; } } Nail val17 = default(Nail); if (val15.TryGetComponent(ref val17) && val17.sawblade) { val17.ForceCheckSawbladeRicochet(); BannedModsDetector.AddBullet(val15, sender); } CleanProj(val15, sender); PlayNoise(bulletType, val, sender); break; } case BulletType.SawHeated: { AnimShoot(sender); GameObject val20 = Object.Instantiate(val7, val, val2); Rigidbody component8 = val20.GetComponent(); if ((Object)(object)component8 != (Object)null) { component8.velocity = ((Component)component8).transform.forward * 200f; } Nail val21 = default(Nail); if (val20.TryGetComponent(ref val21)) { val21.multiHitAmount = Mathf.RoundToInt(num2 * 3f); val21.ForceCheckSawbladeRicochet(); val21.damage = 0f; } CleanProj(val20, sender); PlayNoise(bulletType, val, sender); break; } case BulletType.NailHeated: { AnimShoot(sender); GameObject val23 = Object.Instantiate(val7, val, val2); Rigidbody component10 = val23.GetComponent(); Transform transform = val23.transform; transform.forward *= -1f; if ((Object)(object)component10 != (Object)null) { val23.transform.Rotate(Random.Range((0f - num2) / 3f, num2 / 3f), Random.Range((0f - num2) / 3f, num2 / 3f), Random.Range((0f - num2) / 3f, num2 / 3f)); component10.AddForce(val23.transform.forward * -100f, (ForceMode)2); } Nail val24 = default(Nail); if (val23.TryGetComponent(ref val24) && val24.sawblade) { val24.ForceCheckSawbladeRicochet(); } CleanProj(val23, sender); PlayNoise(bulletType, val, sender); break; } case BulletType.Magnet: { AnimShoot(sender); GameObject val22 = Object.Instantiate(val7, val, val2); Rigidbody component9 = val22.GetComponent(); if ((Object)(object)component9 != (Object)null) { component9.AddForce(((Component)component9).transform.forward * 100f, (ForceMode)2); } CleanProj(val22, sender); PlayNoise(bulletType, val, sender); break; } case BulletType.RailGreen: { AnimShoot(sender); GameObject val14 = Object.Instantiate(val7, val, val2); Rigidbody component4 = val14.GetComponent(); if ((Object)(object)component4 != (Object)null) { component4.AddForce(((Component)component4).transform.forward * 250f, (ForceMode)2); } CleanProj(val14, sender); PlayNoise(bulletType, val, sender); BannedModsDetector.AddBullet(val14, sender); break; } case BulletType.Cannonball: { AnimShoot(sender); GameObject val26 = Object.Instantiate(val7, val, val2); Rigidbody component12 = val26.GetComponent(); if ((Object)(object)component12 != (Object)null) { component12.velocity = ((Component)component12).transform.forward * Mathf.Max(15f, num2 * 150f); } CleanProj(val26, sender); PlayNoise(bulletType, val, sender); break; } case BulletType.Oil: { GameObject val19 = Object.Instantiate(val7, val, val2); Rigidbody component7 = val19.GetComponent(); if ((Object)(object)component7 != (Object)null) { ((Component)component7).transform.Rotate(new Vector3(Random.Range(-1f, 1f), Random.Range(-1f, 1f), Random.Range(-1f, 1f))); component7.velocity = ((Component)component7).transform.forward * 150f; } PlayerRocketManager playerRocketManager = PlayerRocketManager.Get(sender); if ((Object)(object)playerRocketManager != (Object)null) { playerRocketManager.sprayNoiseCooldown = 0.05f; } CleanProj(val19, sender); break; } case BulletType.JackhammerPump: { AnimShoot(sender); if (num == 3) { GameObject bullet = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Attacks and Projectiles/Explosions/Explosion Super.prefab").WaitForCompletion(), val, Quaternion.identity); CleanProj(bullet, sender); break; } GameObject val12 = Object.Instantiate(val7, val, val2); Explosion[] componentsInChildren = val12.GetComponentsInChildren(); Explosion[] array = componentsInChildren; foreach (Explosion val13 in array) { AddExpId(((Component)val13).gameObject, "default", sender); val13.hitterWeapon = "hammer"; if (num == 2) { val13.maxSize *= 2f; } val13.canHit = (AffectedSubjects)1; if (ItePlugin.canBeFriendlyFired.value) { val13.damage -= 10; } else { val13.damage = 0; } } break; } case BulletType.JackhammerLight: { AnimShoot(sender); GameObject val11 = Object.Instantiate(val7, val, val2); AudioSource component3 = val11.GetComponent(); component3.spatialBlend = 1f; component3.minDistance = 100f; component3.maxDistance = 30f; break; } case BulletType.JackhammerMedium: { AnimShoot(sender); GameObject val10 = Object.Instantiate(val7, val, val2); AudioSource component2 = val10.GetComponent(); component2.spatialBlend = 1f; component2.minDistance = 100f; component2.maxDistance = 30f; break; } case BulletType.JackhammerHeavy: { AnimShoot(sender); GameObject val9 = Object.Instantiate(val7, val, val2); AudioSource component = val9.GetComponent(); component.spatialBlend = 1f; component.minDistance = 100f; component.maxDistance = 30f; break; } default: { GameObject val8 = Object.Instantiate(val7, val, val2); CleanProj(val8, sender); PlayNoise(bulletType, val, sender); AnimShoot(sender); BannedModsDetector.AddBullet(val8, sender); break; } } } else { Logs.Warn($"Unknown bullet type: {bulletType}", null, "GunSync"); } } public static void PlayNoise(BulletType type, Vector3 pos, ulong sender) { //IL_0079: Unknown result type (might be due to invalid IL or missing references) if (!currentPlayed.ContainsKey(sender)) { currentPlayed.Add(sender, new List()); } AudioClip val = ItePlugin.mainBundle.LoadAsset(BulletNoises[type]); if ((Object)(object)val != (Object)null) { float pitch = ((type == BulletType.Cannonball) ? 0.75f : (ShouldUseNormPitch(type) ? 1f : Random.Range(0.975f, 1.05f))); AudioSource item = ItePlugin.SpawnSound(val, pitch, null, 0.5f, pos); currentPlayed[sender].Add(item); } } public static void Cutoff(ulong sender) { if (!currentPlayed.ContainsKey(sender) || currentPlayed[sender].Count <= 0) { return; } foreach (AudioSource item in currentPlayed[sender]) { if ((Object)(object)item != (Object)null) { Object.Destroy((Object)(object)((Component)item).gameObject); } } currentPlayed[sender].Clear(); } public static bool ShouldUseNormPitch(BulletType type) { return type == BulletType.RailBlue || type == BulletType.RailGreen || type == BulletType.RailRed; } public static void CleanProj(GameObject bullet, ulong sender) { //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_010a: 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_028e: Unknown result type (might be due to invalid IL or missing references) Grenade val = default(Grenade); if (bullet.TryGetComponent(ref val)) { if (val.rocket) { PlayerRocketManager playerRocketManager = PlayerRocketManager.Get(sender); PlayerRocket playerRocket = ((Component)val).gameObject.AddComponent(); playerRocket.owner = sender; if ((Object)(object)playerRocketManager != (Object)null && !playerRocketManager.rockets.Contains(playerRocket)) { playerRocketManager.rockets.Add(playerRocket); } } Explosion componentInChildren = val.explosion.GetComponentInChildren(); Explosion componentInChildren2 = val.superExplosion.GetComponentInChildren(); Explosion componentInChildren3 = val.harmlessExplosion.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { AddExpId(((Component)componentInChildren).gameObject, "default", sender); componentInChildren.canHit = (AffectedSubjects)1; if (!ItePlugin.canBeFriendlyFired.value) { componentInChildren.damage = 0; } } if ((Object)(object)componentInChildren2 != (Object)null) { AddExpId(((Component)componentInChildren2).gameObject, "default", sender); componentInChildren2.canHit = (AffectedSubjects)1; if (!ItePlugin.canBeFriendlyFired.value) { componentInChildren2.damage = 0; } } if ((Object)(object)componentInChildren3 != (Object)null) { componentInChildren3.canHit = (AffectedSubjects)1; if (!ItePlugin.canBeFriendlyFired.value) { componentInChildren3.damage = 0; } } } RevolverBeam val2 = default(RevolverBeam); if (bullet.TryGetComponent(ref val2)) { val2.damage = 0f; Explosion componentInChildren4 = val2.hitParticle.GetComponentInChildren(); if ((Object)(object)componentInChildren4 != (Object)null) { AddExpId(((Component)componentInChildren4).gameObject, "default", sender); componentInChildren4.enemy = true; componentInChildren4.friendlyFire = false; componentInChildren4.hasHitPlayer = false; componentInChildren4.canHit = (AffectedSubjects)1; if (!ItePlugin.canBeFriendlyFired.value) { componentInChildren4.damage = 0; } } } Projectile val3 = default(Projectile); if (bullet.TryGetComponent(ref val3)) { val3.friendly = true; val3.damage = 0f; } Nail val4 = default(Nail); if (bullet.TryGetComponent(ref val4)) { val4.damage = 0f; } Cannonball val5 = default(Cannonball); if (!bullet.TryGetComponent(ref val5)) { return; } val5.damage = 0f; Explosion componentInChildren5 = val5.interruptionExplosion.GetComponentInChildren(); if ((Object)(object)componentInChildren5 != (Object)null) { AddExpId(((Component)componentInChildren5).gameObject, "default", sender); componentInChildren5.enemy = true; componentInChildren5.friendlyFire = false; componentInChildren5.hasHitPlayer = false; componentInChildren5.canHit = (AffectedSubjects)1; if (!ItePlugin.canBeFriendlyFired.value) { componentInChildren5.damage = 0; } } } } public static class MasterShaderizer { public static void MasterShaderize(SkinnedMeshRenderer rend) { if (!((Object)(object)rend != (Object)null) || SkinManagerV2.IsCustomShader(rend)) { return; } Material[] materials = ((Renderer)rend).materials; foreach (Material val in materials) { val.shader = MonoSingleton.Instance.masterShader; if (IsVertex(val)) { val.DisableKeyword("VERTEX_LIGHTING"); } } } public static void MasterShaderize(Renderer rend) { if (!((Object)(object)rend != (Object)null)) { return; } Material[] materials = rend.materials; foreach (Material val in materials) { val.shader = MonoSingleton.Instance.masterShader; if (IsVertex(val)) { val.DisableKeyword("VERTEX_LIGHTING"); } } } public static bool IsVertex(Material mat) { string[] shaderKeywords = mat.shaderKeywords; int num = 0; if (num < shaderKeywords.Length) { string text = shaderKeywords[num]; return text == "VERTEX_LIGHTING"; } return false; } } public static class NetworkDebugRef { public static GameObject mainObject; public static TextMeshProUGUI netTick; public static TextMeshProUGUI count; public static GameObject netObjUI; public static TextMeshProUGUI simpleId; public static TextMeshProUGUI owner; public static TextMeshProUGUI index; public static TextMeshProUGUI alive; public static TextMeshProUGUI syncTransform; public static void SetUIActive(bool value) { mainObject.SetActive(value); } public static void Update(float netTickRef, int countRef, INetworkObject obj) { if (mainObject.activeSelf) { ((TMP_Text)netTick).text = $"TICK RATE: {netTickRef}"; ((TMP_Text)count).text = $"OBJECT COUNT: {countRef}"; if (Net.List.Objects.Count < 1) { netObjUI.SetActive(false); } else if (NetworkList.ValidObjectCheck(obj)) { netObjUI.SetActive(true); ((TMP_Text)simpleId).text = "SIMPLE ID: " + obj.SimpleID; ((TMP_Text)owner).text = "OWNER: " + NetworkManager.GetNameOfId(obj.Owner, colorName: true); ((TMP_Text)index).text = $"INDEX: {obj.Index}"; ((TMP_Text)alive).text = $"ALIVE: {obj.Alive}"; ((TMP_Text)syncTransform).text = $"TRANSFORM SYNCED: {obj.TransformSynced}"; } else { netObjUI.SetActive(false); } } } public static INetworkObject GetNearestObject(Vector3 from) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: 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_006f: Unknown result type (might be due to invalid IL or missing references) if (!NetworkManager.InLobby) { return null; } if (Net.List.Objects.Count < 1) { return null; } INetworkObject result = null; float num = float.MaxValue; foreach (INetworkObject @object in Net.List.Objects) { Vector3 val = ((Component)@object.Base).transform.position - from; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (sqrMagnitude < num) { num = sqrMagnitude; result = @object; } } return result; } } public static class CommandManager { public static readonly string[] Commands = new string[2] { "level", "help" }; public static bool IsCommand(string msg) { if (string.IsNullOrWhiteSpace(msg)) { return false; } return msg.StartsWith("/"); } public static void CheckCommand(string msg) { string text = msg.Substring(1); string[] array = text.Split(new char[1] { ' ' }); if (array.Length == 0) { return; } string text2 = array[0].ToLower(); string args = ((text.Length > text2.Length) ? text.Substring(text2.Length).Trim() : string.Empty); string text3 = text2; string text4 = text3; if (!(text4 == "level")) { if (text4 == "help") { HelpCommand(); } } else { HandleLevel(args); } } private static void HandleLevel(string args) { if (string.IsNullOrWhiteSpace(args)) { NetworkManager.DisplaySystemChatMessage("Level command usage: /level "); return; } if (args == "Main Menu" || args == "Intro" || args == "Bootstrap") { NetworkManager.DisplayError("Invalid level"); return; } string text = args; string text2 = string.Empty; if (args == "cybergrind") { text2 = "Endless"; } if (args == "credits") { text2 = "CreditsMuseum2"; } if (args == "sandbox") { text2 = "uk_construct"; } if (!text.StartsWith("Level", StringComparison.OrdinalIgnoreCase) && string.IsNullOrEmpty(text2)) { text = "Level " + text.ToUpper(); } else if (!string.IsNullOrEmpty(text2)) { text = text2; } if (NetworkManager.HostAndConnected) { SceneHelper.LoadScene(text, false); } else { NetworkManager.DisplayError("Only the host can use the level command!"); } } private static void HelpCommand() { NetworkManager.DisplaySystemChatMessage("Commands:\n/level \nShortcuts:\n\ncybergrind\ncredits\nsandbox\nExample:\nlevel p-1"); } } public class CustomP2Event : MonoBehaviour { public EnemyIdentifier eid; public FleshPrison pri; public void Start() { if (pri.altVersion && NetworkManager.InLobby && SceneHelper.CurrentScene == "Level P-2") { ((MonoBehaviour)this).StartCoroutine(WaitToTrigger()); } } public IEnumerator WaitToTrigger() { yield return (object)new WaitForSeconds(30f); pri.aud.Play(); ((Behaviour)pri).enabled = false; yield return (object)new WaitForSeconds(2f); Statue stat = default(Statue); ((Component)pri).TryGetComponent(ref stat); ((Enemy)stat).DeathEnd(); } } public static class EntityStorage { public static EnemyIdentifier Spawn(EnemyType type, Vector3 pos, Quaternion rot, ulong sender, string id) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Invalid comparison between Unknown and I4 //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Invalid comparison between Unknown and I4 //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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: 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_0072: 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_007f: 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) GameObject val = null; if ((int)type == 41) { val = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Enemies/MirrorReaperCyberGrind.prefab").WaitForCompletion(), pos, rot); } else if ((int)type == 40) { val = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Enemies/Power.prefab").WaitForCompletion(), pos, rot); } else if ((int)type == 39 && CyberSync.Active) { val = Object.Instantiate(Addressables.LoadAssetAsync((object)"Assets/Prefabs/Enemies/DeathcatcherCaseEndless.prefab").WaitForCompletion(), pos, rot); if (NetworkManager.HostAndConnected) { MonoSingleton.Instance.endlessEvents.Add(val.GetComponent()); MonoSingleton.Instance.deathcatchers.Add(val.GetComponentInChildren(true)); } else { CyberSync.events.Add(val.GetComponent()); CyberSync.catchers.Add(val.GetComponentInChildren(true)); } } else { val = Object.Instantiate(MonoSingleton.Instance.GetEnemyPrefab(type), pos, rot); } AddNetEnemy(val, sender, id); return val.GetComponentInChildren(true); } public static INetworkObject AddNetEnemy(GameObject enemy, ulong sender, string id) { if (enemy.NetObject() == null) { NetworkEnemy networkEnemy = NetworkEnemy.Create(enemy.GetComponentInChildren(true), sender, id); if (CyberSync.Active && !CyberSync.enemies.Contains(networkEnemy)) { CyberSync.enemies.Add(networkEnemy); } return networkEnemy; } return null; } public static void TestSpawn(EnemyType type) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) Spawn(type, ((Component)MonoSingleton.Instance).transform.position, Quaternion.identity, NetworkManager.Id, ""); } } public class HeadRotate : MonoBehaviour { public Transform head; public Transform arm; public Quaternion targetRotation; public Transform spine3; private NetworkPlayer plr; private void Start() { spine3 = head.parent.parent.parent; plr = ((Component)this).GetComponentInParent(); } public void LateUpdate() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_009a: 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) if ((Object)(object)head != (Object)null) { Quaternion localRotation = head.localRotation; Vector3 eulerAngles = ((Quaternion)(ref localRotation)).eulerAngles; Vector3 eulerAngles2 = ((Quaternion)(ref targetRotation)).eulerAngles; float num = Mathf.LerpAngle(eulerAngles.x, eulerAngles2.x, Time.unscaledDeltaTime * 20f); head.localRotation = Quaternion.Euler(num * 1f, 0f, 0f); if ((Object)(object)spine3 != (Object)null) { Transform obj = spine3; obj.localRotation *= head.localRotation; } } } } public interface INetworkObject { string ID { get; set; } string SimpleID { get; } int Index { get; } ulong Owner { get; set; } bool Alive { get; } bool Cleanup { get; } bool TransformSynced { get; } bool Owns { get; } Vector3 TargetPosition { get; set; } Quaternion TargetRotation { get; set; } Vector3 LastPosition { get; set; } Quaternion LastRotation { get; set; } NetworkObject Base { get; } void Transfer(ulong newOwner); void HandDestroy(); void SendState(PacketWriter writer, PacketType type); void TransferOwnerP2P(ulong newOwner); void Send(PacketWriter writer, PacketType packet, bool showDebug = true); void Respond(BinaryPacketReader reader, PacketType packet, ulong sender); void State(Vector3 pos, Quaternion rot, BinaryPacketReader reader); void PrepDestroy(); } public enum VoiceMode { PushToTalk, VoiceActivation, ToggleToTalk } public enum VoiceQuality { Low, Medium, High } public enum SearchFolder { Downloads, Videos, Pictures, Desktop, Documents, Other } public enum ChatAlign { TopLeft, TopMiddle, TopRight, MiddleLeft, MiddleRight, BottomLeft, BottomMiddle, BottomRight } public enum VCAlign { Left, Middle, Right } public enum VCListAlign { TopToBottom, Center, BottomToTop } public struct Typewriter { public string text; public float delay; public TextMeshProUGUI target; public Typewriter(string text, float delay, TextMeshProUGUI target) { this.text = text; this.delay = delay; this.target = target; } } public struct BuildTag { public bool debug; public string buildName; } [BepInPlugin("com.d1g1tal.polarite", "Polarite", "1.1.1")] public class ItePlugin : BaseUnityPlugin { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static PostBoolValueChangeEvent <>9__113_2; public static PostFloatValueChangeEvent <>9__113_3; public static OnClick <>9__113_4; public static OnClick <>9__113_5; public static OnClick <>9__113_8; public static OpenPanelEventDelegate <>9__113_9; public static BoolValueChangeEventDelegate <>9__113_10; public static IntValueChangeEventDelegate <>9__113_11; public static IntValueChangeEventDelegate <>9__113_12; public static IntValueChangeEventDelegate <>9__113_13; public static IntValueChangeEventDelegate <>9__113_14; public static EnumValueChangeEventDelegate <>9__113_15; public static EnumValueChangeEventDelegate <>9__113_16; public static EnumValueChangeEventDelegate <>9__113_17; public static UnityAction <>9__135_1; public static UnityAction <>9__135_2; public static UnityAction <>9__135_3; public static UnityAction <>9__135_6; public static UpdateActivityHandler <>9__147_0; internal void b__113_2(bool v) { if (NetworkManager.HostAndConnected) { ((Lobby)(ref NetworkManager.Instance.CurrentLobby)).SetData("bh", v ? "1" : "0"); } } internal void b__113_3(float v) { if (NetworkManager.HostAndConnected) { ((Lobby)(ref NetworkManager.Instance.CurrentLobby)).SetData("bhm", v.ToString()); } } internal void b__113_4() { Application.OpenURL(SkinSaver.Path); } internal void b__113_5() { SkinSaver.Clear(); SkinSaver.LoadAllSkins(); } internal void b__113_8() { string text = ((searchFolderEnum.value == SearchFolder.Other && !string.IsNullOrEmpty(customSearchFolder.value)) ? customSearchFolder.value : ""); if (string.IsNullOrEmpty(text)) { switch (searchFolderEnum.value) { case SearchFolder.Downloads: text = "C:\\Users\\" + Environment.UserName + "\\Downloads"; break; case SearchFolder.Videos: text = "C:\\Users\\" + Environment.UserName + "\\Videos"; break; case SearchFolder.Pictures: text = "C:\\Users\\" + Environment.UserName + "\\OneDrive\\Pictures"; break; case SearchFolder.Desktop: text = "C:\\Users\\" + Environment.UserName + "\\OneDrive\\Desktop"; break; case SearchFolder.Documents: text = "C:\\Users\\" + Environment.UserName + "\\OneDrive\\Documents"; break; } } SkinSaver.SearchAndImport(text); } internal void b__113_9(bool p) { countOfImported.text = ""; } internal void b__113_10(BoolValueChangeEvent val) { VoiceUI.RefreshIcons(val.value); } internal void b__113_11(IntValueChangeEvent val) { SamPitch.configSam.speed = val.value; } internal void b__113_12(IntValueChangeEvent val) { SamPitch.configSam.pitch = val.value; } internal void b__113_13(IntValueChangeEvent val) { SamPitch.configSam.mouth = val.value; } internal void b__113_14(IntValueChangeEvent val) { SamPitch.configSam.throat = val.value; } internal void b__113_15(EnumValueChangeEvent val) { UIAnchors.Refresh(val.value); } internal void b__113_16(EnumValueChangeEvent val) { UIAnchors.Refresh(val.value); } internal void b__113_17(EnumValueChangeEvent val) { UIAnchors.Refresh(val.value); } internal void b__135_1() { Application.OpenURL(Directory.GetParent("server_config.json").FullName); } internal void b__135_2() { Application.OpenURL("https://www.youtube.com/watch?v=LKeof3dleS0"); } internal void b__135_3() { NetworkManager.Instance.LeaveLobby(); } internal void b__135_6() { Application.OpenURL("https://ko-fi.com/albertdevstein"); } internal void b__147_0(Result ) { } } public static readonly PluginConfigurator config = PluginConfigurator.Create("Polarite Config", "com.d1g1tal.polarite"); public static ConfigPanel mainGameRelated = new ConfigPanel(config.rootPanel, "Gameplay Config", "gameplay"); public static ConfigPanel voiceRelated = new ConfigPanel(config.rootPanel, "Voice Config", "voice"); public static ConfigPanel cosmeticRelated = new ConfigPanel(config.rootPanel, "Cosmetic Config", "cosmetic"); public static ConfigPanel uiConfig = new ConfigPanel(config.rootPanel, "UI Config", "ui"); public static ConfigPanel debugRelated = new ConfigPanel(config.rootPanel, "Debug zone", "debugzone"); public static BoolField canBeFriendlyFired = new BoolField(mainGameRelated, "Can be friendly fired", "gameplay.client.friendlyfire", true); public static BoolField disableCheckpointSync = new BoolField(mainGameRelated, "Disable checkpoint sync", "gameplay.client.checkpointsync", false); public static BoolField timeStopDisable = new BoolField(mainGameRelated, "Disable timestop changes", "timestop.disable", false); public static BoolField disableHI = new BoolField(mainGameRelated, "Disable \"hidden indicator\"", "hi.disable", false); public static KeyCodeField killbind = new KeyCodeField(mainGameRelated, "Killbind", "killbind", (KeyCode)107); public static ConfigPanel hostPanel = new ConfigPanel(mainGameRelated, "Extra host settings", "gameplay.host"); public static ConfigHeader hostControl = new ConfigHeader(hostPanel, "These values are controlled by the host.", 24); public static BoolField bossHpIncrease = new BoolField(hostPanel, "Increase boss HP by player count", "g.b", true); public static FloatField bossHpMult = new FloatField(hostPanel, "Boss HP increase multiplier", "g.bm", 1.3f); public static KeyCodeField buttonToChat = new KeyCodeField(config.rootPanel, "Open chat key", "chat.key", (KeyCode)116); public static ConfigHeader vcheaderstuff = new ConfigHeader(voiceRelated, "Stuff related to Voice Chat", 24); public static KeyCodeField voicePushToTalk = new KeyCodeField(voiceRelated, "Push-to-talk key", "voice.pttkey", (KeyCode)0); public static EnumField voiceMode = new EnumField(voiceRelated, "Voice mode", "voice.mode", VoiceMode.PushToTalk); public static EnumField voiceQuality = new EnumField(voiceRelated, "Voice quality", "voice.quality", VoiceQuality.High); public static IntField voiceMicIndex = new IntField(voiceRelated, "Microphone index", "voice.mic", 0); public static ConfigHeader wheresMyMic = new ConfigHeader(voiceRelated, "0: ", 24); public static IntField voiceVADThreshold = new IntField(voiceRelated, "Voice activation threshold (0-100)", "voice.vad", 30); public static BoolField receiveVoice = new BoolField(voiceRelated, "Hear players voices", "voice.receive", true); public static BoolField vcPlayback = new BoolField(voiceRelated, "Voice playback", "voice.playback", false); public static ConfigPanel skinsMenu = new ConfigPanel(cosmeticRelated, "Skin Config", "skins"); public static KeyCodeField previewSkin = new KeyCodeField(skinsMenu, "Preview skin key", "skin.preview", (KeyCode)308); public static KeyCodeField screenShotSkin = new KeyCodeField(skinsMenu, "Screenshot skin key", "skin.screenie", (KeyCode)307); public static ConfigPanel savePanel = new ConfigPanel(skinsMenu, "Saving/loading skins", "save.skins", (PanelFieldType)1); public static ButtonField openLocation = new ButtonField(savePanel, "Open saved skins folder", "skin.openloc"); public static ButtonField refresh = new ButtonField(savePanel, "Refresh loaded skins", "skin.refresh"); public static ConfigPanel import = new ConfigPanel(savePanel, "Import .polarskin files", "import.skin", (PanelFieldType)1); public static EnumField searchFolderEnum = new EnumField(import, "Search folder", "import.searchfolder", SearchFolder.Downloads); public static StringField customSearchFolder = new StringField(import, "Search folder path", "import.searchfolder.custom", "C:\\Users\\" + Environment.UserName + "\\Downloads"); public static ButtonField searchnImport = new ButtonField(import, "Search & Import", "import.IMPORT"); public static ConfigHeader countOfImported = new ConfigHeader(import, "", 24); public static ConfigPanel saveSkinPanel = new ConfigPanel(savePanel, "Save skin", "save.skin", (PanelFieldType)1); public static ConfigHeader loadedArea = new ConfigHeader(savePanel, "--- Loaded ---", 24); public static StringField saveName = new StringField(saveSkinPanel, "Skin name", "skin.name", "My skin"); public static ButtonField save = new ButtonField(saveSkinPanel, "Save", "save.skin.reallysave"); public static ColorField baseColor = new ColorField(skinsMenu, "Base color", "skin.base", Color.white); public static ColorField lightColor = new ColorField(skinsMenu, "Base light color", "skin.light", Color.white); public static ColorField wingLightColor = new ColorField(skinsMenu, "Wing light color", "skin.light.wing", Color.white); public static ColorField metalColor = new ColorField(skinsMenu, "Metal color", "skin.metal", Color.gray); public static FloatSliderField shinyness = new FloatSliderField(skinsMenu, "Shininess", "skin.SHINY", new Tuple(0f, 1f), 0.7f); public static ConfigSpace skinSpace = new ConfigSpace(skinsMenu, 0.5f); public static ConfigHeader namePlateHeader = new ConfigHeader(skinsMenu, "Max. 5 characters", 24); public static StringField namePlate = new StringField(skinsMenu, "V-Model nameplate", "name.plate", "V?"); public static ColorField namePlateColor = new ColorField(skinsMenu, "V-Model nameplate color", "name.plate.color", Color.black); public static ButtonField apply = new ButtonField(skinsMenu, "Apply skin", "skin.apply"); public static ButtonField random = new ButtonField(skinsMenu, "Randomize skin", "skin.random"); public static BoolField disableSkinTip = new BoolField(config.rootPanel, "Disable skin tip message", "skin.tip.disable", false); public static BoolField chatNoise = new BoolField(cosmeticRelated, "Chat noise", "chat.noise", true); public static ConfigPanel ttsPanel = new ConfigPanel(cosmeticRelated, "TTS Config", "cosmetic.ttssam"); public static BoolField canTTS = new BoolField(ttsPanel, "Enable Sam TTS", "tts.enabled", true); public static BoolField ttsHurtAndDeath = new BoolField(ttsPanel, "Play TTS when getting hurt or while dying", "tts.hurtndyning", true); public static BoolField ttsChat = new BoolField(ttsPanel, "Play TTS when sending/receiving a chat message", "tts.chatter", true); public static IntField ttsSpeed = new IntField(ttsPanel, "TTS speed", "tts.speed", 72); public static IntField ttsPitch = new IntField(ttsPanel, "TTS pitch", "tts.pitch", 64); public static IntField ttsMouth = new IntField(ttsPanel, "TTS mouth", "tts.mouth", 128); public static IntField ttsThroat = new IntField(ttsPanel, "TTS throat", "tts.throat", 128); public static EnumField chatAlignment = new EnumField(uiConfig, "Chat UI position", "ui.chat", ChatAlign.BottomLeft); public static ConfigPanel voiceUiConfig = new ConfigPanel(uiConfig, "Voice UI", "ui.voice"); public static EnumField vcAlignmentPos = new EnumField(voiceUiConfig, "Voice chat UI position", "ui.vcpos", VCAlign.Right); public static EnumField vcAlignmentList = new EnumField(voiceUiConfig, "Voice chat UI list alignment", "ui.vclist", VCListAlign.BottomToTop); public static BoolField useSkinInsteadOfPFP = new BoolField(voiceUiConfig, "Show players custom skin instead of PFP", "ui.showskin", false); public static BoolField hasHadRandomSkin = new BoolField(debugRelated, "Had random skin", "skin.randomized", false); public static BoolField openedPolariteMenu = new BoolField(debugRelated, "Pressed globe", "pressed.globe", false); public static BoolField hasHadRandomPitch = new BoolField(debugRelated, "Had random voice", "random.voice", false); public static BoolField didSetup = new BoolField(debugRelated, "Setup voice chat", "did.setup", false); public static BoolField logPacketParsing = new BoolField(debugRelated, "Log when parsing packets", "log.packets", false); public static BoolField logDebugLogs = new BoolField(debugRelated, "Allow debug logs", "log.allowdebug", false); public static BoolField logDebugErrorLogs = new BoolField(debugRelated, "Allow debug error logs", "log.allowerrordebug", false); internal readonly Harmony harm = new Harmony("com.d1g1tal.polarite"); internal static ManualLogSource log; public static ItePlugin Instance; public static bool ignoreSpectate = false; public static AssetBundle mainBundle; public static GameObject currentUi; public static GameObject leaveButton; public static GameObject joinButton; public static GameObject hostButton; public static GameObject copyButton; public static GameObject inviteButton; public static GameObject playerListButton; public static Discord discord; public static bool HasDiscord; public static readonly string[] PathsToSoftlocks = new string[31] { "Door (Large) With Controllers (9)/LockedDoorBlocker", "V2 - Arena/V2 Stuff(Clone)/Door", "4 - Heart Chamber/4 Stuff(Clone)/Door", "Main Section/9 - Boss Arena/Boss Stuff(Clone)/IntroObjects/WallCollider", "2 - Organ Hall/2 Stuff(Clone)/Door", "Exteriors/14/Cube", "Exteriors/Armboy/Cube", "3 - Fuckatorium/3 Stuff(Clone)/EntranceCloser", "Main/Exterior/ExteriorStuff(Clone)/SecuritySystemFight/ArenaWalls", "Main/Interior/InteriorStuff(Clone)(Clone)/BrainFight/EntryForceField", "Door (Large) With Controllers (17)/LockedDoorBlocker", "Door (Large) With Controllers (18)/LockedDoorBlocker", "3 - First Encounter/3 Stuff(Clone)/Blockers", "4 - Heart Chamber/4 Stuff(Clone)/Backwall", "Main Section/Inside/8 - Elevator/8 Stuff/Hellgate 1/Door", "Main Section/Inside/8 - Elevator/8 Stuff/Hellgate 1/Door (1)", "Pre-Space/Rooms/7 - Heart Chamber/7 Stuff/Door/Door (1)", "Pre-Space/Rooms/7 - Heart Chamber/7 Nonstuff/Void/Backwall", "Pre-Space/Rooms/7 - Heart Chamber/7 Stuff/Door", "First Section/Opening Halls Geometry/Opening Nonstuff/Stairway Down -> Walkway Arena", "8 - Ship/Ship Stuff/Arena 1/Cube", "8 - Ship/Ship Stuff/Arena 1/Cube (1)", "8 - Ship/Ship Stuff/Arena 1/Cube (2)", "8 - Ship/Ship Stuff/Arena 1/Cube (3)", "8 - Ship/Ship Stuff/Arena 1/Cube (4)", "8 - Ship/Ship Stuff/Arena 2/Cube", "8 - Ship/Ship Stuff/Arena 2/Cube (1)", "8 - Ship/Ship Stuff/Arena 2/Cube (2)", "8 - Ship/Ship Stuff/Arena 2/Cube (3)", "8 - Ship/Ship Stuff/Arena 2/Cube (4)", "8 - Ship/Ship Stuff/Arena 2/Cube (5)" }; public Camera cam; public AudioLowPassFilter lowPass; public PolariteMenuManager polrMM; public static bool plrActive; public static bool cameFromPacketRestart; public static bool debugMode = false; public static bool debugSending = false; public static bool showNetDebug = false; private static float killbindCooldown = 5f; public static bool immuneToDeath = false; public static bool canBecomeGhost = false; public static readonly bool ReleaseBuild = true; public static readonly string Version = "v1.1.1"; public static TargetData playerData; public static Skin currentSkin; public static List typewriters = new List(); public static AudioClip message; public static Coroutine currentMoveY; public static Coroutine currentScreaming; public static Coroutine currentFlash; public static GameObject screaming; public static bool PolarMenuActive = false; public static bool HasDisabledRotators = false; public static bool CanEnableDebug => !ReleaseBuild || Net.Dev(NetworkManager.Id); public void Awake() { //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //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_012b: Expected O, but got Unknown //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Expected O, but got Unknown //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Expected O, but got Unknown //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: Expected O, but got Unknown //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022b: 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_0255: Expected O, but got Unknown //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: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a3: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Unknown result type (might be due to invalid IL or missing references) //IL_02d3: Expected O, but got Unknown //IL_02f2: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Expected O, but got Unknown //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0432: Unknown result type (might be due to invalid IL or missing references) try { Assembly executingAssembly = Assembly.GetExecutingAssembly(); Stream manifestResourceStream = executingAssembly.GetManifestResourceStream("Polarite.Concentus.dll"); MemoryStream memoryStream = new MemoryStream(); manifestResourceStream.CopyTo(memoryStream); Assembly.Load(memoryStream.ToArray()); memoryStream.Dispose(); manifestResourceStream.Dispose(); if ((Object)(object)Instance == (Object)null) { Instance = this; } log = ((BaseUnityPlugin)this).Logger; harm.PatchAll(); NetworkManager component = ((Component)this).gameObject.GetComponent(); if ((Object)(object)component == (Object)null) { component = ((Component)this).gameObject.AddComponent(); } SceneManager.sceneLoaded += OnSceneLoaded; config.SetIconWithURL("file://" + Path.Combine(Directory.GetParent(((BaseUnityPlugin)this).Info.Location).FullName, "icon.png")); apply.onClick += (OnClick)delegate { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) HandleSkin(); SpawnSound(mainBundle.LoadAsset("SkinChange"), 1f, ((Component)MonoSingleton.Instance).transform, 1f); }; random.onClick += (OnClick)delegate { //IL_0006: 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_0026: 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_0085: 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_00c2: Unknown result type (might be due to invalid IL or missing references) baseColor.value = Random.ColorHSV(); lightColor.value = Random.ColorHSV(); wingLightColor.value = Random.ColorHSV(); metalColor.value = Random.ColorHSV(); shinyness.value = Random.Range(0f, 1f); namePlate.value = $"V{Random.Range(1, 1000)}"; namePlateColor.value = Random.ColorHSV(); HandleSkin(); SpawnSound(mainBundle.LoadAsset("SkinChange"), 1f, ((Component)MonoSingleton.Instance).transform, 1f); }; BoolField obj = bossHpIncrease; object obj2 = <>c.<>9__113_2; if (obj2 == null) { PostBoolValueChangeEvent val = delegate(bool v) { if (NetworkManager.HostAndConnected) { ((Lobby)(ref NetworkManager.Instance.CurrentLobby)).SetData("bh", v ? "1" : "0"); } }; <>c.<>9__113_2 = val; obj2 = (object)val; } obj.postValueChangeEvent += (PostBoolValueChangeEvent)obj2; FloatField obj3 = bossHpMult; object obj4 = <>c.<>9__113_3; if (obj4 == null) { PostFloatValueChangeEvent val2 = delegate(float v) { if (NetworkManager.HostAndConnected) { ((Lobby)(ref NetworkManager.Instance.CurrentLobby)).SetData("bhm", v.ToString()); } }; <>c.<>9__113_3 = val2; obj4 = (object)val2; } obj3.postValueChangeEvent += (PostFloatValueChangeEvent)obj4; ButtonField obj5 = openLocation; object obj6 = <>c.<>9__113_4; if (obj6 == null) { OnClick val3 = delegate { Application.OpenURL(SkinSaver.Path); }; <>c.<>9__113_4 = val3; obj6 = (object)val3; } obj5.onClick += (OnClick)obj6; ButtonField obj7 = refresh; object obj8 = <>c.<>9__113_5; if (obj8 == null) { OnClick val4 = delegate { SkinSaver.Clear(); SkinSaver.LoadAllSkins(); }; <>c.<>9__113_5 = val4; obj8 = (object)val4; } obj7.onClick += (OnClick)obj8; save.onClick += (OnClick)delegate { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0025: 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) Skin skin = GetSkin(baseColor.value, lightColor.value, wingLightColor.value, metalColor.value, shinyness.value, namePlate.value, namePlateColor.value); SkinSaver.SaveSkin(new SaveableSkin { name = saveName.value, data = skin }); }; hasHadRandomSkin.onValueChange += (BoolValueChangeEventDelegate)delegate(BoolValueChangeEvent val12) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: 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_0040: 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_0060: 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_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) if (currentSkin.Base != Color.clear && !val12.value) { baseColor.value = Random.ColorHSV(); lightColor.value = Random.ColorHSV(); wingLightColor.value = Random.ColorHSV(); metalColor.value = Random.ColorHSV(); shinyness.value = Random.Range(0f, 1f); namePlate.value = $"V{Random.Range(1, 1000)}"; namePlateColor.value = Random.ColorHSV(); HandleSkin(); SpawnSound(mainBundle.LoadAsset("SkinChange"), 1f, ((Component)MonoSingleton.Instance).transform, 1f); hasHadRandomSkin.value = true; } }; ButtonField obj9 = searchnImport; object obj10 = <>c.<>9__113_8; if (obj10 == null) { OnClick val5 = delegate { string text = ((searchFolderEnum.value == SearchFolder.Other && !string.IsNullOrEmpty(customSearchFolder.value)) ? customSearchFolder.value : ""); if (string.IsNullOrEmpty(text)) { switch (searchFolderEnum.value) { case SearchFolder.Downloads: text = "C:\\Users\\" + Environment.UserName + "\\Downloads"; break; case SearchFolder.Videos: text = "C:\\Users\\" + Environment.UserName + "\\Videos"; break; case SearchFolder.Pictures: text = "C:\\Users\\" + Environment.UserName + "\\OneDrive\\Pictures"; break; case SearchFolder.Desktop: text = "C:\\Users\\" + Environment.UserName + "\\OneDrive\\Desktop"; break; case SearchFolder.Documents: text = "C:\\Users\\" + Environment.UserName + "\\OneDrive\\Documents"; break; } } SkinSaver.SearchAndImport(text); }; <>c.<>9__113_8 = val5; obj10 = (object)val5; } obj9.onClick += (OnClick)obj10; ConfigPanel obj11 = import; object obj12 = <>c.<>9__113_9; if (obj12 == null) { OpenPanelEventDelegate val6 = delegate { countOfImported.text = ""; }; <>c.<>9__113_9 = val6; obj12 = (object)val6; } obj11.onPannelOpenEvent += (OpenPanelEventDelegate)obj12; BoolField obj13 = useSkinInsteadOfPFP; object obj14 = <>c.<>9__113_10; if (obj14 == null) { BoolValueChangeEventDelegate val7 = delegate(BoolValueChangeEvent val12) { VoiceUI.RefreshIcons(val12.value); }; <>c.<>9__113_10 = val7; obj14 = (object)val7; } obj13.onValueChange += (BoolValueChangeEventDelegate)obj14; IntField obj15 = ttsSpeed; object obj16 = <>c.<>9__113_11; if (obj16 == null) { IntValueChangeEventDelegate val8 = delegate(IntValueChangeEvent val12) { SamPitch.configSam.speed = val12.value; }; <>c.<>9__113_11 = val8; obj16 = (object)val8; } obj15.onValueChange += (IntValueChangeEventDelegate)obj16; IntField obj17 = ttsPitch; object obj18 = <>c.<>9__113_12; if (obj18 == null) { IntValueChangeEventDelegate val9 = delegate(IntValueChangeEvent val12) { SamPitch.configSam.pitch = val12.value; }; <>c.<>9__113_12 = val9; obj18 = (object)val9; } obj17.onValueChange += (IntValueChangeEventDelegate)obj18; IntField obj19 = ttsMouth; object obj20 = <>c.<>9__113_13; if (obj20 == null) { IntValueChangeEventDelegate val10 = delegate(IntValueChangeEvent val12) { SamPitch.configSam.mouth = val12.value; }; <>c.<>9__113_13 = val10; obj20 = (object)val10; } obj19.onValueChange += (IntValueChangeEventDelegate)obj20; IntField obj21 = ttsThroat; object obj22 = <>c.<>9__113_14; if (obj22 == null) { IntValueChangeEventDelegate val11 = delegate(IntValueChangeEvent val12) { SamPitch.configSam.throat = val12.value; }; <>c.<>9__113_14 = val11; obj22 = (object)val11; } obj21.onValueChange += (IntValueChangeEventDelegate)obj22; chatAlignment.onValueChange += delegate(EnumValueChangeEvent val12) { UIAnchors.Refresh(val12.value); }; vcAlignmentPos.onValueChange += delegate(EnumValueChangeEvent val12) { UIAnchors.Refresh(val12.value); }; vcAlignmentList.onValueChange += delegate(EnumValueChangeEvent val12) { UIAnchors.Refresh(val12.value); }; mainBundle = AssetBundle.LoadFromFile(Path.Combine(Directory.GetParent(((BaseUnityPlugin)this).Info.Location).FullName, "polariteassets.bundle")); TryRunDiscord(); playerData = default(TargetData); ((ConfigField)debugRelated).hidden = !CanEnableDebug; ((ConfigField)bossHpIncrease).interactable = false; ((ConfigField)bossHpMult).interactable = false; bossHpIncrease.value = false; SkinSaver.Init(); SkinScreenshotter.Init(); SkinSaver.LoadAllSkins(); saveSkinPanel.icon = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/Cheats/Save 1.png").WaitForCompletion(); import.icon = Addressables.LoadAssetAsync((object)"Assets/Textures/UI/download_arrow.png").WaitForCompletion(); savePanel.icon = mainBundle.LoadAsset("savenloadingicon"); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)("Polarite failed to load! Error message: " + ex.Message)); harm.UnpatchSelf(); } } public Skin DefaultSkin() { //IL_000b: 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_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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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_0034: 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) return new Skin { Base = Color.gray, Light = Color.white, WingLight = Color.white, Metal = Color.gray, Shinyness = 0.5f, Nameplate = "V?", NameplateColor = Color.black }; } public Skin GetSkin(Color baseColor, Color lightColor, Color wingLight, Color metal, float shiny, string name, Color namePlateColor) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_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_0023: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) return new Skin { Base = baseColor, Light = lightColor, WingLight = wingLight, Metal = metal, Shinyness = shiny, Nameplate = name, NameplateColor = namePlateColor }; } public static void ArmCheck(bool alt) { //IL_003f: 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_0053: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: Unknown result type (might be due to invalid IL or missing references) try { Transform val = MonoSingleton.Instance.currentWeapon.transform.Find(alt ? "Revolver_Rerigged_Alternate/RightArm" : "Revolver_Rerigged_Standard/RightArm"); if ((Object)(object)val != (Object)null) { SkinnedMeshRenderer component = ((Component)val).GetComponent(); SkinManagerV2.CustomColor(component, currentSkin.Base, currentSkin.Light, currentSkin.Metal, currentSkin.Shinyness, "T_MainArmMask2", (alt ? "RArmAlt" : "RArm") + NetworkManager.Id, 0, lit: true); } } catch { } try { SkinnedMeshRenderer[] componentsInChildren = ((Component)MonoSingleton.Instance).GetComponentsInChildren(true); foreach (SkinnedMeshRenderer val2 in componentsInChildren) { if (((Object)val2).name == "Feedbacker") { SkinManagerV2.CustomColor(val2, currentSkin.Base, currentSkin.Light, currentSkin.Metal, currentSkin.Shinyness, "T_FeedbackerMask4", "Feedbacker" + NetworkManager.Id, 0, lit: true); } if (((Object)val2).name == "arm_lp") { SkinManagerV2.CustomColor(val2, currentSkin.Base, currentSkin.Light, currentSkin.Metal, currentSkin.Shinyness, "v2_armtexmask4", "KB" + NetworkManager.Id, 0, lit: true); } if (((Object)val2).name == "Arm" || ((Object)val2).name == "Hook") { SkinManagerV2.CustomColor(val2, currentSkin.Base, currentSkin.Light, currentSkin.Metal, currentSkin.Shinyness, "T_GreenArmMask7", "Whip" + NetworkManager.Id, 0, lit: true); } } } catch { } } public static void ReverseArmCheck() { SkinManagerV2.Reset("RArm" + NetworkManager.Id); SkinManagerV2.Reset("RArmAlt" + NetworkManager.Id); SkinManagerV2.Reset("Feedbacker" + NetworkManager.Id); SkinManagerV2.Reset("KB" + NetworkManager.Id); SkinManagerV2.Reset("Whip" + NetworkManager.Id); } public static void AnimationCheck() { //IL_00cb: 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_00df: 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_0078: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)MonoSingleton.Instance != (Object)null)) { return; } PlayerAnimations componentInChildren = ((Component)MonoSingleton.Instance.gc).GetComponentInChildren(); if (!((Object)(object)componentInChildren != (Object)null)) { return; } SkinnedMeshRenderer component = ((Component)((Component)componentInChildren).transform.Find("v1_mdl")).GetComponent(); for (int i = 0; i < ((Renderer)component).materials.Length; i++) { if (i == 0) { SkinManagerV2.CustomColor(component, currentSkin.Base, currentSkin.Light, currentSkin.Metal, currentSkin.Shinyness, "v1_mask32_nameless", "BaseMir" + NetworkManager.Id, i); continue; } ((Renderer)component).materials[i].DisableKeyword("EMISSIVE"); SkinManagerV2.CustomColor(component, currentSkin.Base, currentSkin.WingLight, currentSkin.Metal, currentSkin.Shinyness, "v1_wingmask2_tex", "WingMir" + NetworkManager.Id, i); } } public static void ReverseAnimationCheck() { if ((Object)(object)MonoSingleton.Instance != (Object)null) { PlayerAnimations componentInChildren = ((Component)MonoSingleton.Instance.gc).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { SkinnedMeshRenderer component = ((Component)((Component)componentInChildren).transform.Find("v1_mdl")).GetComponent(); for (int i = 0; i < ((Renderer)component).materials.Length; i++) { if (i >= 1) { ((Renderer)component).materials[i].EnableKeyword("EMISSIVE"); } } } } SkinManagerV2.Reset("BaseMir" + NetworkManager.Id); SkinManagerV2.Reset("WingMir" + NetworkManager.Id); } public static void LogDebug(string msg, bool ignore = false) { if (debugMode || ignore) { if (MonoSingleton.Instance.subtitlesEnabled) { MonoSingleton.Instance.DisplaySubtitle(msg, (AudioSource)null, false); } else { MonoSingleton.Instance.SendHudMessage(msg, "", "", 0, false, false, true); } } } public void OnApplicationQuit() { discord.Dispose(); } public bool TryRunDiscord() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown try { discord = new Discord(1432308384798867456L, 1uL); HasDiscord = true; return true; } catch { ((BaseUnityPlugin)this).Logger.LogWarning((object)"User doesn't have discord in the background, Skipping discord!"); return false; } } private void Inputs() { //IL_0257: Unknown result type (might be due to invalid IL or missing references) if (!Net.Paused && Net.List != null && NetworkManager.InLobby) { Net.Tick(); } if (debugMode && NetworkManager.InLobby && CanEnableDebug) { NetworkPlayer localPlayer = NetworkPlayer.LocalPlayer; if (Input.GetKeyDown((KeyCode)284)) { showNetDebug = !showNetDebug; LogDebug($"[DEBUG] Toggled networking debugging UI {showNetDebug}."); } if (Input.GetKeyDown((KeyCode)292)) { ChatUI.Hide(!ChatUI.Instance.chatPanel.activeSelf); LogDebug($"[DEBUG] Toggled chat {ChatUI.Instance.chatPanel.activeSelf}."); } else if (Input.GetKeyDown((KeyCode)283)) { LogDebug("[DEBUG] Teleported testing Dummy to your location! (Keep holding to make it follow)"); localPlayer.testPlayer = true; localPlayer.ToggleRig(value: true); localPlayer.UpdateSkin(currentSkin); } else if (Input.GetKeyDown((KeyCode)282)) { if (NameTag.DisabledByDebug) { NameTag.DisabledByDebug = false; foreach (NetworkPlayer value in NetworkManager.players.Values) { ((Component)value.NameTag).gameObject.SetActive(true); } } else { NameTag.DisabledByDebug = true; } LogDebug($"[DEBUG] Toggled name tags {!NameTag.DisabledByDebug}."); } if (!Input.GetKey((KeyCode)283)) { localPlayer.testPlayer = false; } } if (Input.GetKeyDown((KeyCode)286) && CanEnableDebug) { debugMode = !debugMode; LogDebug($"[POLARITE] Toggled debug mode {debugMode}.", ignore: true); } if (Input.GetKeyDown((KeyCode)287) && debugMode) { debugSending = !debugSending; LogDebug($"[POLARITE] Toggled packet messages {debugSending}."); } if (Input.GetKeyDown(killbind.value) && NetworkManager.InLobby && MonoSingleton.Instance.activated && MonoSingleton.Instance.hp != 0 && killbindCooldown <= 0f && !immuneToDeath) { killbindCooldown = 5f; ForceKillSelf("killed themselves"); } killbindCooldown -= Time.deltaTime; } public static void ForceKillSelf(string deathMsg = "died") { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) NewMovement instance = MonoSingleton.Instance; DeadPatch.Death(deathMsg, 0uL); instance.hp = 0; if (!instance.endlessMode) { ((Component)instance.deathSequence).gameObject.SetActive(true); MonoSingleton.Instance.controlPitch = false; instance.screenHud.SetActive(false); } else { ((Component)instance).GetComponentInChildren().GameOver(); CrowdReactions instance2 = MonoSingleton.Instance; if ((Object)(object)instance2 != (Object)null) { instance2.React(instance2.aww); } } instance.rb.constraints = (RigidbodyConstraints)0; instance.rb.AddTorque(Vector3.right * -1f, (ForceMode)2); if (Object.op_Implicit((Object)(object)MonoSingleton.Instance)) { MonoSingleton.Instance.juice = 0f; } ((Behaviour)instance.cc).enabled = false; if ((Object)(object)instance.gunc == (Object)null) { instance.gunc = ((Component)instance).GetComponentInChildren(); } instance.gunc.NoWeapon(); instance.rb.constraints = (RigidbodyConstraints)0; instance.dead = true; instance.activated = false; if ((Object)(object)instance.punch == (Object)null) { instance.punch = ((Component)instance).GetComponentInChildren(); } instance.punch.NoFist(); } private void TryRunCalls() { try { if (HasDiscord) { discord.RunCallbacks(); } } catch { HasDiscord = false; } } public bool ShouldBeImmune() { if (SceneHelper.CurrentScene == "Level 8-4" && MonoSingleton.Instance.kills >= 7) { return true; } return false; } public void FraudThreeRotators() { string[] array = new string[5] { "Pre-Space/Rooms/Red Path (Clockwork)/R1 - Clockwork Tutorial/R1 Stuff/RotatorSwitch", "Pre-Space/Rooms/Red Path (Clockwork)/R2 - Clockwork Arena/R2 Stuff/RotatorSwitch", "Pre-Space/Rooms/Red Path (Clockwork)/R3 - Clockwork Crushers/R3 Stuff/RotatorSwitch", "Pre-Space/Rooms/Red Path (Clockwork)/R4 - Clockwork Lava/R4 Stuff/Portal Stuff/RotatorSwitch (1)", "Pre-Space/Rooms/Red Path (Clockwork)/R5 - Clockwork Climb/R5 Stuff/RotatorSwitch" }; string[] array2 = array; foreach (string path in array2) { GameObject val = TryGetSceneObject(path); if (val != null) { val.gameObject.SetActive(false); } } HasDisabledRotators = true; } private void InNet() { //IL_0246: Unknown result type (might be due to invalid IL or missing references) if (NetworkManager.InLobby && SceneHelper.CurrentScene != "Main Menu") { if (immuneToDeath) { NewMovement instance = MonoSingleton.Instance; instance.hp = 100; } immuneToDeath = ShouldBeImmune(); if (!timeStopDisable.value) { Time.timeScale = 1f; } if (SceneHelper.CurrentScene == "Level 8-3" && !HasDisabledRotators && NetworkManager.ClientAndConnected) { FraudThreeRotators(); } Application.runInBackground = true; DeadPatch.SpectateOnDeath = ((Lobby)(ref NetworkManager.Instance.CurrentLobby)).MemberCount > 1 || !NetworkManager.Sandbox; DeadPatch.TickTimer(); if (MonoSingleton.Instance.cheatsEnabled && ((Lobby)(ref NetworkManager.Instance.CurrentLobby)).GetData("cheat") == "0" && NetworkManager.ClientAndConnected) { foreach (KeyValuePair> allRegisteredCheat in MonoSingleton.Instance.allRegisteredCheats) { foreach (ICheat item in allRegisteredCheat.Value) { if (item.IsActive) { MonoSingleton.Instance.DisableCheat(item); } } } MonoSingleton.Instance.cheatsEnabled = false; } if (MonoSingleton.Instance.paused) { CustomTogglePlayer(val: false); } else { CustomTogglePlayer(val: true); } if ((Object)(object)cam != (Object)null && (Object)(object)lowPass != (Object)null && !MonoSingleton.Instance.inWater) { ((Behaviour)lowPass).enabled = (NetworkPlayer.selfIsGhost ? true : false); } if (CyberSync.Active && NetworkPlayer.selfIsGhost) { MonoSingleton.Instance.NoFist(); MonoSingleton.Instance.NoWeapon(); MonoSingleton.Instance.rb.constraints = MonoSingleton.Instance.defaultRBConstraints; MonoSingleton.Instance.dead = false; bool activated = !MonoSingleton.Instance.paused && !ChatUI.isTyping; MonoSingleton.Instance.activated = activated; MonoSingleton.Instance.hp = 99; ((Behaviour)MonoSingleton.Instance).enabled = true; } } else { DeadPatch.SpectateOnDeath = false; Application.runInBackground = false; immuneToDeath = false; } } public void LateUpdate() { if (!(SceneHelper.CurrentScene == "Intro") && !(SceneHelper.CurrentScene == "Bootstrap") && !(SceneHelper.CurrentScene == "Main Menu")) { cam = MonoSingleton.Instance.cam; if ((Object)(object)cam != (Object)null) { lowPass = ((Component)cam).GetComponent(); } } } public void HandleTargetData() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_0033: 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_004c: 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_0065: 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_0079: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) playerData.portalMatrix = Matrix4x4.identity; playerData.handle = new TargetHandle((ITarget)(object)MonoSingleton.Instance); playerData.position = ((Component)MonoSingleton.Instance).transform.position; playerData.rotation = ((Component)MonoSingleton.Instance).transform.rotation; playerData.headPosition = ((Component)MonoSingleton.Instance).transform.position; playerData.velocity = MonoSingleton.Instance.targetVel; } public void HandleSkin() { //IL_003b: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) if (namePlate.value.Length > 5) { namePlate.value = namePlate.value.Substring(0, 5); } currentSkin = GetSkin(baseColor.value, lightColor.value, wingLightColor.value, metalColor.value, shinyness.value, namePlate.value, namePlateColor.value); if (NetworkManager.InLobby) { Skin skin = currentSkin; PacketWriter packetWriter = new PacketWriter(); packetWriter.WriteSkin(skin); NetworkManager.Instance.BroadcastPacket(PacketType.Skin, packetWriter.GetBytes(), 0uL, 0); if (NetworkPlayer.LocalPlayer.testPlayer) { NetworkPlayer.LocalPlayer.UpdateSkin(skin); } ArmCheck(SwapWeaponsPatch.AltWeapon(MonoSingleton.Instance.currentWeapon)); AnimationCheck(); } SkinManagerV2.SetIcon(NetworkManager.Id); VoiceUI.RefreshIcons(useSkinInsteadOfPFP.value); } public void Update() { //IL_00b2: 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_00e3: 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_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Unknown result type (might be due to invalid IL or missing references) try { ((ConfigField)ttsHurtAndDeath).hidden = !canTTS.value; ((ConfigField)ttsChat).hidden = !canTTS.value; ((ConfigField)ttsSpeed).hidden = !canTTS.value; ((ConfigField)ttsPitch).hidden = !canTTS.value; ((ConfigField)ttsMouth).hidden = !canTTS.value; ((ConfigField)ttsThroat).hidden = !canTTS.value; ((ConfigField)customSearchFolder).hidden = searchFolderEnum.value != SearchFolder.Other; if (currentSkin.Base == Color.clear) { if (!hasHadRandomSkin.value) { baseColor.value = Random.ColorHSV(); lightColor.value = Random.ColorHSV(); wingLightColor.value = Random.ColorHSV(); metalColor.value = Random.ColorHSV(); shinyness.value = Random.Range(0f, 1f); namePlate.value = $"V{Random.Range(1, 1000)}"; namePlateColor.value = Random.ColorHSV(); hasHadRandomSkin.value = true; } HandleSkin(); SkinSaver.CurrentSkin.name = currentSkin.Nameplate; SkinSaver.CurrentSkin.data = currentSkin; } if (!hasHadRandomPitch.value) { ttsPitch.value = Random.Range(32, 128); SamPitch.ReUpdateConfigSam(); hasHadRandomPitch.value = true; } Inputs(); TryRunCalls(); if ((Object)(object)SpecialHudCameraAddPatch.specialHud != (Object)null) { SpecialHudCameraAddPatch.specialHud.SetActive(NetworkManager.InLobby); Camera component = SpecialHudCameraAddPatch.specialHud.GetComponent(); if ((Object)(object)component != (Object)null) { component.fieldOfView = cam.fieldOfView; } } if ((Object)(object)MonoSingleton.Instance != (Object)null) { HandleTargetData(); } if ((Object)(object)currentUi != (Object)null && SceneHelper.CurrentScene != "Main Menu") { if ((Object)(object)polrMM != (Object)null) { currentUi.SetActive(MonoSingleton.Instance.paused && !MonoSingleton.Instance.loadingBlocker.activeSelf); if (polrMM.mainPanel.activeSelf && MonoSingleton.Instance.paused && (Object)(object)MonoSingleton.Instance.pauseMenu != (Object)null) { TogglePauseMenu(value: false); PolarMenuActive = true; } if (!polrMM.mainPanel.activeSelf && MonoSingleton.Instance.paused && (Object)(object)MonoSingleton.Instance.pauseMenu != (Object)null) { TogglePauseMenu(value: true); PolarMenuActive = false; } if (!MonoSingleton.Instance.paused) { polrMM.mainPanel.SetActive(false); PolarMenuActive = false; } if ((Object)(object)polrMM != (Object)null) { string text = (NetworkManager.InLobby ? "STATUS: IN LOBBY" : "STATUS: NOT IN LOBBY"); ((TMP_Text)polrMM.statusHost).text = text; ((TMP_Text)polrMM.statusJoin).text = text; leaveButton.SetActive(NetworkManager.InLobby); playerListButton.SetActive(NetworkManager.InLobby); ((Selectable)joinButton.GetComponent