using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Threading.Tasks; using ArcadeCar.Logic; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using HotDogCheat.Actions; using HotDogCheat.Core; using HotDogCheat.ESP; using HotDogCheat.Features; using HotDogCheat.UI; using HotDogCheat.UI.Tabs; using HotDogCheat.Utils; using Lightbug.CharacterControllerPro.Core; using Lightbug.CharacterControllerPro.Demo; using Lightbug.CharacterControllerPro.Implementation; using RootMotion.Dynamics; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.SceneManagement; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("HotDogCheat")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("HotDogCheat")] [assembly: AssemblyCopyright("Copyright 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("ed33da8a-0adc-46ad-9cfe-4d88d43867a5")] [assembly: AssemblyFileVersion("1.0.4.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.4.0")] namespace HotDogCheat.Utils { public static class GameRunner { private class HostBehaviour : MonoBehaviour { } private static GameObject _hostGo; private static HostBehaviour _host; [RuntimeInitializeOnLoadMethod(/*Could not decode attribute arguments.*/)] private static void Bootstrap() { try { EnsureInitialized(); } catch (Exception ex) { Debug.LogWarning((object)("[HotDogCheat.GameRunner] Bootstrap failed: " + ex.Message + "; falling back to lazy init.")); } } public static void RunAfterFixedUpdates(int count, Action action) { EnsureInitialized(); ((MonoBehaviour)_host).StartCoroutine(RunAfterFixedUpdatesRoutine(count, action)); } public static void RunAfterSeconds(float seconds, Action action) { EnsureInitialized(); ((MonoBehaviour)_host).StartCoroutine(RunAfterSecondsRoutine(seconds, action)); } private static void EnsureInitialized() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (!((Object)(object)_host != (Object)null)) { _hostGo = new GameObject("HotDogCheat.GameRunner"); Object.DontDestroyOnLoad((Object)(object)_hostGo); ((Object)_hostGo).hideFlags = (HideFlags)1; _host = _hostGo.AddComponent(); } } private static IEnumerator RunAfterFixedUpdatesRoutine(int count, Action action) { for (int i = 0; i < count; i++) { yield return (object)new WaitForFixedUpdate(); } action?.Invoke(); } private static IEnumerator RunAfterSecondsRoutine(float seconds, Action action) { yield return (object)new WaitForSeconds(seconds); action?.Invoke(); } } public static class PlayerHelper { private static Dictionary playerNames = new Dictionary(); private static PlayerNetworking cachedLocalPlayer; private static float lastLocalPlayerRefresh; public static PlayerNetworking GetLocalPlayer() { if (Time.unscaledTime - lastLocalPlayerRefresh < 1f) { return cachedLocalPlayer; } cachedLocalPlayer = ((IEnumerable)GetAllPlayers()).FirstOrDefault((Func)((PlayerNetworking p) => ((NetworkBehaviour)p).IsLocalPlayer)); lastLocalPlayerRefresh = Time.unscaledTime; return cachedLocalPlayer; } public static List GetAllPlayers() { return new List(Object.FindObjectsByType((FindObjectsSortMode)0)); } public static string GetPlayerName(PlayerNetworking player) { if (playerNames.ContainsKey(player)) { return playerNames[player]; } string text = "Loading..."; if ((Object)(object)player.SteamPlayer != (Object)null) { string text2 = default(string); if (player.SteamPlayer.TryGetName(ref text2)) { text = text2; playerNames[player] = text; } else { LoadPlayerNameAsync(player); } } return text; } private static async void LoadPlayerNameAsync(PlayerNetworking player) { try { string text = await player.SteamPlayer.WaitForName(); playerNames[player] = text; HotDogCheatMod.Log("Loaded player name: " + text); } catch (Exception ex) { HotDogCheatMod.LogError("Failed to load player name: " + ex.Message); } } public static StatusEffectHandler GetStatusEffects(PlayerNetworking player) { if ((Object)(object)player == (Object)null) { return null; } StatusEffectHandler val = null; try { val = player.StatusEffects; } catch { } if ((Object)(object)val == (Object)null) { val = ((Component)player).GetComponentInChildren(); } return val; } public static List GetAllRCCars() { return new List(Object.FindObjectsByType((FindObjectsSortMode)0)); } } } namespace HotDogCheat.UI { public class MenuManager { private Rect menuRect = UiLayout.MenuRect; private UiProfileKind activeProfile = UiLayout.CurrentKind; private int currentTab; private readonly string[] tabNames = new string[9] { "Spawner", "Self", "Teleport", "Online", "NPCs", "FreeCam", "Visuals", "Game", "Keybinds" }; private readonly string[] tabHints = new string[9] { "Items+Objects", "Local", "Movement", "Friends", "World AI", "Camera", "ESP", "Maps", "Controls" }; private readonly FeatureManager features; private readonly ESPRenderer espRenderer; private readonly SpawnerTab spawnerTab; private readonly PlayerTab playerTab; private readonly TeleportTab teleportTab; private readonly OnlineTab onlineTab; private readonly NPCsTab npcsTab; private readonly FreeCamTab freeCamTab; private readonly ESPTab espTab; private readonly GameTab gameTab; private readonly KeybindsTab keybindsTab; private bool cursorSaved; private CursorLockMode savedLockMode; private bool savedCursorVisible; public bool IsVisible { get; private set; } public MenuManager(FeatureManager features, ESPRenderer espRenderer) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) this.features = features; this.espRenderer = espRenderer; spawnerTab = new SpawnerTab(); playerTab = new PlayerTab(features); teleportTab = new TeleportTab(); onlineTab = new OnlineTab(features); npcsTab = new NPCsTab(features); freeCamTab = new FreeCamTab(features); espTab = new ESPTab(espRenderer.Settings); gameTab = new GameTab(features); keybindsTab = new KeybindsTab(features); } public void ToggleMenu() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) IsVisible = !IsVisible; if (IsVisible) { savedLockMode = Cursor.lockState; savedCursorVisible = Cursor.visible; cursorSaved = true; Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer != (Object)null) { PlayerController component = ((Component)localPlayer).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.Camera != (Object)null) { component.Camera.active = false; } } return; } PlayerNetworking localPlayer2 = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer2 != (Object)null) { PlayerController component2 = ((Component)localPlayer2).GetComponent(); bool flag = (Object)(object)component2 != (Object)null && component2.UIOpen; if (flag) { Cursor.visible = true; Cursor.lockState = (CursorLockMode)0; } else { Cursor.visible = false; Cursor.lockState = (CursorLockMode)1; } if ((Object)(object)component2 != (Object)null && (Object)(object)component2.Camera != (Object)null && !flag) { component2.Camera.active = true; } } else if (cursorSaved) { Cursor.visible = savedCursorVisible; Cursor.lockState = savedLockMode; } cursorSaved = false; } public void Draw() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) Styles.Init(); SyncLayoutProfile(); GUI.backgroundColor = new Color(0f, 0f, 0f, 0f); menuRect = GUI.Window(0, menuRect, new WindowFunction(DrawWindow), "", Styles.Background); menuRect = ClampToScreen(menuRect); } private void SyncLayoutProfile() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) UiProfileKind currentKind = UiLayout.CurrentKind; if (activeProfile != currentKind) { activeProfile = currentKind; menuRect = UiLayout.MenuRect; } } private static Rect ClampToScreen(Rect rect) { //IL_009e: Unknown result type (might be due to invalid IL or missing references) ((Rect)(ref rect)).width = Mathf.Min(((Rect)(ref rect)).width, (float)Screen.width - 8f); ((Rect)(ref rect)).height = Mathf.Min(((Rect)(ref rect)).height, (float)Screen.height - 8f); ((Rect)(ref rect)).x = Mathf.Clamp(((Rect)(ref rect)).x, 0f, Mathf.Max(0f, (float)Screen.width - ((Rect)(ref rect)).width)); ((Rect)(ref rect)).y = Mathf.Clamp(((Rect)(ref rect)).y, 0f, Mathf.Max(0f, (float)Screen.height - ((Rect)(ref rect)).height)); return rect; } private void DrawWindow(int id) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) GUI.DrawTexture(new Rect(0f, 0f, ((Rect)(ref menuRect)).width, ((Rect)(ref menuRect)).height), (Texture)(object)Styles.TexDark); GUILayout.BeginHorizontal(Array.Empty()); DrawSidebar(); DrawContent(); GUILayout.EndHorizontal(); GUI.DragWindow(); } private void DrawSidebar() { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: 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_0105: Expected O, but got Unknown GUILayout.BeginVertical(Styles.Sidebar, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(UiLayout.SidebarWidth), GUILayout.ExpandHeight(true) }); GUILayout.Label("HOTDOG\nMENU", Styles.Title, Array.Empty()); GUILayout.Label("public build", Styles.MutedLabel, Array.Empty()); GUILayout.Space(UiLayout.Space(8f)); for (int i = 0; i < tabNames.Length; i++) { if (GUILayout.Button($"{tabNames[i]}\n{tabHints[i]}", (currentTab == i) ? Styles.SideTabActive : Styles.SideTab, Array.Empty())) { currentTab = i; } } GUILayout.FlexibleSpace(); GUILayout.Label("F10 keybinds", Styles.MutedLabel, Array.Empty()); GUIStyle val = new GUIStyle(Styles.MutedLabel) { fontStyle = (FontStyle)1 }; val.normal.textColor = Color.white; GUILayout.Label("1.0.4 by: Catfishgod420", val, Array.Empty()); GUILayout.EndVertical(); } private void DrawContent() { GUILayout.BeginVertical(Styles.ContentPanel, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); GUILayout.Label(tabNames[currentTab].ToUpperInvariant(), Styles.PageTitle, Array.Empty()); switch (currentTab) { case 0: spawnerTab.Draw(); break; case 1: playerTab.Draw(); break; case 2: teleportTab.Draw(); break; case 3: onlineTab.Draw(); break; case 4: npcsTab.Draw(); break; case 5: freeCamTab.Draw(); break; case 6: espTab.Draw(); break; case 7: gameTab.Draw(); break; case 8: keybindsTab.Draw(); break; } GUILayout.EndVertical(); } } public class Overlay { private GUIStyle bulletTimeStyle; public void Draw() { KeybindManager.Instance?.DrawOverlayList(); DrawBulletTimeIndicator(); } private void DrawBulletTimeIndicator() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.BulletTime != null && featureManager.BulletTime.Enabled) { float num = 0.5f + 0.5f * Mathf.Sin(Time.unscaledTime * 6f); Color textColor = Color.Lerp(new Color(1f, 0.85f, 0.2f, 0.85f), new Color(1f, 1f, 1f, 1f), num); if (bulletTimeStyle == null) { bulletTimeStyle = new GUIStyle(GUI.skin.label) { fontSize = 18, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; } bulletTimeStyle.normal.textColor = textColor; string text = "● BULLET TIME ●"; GUI.Label(new Rect(0f, 60f, (float)Screen.width, 28f), text, bulletTimeStyle); } } } public static class Styles { private static UiProfileKind initializedProfile; public static GUIStyle Background; public static GUIStyle Title; public static GUIStyle Sidebar; public static GUIStyle ContentPanel; public static GUIStyle PageTitle; public static GUIStyle SideTab; public static GUIStyle SideTabActive; public static GUIStyle MutedLabel; public static GUIStyle Section; public static GUIStyle SectionTitle; public static GUIStyle Tab; public static GUIStyle TabActive; public static GUIStyle Button; public static GUIStyle ButtonActive; public static GUIStyle Toggle; public static GUIStyle Selector; public static GUIStyle Box; public static GUIStyle Label; public static GUIStyle Slider; public static GUIStyle SliderThumb; public static GUIStyle TextField; private static Texture2D texDark; private static Texture2D texPanel; private static Texture2D texSection; private static Texture2D texMid; private static Texture2D texLight; private static Texture2D texAccent; private static Texture2D texAccentHover; private static Texture2D texMustard; private static Texture2D texToggleOn; private static Texture2D texToggleOff; private static Texture2D texToggleHover; public static bool Initialized { get; private set; } public static Texture2D TexDark => texDark; public static void Init() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Expected O, but got Unknown //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Unknown result type (might be due to invalid IL or missing references) //IL_0276: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Expected O, but got Unknown //IL_0285: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Expected O, but got Unknown //IL_0354: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0379: Unknown result type (might be due to invalid IL or missing references) //IL_0391: Expected O, but got Unknown //IL_03a5: Unknown result type (might be due to invalid IL or missing references) //IL_03aa: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03ee: Expected O, but got Unknown //IL_0407: 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_0416: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Unknown result type (might be due to invalid IL or missing references) //IL_0447: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Expected O, but got Unknown //IL_0456: Expected O, but got Unknown //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Expected O, but got Unknown //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050a: Unknown result type (might be due to invalid IL or missing references) //IL_0511: Unknown result type (might be due to invalid IL or missing references) //IL_0518: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_053f: Unknown result type (might be due to invalid IL or missing references) //IL_0554: Expected O, but got Unknown //IL_0581: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05b8: Unknown result type (might be due to invalid IL or missing references) //IL_05c2: Expected O, but got Unknown //IL_05e0: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_0617: Unknown result type (might be due to invalid IL or missing references) //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_0629: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0641: Unknown result type (might be due to invalid IL or missing references) //IL_064b: Expected O, but got Unknown //IL_0650: Expected O, but got Unknown //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_06a5: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_06e6: Expected O, but got Unknown //IL_0704: Unknown result type (might be due to invalid IL or missing references) //IL_072c: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Unknown result type (might be due to invalid IL or missing references) //IL_074d: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0765: Unknown result type (might be due to invalid IL or missing references) //IL_076f: Expected O, but got Unknown //IL_0774: Expected O, but got Unknown //IL_07a1: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_0819: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Unknown result type (might be due to invalid IL or missing references) //IL_082d: Unknown result type (might be due to invalid IL or missing references) //IL_0839: Expected O, but got Unknown //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_088e: 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_08de: Unknown result type (might be due to invalid IL or missing references) //IL_08e8: Unknown result type (might be due to invalid IL or missing references) //IL_08ed: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Unknown result type (might be due to invalid IL or missing references) //IL_08ff: Unknown result type (might be due to invalid IL or missing references) //IL_0906: Unknown result type (might be due to invalid IL or missing references) //IL_0919: Unknown result type (might be due to invalid IL or missing references) //IL_0931: Expected O, but got Unknown //IL_095e: Unknown result type (might be due to invalid IL or missing references) //IL_0968: Unknown result type (might be due to invalid IL or missing references) //IL_096d: Unknown result type (might be due to invalid IL or missing references) //IL_0978: Unknown result type (might be due to invalid IL or missing references) //IL_0990: Expected O, but got Unknown //IL_09a9: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c7: Expected O, but got Unknown //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_0a03: Expected O, but got Unknown //IL_0a51: Unknown result type (might be due to invalid IL or missing references) //IL_0a56: Unknown result type (might be due to invalid IL or missing references) //IL_0a61: Unknown result type (might be due to invalid IL or missing references) //IL_0a79: Expected O, but got Unknown //IL_0aa6: Unknown result type (might be due to invalid IL or missing references) //IL_0ace: Unknown result type (might be due to invalid IL or missing references) //IL_0af6: Unknown result type (might be due to invalid IL or missing references) //IL_0b1e: Unknown result type (might be due to invalid IL or missing references) UiProfileKind currentKind = UiLayout.CurrentKind; if (!Initialized || initializedProfile != currentKind) { texDark = MakeTex(new Color(0.07f, 0.07f, 0.1f, 0.96f)); texPanel = MakeTex(new Color(0.1f, 0.1f, 0.15f, 0.98f)); texSection = MakeTex(new Color(0.12f, 0.12f, 0.18f, 1f)); texMid = MakeTex(new Color(0.15f, 0.15f, 0.21f, 1f)); texLight = MakeTex(new Color(0.22f, 0.22f, 0.3f, 1f)); texAccent = MakeTex(new Color(0.74f, 0.12f, 0.16f, 1f)); texAccentHover = MakeTex(new Color(0.9f, 0.2f, 0.22f, 1f)); texMustard = MakeTex(new Color(0.95f, 0.68f, 0.12f, 1f)); texToggleOn = texAccent; texToggleOff = MakeTex(new Color(0.28f, 0.11f, 0.14f, 1f)); texToggleHover = MakeTex(new Color(0.38f, 0.14f, 0.18f, 1f)); Background = new GUIStyle { padding = UiLayout.Offset(12, 12, 12, 12, 8, 8, 8, 8) }; Background.normal.background = texDark; Title = new GUIStyle { fontSize = UiLayout.TitleFont, fontStyle = (FontStyle)1, alignment = (TextAnchor)4, margin = UiLayout.Offset(0, 0, 4, 8, 0, 0, 3, 5) }; Title.normal.textColor = new Color(1f, 0.86f, 0.38f); Sidebar = new GUIStyle { padding = UiLayout.Offset(10, 10, 10, 10, 7, 7, 7, 7), margin = UiLayout.Offset(0, 10, 0, 0, 0, 7, 0, 0) }; Sidebar.normal.background = texPanel; ContentPanel = new GUIStyle { padding = UiLayout.Offset(12, 12, 10, 12, 8, 8, 7, 8), margin = new RectOffset(0, 0, 0, 0) }; ContentPanel.normal.background = texPanel; PageTitle = new GUIStyle { fontSize = UiLayout.PageTitleFont, fontStyle = (FontStyle)1, alignment = (TextAnchor)3, padding = UiLayout.Offset(6, 6, 4, 8, 4, 4, 3, 5), margin = UiLayout.Offset(0, 0, 0, 8, 0, 0, 0, 5) }; PageTitle.normal.textColor = new Color(1f, 0.86f, 0.38f); MutedLabel = new GUIStyle { fontSize = UiLayout.MutedFont, alignment = (TextAnchor)4, wordWrap = true, padding = UiLayout.Offset(4, 4, 2, 6, 3, 3, 1, 4) }; MutedLabel.normal.textColor = new Color(0.62f, 0.62f, 0.7f); Section = new GUIStyle { padding = UiLayout.Offset(10, 10, 8, 10, 7, 7, 5, 7), margin = UiLayout.Offset(0, 0, 0, 8, 0, 0, 0, 5) }; Section.normal.background = texSection; SectionTitle = new GUIStyle { fontSize = UiLayout.SectionTitleFont, fontStyle = (FontStyle)1, alignment = (TextAnchor)3, padding = UiLayout.Offset(4, 4, 0, 6, 3, 3, 0, 4), margin = UiLayout.Offset(0, 0, 0, 4, 0, 0, 0, 2) }; SectionTitle.normal.textColor = new Color(1f, 0.82f, 0.28f); Tab = new GUIStyle { fontSize = UiLayout.ControlFont, fontStyle = (FontStyle)1, alignment = (TextAnchor)4, padding = UiLayout.Offset(8, 8, 6, 6, 6, 6, 4, 4), margin = new RectOffset(2, 2, 0, 0) }; Tab.normal.background = texMid; Tab.normal.textColor = new Color(0.7f, 0.7f, 0.75f); Tab.hover.background = texLight; Tab.hover.textColor = Color.white; TabActive = new GUIStyle(Tab); TabActive.normal.background = texAccent; TabActive.normal.textColor = Color.white; TabActive.hover.background = texAccentHover; SideTab = new GUIStyle(Tab) { alignment = (TextAnchor)3, richText = true, padding = UiLayout.Offset(12, 8, 8, 8, 8, 6, 5, 5), margin = UiLayout.Offset(0, 0, 3, 3, 0, 0, 2, 2), fixedHeight = UiLayout.Height(34f) }; SideTab.normal.background = texMid; SideTab.normal.textColor = new Color(0.78f, 0.78f, 0.84f); SideTab.hover.background = texLight; SideTab.hover.textColor = Color.white; SideTabActive = new GUIStyle(SideTab); SideTabActive.normal.background = texAccent; SideTabActive.normal.textColor = Color.white; SideTabActive.hover.background = texAccentHover; SideTabActive.hover.textColor = Color.white; Button = new GUIStyle { fontSize = UiLayout.ControlFont, alignment = (TextAnchor)4, padding = UiLayout.Offset(8, 8, 6, 6, 6, 6, 4, 4), margin = new RectOffset(2, 2, 2, 2) }; Button.normal.background = texMid; Button.normal.textColor = new Color(0.85f, 0.85f, 0.9f); Button.hover.background = texLight; Button.hover.textColor = Color.white; Button.active.background = texAccent; Button.active.textColor = Color.white; ButtonActive = new GUIStyle(Button); ButtonActive.normal.background = texAccent; ButtonActive.normal.textColor = Color.white; ButtonActive.hover.background = texAccentHover; ButtonActive.hover.textColor = Color.white; Toggle = new GUIStyle { fontSize = UiLayout.ControlFont, alignment = (TextAnchor)4, padding = UiLayout.Offset(8, 8, 6, 6, 6, 6, 4, 4), margin = new RectOffset(2, 2, 2, 2) }; Toggle.normal.background = texToggleOff; Toggle.normal.textColor = new Color(0.86f, 0.72f, 0.75f); Toggle.onNormal.background = texToggleOn; Toggle.onNormal.textColor = Color.white; Toggle.hover.background = texToggleHover; Toggle.hover.textColor = Color.white; Toggle.onHover.background = texToggleOn; Toggle.onHover.textColor = Color.white; Selector = new GUIStyle(Toggle) { fontStyle = (FontStyle)1 }; Selector.normal.background = texMid; Selector.normal.textColor = new Color(0.85f, 0.85f, 0.9f); Selector.hover.background = texLight; Selector.hover.textColor = Color.white; Selector.onNormal.background = texAccent; Selector.onNormal.textColor = Color.white; Selector.onHover.background = texAccentHover; Selector.onHover.textColor = Color.white; Box = new GUIStyle { fontSize = UiLayout.BoxFont, fontStyle = (FontStyle)1, alignment = (TextAnchor)4, padding = UiLayout.Offset(6, 6, 4, 4, 4, 4, 3, 3), margin = UiLayout.Offset(0, 0, 4, 4, 0, 0, 3, 3) }; Box.normal.background = texMid; Box.normal.textColor = new Color(1f, 0.82f, 0.28f); Label = new GUIStyle { fontSize = UiLayout.ControlFont, padding = UiLayout.Offset(4, 4, 2, 2, 3, 3, 1, 1) }; Label.normal.textColor = new Color(0.8f, 0.8f, 0.85f); Slider = new GUIStyle(GUI.skin.horizontalSlider); Slider.normal.background = texMid; Slider.fixedHeight = UiLayout.Height(8f); SliderThumb = new GUIStyle(GUI.skin.horizontalSliderThumb); SliderThumb.normal.background = texMustard; SliderThumb.fixedWidth = (UiLayout.IsCompact ? 12 : 14); SliderThumb.fixedHeight = (UiLayout.IsCompact ? 12 : 14); TextField = new GUIStyle(GUI.skin.textField) { fontSize = UiLayout.ControlFont, padding = UiLayout.Offset(6, 6, 4, 4, 4, 4, 3, 3) }; TextField.normal.background = texMid; TextField.normal.textColor = new Color(0.9f, 0.9f, 0.95f); TextField.active.background = texLight; TextField.active.textColor = Color.white; TextField.focused.background = texLight; TextField.focused.textColor = Color.white; TextField.hover.background = texLight; TextField.hover.textColor = Color.white; initializedProfile = currentKind; Initialized = true; UiLayout.NoteStylesRebuilt(); } } public static void BeginSection(string title) { GUILayout.BeginVertical(Section, Array.Empty()); GUILayout.Label(title, SectionTitle, Array.Empty()); } public static string FilterNumeric(string input) { if (string.IsNullOrEmpty(input)) { return ""; } string text = ""; bool flag = false; for (int i = 0; i < input.Length; i++) { char c = input[i]; if (c >= '0' && c <= '9') { text += c; } else if (c == '.' && !flag) { text += c; flag = true; } } return text; } public static string FilterInteger(string input) { if (string.IsNullOrEmpty(input)) { return ""; } string text = ""; for (int i = 0; i < input.Length; i++) { char c = input[i]; if (c >= '0' && c <= '9') { text += c; } } return text; } public static void EndSection() { GUILayout.EndVertical(); } private static Texture2D MakeTex(Color col) { //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_000a: 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: Expected O, but got Unknown Texture2D val = new Texture2D(1, 1); val.SetPixel(0, 0, col); val.Apply(); return val; } } public enum UiProfileKind { Default, Compact1080 } public static class UiLayout { public static UiProfileKind CurrentKind { get { if (Screen.width != 1920 || Screen.height != 1080) { return UiProfileKind.Default; } return UiProfileKind.Compact1080; } } public static bool IsCompact => CurrentKind == UiProfileKind.Compact1080; public static Rect MenuRect { get { //IL_0035: 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) if (!IsCompact) { return new Rect(20f, 20f, 840f, 700f); } return new Rect(14f, 14f, 720f, 610f); } } public static Rect KeybindPickerRect { get { //IL_0035: 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) if (!IsCompact) { return new Rect(870f, 20f, 520f, 560f); } return new Rect(746f, 14f, 440f, 500f); } } public static Rect KeybindCaptureRect { get { //IL_0035: 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) if (!IsCompact) { return new Rect(0f, 0f, 340f, 150f); } return new Rect(0f, 0f, 300f, 128f); } } public static int StyleVersion { get; private set; } public static float SidebarWidth { get { if (!IsCompact) { return 150f; } return 122f; } } public static float OverlayKeybindWidth { get { if (!IsCompact) { return 260f; } return 230f; } } public static float OverlayKeybindHeaderHeight { get { if (!IsCompact) { return 24f; } return 20f; } } public static float OverlayKeybindRowHeight { get { if (!IsCompact) { return 18f; } return 16f; } } public static float OverlayKeybindMargin { get { if (!IsCompact) { return 15f; } return 10f; } } public static float OverlayKeybindY { get { if (!IsCompact) { return 38f; } return 32f; } } public static int TitleFont { get { if (!IsCompact) { return 18; } return 15; } } public static int PageTitleFont { get { if (!IsCompact) { return 15; } return 13; } } public static int MutedFont { get { if (!IsCompact) { return 11; } return 10; } } public static int SectionTitleFont { get { if (!IsCompact) { return 12; } return 11; } } public static int ControlFont { get { if (!IsCompact) { return 12; } return 11; } } public static int BoxFont { get { if (!IsCompact) { return 13; } return 12; } } public static void NoteStylesRebuilt() { StyleVersion++; } public static float Space(float normal) { if (!IsCompact) { return normal; } if (normal >= 12f) { return 8f; } if (normal >= 10f) { return 7f; } if (normal >= 8f) { return 6f; } if (normal >= 6f) { return 4f; } if (normal >= 4f) { return 3f; } return normal; } public static GUILayoutOption H(float normal) { return GUILayout.Height(Height(normal)); } public static GUILayoutOption W(float normal) { return GUILayout.Width(Width(normal)); } public static GUILayoutOption MinH(float normal) { return GUILayout.MinHeight(Height(normal)); } public static float Height(float normal) { if (!IsCompact) { return normal; } if (normal >= 420f) { return 300f; } if (normal >= 400f) { return 290f; } if (normal >= 260f) { return 190f; } if (normal >= 245f) { return 185f; } if (normal >= 150f) { return 110f; } if (normal >= 105f) { return 78f; } if (normal >= 40f) { return 34f; } if (normal >= 35f) { return 30f; } if (normal >= 32f) { return 28f; } if (normal >= 30f) { return 26f; } if (normal >= 28f) { return 24f; } if (normal >= 26f) { return 23f; } if (normal >= 24f) { return 21f; } return normal; } public static float Width(float normal) { if (!IsCompact) { return normal; } if (normal >= 330f) { return 270f; } if (normal >= 285f) { return 230f; } if (normal >= 260f) { return 210f; } if (normal >= 220f) { return 178f; } if (normal >= 160f) { return 130f; } if (normal >= 146f) { return 118f; } if (normal >= 145f) { return 118f; } if (normal >= 140f) { return 112f; } if (normal >= 130f) { return 106f; } if (normal >= 120f) { return 98f; } if (normal >= 112f) { return 92f; } if (normal >= 110f) { return 90f; } if (normal >= 105f) { return 86f; } if (normal >= 100f) { return 82f; } if (normal >= 95f) { return 78f; } if (normal >= 92f) { return 76f; } if (normal >= 90f) { return 74f; } if (normal >= 82f) { return 68f; } if (normal >= 80f) { return 66f; } if (normal >= 78f) { return 64f; } if (normal >= 70f) { return 58f; } if (normal >= 65f) { return 54f; } if (normal >= 55f) { return 48f; } if (normal >= 50f) { return 44f; } if (normal >= 45f) { return 40f; } if (normal >= 42f) { return 38f; } if (normal >= 40f) { return 36f; } if (normal >= 34f) { return 30f; } if (normal >= 32f) { return 28f; } if (normal >= 22f) { return 20f; } return normal; } public static RectOffset Offset(int l, int r, int t, int b, int cl, int cr, int ct, int cb) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown if (IsCompact) { return new RectOffset(cl, cr, ct, cb); } return new RectOffset(l, r, t, b); } } } namespace HotDogCheat.UI.Tabs { public class ESPTab { private readonly ESPSettings s; private int subTab; private int settingsSubTab; private Vector2 regularColorsScroll; private Vector2 tasksColorsScroll; public ESPTab(ESPSettings settings) { s = settings; } public void Draw() { if (subTab > 1) { subTab = 0; } GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("ESP", (subTab == 0) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 0; } if (GUILayout.Button("Settings", (subTab == 1) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 1; } GUILayout.EndHorizontal(); GUILayout.Space(10f); switch (subTab) { case 0: DrawESP(); break; case 1: DrawSettings(); break; } } private void DrawESP() { if (!string.IsNullOrEmpty(s.ItemFilter)) { s.ItemFilter = ""; } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); Styles.BeginSection("Player ESP"); s.PlayerEnabled = GUILayout.Toggle(s.PlayerEnabled, "Enable Player ESP", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }); GUILayout.BeginHorizontal(Array.Empty()); s.PlayerBoxes = GUILayout.Toggle(s.PlayerBoxes, "Boxes", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.PlayerNames = GUILayout.Toggle(s.PlayerNames, "Names", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.PlayerHealth = GUILayout.Toggle(s.PlayerHealth, "Health", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.PlayerDistance = GUILayout.Toggle(s.PlayerDistance, "Distance", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.PlayerTracers = GUILayout.Toggle(s.PlayerTracers, "Tracers", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); GUILayout.EndHorizontal(); s.PlayerSkeleton = GUILayout.Toggle(s.PlayerSkeleton, "Skeleton", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); Styles.EndSection(); Styles.BeginSection("NPC ESP"); s.NpcEnabled = GUILayout.Toggle(s.NpcEnabled, "Enable NPC ESP", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }); GUILayout.BeginHorizontal(Array.Empty()); s.NpcBob = GUILayout.Toggle(s.NpcBob, "Bob", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.NpcBoxes = GUILayout.Toggle(s.NpcBoxes, "Boxes", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.NpcNames = GUILayout.Toggle(s.NpcNames, "Names", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.NpcDistance = GUILayout.Toggle(s.NpcDistance, "Distance", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.NpcTracers = GUILayout.Toggle(s.NpcTracers, "Tracers", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); GUILayout.EndHorizontal(); s.NpcSkeleton = GUILayout.Toggle(s.NpcSkeleton, "Skeleton (Human)", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); Styles.EndSection(); Styles.BeginSection("Enemy AI"); GUILayout.BeginHorizontal(Array.Empty()); s.NpcHuman = GUILayout.Toggle(s.NpcHuman, "Human", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcSpider = GUILayout.Toggle(s.NpcSpider, "Spider", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.NpcCat = GUILayout.Toggle(s.NpcCat, "Cat", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcMole = GUILayout.Toggle(s.NpcMole, "Mole", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcVacuum = GUILayout.Toggle(s.NpcVacuum, "Vacuum", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.NpcRedcap = GUILayout.Toggle(s.NpcRedcap, "Redcap", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcRat = GUILayout.Toggle(s.NpcRat, "Rat", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcRoach = GUILayout.Toggle(s.NpcRoach, "Roach", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.NpcBoar = GUILayout.Toggle(s.NpcBoar, "Boar", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcDog = GUILayout.Toggle(s.NpcDog, "Dog", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcBibi = GUILayout.Toggle(s.NpcBibi, "Bibi", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.NpcBeehive = GUILayout.Toggle(s.NpcBeehive, "Beehive", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcFairy = GUILayout.Toggle(s.NpcFairy, "Fairy", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.NpcJonathan = GUILayout.Toggle(s.NpcJonathan, "Jonathan", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); s.NpcSealman = GUILayout.Toggle(s.NpcSealman, "Sealman", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(25f) }); GUILayout.EndHorizontal(); Styles.EndSection(); GUILayout.EndVertical(); GUILayout.Space(12f); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); Styles.BeginSection("Item ESP"); s.ItemEnabled = GUILayout.Toggle(s.ItemEnabled, "Enable Item ESP", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }); GUILayout.BeginHorizontal(Array.Empty()); s.ItemNames = GUILayout.Toggle(s.ItemNames, "Names", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.ItemDistance = GUILayout.Toggle(s.ItemDistance, "Distance", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); s.ItemTracers = GUILayout.Toggle(s.ItemTracers, "Tracers", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.ItemFilterWeaponsOnly = GUILayout.Toggle(s.ItemFilterWeaponsOnly, "Weapons Only", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Smart Tasks"); s.TaskEnabled = GUILayout.Toggle(s.TaskEnabled, "Enable Smart Tasks ESP", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }); GUILayout.BeginHorizontal(Array.Empty()); s.TaskNames = GUILayout.Toggle(s.TaskNames, "Names", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.TaskDistance = GUILayout.Toggle(s.TaskDistance, "Distance", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); s.TaskTracers = GUILayout.Toggle(s.TaskTracers, "Tracers", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Keybinds UI"); s.ShowKeybindsUi = GUILayout.Toggle(s.ShowKeybindsUi, "Show Keybinds UI", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(28f) }); s.KeybindsUiRightSide = GUILayout.Toggle(s.KeybindsUiRightSide, s.KeybindsUiRightSide ? "Top Right" : "Top Left", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(26f) }); Styles.EndSection(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); } private void DrawSettings() { GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("General", (settingsSubTab == 0) ? Styles.TabActive : Styles.Tab, Array.Empty())) { settingsSubTab = 0; } if (GUILayout.Button("ESP Colors", (settingsSubTab == 1) ? Styles.TabActive : Styles.Tab, Array.Empty())) { settingsSubTab = 1; } if (GUILayout.Button("Tasks Colors", (settingsSubTab == 2) ? Styles.TabActive : Styles.Tab, Array.Empty())) { settingsSubTab = 2; } GUILayout.EndHorizontal(); GUILayout.Space(10f); switch (settingsSubTab) { case 0: DrawSettingsGeneral(); break; case 1: DrawRegularColors(); break; case 2: DrawTasksColors(); break; } } private void DrawSettingsGeneral() { Styles.BeginSection("Distance"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Max Distance: {s.MaxDistance:F0}m", Styles.Label, Array.Empty()); s.MaxDistance = GUILayout.HorizontalSlider(s.MaxDistance, 10f, 500f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(200f) }); GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Scan Intervals"); GUILayout.Label("Scan Intervals:", Styles.Label, Array.Empty()); IntervalSlider("Players", ref s.IntervalPlayers, 0.05f, 0.5f, "F2"); IntervalSlider("NPCs/AI", ref s.IntervalNpcs, 0.1f, 0.5f, "F2"); IntervalSlider("Items", ref s.IntervalItems, 1f, 10f, "F1"); IntervalSlider("Cabinets", ref s.IntervalCabinets, 2f, 15f, "F1"); IntervalSlider("World", ref s.IntervalWorld, 2f, 15f, "F1"); IntervalSlider("Tasks", ref s.IntervalTasks, 0.1f, 1f, "F2"); Styles.EndSection(); Styles.BeginSection("Config"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Save Config", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { HotDogCheatMod.Instance?.SaveAllConfig(); } if (GUILayout.Button("Reset to Default", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { ResetToDefault(); HotDogCheatMod.Instance?.SaveAllConfig(); HotDogCheatMod.Log("ESP settings reset to default (saved)"); } GUILayout.EndHorizontal(); Styles.EndSection(); } private void DrawRegularColors() { //IL_0002: 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) regularColorsScroll = GUILayout.BeginScrollView(regularColorsScroll, Array.Empty()); Styles.BeginSection("Player ESP"); ColorRow("Other Players", ref s.ColorPlayerOther); ColorRow("Local [YOU]", ref s.ColorPlayerLocal); Styles.EndSection(); Styles.BeginSection("NPC ESP"); ColorRow("Bob", ref s.ColorBob); Styles.EndSection(); Styles.BeginSection("Enemy AI"); ColorRow("Human", ref s.ColorHuman); ColorRow("Spider", ref s.ColorSpider); ColorRow("Cat", ref s.ColorCat); ColorRow("Mole", ref s.ColorMole); ColorRow("Vacuum", ref s.ColorVacuum); ColorRow("Redcap", ref s.ColorRedcap); ColorRow("Rat", ref s.ColorRat); ColorRow("Roach", ref s.ColorRoach); ColorRow("Boar", ref s.ColorBoar); ColorRow("Dog", ref s.ColorDog); ColorRow("Bibi", ref s.ColorBibi); ColorRow("Beehive", ref s.ColorBeehive); ColorRow("Fairy", ref s.ColorFairy); ColorRow("Jonathan", ref s.ColorJonathan); ColorRow("Sealman", ref s.ColorSealman); Styles.EndSection(); Styles.BeginSection("Item ESP"); ColorRow("Items", ref s.ColorItem); ColorRow("Weapons", ref s.ColorWeapon); Styles.EndSection(); Styles.BeginSection("World"); ColorRow("Doors", ref s.ColorDoor); ColorRow("Hatches", ref s.ColorHatch); Styles.EndSection(); GUILayout.EndScrollView(); } private void DrawTasksColors() { //IL_0002: 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) tasksColorsScroll = GUILayout.BeginScrollView(tasksColorsScroll, Array.Empty()); Styles.BeginSection("Task Slot Colors"); ColorRow("Task #1", ref s.ColorTask1); ColorRow("Task #2", ref s.ColorTask2); ColorRow("Task #3", ref s.ColorTask3); ColorRow("Task #4", ref s.ColorTask4); ColorRow("Task #5", ref s.ColorTask5); Styles.EndSection(); Styles.BeginSection("Other"); ColorRow("Generic Task", ref s.ColorTask); ColorRow("Weapons (in tasks)", ref s.ColorWeapon); Styles.EndSection(); GUILayout.EndScrollView(); } private void IntervalSlider(string label, ref float val, float min, float max, string fmt) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(label + ": " + val.ToString(fmt) + "s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(120f) }); val = GUILayout.HorizontalSlider(val, min, max, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(100f) }); GUILayout.EndHorizontal(); } private void ColorRow(string label, ref Color c) { //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(label, Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(90f) }); GUILayout.Label("R", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(12f) }); float num = GUILayout.HorizontalSlider(c.r, 0f, 1f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); GUILayout.Label("G", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(12f) }); float num2 = GUILayout.HorizontalSlider(c.g, 0f, 1f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); GUILayout.Label("B", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(12f) }); float num3 = GUILayout.HorizontalSlider(c.b, 0f, 1f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(50f) }); c = new Color(num, num2, num3, 1f); Color backgroundColor = GUI.backgroundColor; GUI.backgroundColor = c; GUILayout.Box("", (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(22f), GUILayout.Height(18f) }); GUI.backgroundColor = backgroundColor; GUILayout.EndHorizontal(); } private void ResetToDefault() { s.ResetToDefaults(); } } public class FreeCamTab { private readonly FeatureManager features; private Vector2 scrollPos; public FreeCamTab(FeatureManager features) { this.features = features; } public void Draw() { //IL_0002: 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) scrollPos = GUILayout.BeginScrollView(scrollPos, Array.Empty()); Styles.BeginSection("FreeCam"); if (GUILayout.Button(features.FreeCam.Enabled ? "[ACTIVE] Toggle FreeCam" : "Toggle FreeCam", features.FreeCam.Enabled ? Styles.ButtonActive : Styles.Button, Array.Empty())) { features.FreeCam.Toggle(); } if (features.FreeCam.Enabled) { GUILayout.Label($"Mode: {features.FreeCam.CurrentMode}", Styles.Label, Array.Empty()); GUILayout.Label("Mouse wheel changes mode while FreeCam is active", Styles.Label, Array.Empty()); } Styles.EndSection(); Styles.BeginSection("Base Settings"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Move Speed: {features.FreeCam.MoveSpeed:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.MoveSpeed = GUILayout.HorizontalSlider(features.FreeCam.MoveSpeed, 5f, 150f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Camera Sens: {features.FreeCam.LookSensitivity:F2}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.LookSensitivity = GUILayout.HorizontalSlider(features.FreeCam.LookSensitivity, 0.02f, 1.5f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Black Hole"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Strength: {features.FreeCam.BlackHoleStrength:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.BlackHoleStrength = GUILayout.HorizontalSlider(features.FreeCam.BlackHoleStrength, 5f, 300f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Radius: {features.FreeCam.BlackHoleRadius:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.BlackHoleRadius = GUILayout.HorizontalSlider(features.FreeCam.BlackHoleRadius, 2f, 80f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Interact Grab"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Strength: {features.FreeCam.InteractGrabStrength:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.InteractGrabStrength = GUILayout.HorizontalSlider(features.FreeCam.InteractGrabStrength, 1f, 5f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Knife Throw"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Throw Rate: {features.FreeCam.KnifeThrowRate:F0}/s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.KnifeThrowRate = GUILayout.HorizontalSlider(features.FreeCam.KnifeThrowRate, 1f, 30f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Throw Power: {features.FreeCam.KnifeThrowPower:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.KnifeThrowPower = GUILayout.HorizontalSlider(features.FreeCam.KnifeThrowPower, 10f, 200f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Despawn: {features.FreeCam.KnifeDespawnTime:F0}s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.KnifeDespawnTime = GUILayout.HorizontalSlider(features.FreeCam.KnifeDespawnTime, 1f, 60f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Gun"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Cooldown: {features.FreeCam.GunCooldownTime:F2}s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.GunCooldownTime = GUILayout.HorizontalSlider(features.FreeCam.GunCooldownTime, 0.01f, 2f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); features.FreeCam.GunRapidFire = GUILayout.Toggle(features.FreeCam.GunRapidFire, "Rapid Fire (Hold Left Click)", Styles.Toggle, Array.Empty()); if (features.FreeCam.GunRapidFire) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Fire Rate: {features.FreeCam.GunRapidFireRate:F0}/s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.GunRapidFireRate = GUILayout.HorizontalSlider(features.FreeCam.GunRapidFireRate, 1f, 30f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); } Styles.EndSection(); Styles.BeginSection("RPG"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Cooldown: {features.FreeCam.RpgCooldownTime:F2}s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.RpgCooldownTime = GUILayout.HorizontalSlider(features.FreeCam.RpgCooldownTime, 0.01f, 2f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); features.FreeCam.RpgRapidFire = GUILayout.Toggle(features.FreeCam.RpgRapidFire, "Rapid Fire (Hold Left Click)", Styles.Toggle, Array.Empty()); if (features.FreeCam.RpgRapidFire) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Fire Rate: {features.FreeCam.RpgRapidFireRate:F0}/s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.RpgRapidFireRate = GUILayout.HorizontalSlider(features.FreeCam.RpgRapidFireRate, 1f, 30f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Speed: {features.FreeCam.RpgProjectileSpeed:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.RpgProjectileSpeed = GUILayout.HorizontalSlider(features.FreeCam.RpgProjectileSpeed, 10f, 200f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); features.FreeCam.RpgAccurate = GUILayout.Toggle(features.FreeCam.RpgAccurate, "Dead Straight (No Gravity/Drift)", Styles.Toggle, Array.Empty()); Styles.EndSection(); Styles.BeginSection("Shotgun"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Cooldown: {features.FreeCam.ShotgunCooldownTime:F2}s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.ShotgunCooldownTime = GUILayout.HorizontalSlider(features.FreeCam.ShotgunCooldownTime, 0.01f, 2f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); features.FreeCam.ShotgunRapidFire = GUILayout.Toggle(features.FreeCam.ShotgunRapidFire, "Rapid Fire (Hold Left Click)", Styles.Toggle, Array.Empty()); if (features.FreeCam.ShotgunRapidFire) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Fire Rate: {features.FreeCam.ShotgunRapidFireRate:F0}/s", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(160f) }); features.FreeCam.ShotgunRapidFireRate = GUILayout.HorizontalSlider(features.FreeCam.ShotgunRapidFireRate, 1f, 30f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Width(260f) }); GUILayout.EndHorizontal(); } Styles.EndSection(); Styles.BeginSection("Config"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Save FreeCam Settings", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { HotDogCheatMod.Instance?.SaveAllConfig(); HotDogCheatMod.Log("FreeCam settings saved"); } if (GUILayout.Button("Reset FreeCam", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(35f) })) { features.FreeCam.MoveSpeed = 20f; features.FreeCam.LookSensitivity = 0.15f; features.FreeCam.BlackHoleStrength = 45f; features.FreeCam.BlackHoleRadius = 14f; features.FreeCam.InteractGrabStrength = 1f; features.FreeCam.GunCooldownTime = 0.4f; features.FreeCam.GunRapidFire = false; features.FreeCam.GunRapidFireRate = 8f; features.FreeCam.RpgCooldownTime = 1f; features.FreeCam.RpgRapidFire = false; features.FreeCam.RpgRapidFireRate = 4f; features.FreeCam.RpgProjectileSpeed = 40f; features.FreeCam.RpgAccurate = true; features.FreeCam.ShotgunCooldownTime = 0.8f; features.FreeCam.ShotgunRapidFire = false; features.FreeCam.ShotgunRapidFireRate = 6f; features.FreeCam.KnifeThrowRate = 4f; features.FreeCam.KnifeThrowPower = 30f; features.FreeCam.KnifeDespawnTime = 7f; } GUILayout.EndHorizontal(); Styles.EndSection(); GUILayout.EndScrollView(); } } public class GameTab { private readonly FeatureManager features; private int subTab; private Vector2 scrollPos; private int selectedTaskIndex = -1; private Vector2 taskScrollPos; private PlayerTaskManager cachedTaskManager; private int selectedCarIndex; private bool speedSliderAll; private Vector2 carScrollPos; private static GUIStyle gameSection; private static GUIStyle gameTitle; private static int gameStyleVersion = -1; private string timeMinutesInput = "5"; private float timeMinutes = 5f; private string respawnsPerRoundInput = "3"; private int respawnsPerRound = 3; private string singlePlayerRespawnsInput = "1"; private int singlePlayerRespawns = 1; private static FieldInfo _fCurrentGameTime; private static FieldInfo _fLandMineGrenade; private static MethodInfo _mMicrowaveExplode; private static FieldInfo _fMaxRespawnsPerRound; private static FieldInfo _fMaxRespawnsPerRoundSinglePlayer; private const float MAX_GAME_MINUTES = 15f; public GameTab(FeatureManager features) { this.features = features; } public void Draw() { GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Game", (subTab == 0) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 0; } if (GUILayout.Button("World", (subTab == 1) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 1; } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(10f)); switch (subTab) { case 0: DrawGame(); break; case 1: DrawWorld(); break; } } private void DrawGame() { //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_0016: Unknown result type (might be due to invalid IL or missing references) EnsureGameStyles(); scrollPos = GUILayout.BeginScrollView(scrollPos, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); DrawMapManager(); GUILayout.Space(UiLayout.Space(10f)); DrawTasks(); GUILayout.EndHorizontal(); DrawRCCars(); GUILayout.EndScrollView(); } private void DrawMapManager() { MapManagerFeature mapManager = features.MapManager; IReadOnlyList maps = mapManager.GetMaps(); BeginGameSection("Map Manager"); GUILayout.Label("Next: " + mapManager.GetCurrentNextMapName(), Styles.Box, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) }); GUILayout.Label(mapManager.GetDisplayedOptionsText(), Styles.MutedLabel, Array.Empty()); if (maps.Count == 0) { GUILayout.Label("No maps found yet. This usually needs the lobby/game progression to be loaded.", Styles.MutedLabel, Array.Empty()); if (GUILayout.Button("Refresh Maps", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { mapManager.GetMaps(); } EndGameSection(); return; } for (int i = 0; i < maps.Count; i++) { string mapLabel = MapManagerFeature.GetMapLabel(maps[i], i); if (GUILayout.Toggle(mapManager.SelectedMapIndex == i, mapLabel, Styles.Selector, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { mapManager.SelectedMapIndex = i; } } GUILayout.Space(UiLayout.Space(3f)); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Set Next", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { mapManager.SetNextMap(mapManager.SelectedMapIndex); } if (GUILayout.Button("Refresh", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.H(28f), UiLayout.W(92f) })) { mapManager.GetMaps(); } GUILayout.EndHorizontal(); EndGameSection(); } private void DrawTasks() { //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) BeginGameSection("Tasks"); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { GUILayout.Label("Local player not found.", Styles.Label, Array.Empty()); EndGameSection(); return; } PlayerTaskManager val = FindTaskManager(localPlayer); if ((Object)(object)val == (Object)null || val.AllTasks == null || val.AllTasks.Count == 0) { GUILayout.Label("No tasks loaded yet.", Styles.Label, Array.Empty()); if (GUILayout.Button("Refresh", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RefreshTaskCache(localPlayer); } EndGameSection(); return; } ReadOnly currentTasks = val.CurrentTasks; if (currentTasks.Length == 0) { GUILayout.Label("No active tasks.", Styles.Label, Array.Empty()); EndGameSection(); return; } GUILayout.Label($"Active: {currentTasks.Length}", Styles.Label, Array.Empty()); taskScrollPos = GUILayout.BeginScrollView(taskScrollPos, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.Height(Mathf.Min(UiLayout.Height(150f), (float)currentTasks.Length * UiLayout.Height(28f))) }); for (int i = 0; i < currentTasks.Length; i++) { TaskInstance val2 = currentTasks[i]; string text = "Unknown Task"; if (val2.taskIndex >= 0 && val2.taskIndex < val.AllTasks.Count && (Object)(object)val.AllTasks[val2.taskIndex] != (Object)null) { text = ((Object)val.AllTasks[val2.taskIndex]).name; } string text2 = ((!val2.wasCompleted) ? $" [{val2.currentCompletionCount}/{val2.maxCompletionCount}]" : " ✓ DONE"); string text3 = text + text2; if (GUILayout.Toggle(selectedTaskIndex == i, text3, Styles.Selector, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { selectedTaskIndex = i; } } GUILayout.EndScrollView(); GUILayout.BeginHorizontal(Array.Empty()); bool flag = selectedTaskIndex >= 0 && selectedTaskIndex < currentTasks.Length && !currentTasks[selectedTaskIndex].wasCompleted; if (GUILayout.Button("Complete", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) }) && flag) { ForceCompleteTask(val, selectedTaskIndex); } if (GUILayout.Button("Refresh", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RefreshTaskCache(localPlayer); } int num = CountIncomplete(currentTasks); if (num > 0 && GUILayout.Button($"All ({num})", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { ForceCompleteAllTasks(val, currentTasks); } GUILayout.EndHorizontal(); EndGameSection(); } private int CountIncomplete(ReadOnly current) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) int num = 0; for (int i = 0; i < current.Length; i++) { if (!current[i].wasCompleted) { num++; } } return num; } private void ForceCompleteAllTasks(PlayerTaskManager tm, ReadOnly current) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) int num = 0; for (int i = 0; i < current.Length; i++) { if (!current[i].wasCompleted) { ForceCompleteTask(tm, i); num++; } } HotDogCheatMod.Log($"Completed {num} tasks"); } private void ForceCompleteTask(PlayerTaskManager tm, int index) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) try { MethodInfo method = typeof(PlayerTaskManager).GetMethod("DebugCompleteTask", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (method != null) { method.Invoke(tm, new object[1] { index }); TaskInstance val = tm.CurrentTasks[index]; string name = ((Object)tm.AllTasks[val.taskIndex]).name; HotDogCheatMod.Log("Force-completed task: " + name); } else { HotDogCheatMod.LogError("DebugCompleteTask method not found"); } } catch (Exception ex) { HotDogCheatMod.LogError("Failed to complete task: " + ex.Message); } } private PlayerTaskManager FindTaskManager(PlayerNetworking local) { if ((Object)(object)cachedTaskManager != (Object)null && (Object)(object)((Component)cachedTaskManager).gameObject != (Object)null) { return cachedTaskManager; } cachedTaskManager = ((Component)local).GetComponent() ?? ((Component)local).GetComponentInChildren(true) ?? ((Component)local).GetComponentInParent() ?? Object.FindFirstObjectByType(); return cachedTaskManager; } private void RefreshTaskCache(PlayerNetworking local) { cachedTaskManager = null; selectedTaskIndex = -1; FindTaskManager(local); } private static void EnsureGameStyles() { //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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004e: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_007a: Expected O, but got Unknown if (gameSection == null || gameStyleVersion != UiLayout.StyleVersion) { gameSection = new GUIStyle(Styles.Section) { padding = UiLayout.Offset(7, 7, 5, 6, 5, 5, 4, 5), margin = UiLayout.Offset(0, 0, 0, 6, 0, 0, 0, 4) }; gameTitle = new GUIStyle(Styles.SectionTitle) { padding = UiLayout.Offset(4, 4, 0, 2, 3, 3, 0, 1), margin = new RectOffset(0, 0, 0, 1) }; gameStyleVersion = UiLayout.StyleVersion; } } private static void BeginGameSection(string title) { EnsureGameStyles(); GUILayout.BeginVertical(gameSection, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.Label(title, gameTitle, Array.Empty()); } private static void EndGameSection() { GUILayout.EndVertical(); } private void DrawRCCars() { //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) List allRCCars = PlayerHelper.GetAllRCCars(); if (selectedCarIndex >= allRCCars.Count) { selectedCarIndex = Mathf.Max(0, allRCCars.Count - 1); } GUILayout.BeginHorizontal((GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.MinH(245f), GUILayout.ExpandHeight(true) }); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(285f), GUILayout.ExpandHeight(true) }); BeginGameSection("RC Cars"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Total: {allRCCars.Count}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("Spawn", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(78f), UiLayout.H(26f) })) { SpawnRCCar(); } GUILayout.EndHorizontal(); if (allRCCars.Count == 0) { GUILayout.Label("No RC Cars in scene", Styles.MutedLabel, Array.Empty()); } else { carScrollPos = GUILayout.BeginScrollView(carScrollPos, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.MinH(105f), GUILayout.ExpandHeight(true) }); for (int i = 0; i < allRCCars.Count; i++) { string arg = (((Object)(object)((PlayerSittable)allRCCars[i]).CurrentSitter != (Object)null) ? (" - " + PlayerHelper.GetPlayerName(((PlayerSittable)allRCCars[i]).CurrentSitter)) : " - Empty"); if (GUILayout.Toggle(selectedCarIndex == i, $"#{i + 1}{arg}", Styles.Selector, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { selectedCarIndex = i; } } GUILayout.EndScrollView(); } EndGameSection(); BeginGameSection("Mass"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { TeleportAllCarsToMe(allRCCars); } if (GUILayout.Button("Flip All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { FlipAllCars(allRCCars); } GUILayout.EndHorizontal(); speedSliderAll = GUILayout.Toggle(speedSliderAll, "speed-slider-all", Styles.Toggle, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) }); if (GUILayout.Button("Delete All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RCCarActions.DeleteAll(); } EndGameSection(); GUILayout.EndVertical(); GUILayout.Space(UiLayout.Space(10f)); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true) }); if (selectedCarIndex < allRCCars.Count) { RCCar val = allRCCars[selectedCarIndex]; BeginGameSection($"Selected: RC Car #{selectedCarIndex + 1}"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RCCarActions.TeleportToMe(val); } if (GUILayout.Button("TP to Car", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RCCarActions.TeleportMeTo(val); } GUILayout.EndHorizontal(); if (GUILayout.Button("Flip", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RCCarActions.Flip(val); } GUILayout.Space(UiLayout.Space(3f)); float speedMultiplier = RCCarActions.GetSpeedMultiplier(val); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Speed: {speedMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(95f) }); float num = GUILayout.HorizontalSlider(speedMultiplier, 1f, 10f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (GUILayout.Button("1x", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(42f), UiLayout.H(26f) })) { num = 1f; } GUILayout.EndHorizontal(); if (!Mathf.Approximately(num, speedMultiplier)) { if (speedSliderAll) { SetSpeedMultiplierForAll(allRCCars, num); } else { RCCarActions.SetSpeedMultiplier(val, num); } } GUILayout.Space(UiLayout.Space(3f)); if ((Object)(object)((PlayerSittable)val).CurrentSitter != (Object)null) { if (GUILayout.Button("Eject Driver", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RCCarActions.EjectDriver(val); } else { GUILayout.Label("Driver: Empty", Styles.MutedLabel, Array.Empty()); } } if (GUILayout.Button("Delete Car", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { RCCarActions.Delete(val); } EndGameSection(); } else { BeginGameSection("Selected"); GUILayout.Label("Spawn or select an RC car.", Styles.MutedLabel, Array.Empty()); EndGameSection(); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); } private void SpawnRCCar() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0083: Unknown result type (might be due to invalid IL or missing references) try { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } GameObject val = null; RCCar[] array = Resources.FindObjectsOfTypeAll(); foreach (RCCar val2 in array) { if ((Object)(object)val2 != (Object)null) { val = ((Component)val2).gameObject; break; } } if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("No RC Car prefab found"); return; } Vector3 val3 = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; NetworkObject componentInChildren = Object.Instantiate(val, val3, Quaternion.identity).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.Spawn(false); } HotDogCheatMod.Log("Spawned RC Car"); } catch (Exception ex) { HotDogCheatMod.LogError("RC Spawn failed: " + ex.Message); } } private static void TeleportAllCarsToMe(List cars) { foreach (RCCar car in cars) { RCCarActions.TeleportToMe(car); } } private static void FlipAllCars(List cars) { foreach (RCCar car in cars) { RCCarActions.Flip(car); } } private static void SetSpeedMultiplierForAll(List cars, float multiplier) { foreach (RCCar car in cars) { RCCarActions.SetSpeedMultiplier(car, multiplier); } } private void DrawWorld() { //IL_00c0: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) EnsureGameStyles(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); BeginGameSection("Doors & Explosives"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Open Doors", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { int num = 0; HashSet hashSet = new HashSet { (Type)30, (Type)31, (Type)26, (Type)27, (Type)28 }; OpenableInteractable[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (OpenableInteractable val in array) { if (!((Object)(object)val == (Object)null) && !val.Unhinged && !hashSet.Contains(((InteractableObject)val).InteractType) && (int)val.State != 0) { try { val.OpenRpc(); num++; } catch { } } } GarageDoor[] array2 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (GarageDoor val2 in array2) { if (!((Object)(object)val2 == (Object)null)) { try { val2.Open(); num++; } catch { } } } HotDogCheatMod.Log($"Opened {num} doors/windows"); } if (GUILayout.Button("Close Doors", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { int num2 = 0; HashSet hashSet2 = new HashSet { (Type)30, (Type)31, (Type)26, (Type)27, (Type)28 }; OpenableInteractable[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (OpenableInteractable val3 in array) { if (!((Object)(object)val3 == (Object)null) && !val3.Unhinged && !hashSet2.Contains(((InteractableObject)val3).InteractType) && (int)val3.State == 0) { try { val3.ToggleRpc(); num2++; } catch { } } } HotDogCheatMod.Log($"Closed {num2} doors/windows"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Explode Grenades", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { int num3 = 0; Grenade[] array3 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (Grenade val4 in array3) { if (!((Object)(object)val4 == (Object)null)) { try { val4.InstantExplodeRpc(); num3++; } catch { } } } HotDogCheatMod.Log($"Exploded {num3} grenades"); } if (GUILayout.Button("Explode Landmines", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { int num4 = 0; if (_fLandMineGrenade == null) { _fLandMineGrenade = typeof(LandMineTrigger).GetField("grenade", BindingFlags.Instance | BindingFlags.NonPublic); } LandMineTrigger[] array4 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (LandMineTrigger val5 in array4) { if ((Object)(object)val5 == (Object)null) { continue; } try { object? obj5 = _fLandMineGrenade?.GetValue(val5); Grenade val6 = (Grenade)((obj5 is Grenade) ? obj5 : null); if ((Object)(object)val6 != (Object)null) { val6.InstantExplodeRpc(); num4++; } } catch { } } HotDogCheatMod.Log($"Exploded {num4} landmines"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Explode Microwaves", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { int num5 = 0; if (_mMicrowaveExplode == null) { _mMicrowaveExplode = typeof(Microwave).GetMethod("Explode", BindingFlags.Instance | BindingFlags.NonPublic); } Microwave[] array5 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (Microwave val7 in array5) { if (!((Object)(object)val7 == (Object)null)) { try { _mMicrowaveExplode?.Invoke(val7, null); num5++; } catch { } } } HotDogCheatMod.Log($"Exploded {num5} microwaves"); } if (GUILayout.Button("Explode All 3", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { int num6 = 0; int num7 = 0; int num8 = 0; Grenade[] array3 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (Grenade val8 in array3) { if (!((Object)(object)val8 == (Object)null)) { try { val8.InstantExplodeRpc(); num6++; } catch { } } } if (_fLandMineGrenade == null) { _fLandMineGrenade = typeof(LandMineTrigger).GetField("grenade", BindingFlags.Instance | BindingFlags.NonPublic); } LandMineTrigger[] array4 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (LandMineTrigger val9 in array4) { if ((Object)(object)val9 == (Object)null) { continue; } try { object? obj9 = _fLandMineGrenade?.GetValue(val9); Grenade val10 = (Grenade)((obj9 is Grenade) ? obj9 : null); if ((Object)(object)val10 != (Object)null) { val10.InstantExplodeRpc(); num7++; } } catch { } } if (_mMicrowaveExplode == null) { _mMicrowaveExplode = typeof(Microwave).GetMethod("Explode", BindingFlags.Instance | BindingFlags.NonPublic); } Microwave[] array5 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (Microwave val11 in array5) { if (!((Object)(object)val11 == (Object)null)) { try { _mMicrowaveExplode?.Invoke(val11, null); num8++; } catch { } } } HotDogCheatMod.Log($"Exploded All 3 -> {num6} grenades + {num7} landmines + {num8} microwaves"); } GUILayout.EndHorizontal(); EndGameSection(); BeginGameSection("Game Timer"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Remaining (1-15 min):", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); string text = GUILayout.TextField(timeMinutesInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(45f) }); if (text != timeMinutesInput) { timeMinutesInput = Styles.FilterNumeric(text); if (float.TryParse(timeMinutesInput, out var result) && result > 0f) { timeMinutes = Mathf.Clamp(result, 1f, 15f); } } if (GUILayout.Button("Set", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(40f), UiLayout.H(28f) })) { SetGameTimer(timeMinutes); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("1m", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { SetGameTimer(1f); } if (GUILayout.Button("5m", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { SetGameTimer(5f); } if (GUILayout.Button("10m", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { SetGameTimer(10f); } if (GUILayout.Button("15m", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { SetGameTimer(15f); } GUILayout.EndHorizontal(); EndGameSection(); GUILayout.EndVertical(); GUILayout.Space(UiLayout.Space(10f)); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); BeginGameSection("Gnomeium"); GUILayout.Label("Multiplies gnomeium earned from tasks at round end.", Styles.Label, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Multiplier: {features.GnomeiumMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(100f) }); features.GnomeiumMultiplier = GUILayout.HorizontalSlider(features.GnomeiumMultiplier, 1f, 20f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); if (!Mathf.Approximately(features.GnomeiumMultiplier, 1f)) { GUILayout.Label($"Active: {features.GnomeiumMultiplier:F0}x more gnomeium per task", Styles.MutedLabel, Array.Empty()); } EndGameSection(); BeginGameSection("Respawns"); GUILayout.Label("Set respawn limits per round.", Styles.Label, Array.Empty()); GUILayout.Space(UiLayout.Space(3f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Per Round:", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(80f) }); string text2 = GUILayout.TextField(respawnsPerRoundInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(40f) }); if (text2 != respawnsPerRoundInput) { respawnsPerRoundInput = Styles.FilterNumeric(text2); if (int.TryParse(respawnsPerRoundInput, out var result2) && result2 >= 1 && result2 <= 99) { respawnsPerRound = result2; } } if (GUILayout.Button("Set", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(40f), UiLayout.H(26f) })) { SetRespawnsPerRound(respawnsPerRound); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Solo:", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(80f) }); string text3 = GUILayout.TextField(singlePlayerRespawnsInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(40f) }); if (text3 != singlePlayerRespawnsInput) { singlePlayerRespawnsInput = Styles.FilterNumeric(text3); if (int.TryParse(singlePlayerRespawnsInput, out var result3) && result3 >= 1 && result3 <= 99) { singlePlayerRespawns = result3; } } if (GUILayout.Button("Set", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(40f), UiLayout.H(26f) })) { SetSinglePlayerRespawns(singlePlayerRespawns); } GUILayout.EndHorizontal(); EndGameSection(); BeginGameSection("Karma"); GameProgressionManager instance = GameProgressionManager.Instance; bool flag = (Object)(object)NetworkManager.Singleton != (Object)null && NetworkManager.Singleton.IsServer; bool flag2 = flag && (Object)(object)instance != (Object)null; float num9 = (((Object)(object)instance != (Object)null) ? instance.Karma : 0f); float num10 = Mathf.Round(num9 * 100f) / 100f; GUILayout.Label($"Current: {num9:F2} / 1.00", Styles.Label, Array.Empty()); GUI.enabled = flag; try { float num11 = GUILayout.HorizontalSlider(num10, 0f, 1f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); if (flag2 && !Mathf.Approximately(num11, num10)) { SetKarmaFromMod(instance, Mathf.Round(num11 * 100f) / 100f); } GUILayout.BeginHorizontal(Array.Empty()); try { if (GUILayout.Button("Max", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) }) && flag2) { SetKarmaFromMod(instance, 1f); } if (GUILayout.Button("Zero", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) }) && flag2) { SetKarmaFromMod(instance, 0f); } } finally { GUILayout.EndHorizontal(); } } finally { GUI.enabled = true; } bool flag3 = GUILayout.Toggle(features.SuppressKarmaSpikeFeedback, "Mute Karma Spike Audio", Styles.Toggle, Array.Empty()); if (flag3 != features.SuppressKarmaSpikeFeedback) { features.SuppressKarmaSpikeFeedback = flag3; } if (!flag) { GUILayout.Label("Note: changing karma only takes effect on the host.", Styles.MutedLabel, Array.Empty()); } EndGameSection(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); } private void SetGameTimer(float remainingMinutes) { remainingMinutes = Mathf.Clamp(remainingMinutes, 1f, 15f); GameProgressionManager instance = GameProgressionManager.Instance; if ((Object)(object)instance == (Object)null) { HotDogCheatMod.LogError("GameProgressionManager not found!"); return; } if (_fCurrentGameTime == null) { _fCurrentGameTime = typeof(GameProgressionManager).GetField("n_currentGameTime", BindingFlags.Instance | BindingFlags.NonPublic); } if (_fCurrentGameTime == null) { HotDogCheatMod.LogError("n_currentGameTime field not found!"); } else if (!(_fCurrentGameTime.GetValue(instance) is NetworkVariable val)) { HotDogCheatMod.LogError("n_currentGameTime NetworkVariable not found!"); } else { HotDogCheatMod.Log(string.Format(arg1: (val.Value = (15f - remainingMinutes) * 60f) / 60f, format: "Game timer -> {0:F0}m remaining (elapsed={1:F0}m)", arg0: remainingMinutes)); } } private static void SetKarmaFromMod(GameProgressionManager gpm, float value) { if ((Object)(object)gpm == (Object)null) { return; } Patches.KarmaWriteFromMod = true; try { gpm.Karma = value; } finally { Patches.KarmaWriteFromMod = false; } } private void SetRespawnsPerRound(int value) { MedicalTerminal val = Object.FindFirstObjectByType(); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("MedicalTerminal not found!"); return; } BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; if (_fMaxRespawnsPerRound == null) { _fMaxRespawnsPerRound = typeof(MedicalTerminal).GetField("maxRespawnsPerRound", bindingAttr); } if (_fMaxRespawnsPerRound != null) { _fMaxRespawnsPerRound.SetValue(val, value); HotDogCheatMod.Log($"Respawns Per Round -> {value}"); } else { HotDogCheatMod.LogError("maxRespawnsPerRound field not found!"); } } private void SetSinglePlayerRespawns(int value) { MedicalTerminal val = Object.FindFirstObjectByType(); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("MedicalTerminal not found!"); return; } BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; if (_fMaxRespawnsPerRoundSinglePlayer == null) { _fMaxRespawnsPerRoundSinglePlayer = typeof(MedicalTerminal).GetField("maxRespawnsPerRoundSinglePlayer", bindingAttr); } if (_fMaxRespawnsPerRoundSinglePlayer != null) { _fMaxRespawnsPerRoundSinglePlayer.SetValue(val, value); HotDogCheatMod.Log($"Single Player Respawns -> {value}"); } else { HotDogCheatMod.LogError("maxRespawnsPerRoundSinglePlayer field not found!"); } } } public class KeybindsTab { private Vector2 pageScroll; private Vector2 appliedScroll; public KeybindsTab(FeatureManager features) { } public void Draw() { //IL_0002: 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) pageScroll = GUILayout.BeginScrollView(pageScroll, Array.Empty()); DrawUserKeybinds(); DrawHardcodedKeybinds(); GUILayout.EndScrollView(); } private void DrawUserKeybinds() { //IL_0082: 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) //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) Styles.BeginSection("User Keybinds"); KeybindManager instance = KeybindManager.Instance; if (instance == null) { GUILayout.Label("Keybind manager not ready.", Styles.MutedLabel, Array.Empty()); Styles.EndSection(); return; } List> list = new List>(instance.AppliedBindings); list.Sort(delegate(KeyValuePair a, KeyValuePair b) { int num = string.Compare(a.Key.Category, b.Key.Category, StringComparison.Ordinal); return (num == 0) ? string.Compare(a.Key.Label, b.Key.Label, StringComparison.Ordinal) : num; }); if (list.Count == 0) { GUILayout.Label("No custom keybinds set. Press F10 while the menu is open to add one.", Styles.MutedLabel, Array.Empty()); Styles.EndSection(); return; } appliedScroll = GUILayout.BeginScrollView(appliedScroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(260f) }); string text = null; foreach (KeyValuePair item in list) { if (text != item.Key.Category) { GUILayout.Space(UiLayout.Space(4f)); GUILayout.Label(item.Key.Category, Styles.Box, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(24f) }); text = item.Key.Category; } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(((object)item.Value/*cast due to .constrained prefix*/).ToString(), Styles.Box, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(105f), UiLayout.H(26f) }); GUILayout.Label(item.Key.Label, Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), UiLayout.H(26f) }); if (GUILayout.Button("X", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(34f), UiLayout.H(26f) })) { instance.Unbind(item.Key.Id); } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); Styles.EndSection(); } private void DrawHardcodedKeybinds() { Styles.BeginSection("Hardcoded Controls"); DrawControlLine("Menu", "Insert/F2", "Open / close menu"); DrawControlLine("Menu", "F10", "Open custom keybind picker while menu is open"); DrawControlLine("Fly Mode", "W/A/S/D", "Move"); DrawControlLine("Fly Mode", "Space / Left Shift", "Up / down"); DrawControlLine("Fly Mode", "Left Ctrl", "Move faster"); Styles.EndSection(); Styles.BeginSection("FreeCam Controls"); DrawControlLine("Camera", "Mouse", "Look around"); DrawControlLine("Camera", "W/A/S/D", "Move"); DrawControlLine("Camera", "Space / Left Shift", "Up / down"); DrawControlLine("Camera", "Left Ctrl", "Move faster"); DrawControlLine("Modes", "Mouse Wheel", "Cycle FreeCam mode"); DrawControlLine("Spawner", "Q", "Toggle spawner mode"); DrawControlLine("Spawner", "Mouse Wheel / LMB", "Select object / spawn"); DrawControlLine("Weapons", "LMB", "Shoot or throw in gun, shotgun, RPG, and knife modes"); DrawControlLine("Weapons", "Middle Mouse", "Toggle rapid fire for gun, shotgun, and RPG"); DrawControlLine("Teleport", "LMB", "Teleport player to crosshair hit"); DrawControlLine("Interact", "E", "Use hovered interactable"); DrawControlLine("Interact", "LMB hold / release", "Grab and drop physics objects"); DrawControlLine("Knife", "Up / Down", "Adjust throw power"); DrawControlLine("Black Hole", "LMB hold", "Pull stealable objects"); DrawControlLine("Black Hole", "Up / Down", "Strength"); DrawControlLine("Black Hole", "Left / Right", "Radius"); Styles.EndSection(); } private static void DrawControlLine(string group, string keys, string action) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label(group, Styles.MutedLabel, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(90f), UiLayout.H(24f) }); GUILayout.Label(keys, Styles.Box, (GUILayoutOption[])(object)new GUILayoutOption[2] { UiLayout.W(145f), UiLayout.H(24f) }); GUILayout.Label(action, Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.ExpandWidth(true), UiLayout.H(24f) }); GUILayout.EndHorizontal(); } } public class NPCsTab { private readonly FeatureManager features; private Vector2 scrollPos; private Dictionary npcCache; private float lastNpcRefresh; private static GUIStyle npcSection; private static GUIStyle npcTitle; private static int npcStyleVersion = -1; public NPCsTab(FeatureManager features) { this.features = features; } public void Draw() { DrawNPCs(); } private void DrawNPCs() { //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_0016: Unknown result type (might be due to invalid IL or missing references) EnsureNpcStyles(); scrollPos = GUILayout.BeginScrollView(scrollPos, Array.Empty()); if (npcCache == null || Time.unscaledTime - lastNpcRefresh > 1f) { RefreshNPCDetections(); } DrawMassSection(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); DrawBobSection(); if (Cached("Spider")) { DrawSpiderSection(); } if (Cached("Mole")) { DrawMoleSection(); } if (Cached("Redcap")) { DrawAISection("Redcap"); } if (Cached("Boar")) { DrawAISection("Boar"); } if (Cached("Bibi")) { DrawBibiSection(); } if (Cached("Fairy")) { DrawAISection("Fairy"); } GUILayout.EndVertical(); GUILayout.Space(UiLayout.Space(10f)); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); DrawHumanSection(); if (Cached("Cat")) { DrawCatSection(); } if (Cached("Vacuum")) { DrawVacuumSection(); } if (Cached("Rat")) { DrawAISection("Rat"); } if (Cached("Roach")) { DrawAISection("Roach"); } if (Cached("Pitbull")) { DrawAISection("Pitbull", "Dog"); } if (Cached("Beehive")) { DrawBeehiveSection(); } if (Cached("Jonathan")) { DrawAISection("Jonathan"); } if (Cached("Sealman")) { DrawAISection("Sealman"); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.EndScrollView(); } private static void DrawMassSection() { BeginNpcSection("Mass Enemy Control"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Kill All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { int num = 0; GameEntityAI[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (GameEntityAI val in array) { if ((Object)(object)val == (Object)null) { continue; } try { HealthBase component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null && !((GameEntityBase)val).IsDead) { component.Kill(); num++; } } catch { } } HotDogCheatMod.Log($"Killed {num} enemies"); } if (GUILayout.Button("Despawn All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(28f) })) { try { AiDirector val2 = Object.FindFirstObjectByType(); if ((Object)(object)val2 != (Object)null) { val2.DespawnEnemies(); } HotDogCheatMod.Log("Despawned all enemies"); } catch (Exception ex) { HotDogCheatMod.LogError("Despawn failed: " + ex.Message); } } GUILayout.EndHorizontal(); EndNpcSection(); } private bool Cached(string key) { bool value = default(bool); return npcCache != null && npcCache.TryGetValue(key, out value) && value; } private void RefreshNPCDetections() { npcCache = new Dictionary(); lastNpcRefresh = Time.unscaledTime; npcCache["Spider"] = (Object)(object)Object.FindFirstObjectByType() != (Object)null; npcCache["Cat"] = (Object)(object)Object.FindFirstObjectByType() != (Object)null; npcCache["Mole"] = (Object)(object)Object.FindFirstObjectByType() != (Object)null; npcCache["Vacuum"] = (Object)(object)Object.FindFirstObjectByType() != (Object)null; npcCache["Bibi"] = (Object)(object)Object.FindFirstObjectByType() != (Object)null; npcCache["Beehive"] = (Object)(object)Object.FindFirstObjectByType() != (Object)null; npcCache["Redcap"] = (Object)(object)NPCActions.FindAIByName("Redcap") != (Object)null; npcCache["Rat"] = (Object)(object)NPCActions.FindAIByName("Rat") != (Object)null; npcCache["Roach"] = (Object)(object)NPCActions.FindAIByName("Roach") != (Object)null; npcCache["Boar"] = (Object)(object)NPCActions.FindAIByName("Boar") != (Object)null; npcCache["Pitbull"] = (Object)(object)NPCActions.FindAIByName("Pitbull") != (Object)null; npcCache["Fairy"] = (Object)(object)NPCActions.FindAIByName("Fairy") != (Object)null; npcCache["Jonathan"] = (Object)(object)NPCActions.FindAIByName("Jonathan") != (Object)null; npcCache["Sealman"] = (Object)(object)NPCActions.FindSealman() != (Object)null; } private void DrawBobSection() { BeginNpcSection("Bob"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportBobToMe(); } if (GUILayout.Button("TP Away", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportBobAway(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.KillBob(); } if (GUILayout.Button("Drop Item", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.MakeBobDrop(); } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(3f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Speed: {features.BobSpeedMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(82f) }); features.BobSpeedMultiplier = GUILayout.HorizontalSlider(features.BobSpeedMultiplier, 0.1f, 10f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("1x", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(24f) })) { features.BobSpeedMultiplier = 1f; } if (GUILayout.Button("2x", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(24f) })) { features.BobSpeedMultiplier = 2f; } if (GUILayout.Button("5x", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(24f) })) { features.BobSpeedMultiplier = 5f; } if (GUILayout.Button("10x", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(24f) })) { features.BobSpeedMultiplier = 10f; } GUILayout.EndHorizontal(); EndNpcSection(); } private static void DrawHumanSection() { BeginNpcSection("Human"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportHumanToMe(); } if (GUILayout.Button("TP Away", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportHumanAway(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.KillHuman(); } if (GUILayout.Button("Release", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.HumanReleasePlayer(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Drop Weapon", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.HumanDropGun(); } if (GUILayout.Button("Give Weapon", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.HumanGiveRandomWeapon(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Naked", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.MakeHumanNaked(); } if (GUILayout.Button("Calm", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.HumanMakeCalm(); } if (GUILayout.Button("Rage", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.HumanMakeRage(); } GUILayout.EndHorizontal(); EndNpcSection(); } private static void DrawSpiderSection() { BeginNpcSection("Spider"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportSpiderToMe(); } if (GUILayout.Button("TP to Spider", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportMeToSpider(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.KillSpider(); } if (GUILayout.Button("Release", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.SpiderRelease(); } GUILayout.EndHorizontal(); EndNpcSection(); } private static void DrawCatSection() { BeginNpcSection("Cat"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportCatToMe(); } if (GUILayout.Button("Attack Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.CatAttackPlayer(PlayerHelper.GetLocalPlayer()); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Meow", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.SpamCatMeow(); } if (GUILayout.Button("Hiss", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.SpamCatHiss(); } GUILayout.EndHorizontal(); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { CatAiLink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); HotDogCheatMod.Log("Killed Cat"); } } EndNpcSection(); } private static void DrawMoleSection() { BeginNpcSection("Mole"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportMoleToMe(); } if (GUILayout.Button("TP to Mole", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportMeToMole(); } GUILayout.EndHorizontal(); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.KillMole(); } EndNpcSection(); } private static void DrawVacuumSection() { BeginNpcSection("Vacuum"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportVacuumToMe(); } if (GUILayout.Button("TP to Vac", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportMeToVacuum(); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Toggle", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.ToggleVacuum(); } if (GUILayout.Button("Release All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.VacuumReleaseAll(); } GUILayout.EndHorizontal(); EndNpcSection(); } private static void DrawAISection(string name, string display = null) { string text = display ?? name; BeginNpcSection(text); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportEntityToMe(name, text); } if (GUILayout.Button("TP to " + text, Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.TeleportMeToEntity(name, text); } GUILayout.EndHorizontal(); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { NPCActions.KillEntity(name, text); } EndNpcSection(); } private static void DrawBibiSection() { //IL_005d: 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_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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); BeginNpcSection("Bibi"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { Bibi val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported Bibi to you"); } } if (GUILayout.Button("TP to Bibi", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { Bibi val2 = Object.FindFirstObjectByType(); if ((Object)(object)val2 != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((Component)val2).transform.position + Vector3.up * 2f); } } GUILayout.EndHorizontal(); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { Bibi val3 = Object.FindFirstObjectByType(); if ((Object)(object)val3 != (Object)null) { Object.Destroy((Object)(object)((Component)val3).gameObject); HotDogCheatMod.Log("Killed Bibi"); } } EndNpcSection(); } private static void DrawBeehiveSection() { //IL_005d: 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_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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); BeginNpcSection("Beehive"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { Beehive val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported Beehive to you"); } } if (GUILayout.Button("TP to Beehive", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { Beehive val2 = Object.FindFirstObjectByType(); if ((Object)(object)val2 != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((Component)val2).transform.position + Vector3.up * 2f); } } GUILayout.EndHorizontal(); if (GUILayout.Button("Kill", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { Beehive val3 = Object.FindFirstObjectByType(); if ((Object)(object)val3 != (Object)null) { Object.Destroy((Object)(object)((Component)val3).gameObject); HotDogCheatMod.Log("Killed Beehive"); } } EndNpcSection(); } private static void EnsureNpcStyles() { //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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004e: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown //IL_007a: Expected O, but got Unknown if (npcSection == null || npcStyleVersion != UiLayout.StyleVersion) { npcSection = new GUIStyle(Styles.Section) { padding = UiLayout.Offset(7, 7, 5, 6, 5, 5, 4, 5), margin = UiLayout.Offset(0, 0, 0, 6, 0, 0, 0, 4) }; npcTitle = new GUIStyle(Styles.SectionTitle) { padding = UiLayout.Offset(4, 4, 0, 2, 3, 3, 0, 1), margin = new RectOffset(0, 0, 0, 1) }; npcStyleVersion = UiLayout.StyleVersion; } } private static void BeginNpcSection(string title) { EnsureNpcStyles(); GUILayout.BeginVertical(npcSection, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.Label(title, npcTitle, Array.Empty()); } private static void EndNpcSection() { GUILayout.EndVertical(); } } public class OnlineTab { private static readonly (string Label, Type Type)[] OnlineEffects = new(string, Type)[10] { ("Fire", (Type)1), ("Stun", (Type)0), ("Tied", (Type)2), ("Electrocute", (Type)4), ("Mobility", (Type)6), ("Stamina", (Type)7), ("Flight", (Type)8), ("Sleep", (Type)10), ("Health Regen", (Type)11), ("Strength", (Type)12) }; private static readonly Dictionary fireClearTimes = new Dictionary(); private static readonly Dictionary tiedClearTimes = new Dictionary(); private readonly FeatureManager features; private readonly bool[] selectedEffects = new bool[OnlineEffects.Length]; private int selectedPlayerIndex; private bool allPlayersSelected; private string effectDurationInput = "10"; private float effectDuration = 10f; public OnlineTab(FeatureManager features) { this.features = features; } public void Draw() { List allPlayers = PlayerHelper.GetAllPlayers(); if (allPlayers.Count == 0) { GUILayout.Label("No players found", Styles.Label, Array.Empty()); return; } Styles.BeginSection("Players"); GUILayout.Label($"Total Players: {allPlayers.Count}", Styles.Label, Array.Empty()); allPlayersSelected = GUILayout.Toggle(allPlayersSelected, "All Players", Styles.Toggle, Array.Empty()); for (int i = 0; i < allPlayers.Count; i++) { string playerName = PlayerHelper.GetPlayerName(allPlayers[i]); string text = (((NetworkBehaviour)allPlayers[i]).IsLocalPlayer ? " [YOU]" : ""); bool flag = allPlayersSelected || selectedPlayerIndex == i; bool flag2 = GUILayout.Toggle(flag, playerName + text, Styles.Selector, Array.Empty()); if (flag2 != flag && allPlayersSelected) { allPlayersSelected = false; selectedPlayerIndex = i; } else if (flag2) { selectedPlayerIndex = i; } } Styles.EndSection(); if (selectedPlayerIndex >= allPlayers.Count) { selectedPlayerIndex = Mathf.Max(0, allPlayers.Count - 1); } if (!allPlayersSelected && selectedPlayerIndex >= allPlayers.Count) { return; } PlayerNetworking val = allPlayers[selectedPlayerIndex]; List targets = GetTargets(allPlayers); string text2 = (allPlayersSelected ? $"All Players ({targets.Count})" : PlayerHelper.GetPlayerName(val)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); Styles.BeginSection("Actions for " + text2); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Heal", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.HealPlayer, "healed"); } if (GUILayout.Button("Kill", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.KillPlayer, "killed"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Ragdoll", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.ForceRagdoll, "ragdolled"); } if (GUILayout.Button("Unragdoll", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.UnRagdoll, "unragdolled"); } GUILayout.EndHorizontal(); Styles.EndSection(); Styles.BeginSection("Kidnapping"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Spider Kidnap", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.SpiderKidnap, "spider kidnapped"); } if (GUILayout.Button("Vacuum Kidnap", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.VacuumKidnap, "vacuum kidnapped"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Human Kidnap", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.HumanKidnap, "human kidnapped"); } if (GUILayout.Button("Release All", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.ReleaseFromAll, "released"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("TP to Me", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.TeleportPlayerToMe, "teleported to you"); } if (!allPlayersSelected && GUILayout.Button("TP to Player", Styles.Button, Array.Empty())) { PlayerActions.TeleportMeToPlayer(val); } GUILayout.EndHorizontal(); Styles.EndSection(); GUILayout.EndVertical(); GUILayout.Space(UiLayout.Space(12f)); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); Styles.BeginSection("Trolling"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Dismember Head", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.DismemberHead, "dismembered heads"); } if (GUILayout.Button("Dismember Legs", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.DismemberLegs, "dismembered legs"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Dismember Arms", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.DismemberArms, "dismembered arms"); } if (GUILayout.Button("Shoot Player", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.ShootAt, "shot at"); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Shock with Taser", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.TaserPlayer, "tased"); } if (GUILayout.Button("Pepper Spray", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.PepperSprayPlayer, "pepper sprayed"); } GUILayout.EndHorizontal(); if (GUILayout.Button("Bee Sting (Confuse)", Styles.Button, Array.Empty())) { ForTargets(targets, PlayerActions.ConfusePlayer, "confused"); } if (!allPlayersSelected) { bool isSpectateActive = PlayerActions.IsSpectateActive; bool flag3 = GUILayout.Toggle(isSpectateActive, isSpectateActive ? "Stop Spectate" : "Spectate Player", Styles.Toggle, Array.Empty()); if (flag3 != isSpectateActive) { if (flag3) { PlayerActions.StartSpectate(val); } else { PlayerActions.StopSpectate(); } } } Styles.EndSection(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); DrawEffects(targets); } private void DrawEffects(List targets) { float num = UiLayout.Width(112f); float num2 = UiLayout.Height(28f); float num3 = UiLayout.Width(146f); float num4 = UiLayout.Height(32f); Styles.BeginSection("Effects"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.FlexibleSpace(); GUILayout.Label("Duration (1-20s):", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(120f) }); string text = GUILayout.TextField(effectDurationInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(70f) }); if (text != effectDurationInput) { effectDurationInput = Styles.FilterInteger(text); if (float.TryParse(effectDurationInput, out var result)) { effectDuration = Mathf.Clamp(result, 1f, 20f); effectDurationInput = effectDuration.ToString("F0"); } } if (GUILayout.Button("1s", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(40f) })) { SetEffectDuration(1f); } if (GUILayout.Button("5s", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(40f) })) { SetEffectDuration(5f); } if (GUILayout.Button("10s", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(45f) })) { SetEffectDuration(10f); } if (GUILayout.Button("20s", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(45f) })) { SetEffectDuration(20f); } GUILayout.Space(UiLayout.Space(12f)); GUILayout.Label($"Selected: {CountSelectedEffects()}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(90f) }); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); for (int i = 0; i < 2; i++) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.FlexibleSpace(); for (int j = 0; j < 5; j++) { int num5 = i * 5 + j; selectedEffects[num5] = GUILayout.Toggle(selectedEffects[num5], OnlineEffects[num5].Label, Styles.Selector, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num), GUILayout.Height(num2) }); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.FlexibleSpace(); if (GUILayout.Button("Select All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num3), GUILayout.Height(num4) })) { SetAllEffectsSelected(selected: true); } if (GUILayout.Button("Deselect All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num3), GUILayout.Height(num4) })) { SetAllEffectsSelected(selected: false); } if (GUILayout.Button("Apply Selected", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num3), GUILayout.Height(num4) })) { ApplySelectedEffects(targets); } if (GUILayout.Button("Clear Selected", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num3), GUILayout.Height(num4) })) { ClearSelectedEffects(targets); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.FlexibleSpace(); if (GUILayout.Button("Clear All", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num3), GUILayout.Height(num4) })) { ClearAllEffects(targets); } if (GUILayout.Button("Untie", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num3), GUILayout.Height(num4) })) { ForTargets(targets, UntieAndClearStatus, "untied"); } if (GUILayout.Button("Kick Player", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[2] { GUILayout.Width(num3), GUILayout.Height(num4) })) { KickTargets(targets); } GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); Styles.EndSection(); } private int CountSelectedEffects() { int num = 0; for (int i = 0; i < selectedEffects.Length; i++) { if (selectedEffects[i]) { num++; } } return num; } private List GetTargets(List allPlayers) { if (allPlayersSelected) { return allPlayers.FindAll((PlayerNetworking p) => (Object)(object)p != (Object)null); } if (selectedPlayerIndex < 0 || selectedPlayerIndex >= allPlayers.Count || (Object)(object)allPlayers[selectedPlayerIndex] == (Object)null) { return new List(); } return new List { allPlayers[selectedPlayerIndex] }; } private static void ForTargets(List targets, Action action, string label) { int num = 0; foreach (PlayerNetworking target in targets) { if (!((Object)(object)target == (Object)null)) { action(target); num++; } } if (targets.Count > 1) { HotDogCheatMod.Log($"Online: {label} {num} player(s)"); } } private void SetEffectDuration(float seconds) { effectDuration = Mathf.Clamp(seconds, 1f, 20f); effectDurationInput = effectDuration.ToString("F0"); } private void SetAllEffectsSelected(bool selected) { for (int i = 0; i < selectedEffects.Length; i++) { selectedEffects[i] = selected; } } private void ApplySelectedEffects(List targets) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) int num = 0; int num2 = 0; foreach (PlayerNetworking target in targets) { if ((Object)(object)target == (Object)null) { continue; } bool flag = false; for (int i = 0; i < selectedEffects.Length; i++) { if (selectedEffects[i] && ApplyEffect(target, OnlineEffects[i].Type, effectDuration)) { flag = true; num2++; } } if (flag) { num++; } } HotDogCheatMod.Log($"Online: applied {num2} effect(s) to {num} player(s) for {effectDuration:F0}s"); } private void ClearSelectedEffects(List targets) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) int num = 0; int num2 = 0; foreach (PlayerNetworking target in targets) { if ((Object)(object)target == (Object)null) { continue; } bool flag = false; for (int i = 0; i < selectedEffects.Length; i++) { if (selectedEffects[i] && ClearEffect(target, OnlineEffects[i].Type)) { flag = true; num2++; } } if (flag) { num++; } } HotDogCheatMod.Log($"Online: cleared {num2} selected effect(s) from {num} player(s)"); } private static void ClearAllEffects(List targets) { int num = 0; foreach (PlayerNetworking target in targets) { if (!((Object)(object)target == (Object)null)) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(target); if (!((Object)(object)statusEffects == (Object)null)) { statusEffects.ClearStatuses(); statusEffects.SetOnFire(false); statusEffects.SetTied(false); fireClearTimes.Remove(target); tiedClearTimes.Remove(target); num++; } } } HotDogCheatMod.Log($"Online: cleared all effects from {num} player(s)"); } private static bool ApplyEffect(PlayerNetworking player, Type type, float duration) { //IL_0013: 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_001c: Invalid comparison between Unknown and I4 //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Invalid comparison between Unknown and I4 //IL_0026: 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) StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if ((Object)(object)statusEffects == (Object)null) { return false; } statusEffects.AddStatus(type, duration); if ((int)type == 1) { statusEffects.SetOnFire(true); ScheduleExplicitClear(player, type, duration); } else if ((int)type == 2) { statusEffects.SetTied(true); ScheduleExplicitClear(player, type, duration); } return true; } private static bool ClearEffect(PlayerNetworking player, Type type) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Invalid comparison between Unknown and I4 //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Invalid comparison between Unknown and I4 StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if ((Object)(object)statusEffects == (Object)null) { return false; } statusEffects.RemoveStatus(type); if ((int)type == 0) { statusEffects.ClearStun(); } else if ((int)type == 1) { statusEffects.SetOnFire(false); fireClearTimes.Remove(player); } else if ((int)type == 2) { statusEffects.SetTied(false); tiedClearTimes.Remove(player); } return true; } private static void UntieAndClearStatus(PlayerNetworking player) { PlayerActions.Untie(player); ClearEffect(player, (Type)2); } private static void KickTargets(List targets) { int num = 0; foreach (PlayerNetworking target in targets) { if (!((Object)(object)target == (Object)null) && !((NetworkBehaviour)target).IsLocalPlayer) { PlayerActions.Kick(target); num++; } } HotDogCheatMod.Log($"Online: kicked {num} player(s)"); } private static void ScheduleExplicitClear(PlayerNetworking player, Type type, float duration) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 Dictionary clearTimes = (((int)type == 1) ? fireClearTimes : tiedClearTimes); float clearAt = Time.time + duration; clearTimes[player] = clearAt; GameRunner.RunAfterSeconds(duration, delegate { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Invalid comparison between Unknown and I4 //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Invalid comparison between Unknown and I4 if (!((Object)(object)player == (Object)null) && clearTimes.TryGetValue(player, out var value) && !(value > clearAt + 0.01f)) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if (!((Object)(object)statusEffects == (Object)null)) { if ((int)type == 1) { statusEffects.SetOnFire(false); } else if ((int)type == 2) { statusEffects.SetTied(false); } clearTimes.Remove(player); } } }); } } public class PlayerTab { private readonly FeatureManager features; private Vector2 scrollPos; private int subTab; private bool[] selectedAbilities = new bool[8]; private string durationInput = "30"; private float abilityDuration = 30f; private string wallPhaseDurationInput = "5.0"; private static GUIStyle selfSection; private static GUIStyle selfSectionTitle; private static GUIStyle coreCard; private static GUIStyle coreCardTitle; private static int selfStyleVersion = -1; private static readonly (string Label, Type Type)[] PotionAbilities = new(string, Type)[8] { ("Mobility (Speed Boost)", (Type)6), ("Stamina (Infinite)", (Type)7), ("Flight", (Type)8), ("Fart (Gas Cloud)", (Type)9), ("Sleep", (Type)10), ("Health (Regen)", (Type)11), ("Strength", (Type)12), ("Confusion", (Type)13) }; public PlayerTab(FeatureManager features) { this.features = features; } public void Draw() { //IL_0002: 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) scrollPos = GUILayout.BeginScrollView(scrollPos, Array.Empty()); if (subTab > 2) { subTab = 0; } DrawSubTabs(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); switch (subTab) { case 0: DrawCore(localPlayer); break; case 1: DrawAbilities(); break; case 2: DrawItemMods(localPlayer); break; } GUILayout.EndScrollView(); } private void DrawSubTabs() { GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Core", (subTab == 0) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 0; } if (GUILayout.Button("Abilities", (subTab == 1) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 1; } if (GUILayout.Button("Item mods", (subTab == 2) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 2; } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(10f)); } private void DrawCore(PlayerNetworking local) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); BeginCoreCard("Core"); bool flag = GUILayout.Toggle(features.GodModeEnabled, "God Mode", Styles.Toggle, Array.Empty()); if (flag != features.GodModeEnabled) { features.GodModeEnabled = flag; HotDogCheatMod.Log($"God Mode: {flag}"); } features.InfiniteStaminaEnabled = GUILayout.Toggle(features.InfiniteStaminaEnabled, "Infinite Stamina", Styles.Toggle, Array.Empty()); bool flag2 = GUILayout.Toggle(features.NoRagdollEnabled, "No Ragdoll", Styles.Toggle, Array.Empty()); if (flag2 != features.NoRagdollEnabled) { features.NoRagdollEnabled = flag2; HotDogCheatMod.Log($"No Ragdoll: {flag2}"); } bool flag3 = GUILayout.Toggle(features.NeverDropItemsEnabled, "Keep Inventory", Styles.Toggle, Array.Empty()); if (flag3 != features.NeverDropItemsEnabled) { features.NeverDropItemsEnabled = flag3; HotDogCheatMod.Log($"Keep Inventory: {flag3}"); } bool flag4 = GUILayout.Toggle(features.FreeCraftingEnabled, "Free Crafting", Styles.Toggle, Array.Empty()); if (flag4 != features.FreeCraftingEnabled) { features.SetFreeCrafting(flag4); } features.AntiKidnapEnabled = GUILayout.Toggle(features.AntiKidnapEnabled, "Auto Untie", Styles.Toggle, Array.Empty()); bool flag5 = GUILayout.Toggle(features.NoFallDamageEnabled, "No Fall Damage", Styles.Toggle, Array.Empty()); if (flag5 != features.NoFallDamageEnabled) { features.NoFallDamageEnabled = flag5; HotDogCheatMod.Log($"No Fall Damage: {flag5}"); } bool flag6 = GUILayout.Toggle(features.InstantRespawnEnabled, "Instant Respawn", Styles.Toggle, Array.Empty()); if (flag6 != features.InstantRespawnEnabled) { features.InstantRespawnEnabled = flag6; HotDogCheatMod.Log($"Instant Respawn: {flag6}"); } bool flag7 = GUILayout.Toggle(features.InfiniteJumpsEnabled, "Infinite Jumps", Styles.Toggle, Array.Empty()); if (flag7 != features.InfiniteJumpsEnabled) { features.InfiniteJumpsEnabled = flag7; HotDogCheatMod.Log($"Infinite Jumps: {flag7}"); } bool flag8 = GUILayout.Toggle(features.InfiniteHandsEnabled, "Max Reach", Styles.Toggle, Array.Empty()); if (flag8 != features.InfiniteHandsEnabled) { features.InfiniteHandsEnabled = flag8; HotDogCheatMod.Log($"Infinite Arms: {flag8}"); } bool flag9 = GUILayout.Toggle(features.SuperPunchEnabled, "Super Punch", Styles.Toggle, Array.Empty()); if (flag9 != features.SuperPunchEnabled) { features.SuperPunchEnabled = flag9; HotDogCheatMod.Log($"Super Punch: {flag9}"); } bool flag10 = GUILayout.Toggle(features.InstantLimbRegrowEnabled, "Instant Limb Regrow", Styles.Toggle, Array.Empty()); if (flag10 != features.InstantLimbRegrowEnabled) { features.InstantLimbRegrowEnabled = flag10; HotDogCheatMod.Log($"Instant Limb Regrow: {flag10}"); } bool flag11 = GUILayout.Toggle(features.NpcIgnoreEnabled, "NPC Ignore", Styles.Toggle, Array.Empty()); if (flag11 != features.NpcIgnoreEnabled) { features.NpcIgnoreEnabled = flag11; HotDogCheatMod.Log($"NPC Ignore: {flag11}"); } EndCoreCard(); BeginCoreCard("Flight"); bool flag12 = GUILayout.Toggle(features.FlyModeEnabled, "Flight", Styles.Toggle, Array.Empty()); if (flag12 != features.FlyModeEnabled) { features.ToggleFlyMode(flag12); } if (features.FlyModeEnabled || features.NoclipEnabled) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Fly Speed: {features.FlySpeed:F1}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(false) }); features.FlySpeed = GUILayout.HorizontalSlider(features.FlySpeed, 1f, 50f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); } EndCoreCard(); BeginCoreCard("Wall Phase"); if (GUILayout.Button(PlayerActions.IsWallPhaseActive ? "[ACTIVE] Wall Phase" : "Wall Phase", PlayerActions.IsWallPhaseActive ? Styles.ButtonActive : Styles.Button, Array.Empty())) { PlayerActions.WallPhase(); } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Duration (s):", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(110f) }); string text = GUILayout.TextField(wallPhaseDurationInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(65f) }); if (text != wallPhaseDurationInput) { wallPhaseDurationInput = Styles.FilterNumeric(text); if (float.TryParse(wallPhaseDurationInput, out var result)) { PlayerActions.WallPhaseDuration = Mathf.Clamp(result, 1f, 60f); } } GUILayout.EndHorizontal(); EndCoreCard(); GUILayout.EndVertical(); GUILayout.Space(UiLayout.Space(12f)); GUILayout.BeginVertical((GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); BeginCoreCard("Player Actions"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Heal", Styles.Button, Array.Empty())) { PlayerActions.HealPlayer(local); } if (GUILayout.Button("Kill Self", Styles.Button, Array.Empty())) { PlayerActions.KillPlayer(local); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Ragdoll", Styles.Button, Array.Empty())) { PlayerActions.ForceRagdoll(local); } if (GUILayout.Button("Unragdoll", Styles.Button, Array.Empty())) { PlayerActions.UnRagdoll(local); } GUILayout.EndHorizontal(); if (GUILayout.Button("Deposit Resources to Stockpile", Styles.Button, Array.Empty())) { PlayerActions.DepositResourcesToStockpile(); } EndCoreCard(); BeginCoreCard("Backpack"); bool flag13 = GUILayout.Toggle(features.BackpackEnabled, "Backpack (+2 Inventory Slots)", Styles.Toggle, Array.Empty()); if (flag13 != features.BackpackEnabled) { features.BackpackEnabled = flag13; if (flag13 || features.BackpackExtraEnabled) { features.ApplyBackpack(); } else { features.RestoreBackpack(); } } bool flag14 = GUILayout.Toggle(features.BackpackExtraEnabled, "Backpack EXTRA (6 Slots Total)", Styles.Toggle, Array.Empty()); if (flag14 != features.BackpackExtraEnabled) { features.BackpackExtraEnabled = flag14; if (flag14 || features.BackpackEnabled) { features.ApplyBackpack(); } else { features.RestoreBackpack(); } } EndCoreCard(); BeginCoreCard("Multipliers"); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Speed: {features.SpeedMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(110f) }); features.SpeedMultiplier = GUILayout.HorizontalSlider(features.SpeedMultiplier, 0.5f, 5f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(220f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Stamina: {features.StaminaMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(110f) }); features.StaminaMultiplier = GUILayout.HorizontalSlider(features.StaminaMultiplier, 1f, 5f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(220f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Jump: {features.JumpMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(110f) }); features.JumpMultiplier = GUILayout.HorizontalSlider(features.JumpMultiplier, 1f, 25f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(220f) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"HP Regen: {features.HpRegenMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(110f) }); features.HpRegenMultiplier = GUILayout.HorizontalSlider(features.HpRegenMultiplier, 1f, 25f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(220f) }); GUILayout.EndHorizontal(); EndCoreCard(); BeginCoreCard("World / Time"); bool flag15 = GUILayout.Toggle(features.BulletTime.Enabled, "Bullet Time (Experimental)", Styles.Toggle, Array.Empty()); if (flag15 != features.BulletTime.Enabled) { if (flag15) { features.BulletTime.Enable(); } else { features.BulletTime.Disable(); } } if (features.BulletTime.Enabled) { GUILayout.Label("World Frozen Grab or use FreeCam to throw items, then toggle off to unleash them.", Styles.MutedLabel, Array.Empty()); } bool flag16 = GUILayout.Toggle(features.InfiniteTimeEnabled, "Infinite Time", Styles.Toggle, Array.Empty()); if (flag16 != features.InfiniteTimeEnabled) { features.SetInfiniteTime(flag16); } EndCoreCard(); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(8f)); BeginCoreCard("Temp Helicopter Spot"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Spawn + Complete", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { SpawnerActions.SpawnAndCompleteHelicopter(); } if (GUILayout.Button("Delete", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(26f) })) { SpawnerActions.DespawnHelicopter(); } GUILayout.EndHorizontal(); EndCoreCard(); } private void DrawAbilities() { //IL_03a2: Unknown result type (might be due to invalid IL or missing references) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); BeginSelfSection("Abilities"); if ((Object)(object)localPlayer == (Object)null) { GUILayout.Label("Local player not found.", Styles.Label, Array.Empty()); EndSelfSection(); return; } GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Duration (seconds):", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); string text = GUILayout.TextField(durationInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(100f) }); if (text != durationInput) { durationInput = Styles.FilterNumeric(text); if (float.TryParse(durationInput, out var result) && result > 0f) { abilityDuration = result; } } if (GUILayout.Button("+10s", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(50f) })) { abilityDuration += 10f; durationInput = abilityDuration.ToString("F0"); } if (GUILayout.Button("+60s", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(50f) })) { abilityDuration += 60f; durationInput = abilityDuration.ToString("F0"); } if (GUILayout.Button("+100s", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(55f) })) { abilityDuration += 100f; durationInput = abilityDuration.ToString("F0"); } GUILayout.EndHorizontal(); GUILayout.Label($"Select Abilities (current: {abilityDuration:F0}s):", Styles.Label, Array.Empty()); int num = 0; GUILayout.BeginHorizontal(Array.Empty()); GUILayout.BeginVertical(Array.Empty()); for (int i = 0; i < 4; i++) { selectedAbilities[i] = GUILayout.Toggle(selectedAbilities[i], PotionAbilities[i].Label, Styles.Selector, Array.Empty()); if (selectedAbilities[i]) { num++; } } GUILayout.EndVertical(); GUILayout.BeginVertical(Array.Empty()); for (int j = 4; j < PotionAbilities.Length; j++) { selectedAbilities[j] = GUILayout.Toggle(selectedAbilities[j], PotionAbilities[j].Label, Styles.Selector, Array.Empty()); if (selectedAbilities[j]) { num++; } } GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(5f)); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Select All", Styles.Button, Array.Empty())) { for (int k = 0; k < selectedAbilities.Length; k++) { selectedAbilities[k] = true; } } if (GUILayout.Button("Deselect All", Styles.Button, Array.Empty())) { for (int l = 0; l < selectedAbilities.Length; l++) { selectedAbilities[l] = false; } } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(10f)); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Add Selected Abilities", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(35f) })) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(localPlayer); if ((Object)(object)statusEffects != (Object)null) { int num2 = 0; for (int m = 0; m < selectedAbilities.Length; m++) { if (selectedAbilities[m]) { (string, Type) tuple = PotionAbilities[m]; statusEffects.AddStatus(tuple.Item2, abilityDuration); num2++; } } HotDogCheatMod.Log($"Applied {num2} abilities for {abilityDuration}s"); } } if (GUILayout.Button("Clear All Abilities", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(35f) })) { StatusEffectHandler statusEffects2 = PlayerHelper.GetStatusEffects(localPlayer); if ((Object)(object)statusEffects2 != (Object)null) { statusEffects2.ClearStatuses(); HotDogCheatMod.Log("All status effects cleared"); } } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(5f)); GUILayout.Label($"Selected: {num}", Styles.Label, Array.Empty()); GUILayout.Label("Note: Only works as host.", Styles.Label, Array.Empty()); EndSelfSection(); } private static void EnsureSelfStyles() { //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_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown //IL_004e: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00e4: Expected O, but got Unknown if (selfSection == null || selfStyleVersion != UiLayout.StyleVersion) { selfSection = new GUIStyle(Styles.Section) { padding = UiLayout.Offset(8, 8, 6, 7, 6, 6, 4, 5), margin = UiLayout.Offset(0, 0, 0, 5, 0, 0, 0, 4) }; selfSectionTitle = new GUIStyle(Styles.SectionTitle) { padding = UiLayout.Offset(4, 4, 0, 3, 3, 3, 0, 2), margin = UiLayout.Offset(0, 0, 0, 2, 0, 0, 0, 1) }; coreCard = new GUIStyle(Styles.Section) { padding = UiLayout.Offset(7, 7, 5, 6, 5, 5, 4, 5), margin = UiLayout.Offset(0, 0, 0, 6, 0, 0, 0, 4) }; coreCardTitle = new GUIStyle(Styles.SectionTitle) { padding = UiLayout.Offset(4, 4, 0, 2, 3, 3, 0, 1), margin = new RectOffset(0, 0, 0, 1) }; selfStyleVersion = UiLayout.StyleVersion; } } private static void BeginSelfSection(string title) { EnsureSelfStyles(); GUILayout.BeginVertical(selfSection, Array.Empty()); GUILayout.Label(title, selfSectionTitle, Array.Empty()); } private static void EndSelfSection() { GUILayout.EndVertical(); } private void DrawItemMods(PlayerNetworking local) { BeginCoreCard("Item mods"); bool flag = GUILayout.Toggle(features.ModdedLauncherEnabled, "Modded Launcher", Styles.Toggle, Array.Empty()); if (flag != features.ModdedLauncherEnabled) { features.ModdedLauncherEnabled = flag; HotDogCheatMod.Log($"Modded Launcher: {flag}"); } if (features.ModdedLauncherEnabled) { GUILayout.Space(UiLayout.Space(4f)); GUILayout.Label("Fire Mode:", Styles.Label, Array.Empty()); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Gun", (features.ModdedLauncherMode == FeatureManager.ModdedLauncherModeType.Gun) ? Styles.ButtonActive : Styles.Button, Array.Empty())) { features.ModdedLauncherMode = FeatureManager.ModdedLauncherModeType.Gun; } if (GUILayout.Button("Shotgun", (features.ModdedLauncherMode == FeatureManager.ModdedLauncherModeType.Shotgun) ? Styles.ButtonActive : Styles.Button, Array.Empty())) { features.ModdedLauncherMode = FeatureManager.ModdedLauncherModeType.Shotgun; } if (GUILayout.Button("RPG", (features.ModdedLauncherMode == FeatureManager.ModdedLauncherModeType.RPG) ? Styles.ButtonActive : Styles.Button, Array.Empty())) { features.ModdedLauncherMode = FeatureManager.ModdedLauncherModeType.RPG; } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(4f)); string text = ((features.ModdedLauncherMode == FeatureManager.ModdedLauncherModeType.Gun) ? "Fires like a gun: instant hitscan, kills targets on hit." : ((features.ModdedLauncherMode != FeatureManager.ModdedLauncherModeType.Shotgun) ? "Fires like an RPG: launches a real rocket that flies and explodes." : "Fires like a shotgun: spread of 6 instant-kill pellets.")); GUILayout.Label(text, Styles.MutedLabel, Array.Empty()); } EndCoreCard(); BeginCoreCard("Grappling Hook"); bool flag2 = GUILayout.Toggle(features.GrapplingHookModEnabled, "Grappling Hook", Styles.Toggle, Array.Empty()); if (flag2 != features.GrapplingHookModEnabled) { features.GrapplingHookModEnabled = flag2; HotDogCheatMod.Log($"Grappling Hook Mod: {flag2}"); } if (features.GrapplingHookModEnabled) { GUILayout.Space(UiLayout.Space(4f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Max Range: {features.GrapplingHookMaxRange:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(120f) }); features.GrapplingHookMaxRange = GUILayout.HorizontalSlider(features.GrapplingHookMaxRange, 5f, 200f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Min Range: {features.GrapplingHookMinRange:F1}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(120f) }); features.GrapplingHookMinRange = GUILayout.HorizontalSlider(features.GrapplingHookMinRange, 0.5f, 30f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Hook Speed: {features.GrapplingHookSpeed:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(120f) }); features.GrapplingHookSpeed = GUILayout.HorizontalSlider(features.GrapplingHookSpeed, 1f, 300f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); } EndCoreCard(); BeginCoreCard("Gnomium Gloves"); bool flag3 = GUILayout.Toggle(features.GnomiumGlovesModEnabled, "Gnomium Gloves", Styles.Toggle, Array.Empty()); if (flag3 != features.GnomiumGlovesModEnabled) { features.GnomiumGlovesModEnabled = flag3; HotDogCheatMod.Log($"Gnomium Gloves Mod: {flag3}"); } if (features.GnomiumGlovesModEnabled) { GUILayout.Space(UiLayout.Space(4f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Max Distance: {features.GnomiumGlovesMaxDistance:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(120f) }); features.GnomiumGlovesMaxDistance = GUILayout.HorizontalSlider(features.GnomiumGlovesMaxDistance, 1f, 50f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Force: {features.GnomiumGlovesForceMultiplier:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(120f) }); features.GnomiumGlovesForceMultiplier = GUILayout.HorizontalSlider(features.GnomiumGlovesForceMultiplier, 0.1f, 10f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); bool flag4 = GUILayout.Toggle(features.GnomiumGlovesInstantInteraction, "Instant Interaction", Styles.Toggle, Array.Empty()); if (flag4 != features.GnomiumGlovesInstantInteraction) { features.GnomiumGlovesInstantInteraction = flag4; HotDogCheatMod.Log($"Gloves Instant Interaction: {flag4}"); } } EndCoreCard(); BeginCoreCard("Spring Shoes"); bool flag5 = GUILayout.Toggle(features.SpringShoesModEnabled, "Spring Shoes", Styles.Toggle, Array.Empty()); if (flag5 != features.SpringShoesModEnabled) { features.SpringShoesModEnabled = flag5; HotDogCheatMod.Log($"Spring Shoes Mod: {flag5}"); } if (features.SpringShoesModEnabled) { GUILayout.Space(UiLayout.Space(4f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Max Jump Velocity: {features.SpringShoesMaxJumpVelocity:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.SpringShoesMaxJumpVelocity = GUILayout.HorizontalSlider(features.SpringShoesMaxJumpVelocity, 5f, 100f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Min Inertia Transfer: {features.SpringShoesMinInertiaTransfer:F1}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.SpringShoesMinInertiaTransfer = GUILayout.HorizontalSlider(features.SpringShoesMinInertiaTransfer, 0f, 10f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Active Inertia Transfer: {features.SpringShoesActiveInertiaTransfer:F1}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(160f) }); features.SpringShoesActiveInertiaTransfer = GUILayout.HorizontalSlider(features.SpringShoesActiveInertiaTransfer, 0.1f, 5f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Passive Inertia Transfer: {features.SpringShoesPassiveInertiaTransfer:F1}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(160f) }); features.SpringShoesPassiveInertiaTransfer = GUILayout.HorizontalSlider(features.SpringShoesPassiveInertiaTransfer, 0.1f, 5f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Stamina per Active Jump: {features.SpringShoesStaminaPerActiveJump:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(160f) }); features.SpringShoesStaminaPerActiveJump = GUILayout.HorizontalSlider(features.SpringShoesStaminaPerActiveJump, 0f, 50f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); bool flag6 = GUILayout.Toggle(features.SpringShoesNoHeadHit, "No Head Hit", Styles.Toggle, Array.Empty()); if (flag6 != features.SpringShoesNoHeadHit) { features.SpringShoesNoHeadHit = flag6; HotDogCheatMod.Log($"Spring Shoes No Head Hit: {flag6}"); } } EndCoreCard(); BeginCoreCard("Glue Gloves"); bool flag7 = GUILayout.Toggle(features.GlueGlovesModEnabled, "Glue Gloves", Styles.Toggle, Array.Empty()); if (flag7 != features.GlueGlovesModEnabled) { features.GlueGlovesModEnabled = flag7; HotDogCheatMod.Log($"Glue Gloves Mod: {flag7}"); } if (features.GlueGlovesModEnabled) { GUILayout.Space(UiLayout.Space(4f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Climb H Speed: {features.GlueGlovesClimbHSpeed:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GlueGlovesClimbHSpeed = GUILayout.HorizontalSlider(features.GlueGlovesClimbHSpeed, 0.1f, 10f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Climb V Speed: {features.GlueGlovesClimbVSpeed:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GlueGlovesClimbVSpeed = GUILayout.HorizontalSlider(features.GlueGlovesClimbVSpeed, 0.5f, 15f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Climb Accel: {features.GlueGlovesClimbAccel:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GlueGlovesClimbAccel = GUILayout.HorizontalSlider(features.GlueGlovesClimbAccel, 1f, 50f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Passive Stamina: {features.GlueGlovesPassiveStamina:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GlueGlovesPassiveStamina = GUILayout.HorizontalSlider(features.GlueGlovesPassiveStamina, 0f, 50f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Active Stamina: {features.GlueGlovesActiveStamina:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GlueGlovesActiveStamina = GUILayout.HorizontalSlider(features.GlueGlovesActiveStamina, 0f, 50f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); bool flag8 = GUILayout.Toggle(features.GlueGlovesAnySurface, "Any-Surface Climbing", Styles.Toggle, Array.Empty()); if (flag8 != features.GlueGlovesAnySurface) { features.GlueGlovesAnySurface = flag8; HotDogCheatMod.Log($"Glue Gloves Any-Surface: {flag8}"); } } EndCoreCard(); BeginCoreCard("Glider"); bool flag9 = GUILayout.Toggle(features.GliderModEnabled, "Glider", Styles.Toggle, Array.Empty()); if (flag9 != features.GliderModEnabled) { features.GliderModEnabled = flag9; HotDogCheatMod.Log($"Glider Mod: {flag9}"); } if (features.GliderModEnabled) { GUILayout.Space(UiLayout.Space(4f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Max Flight Velocity: {features.GliderMaxFlightVelocity:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GliderMaxFlightVelocity = GUILayout.HorizontalSlider(features.GliderMaxFlightVelocity, 1f, 50f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Gravity: {features.GliderGravity:F1}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GliderGravity = GUILayout.HorizontalSlider(features.GliderGravity, 0f, 15f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Drag: {features.GliderDrag:F1}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GliderDrag = GUILayout.HorizontalSlider(features.GliderDrag, 0f, 3f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Turn Speed: {features.GliderTurnSpeed:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(140f) }); features.GliderTurnSpeed = GUILayout.HorizontalSlider(features.GliderTurnSpeed, 0.5f, 15f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Velocity Gain On Enter: {features.GliderVelocityGainOnEnter:F0}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(160f) }); features.GliderVelocityGainOnEnter = GUILayout.HorizontalSlider(features.GliderVelocityGainOnEnter, 0f, 30f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"Fart Accel Multiplier: {features.GliderFartAccelMlp:F1}x", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(160f) }); features.GliderFartAccelMlp = GUILayout.HorizontalSlider(features.GliderFartAccelMlp, 0f, 10f, Styles.Slider, Styles.SliderThumb, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.EndHorizontal(); } EndCoreCard(); } private static void BeginCoreCard(string title) { EnsureSelfStyles(); GUILayout.BeginVertical(coreCard, (GUILayoutOption[])(object)new GUILayoutOption[1] { GUILayout.ExpandWidth(true) }); GUILayout.Label(title, coreCardTitle, Array.Empty()); } private static void EndCoreCard() { GUILayout.EndVertical(); } } public class SpawnerTab { private int subTab; private int selectedItemIndex; private int selectedObjectIndex; private Vector2 itemScrollPos; private Vector2 objectScrollPos; private List itemList = new List(); private bool itemsTriedLoad; private int selectedEnemyIndex; private int spawnCount = 1; private string spawnCountInput = "1"; private readonly string[] enemyNames = new string[12] { "Redcap", "Rat", "Roach", "Cat", "Human", "Mole", "Boar", "Pitbull", "Vacuum", "Fairy", "Jonathan", "Sealman" }; private string rainCountInput = "30"; private int rainCount = 30; private bool rainAllPlayers; public static readonly string[] ObjectNames = new string[35] { "Knife", "Gun", "Taser", "Grenade", "PepperSpray", "Mousetrap", "Shotgun", "RocketLauncher", "Chainsaw", "Firework", "BearToy", "CatToy", "BallToy", "RobotToy", "Egg", "Bread", "Toaster", "Radio", "RecordPlayer", "GameConsole", "GameConsoleJoystick", "Hairdryer", "Fork", "Pan", "Landmine", "Teapot", "CatBowl", "Globe", "ClockTable", "Slipper", "Underpants", "TrashBucket", "Plunger", "ToiletPaper", "Lawnmower" }; public void Draw() { GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Items", (subTab == 0) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 0; } if (GUILayout.Button("Objects", (subTab == 1) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 1; } if (GUILayout.Button("NPC's", (subTab == 2) ? Styles.TabActive : Styles.Tab, Array.Empty())) { subTab = 2; } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(10f)); switch (subTab) { case 0: DrawItems(); break; case 1: DrawObjects(); break; case 2: DrawNPCSpawner(); break; } } private void DrawItems() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) Styles.BeginSection("Resource Items"); if (!itemsTriedLoad) { itemsTriedLoad = true; itemList = SpawnerActions.LoadItemsList(); } if (itemList.Count == 0) { GUILayout.Label("No items found. The game may not be fully loaded.", Styles.MutedLabel, Array.Empty()); if (GUILayout.Button("Retry Load", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(40f) })) { itemList = SpawnerActions.LoadItemsList(); } Styles.EndSection(); return; } itemScrollPos = GUILayout.BeginScrollView(itemScrollPos, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(400f) }); for (int i = 0; i < itemList.Count; i++) { if (GUILayout.Toggle(selectedItemIndex == i, itemList[i], Styles.Selector, Array.Empty())) { selectedItemIndex = i; } } GUILayout.EndScrollView(); Styles.EndSection(); Styles.BeginSection("Selected Item"); if (GUILayout.Button("Spawn: " + itemList[selectedItemIndex], Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(40f) })) { SpawnerActions.SpawnItem(itemList[selectedItemIndex]); } Styles.EndSection(); } private void DrawNPCSpawner() { Styles.BeginSection("Enemy Spawner"); for (int i = 0; i < enemyNames.Length; i++) { if (GUILayout.Toggle(selectedEnemyIndex == i, enemyNames[i], Styles.Selector, Array.Empty())) { selectedEnemyIndex = i; } } GUILayout.Space(UiLayout.Space(10f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Count (1-30):", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(110f) }); string text = GUILayout.TextField(spawnCountInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(70f) }); if (text != spawnCountInput) { spawnCountInput = Styles.FilterInteger(text); if (int.TryParse(spawnCountInput, out var result) && result > 0) { spawnCount = Mathf.Clamp(result, 1, 30); } } GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(10f)); if (GUILayout.Button($"Spawn {spawnCount}x {enemyNames[selectedEnemyIndex]}", Styles.Button, Array.Empty())) { SpawnEnemies(enemyNames[selectedEnemyIndex], spawnCount); } Styles.EndSection(); } private void SpawnEnemies(string enemyName, int count) { //IL_0063: 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) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) try { AiDirector val = Object.FindFirstObjectByType(); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("AiDirector not found"); return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { Vector3 val2 = default(Vector3); for (int i = 0; i < count; i++) { ((Vector3)(ref val2))..ctor(Random.Range(-3f, 3f), 0f, Random.Range(-3f, 3f)); val.SpawnEnemy(enemyName, ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f + val2); } HotDogCheatMod.Log($"Spawned {count}x {enemyName}"); } } catch (Exception ex) { HotDogCheatMod.LogError("Spawn failed: " + ex.Message); } } private void DrawObjects() { //IL_000c: 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) Styles.BeginSection("Objects"); objectScrollPos = GUILayout.BeginScrollView(objectScrollPos, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(420f) }); for (int i = 0; i < ObjectNames.Length; i++) { if (GUILayout.Toggle(selectedObjectIndex == i, ObjectNames[i], Styles.Selector, Array.Empty())) { selectedObjectIndex = i; } } GUILayout.EndScrollView(); Styles.EndSection(); Styles.BeginSection("Object Actions"); GUILayout.BeginHorizontal(Array.Empty()); if (GUILayout.Button("Spawn: " + ObjectNames[selectedObjectIndex], Styles.Button, Array.Empty())) { SpawnerActions.SpawnObject(ObjectNames[selectedObjectIndex]); } rainAllPlayers = GUILayout.Toggle(rainAllPlayers, "ALL PLAYERS", Styles.Toggle, Array.Empty()); GUILayout.EndHorizontal(); GUILayout.Space(UiLayout.Space(5f)); GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label("Rain Count (1-1000):", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(130f) }); string text = GUILayout.TextField(rainCountInput, Styles.TextField, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(70f) }); if (text != rainCountInput) { rainCountInput = Styles.FilterInteger(text); if (int.TryParse(rainCountInput, out var result) && result > 0) { rainCount = Mathf.Clamp(result, 1, 1000); } } if (GUILayout.Button($"Rain Objects ({rainCount})", Styles.Button, Array.Empty())) { SpawnerActions.RainItems(ObjectNames[selectedObjectIndex], rainCount, rainAllPlayers); } GUILayout.EndHorizontal(); Styles.EndSection(); } } public class TeleportTab { public void Draw() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); Styles.BeginSection("Destinations"); if (GUILayout.Button("Teleport to Hut", Styles.Button, Array.Empty())) { PlayerActions.TeleportToHut(localPlayer); } if (GUILayout.Button("Teleport to Crosshair", Styles.Button, Array.Empty())) { PlayerActions.TeleportToCrosshair(); } Styles.EndSection(); Styles.BeginSection("Saved Position"); if (GUILayout.Button("Save Current Position", Styles.Button, Array.Empty())) { PlayerActions.SaveCurrentTeleport(localPlayer); } if (GUILayout.Button("Teleport to Saved Position", Styles.Button, Array.Empty())) { PlayerActions.TeleportToSaved(localPlayer); } Styles.EndSection(); Styles.BeginSection("Host Tools"); if (GUILayout.Button("Mass Item Turn In", Styles.Button, Array.Empty())) { MassActions.MassItemTurnIn(); } Styles.EndSection(); } } } namespace HotDogCheat.ESP { public class ESPRenderer { private struct TaskEspTarget { public Vector3 Position; public string Label; public bool IsWeapon; public int TaskSlot; } private struct CabinetItemInfo { public string Label; public StealableObject Stealable; public CabinetDrawer Cabinet; } public ESPSettings Settings = new ESPSettings(); private float lastPlayerScan; private float lastNpcScan; private float lastItemScan; private float lastCabinetScan; private float lastWorldScan; private float lastTaskScan; private List cachedPlayers = new List(); private List cachedItems = new List(); private Bob cachedBob; private HumanAILink cachedHuman; private Spider cachedSpider; private CatAiLink cachedCat; private MoleAiLink cachedMole; private VacuumAiLink cachedVacuum; private List cachedRedcaps = new List(); private List cachedRats = new List(); private List cachedRoaches = new List(); private GameEntityBase cachedBoar; private GameEntityBase cachedDog; private List cachedBeehives = new List(); private GameEntityBase cachedBibi; private Fairy cachedFairy; private GameEntityBase cachedJonathan; private GameEntityBase cachedSealman; private List cachedDoors = new List(); private List cachedHatches = new List(); private List cachedTaskTargets = new List(); private PlayerTaskManager cachedTaskManager; private static readonly (HumanBodyBones a, HumanBodyBones b)[] SkeletonBonePairs = new(HumanBodyBones, HumanBodyBones)[19] { ((HumanBodyBones)10, (HumanBodyBones)9), ((HumanBodyBones)9, (HumanBodyBones)54), ((HumanBodyBones)9, (HumanBodyBones)8), ((HumanBodyBones)54, (HumanBodyBones)8), ((HumanBodyBones)54, (HumanBodyBones)7), ((HumanBodyBones)8, (HumanBodyBones)7), ((HumanBodyBones)7, (HumanBodyBones)0), ((HumanBodyBones)13, (HumanBodyBones)15), ((HumanBodyBones)15, (HumanBodyBones)17), ((HumanBodyBones)13, (HumanBodyBones)7), ((HumanBodyBones)14, (HumanBodyBones)16), ((HumanBodyBones)16, (HumanBodyBones)18), ((HumanBodyBones)14, (HumanBodyBones)7), ((HumanBodyBones)1, (HumanBodyBones)3), ((HumanBodyBones)3, (HumanBodyBones)5), ((HumanBodyBones)1, (HumanBodyBones)0), ((HumanBodyBones)2, (HumanBodyBones)4), ((HumanBodyBones)4, (HumanBodyBones)6), ((HumanBodyBones)2, (HumanBodyBones)0) }; private List cachedCabinetItems = new List(); private readonly List<(Transform t, string label, bool isWeapon, float dist)> itemDrawBuffer = new List<(Transform, string, bool, float)>(128); private readonly List itemDrawnRects = new List(64); private static readonly BindingFlags AnyInstance = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; private Texture2D espTex; private GUIStyle labelStyle; private bool stylesInit; public void Draw() { Camera main = Camera.main; if ((Object)(object)main == (Object)null) { return; } InitStyles(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); float time = Time.time; if (Settings.PlayerEnabled && time - lastPlayerScan > Settings.IntervalPlayers) { cachedPlayers = PlayerHelper.GetAllPlayers(); lastPlayerScan = time; } if (Settings.NpcEnabled && time - lastNpcScan > Settings.IntervalNpcs) { UpdateNpcCache(); lastNpcScan = time; } if ((Settings.ItemEnabled || Settings.TaskEnabled) && time - lastItemScan > Settings.IntervalItems) { cachedItems = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); lastItemScan = time; } if ((Settings.ItemEnabled || Settings.TaskEnabled) && time - lastCabinetScan > Settings.IntervalCabinets) { ScanCabinetContents(); lastCabinetScan = time; } if (Settings.TaskEnabled && time - lastTaskScan > Settings.IntervalTasks) { UpdateTaskCache(localPlayer); lastTaskScan = time; } else if (!Settings.TaskEnabled && cachedTaskTargets.Count > 0) { cachedTaskTargets.Clear(); } if (Settings.WorldEnabled && time - lastWorldScan > Settings.IntervalWorld) { if (Settings.WorldDoors) { cachedDoors = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); } if (Settings.WorldHatches) { cachedHatches = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); } lastWorldScan = time; } if (Settings.PlayerEnabled) { DrawPlayers(main, localPlayer); } if (Settings.NpcEnabled) { DrawNpcs(main, localPlayer); } if (Settings.ItemEnabled) { DrawItems(main, localPlayer); } if (Settings.TaskEnabled) { DrawTaskItems(main, localPlayer); } if (Settings.WorldEnabled) { DrawWorld(main, localPlayer); } } private void InitStyles() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_001e: 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_0041: 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_0054: Expected O, but got Unknown if (!stylesInit) { espTex = new Texture2D(1, 1); espTex.SetPixel(0, 0, Color.white); espTex.Apply(); labelStyle = new GUIStyle { fontSize = 12, fontStyle = (FontStyle)1, alignment = (TextAnchor)4 }; stylesInit = true; } } private void UpdateNpcCache() { if (Settings.NpcBob) { cachedBob = Object.FindFirstObjectByType(); } if (Settings.NpcHuman) { cachedHuman = Object.FindFirstObjectByType(); } if (Settings.NpcSpider) { cachedSpider = Object.FindFirstObjectByType(); } if (Settings.NpcCat) { cachedCat = Object.FindFirstObjectByType(); } if (Settings.NpcMole) { cachedMole = Object.FindFirstObjectByType(); } if (Settings.NpcVacuum) { cachedVacuum = Object.FindFirstObjectByType(); } if (Settings.NpcRedcap || Settings.NpcRat || Settings.NpcRoach || Settings.NpcBoar || Settings.NpcDog || Settings.NpcJonathan || Settings.NpcSealman) { GameEntityAI[] array = Object.FindObjectsByType((FindObjectsSortMode)0); cachedRedcaps.Clear(); cachedRats.Clear(); cachedRoaches.Clear(); cachedBoar = null; cachedDog = null; cachedJonathan = null; cachedSealman = null; GameEntityAI[] array2 = array; foreach (GameEntityAI val in array2) { if (!((Object)(object)val == (Object)null) && !((Object)(object)((GameEntityBase)val).EntityData == (Object)null)) { string name = ((Object)((GameEntityBase)val).EntityData).name; if (Settings.NpcRedcap && name == "Redcap") { cachedRedcaps.Add((GameEntityBase)(object)val); } if (Settings.NpcRat && name == "Rat") { cachedRats.Add((GameEntityBase)(object)val); } if (Settings.NpcRoach && name == "Roach") { cachedRoaches.Add((GameEntityBase)(object)val); } if (Settings.NpcBoar && name == "Boar") { cachedBoar = (GameEntityBase)(object)val; } if (Settings.NpcDog && name == "Pitbull") { cachedDog = (GameEntityBase)(object)val; } if (Settings.NpcJonathan && name == "Jonathan") { cachedJonathan = (GameEntityBase)(object)val; } if (Settings.NpcSealman && name == "Sealman") { cachedSealman = (GameEntityBase)(object)val; } } } } if (Settings.NpcBibi) { Bibi val2 = Object.FindFirstObjectByType(); cachedBibi = (GameEntityBase)(object)((val2 != null) ? ((Component)val2).GetComponent() : null); } if (Settings.NpcBeehive) { cachedBeehives = Object.FindObjectsByType((FindObjectsSortMode)0).ToList(); } if (Settings.NpcFairy) { cachedFairy = Object.FindFirstObjectByType(); } } private void ScanCabinetContents() { cachedCabinetItems.Clear(); CabinetDrawer[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (CabinetDrawer val in array) { if ((Object)(object)val == (Object)null || GetPrivateField(val, "wasInit", fallback: false) || !(GetPrivateField(val, "toSpawnOnCabinetOpen") is IList { Count: var count } list)) { continue; } for (int j = 0; j < count && j < 5; j++) { object obj = list[j]; if (obj == null) { continue; } FieldInfo field = obj.GetType().GetField("prefab", AnyInstance); if (field == null) { continue; } object? value = field.GetValue(obj); GameObject val2 = (GameObject)((value is GameObject) ? value : null); if (!((Object)(object)val2 == (Object)null)) { StealableObject component = val2.GetComponent(); if (!((Object)(object)component == (Object)null)) { cachedCabinetItems.Add(new CabinetItemInfo { Label = ((Object)val2).name, Stealable = component, Cabinet = val }); } } } } } private void UpdateTaskCache(PlayerNetworking local) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_084a: Unknown result type (might be due to invalid IL or missing references) //IL_084c: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_096f: Unknown result type (might be due to invalid IL or missing references) //IL_0991: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Unknown result type (might be due to invalid IL or missing references) //IL_09a5: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_0876: Unknown result type (might be due to invalid IL or missing references) //IL_0898: Unknown result type (might be due to invalid IL or missing references) //IL_089d: Unknown result type (might be due to invalid IL or missing references) //IL_08a7: Unknown result type (might be due to invalid IL or missing references) //IL_08ac: Unknown result type (might be due to invalid IL or missing references) //IL_08b1: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Invalid comparison between Unknown and I4 //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Invalid comparison between Unknown and I4 //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_045e: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0485: Unknown result type (might be due to invalid IL or missing references) //IL_048f: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0558: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_077c: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Invalid comparison between Unknown and I4 //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_0249: Unknown result type (might be due to invalid IL or missing references) //IL_0576: Unknown result type (might be due to invalid IL or missing references) //IL_057b: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_0721: Unknown result type (might be due to invalid IL or missing references) //IL_0642: Unknown result type (might be due to invalid IL or missing references) //IL_0669: Unknown result type (might be due to invalid IL or missing references) //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0742: Unknown result type (might be due to invalid IL or missing references) //IL_0612: Unknown result type (might be due to invalid IL or missing references) //IL_07b9: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07cd: Unknown result type (might be due to invalid IL or missing references) //IL_07d2: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) cachedTaskTargets.Clear(); if ((Object)(object)local == (Object)null) { return; } PlayerTaskManager val = FindLocalTaskManager(local); if ((Object)(object)val == (Object)null || val.AllTasks == null || val.AllTasks.Count == 0) { return; } bool flag = false; bool flag2 = false; HashSet hashSet = new HashSet(); HashSet hashSet2 = new HashSet(); HashSet hashSet3 = new HashSet(); HashSet hashSet4 = new HashSet(); List list = new List(); ItemCategory val2 = (ItemCategory)0; Dictionary dictionary = new Dictionary(); ReadOnly currentTasks = val.CurrentTasks; for (int i = 0; i < currentTasks.Length; i++) { TaskInstance val3 = currentTasks[i]; if (val3.wasCompleted || val3.currentCompletionCount >= val3.maxCompletionCount || val3.taskIndex < 0 || val3.taskIndex >= val.AllTasks.Count) { continue; } PlayerTaskBase val4 = val.AllTasks[val3.taskIndex]; if ((Object)(object)val4 == (Object)null) { continue; } val4.ReadCustomInfo(val3); if (val4 is BreakStealableTask) { flag = true; continue; } StealFromRoomTask val5 = (StealFromRoomTask)(object)((val4 is StealFromRoomTask) ? val4 : null); if (val5 != null) { RoomType privateField = GetPrivateField(val5, "cachedType", (RoomType)9); if ((int)privateField != 9 && (int)privateField != 6) { hashSet.Add(privateField); } continue; } PlayerStealTask val6 = (PlayerStealTask)(object)((val4 is PlayerStealTask) ? val4 : null); if (val6 != null) { ItemCategory privateField2 = GetPrivateField(val6, "cachedCategory", (ItemCategory)0); SpecificItemType privateField3 = GetPrivateField(val6, "cachedType", (SpecificItemType)0); if ((int)privateField2 != 0) { val2 |= privateField2; } if ((int)privateField3 != 0) { hashSet2.Add(privateField3); } } else if (val4 is GatherResourceTask) { if (val3.customIndex2 > 0) { hashSet3.Add(val3.customIndex); } } else if (val4 is ExplosionTask) { hashSet2.Add((SpecificItemType)3); } else if (val4 is KissGardenGnomesTask) { flag2 = true; } else if (val4 is GenericTaskWithRequirements) { TaskWorldRequirement[] privateField4 = GetPrivateField(val4, "requirements"); if (privateField4 == null) { continue; } dictionary[i] = privateField4; TaskWorldRequirement[] array = privateField4; foreach (TaskWorldRequirement val7 in array) { if (val7 != null) { if ((int)val7.requiredItemInWorld != 0) { hashSet2.Add(val7.requiredItemInWorld); } if ((int)val7.requiredItemCategoryInWorld != 0) { val2 |= val7.requiredItemCategoryInWorld; } if ((int)val7.requiredInteractableInWorld != 32) { hashSet4.Add(val7.requiredInteractableInWorld); } if ((Object)(object)val7.requiredEntityInSpawnList != (Object)null) { list.Add(val7.requiredEntityInSpawnList); } } } } else if (val4 is EntityActionTask) { EntityActionTask obj = (EntityActionTask)(object)((val4 is EntityActionTask) ? val4 : null); EntityData privateField5 = GetPrivateField(obj, "cachedTarget"); if ((Object)(object)privateField5 == (Object)null) { privateField5 = GetPrivateField(obj, "targetEntityType"); } if ((Object)(object)privateField5 != (Object)null) { list.Add(privateField5); } } } if (!flag && hashSet.Count == 0 && hashSet2.Count == 0 && hashSet3.Count == 0 && !flag2 && hashSet4.Count == 0 && list.Count == 0 && (int)val2 == 0) { return; } HashSet hashSet5 = new HashSet(); foreach (StealableObject cachedItem in cachedItems) { if ((Object)(object)cachedItem == (Object)null) { continue; } bool flag3 = false; if (flag && cachedItem.DieToImpacts) { flag3 = true; } if (!flag3 && hashSet.Count > 0 && hashSet.Contains(cachedItem.OriginallyInRoom)) { flag3 = true; } if (!flag3 && hashSet2.Count > 0 && hashSet2.Contains(cachedItem.ItemType)) { flag3 = true; } if (!flag3 && (int)val2 != 0 && (cachedItem.Category & val2) != 0) { flag3 = true; } if (!flag3 && hashSet3.Count > 0) { foreach (int item in hashSet3) { if (cachedItem.StealReward != null && cachedItem.StealReward[item] > 0) { flag3 = true; break; } } } if (flag3) { hashSet5.Add(cachedItem); } } foreach (StealableObject item2 in hashSet5) { int taskSlot = FindTaskSlotForItem(item2, val, currentTasks, dictionary); cachedTaskTargets.Add(new TaskEspTarget { Position = ((Component)item2).transform.position + Vector3.up * 0.3f, Label = ((Object)((Component)item2).gameObject).name, IsWeapon = IsWeapon(item2), TaskSlot = taskSlot }); } RoomTriggerListener val8 = default(RoomTriggerListener); foreach (CabinetItemInfo cachedCabinetItem in cachedCabinetItems) { if ((Object)(object)cachedCabinetItem.Cabinet == (Object)null || (Object)(object)cachedCabinetItem.Stealable == (Object)null) { continue; } bool flag4 = false; if (flag && cachedCabinetItem.Stealable.DieToImpacts) { flag4 = true; } if (!flag4 && hashSet2.Count > 0 && hashSet2.Contains(cachedCabinetItem.Stealable.ItemType)) { flag4 = true; } if (!flag4 && (int)val2 != 0 && (cachedCabinetItem.Stealable.Category & val2) != 0) { flag4 = true; } if (!flag4 && hashSet3.Count > 0) { foreach (int item3 in hashSet3) { if (cachedCabinetItem.Stealable.StealReward != null && cachedCabinetItem.Stealable.StealReward[item3] > 0) { flag4 = true; break; } } } if (!flag4 && hashSet.Count > 0 && (Object)(object)RoomManager.Instance != (Object)null && RoomManager.Instance.TryGetRoomEnvelopingPoint(((Component)cachedCabinetItem.Cabinet).transform.position, ref val8) && hashSet.Contains(val8.Type)) { flag4 = true; } if (flag4) { int taskSlot2 = FindTaskSlotForItem(cachedCabinetItem.Stealable, val, currentTasks, dictionary); cachedTaskTargets.Add(new TaskEspTarget { Position = ((Component)cachedCabinetItem.Cabinet).transform.position + Vector3.up * 0.3f, Label = "[Cabinet] " + cachedCabinetItem.Label, IsWeapon = IsWeapon(cachedCabinetItem.Stealable), TaskSlot = taskSlot2 }); } } if (flag2 && (Object)(object)RoomManager.Instance != (Object)null) { try { int taskSlot3 = -1; for (int k = 0; k < currentTasks.Length; k++) { if (!currentTasks[k].wasCompleted && currentTasks[k].taskIndex >= 0 && currentTasks[k].taskIndex < val.AllTasks.Count && (Object)/*isinst with value type is only supported in some contexts*/ != (Object)null) { taskSlot3 = k; break; } } foreach (InteractableObject item4 in RoomManager.Instance.GetAllInteractablesOfType((Type)12, RoomQuery.Default)) { if (!((Object)(object)item4 == (Object)null)) { cachedTaskTargets.Add(new TaskEspTarget { Position = ((Component)item4).transform.position + Vector3.up * 0.5f, Label = "Garden Gnome", TaskSlot = taskSlot3 }); } } } catch { } } if (hashSet4.Count > 0 && (Object)(object)RoomManager.Instance != (Object)null) { try { foreach (Type item5 in hashSet4) { foreach (InteractableObject item6 in RoomManager.Instance.GetAllInteractablesOfType(item5, RoomQuery.Default)) { if (!((Object)(object)item6 == (Object)null)) { int taskSlot4 = FindTaskSlotForInteractableType(item5, val, currentTasks, dictionary); cachedTaskTargets.Add(new TaskEspTarget { Position = ((Component)item6).transform.position + Vector3.up * 0.5f, Label = ((Object)((Component)item6).gameObject).name, TaskSlot = taskSlot4 }); } } } } catch { } } if (list.Count <= 0) { return; } try { GameEntityBase[] array2 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (GameEntityBase val9 in array2) { if (!((Object)(object)val9 == (Object)null) && !((Object)(object)val9.EntityData == (Object)null) && list.Contains(val9.EntityData)) { int taskSlot5 = FindTaskSlotForEntity(val9.EntityData, val, currentTasks, dictionary); cachedTaskTargets.Add(new TaskEspTarget { Position = ((Component)val9).transform.position + Vector3.up * 1f, Label = ((Object)((Component)val9).gameObject).name, TaskSlot = taskSlot5 }); } } } catch { } } private void DrawTaskItems(Camera cam, PlayerNetworking local) { //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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Expected O, but got Unknown //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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_0194: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: 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_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)local == (Object)null) { return; } List<(TaskEspTarget, float)> list = new List<(TaskEspTarget, float)>(); foreach (TaskEspTarget cachedTaskTarget in cachedTaskTargets) { float num = Vector3.Distance(((GameEntityBase)local).Position, cachedTaskTarget.Position); if (!(num > Settings.MaxDistance)) { list.Add((cachedTaskTarget, num)); } } list.Sort(((TaskEspTarget target, float dist) a, (TaskEspTarget target, float dist) b) => (a.target.IsWeapon != b.target.IsWeapon) ? ((!a.target.IsWeapon) ? 1 : (-1)) : a.dist.CompareTo(b.dist)); List list2 = new List(); int num2 = 0; Rect val4 = default(Rect); foreach (var item in list) { if (num2 >= 100) { break; } Vector3 val = WorldToScreen(cam, item.Item1.Position); if (val.z <= 0f) { continue; } Color val2 = (item.Item1.IsWeapon ? Settings.ColorWeapon : GetTaskSlotColor(item.Item1.TaskSlot)); string text = ""; if (Settings.TaskNames) { text = item.Item1.Label; } if (Settings.TaskDistance) { text += $"\n{item.Item2:F0}m"; } Vector2 val3 = labelStyle.CalcSize(new GUIContent(text)); ((Rect)(ref val4))..ctor(val.x - val3.x / 2f, val.y - val3.y - 4f, val3.x, val3.y); if (item.Item1.IsWeapon || !OverlapsExisting(val4, list2)) { if (Settings.TaskNames || Settings.TaskDistance) { DrawLabelAt(val, text, val2, val4); } if (Settings.TaskTracers) { DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height), new Vector2(val.x, val.y), val2, 1f); } list2.Add(val4); num2++; } } } private PlayerTaskManager FindLocalTaskManager(PlayerNetworking local) { if ((Object)(object)cachedTaskManager != (Object)null && (Object)(object)((Component)cachedTaskManager).gameObject != (Object)null) { return cachedTaskManager; } cachedTaskManager = ((Component)local).GetComponent() ?? ((Component)local).GetComponentInChildren(true) ?? ((Component)local).GetComponentInParent() ?? Object.FindFirstObjectByType(); return cachedTaskManager; } private static T GetPrivateField(object obj, string name, T fallback = default(T)) { if (obj == null) { return fallback; } FieldInfo field = obj.GetType().GetField(name, AnyInstance); if (field == null) { return fallback; } object value = field.GetValue(obj); if (value is T) { return (T)value; } return fallback; } private static bool IsWeapon(StealableObject item) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Invalid comparison between Unknown and I4 //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Invalid comparison between Unknown and I4 //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Invalid comparison between Unknown and I4 //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 if ((Object)(object)item == (Object)null) { return false; } if ((int)item.ItemType != 4 && (int)item.ItemType != 3 && (int)item.ItemType != 97 && (int)item.ItemType != 2 && (int)item.ItemType != 1 && (int)item.ItemType != 78 && (int)item.ItemType != 98) { return (int)item.ItemType == 94; } return true; } private Color GetTaskSlotColor(int slot) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_0055: 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) return (Color)(slot switch { 0 => Settings.ColorTask1, 1 => Settings.ColorTask2, 2 => Settings.ColorTask3, 3 => Settings.ColorTask4, 4 => Settings.ColorTask5, _ => Settings.ColorTask, }); } private bool ItemMatchesTask(StealableObject item, PlayerTaskManager taskManager, int taskListIndex, TaskInstance instance, Dictionary cachedGenReq = null) { //IL_0000: 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_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Invalid comparison between Unknown and I4 //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Invalid comparison between Unknown and I4 //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Invalid comparison between Unknown and I4 //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: 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_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: 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_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) if (instance.wasCompleted) { return false; } if (instance.currentCompletionCount >= instance.maxCompletionCount) { return false; } if (instance.taskIndex < 0 || instance.taskIndex >= taskManager.AllTasks.Count) { return false; } PlayerTaskBase val = taskManager.AllTasks[instance.taskIndex]; if ((Object)(object)val == (Object)null) { return false; } val.ReadCustomInfo(instance); if ((Object)(object)((val is BreakStealableTask) ? val : null) != (Object)null) { return item.DieToImpacts; } StealFromRoomTask val2 = (StealFromRoomTask)(object)((val is StealFromRoomTask) ? val : null); if ((Object)(object)val2 != (Object)null) { RoomType privateField = GetPrivateField(val2, "cachedType", (RoomType)9); if ((int)privateField != 9 && (int)privateField != 6) { return item.OriginallyInRoom == privateField; } return false; } PlayerStealTask val3 = (PlayerStealTask)(object)((val is PlayerStealTask) ? val : null); if ((Object)(object)val3 != (Object)null) { ItemCategory privateField2 = GetPrivateField(val3, "cachedCategory", (ItemCategory)0); SpecificItemType privateField3 = GetPrivateField(val3, "cachedType", (SpecificItemType)0); if ((int)privateField3 != 0 && item.ItemType == privateField3) { return true; } if ((int)privateField2 != 0 && (item.Category & privateField2) != 0) { return true; } return false; } if ((Object)(object)((val is GatherResourceTask) ? val : null) != (Object)null) { if (item.StealReward == null) { return false; } try { return instance.customIndex2 > 0 && item.StealReward[instance.customIndex] > 0; } catch { return false; } } if (val is ExplosionTask) { return (int)item.ItemType == 3; } if (val is KissGardenGnomesTask) { return false; } GenericTaskWithRequirements val4 = (GenericTaskWithRequirements)(object)((val is GenericTaskWithRequirements) ? val : null); if ((Object)(object)val4 != (Object)null) { TaskWorldRequirement[] array = null; if (cachedGenReq != null && cachedGenReq.TryGetValue(taskListIndex, out var value)) { array = value; } if (array == null) { array = GetPrivateField(val4, "requirements"); } if (array != null) { TaskWorldRequirement[] array2 = array; foreach (TaskWorldRequirement val5 in array2) { if (val5 != null) { if ((int)val5.requiredItemInWorld != 0 && item.ItemType == val5.requiredItemInWorld) { return true; } if ((int)val5.requiredItemCategoryInWorld != 0 && (item.Category & val5.requiredItemCategoryInWorld) != 0) { return true; } } } } return false; } _ = (Object)(object)((val is EntityActionTask) ? val : null) != (Object)null; return false; } private int FindTaskSlotForItem(StealableObject item, PlayerTaskManager taskManager, ReadOnly currentTasks, Dictionary cachedGenReq = null) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_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_0037: 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) for (int i = 0; i < currentTasks.Length; i++) { TaskInstance val = currentTasks[i]; if (!val.wasCompleted && val.taskIndex >= 0 && val.taskIndex < taskManager.AllTasks.Count && !((Object)(object)taskManager.AllTasks[val.taskIndex] == (Object)null) && ItemMatchesTask(item, taskManager, i, val, cachedGenReq)) { return i; } } return -1; } private int FindTaskSlotForInteractableType(Type iType, PlayerTaskManager taskManager, ReadOnly currentTasks, Dictionary cachedGenReq = null) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < currentTasks.Length; i++) { TaskInstance val = currentTasks[i]; if (val.wasCompleted || val.taskIndex < 0 || val.taskIndex >= taskManager.AllTasks.Count) { continue; } PlayerTaskBase val2 = taskManager.AllTasks[val.taskIndex]; if ((Object)(object)val2 == (Object)null) { continue; } GenericTaskWithRequirements val3 = (GenericTaskWithRequirements)(object)((val2 is GenericTaskWithRequirements) ? val2 : null); if ((Object)(object)val3 == (Object)null) { continue; } TaskWorldRequirement[] array = null; if (cachedGenReq != null && cachedGenReq.TryGetValue(i, out var value)) { array = value; } if (array == null) { array = GetPrivateField(val3, "requirements"); } if (array == null) { continue; } TaskWorldRequirement[] array2 = array; foreach (TaskWorldRequirement val4 in array2) { if (val4 != null && val4.requiredInteractableInWorld == iType) { return i; } } } return -1; } private int FindTaskSlotForEntity(EntityData entityData, PlayerTaskManager taskManager, ReadOnly currentTasks, Dictionary cachedGenReq = null) { //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < currentTasks.Length; i++) { TaskInstance val = currentTasks[i]; if (val.wasCompleted || val.taskIndex < 0 || val.taskIndex >= taskManager.AllTasks.Count) { continue; } PlayerTaskBase val2 = taskManager.AllTasks[val.taskIndex]; if ((Object)(object)val2 == (Object)null) { continue; } EntityActionTask val3 = (EntityActionTask)(object)((val2 is EntityActionTask) ? val2 : null); if ((Object)(object)val3 != (Object)null) { EntityData privateField = GetPrivateField(val3, "cachedTarget"); if ((Object)(object)privateField == (Object)null) { privateField = GetPrivateField(val3, "targetEntityType"); } if ((Object)(object)privateField == (Object)(object)entityData) { return i; } continue; } GenericTaskWithRequirements val4 = (GenericTaskWithRequirements)(object)((val2 is GenericTaskWithRequirements) ? val2 : null); if (!((Object)(object)val4 != (Object)null)) { continue; } TaskWorldRequirement[] array = null; if (cachedGenReq != null && cachedGenReq.TryGetValue(i, out var value)) { array = value; } if (array == null) { array = GetPrivateField(val4, "requirements"); } if (array == null) { continue; } TaskWorldRequirement[] array2 = array; foreach (TaskWorldRequirement val5 in array2) { if (val5 != null && (Object)(object)val5.requiredEntityInSpawnList == (Object)(object)entityData) { return i; } } } return -1; } private void DrawPlayers(Camera cam, PlayerNetworking local) { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0233: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)local == (Object)null) { return; } foreach (PlayerNetworking cachedPlayer in cachedPlayers) { if ((Object)(object)cachedPlayer == (Object)null) { continue; } if (!((NetworkBehaviour)cachedPlayer).IsLocalPlayer) { float num = Vector3.Distance(((GameEntityBase)local).Position, ((GameEntityBase)cachedPlayer).Position); if (num > Settings.MaxDistance) { continue; } Vector3 val = WorldToScreen(cam, ((GameEntityBase)cachedPlayer).Position + Vector3.up * 2f); if (val.z <= 0f) { continue; } Color colorPlayerOther = Settings.ColorPlayerOther; if (Settings.PlayerBoxes) { float num2 = Mathf.Abs(WorldToScreen(cam, ((GameEntityBase)cachedPlayer).Position - Vector3.up * 0.1f).y - val.y); float num3 = num2 * 0.4f; DrawBox(new Rect(val.x - num3 / 2f, val.y, num3, num2), colorPlayerOther); } if (Settings.PlayerNames || Settings.PlayerHealth || Settings.PlayerDistance) { string text = ""; if (Settings.PlayerNames) { text = PlayerHelper.GetPlayerName(cachedPlayer); } if (Settings.PlayerHealth && (Object)(object)cachedPlayer.Health != (Object)null) { text += $"\n{((HealthBase)cachedPlayer.Health).Health:F0} HP"; } if (Settings.PlayerDistance) { text += $"\n{num:F0}m"; } DrawLabel(val, text, colorPlayerOther); } if (Settings.PlayerTracers) { DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height), new Vector2(val.x, val.y), colorPlayerOther, 1f); } if (Settings.PlayerSkeleton) { DrawHumanoidSkeleton(cam, local, ((Component)cachedPlayer).GetComponent(), colorPlayerOther); } } else if (Settings.PlayerNames) { Vector3 val2 = WorldToScreen(cam, ((GameEntityBase)cachedPlayer).Position + Vector3.up * 2f); if (val2.z > 0f) { DrawLabel(val2, "[YOU]", Settings.ColorPlayerLocal); } } } } private void DrawNpcs(Camera cam, PlayerNetworking local) { //IL_0033: 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_0304: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_035c: 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_025f: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_03b6: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: 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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0552: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05aa: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_0490: 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_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_069b: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: 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_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_06e3: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: 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_073b: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_064a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)local == (Object)null) { return; } if (Settings.NpcBob && (Object)(object)cachedBob != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedBob).transform.position, "Bob", Settings.ColorBob, 1.5f); } if (Settings.NpcHuman && (Object)(object)cachedHuman != (Object)null) { string text = "Human"; if (cachedHuman.IsHoldingWeapon) { text += " [ARMED]"; } if ((Object)(object)cachedHuman.PlayerInHand != (Object)null) { text += " [HOLD]"; } if (Settings.NpcSkeleton) { Animator component = ((Component)cachedHuman).GetComponent(); DrawHumanoidSkeleton(cam, local, component, Settings.ColorHuman); Transform val = ((component != null) ? component.GetBoneTransform((HumanBodyBones)10) : null); Vector3 worldPos = (((Object)(object)val != (Object)null) ? (val.position + Vector3.up * 0.55f) : (((Component)cachedHuman).transform.position + Vector3.up * 2.5f)); float num = Vector3.Distance(((GameEntityBase)local).Position, ((Component)cachedHuman).transform.position); if (num <= Settings.MaxDistance) { Vector3 val2 = WorldToScreen(cam, worldPos); if (val2.z > 0f) { if (Settings.NpcNames || Settings.NpcDistance) { string text2 = ""; if (Settings.NpcNames) { text2 = text; } if (Settings.NpcDistance) { text2 += $"\n{num:F0}m"; } DrawLabel(val2, text2, Settings.ColorHuman); } if (Settings.NpcTracers) { DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height), new Vector2(val2.x, val2.y), Settings.ColorHuman, 1f); } } } } else { DrawNpcMarker(cam, local, ((Component)cachedHuman).transform.position, text, Settings.ColorHuman, 2f); } } if (Settings.NpcSpider && (Object)(object)cachedSpider != (Object)null) { string text3 = "Spider"; if ((Object)(object)((PlayerKidnapper)cachedSpider).CurrentlyHeld != (Object)null) { text3 += " [HOLD]"; } DrawNpcMarker(cam, local, ((Component)cachedSpider).transform.position, text3, Settings.ColorSpider, 1f); } if (Settings.NpcCat && (Object)(object)cachedCat != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedCat).transform.position, "Cat", Settings.ColorCat, 0.8f); } if (Settings.NpcMole && (Object)(object)cachedMole != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedMole).transform.position, "Mole", Settings.ColorMole, 0.6f); } if (Settings.NpcVacuum && (Object)(object)cachedVacuum != (Object)null) { string text4 = "Vacuum"; if (cachedVacuum.Off) { text4 += " [OFF]"; } DrawNpcMarker(cam, local, ((Component)cachedVacuum).transform.position, text4, Settings.ColorVacuum, 1f); } if (Settings.NpcRedcap) { foreach (GameEntityBase cachedRedcap in cachedRedcaps) { if ((Object)(object)cachedRedcap != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedRedcap).transform.position, "Redcap", Settings.ColorRedcap, 1.2f); } } } if (Settings.NpcRat) { foreach (GameEntityBase cachedRat in cachedRats) { if ((Object)(object)cachedRat != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedRat).transform.position, "Rat", Settings.ColorRat, 0.4f); } } } if (Settings.NpcRoach) { foreach (GameEntityBase cachedRoach in cachedRoaches) { if ((Object)(object)cachedRoach != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedRoach).transform.position, "Roach", Settings.ColorRoach, 0.2f); } } } if (Settings.NpcBoar && (Object)(object)cachedBoar != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedBoar).transform.position, "Boar", Settings.ColorBoar, 1f); } if (Settings.NpcDog && (Object)(object)cachedDog != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedDog).transform.position, "Dog", Settings.ColorDog, 0.8f); } if (Settings.NpcBibi && (Object)(object)cachedBibi != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedBibi).transform.position, "Bibi", Settings.ColorBibi, 0.7f); } if (Settings.NpcBeehive) { foreach (Beehive cachedBeehive in cachedBeehives) { if ((Object)(object)cachedBeehive != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedBeehive).transform.position, "Beehive", Settings.ColorBeehive, 1.5f); } } } if (Settings.NpcFairy && (Object)(object)cachedFairy != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedFairy).transform.position, "Fairy", Settings.ColorFairy, 0.8f); } if (Settings.NpcJonathan && (Object)(object)cachedJonathan != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedJonathan).transform.position, "Jonathan", Settings.ColorJonathan, 1.5f); } if (Settings.NpcSealman && (Object)(object)cachedSealman != (Object)null) { DrawNpcMarker(cam, local, ((Component)cachedSealman).transform.position, "Sealman", Settings.ColorSealman, 1.2f); } } private void DrawNpcMarker(Camera cam, PlayerNetworking local, Vector3 worldPos, string name, Color col, float height) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_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_003c: 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_005a: 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_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00f5: 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_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) float num = Vector3.Distance(((GameEntityBase)local).Position, worldPos); if (num > Settings.MaxDistance) { return; } Vector3 val = WorldToScreen(cam, worldPos + Vector3.up * (height + 0.5f)); if (val.z <= 0f) { return; } if (Settings.NpcBoxes) { float num2 = Mathf.Abs(WorldToScreen(cam, worldPos).y - val.y); float num3 = num2 * 0.5f; DrawBox(new Rect(val.x - num3 / 2f, val.y, num3, num2), col); } if (Settings.NpcNames || Settings.NpcDistance) { string text = ""; if (Settings.NpcNames) { text = name; } if (Settings.NpcDistance) { text += $"\n{num:F0}m"; } DrawLabel(val, text, col); } if (Settings.NpcTracers) { DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height), new Vector2(val.x, val.y), col, 1f); } } private void DrawItems(Camera cam, PlayerNetworking local) { //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0286: 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_028b: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Unknown result type (might be due to invalid IL or missing references) //IL_035b: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0389: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_0397: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)local == (Object)null) { return; } string text = Settings.ItemFilter?.Trim().ToLower() ?? ""; bool itemFilterWeaponsOnly = Settings.ItemFilterWeaponsOnly; List<(Transform, string, bool, float)> list = itemDrawBuffer; list.Clear(); foreach (StealableObject cachedItem in cachedItems) { if ((Object)(object)cachedItem == (Object)null) { continue; } float num = Vector3.Distance(((GameEntityBase)local).Position, ((Component)cachedItem).transform.position); if (!(num > Settings.MaxDistance)) { bool flag = IsWeapon(cachedItem); if ((!itemFilterWeaponsOnly || flag) && (text.Length <= 0 || ((Object)((Component)cachedItem).gameObject).name.ToLower().Contains(text))) { list.Add((((Component)cachedItem).transform, ((Object)((Component)cachedItem).gameObject).name, flag, num)); } } } foreach (CabinetItemInfo cachedCabinetItem in cachedCabinetItems) { if ((Object)(object)cachedCabinetItem.Cabinet == (Object)null) { continue; } float num2 = Vector3.Distance(((GameEntityBase)local).Position, ((Component)cachedCabinetItem.Cabinet).transform.position); if (!(num2 > Settings.MaxDistance)) { bool flag2 = IsWeapon(cachedCabinetItem.Stealable); if ((!itemFilterWeaponsOnly || flag2) && (text.Length <= 0 || cachedCabinetItem.Label.ToLower().Contains(text))) { list.Add((((Component)cachedCabinetItem.Cabinet).transform, "[Cabinet] " + cachedCabinetItem.Label, flag2, num2)); } } } list.Sort(((Transform t, string label, bool isWeapon, float dist) a, (Transform t, string label, bool isWeapon, float dist) b) => (a.isWeapon != b.isWeapon) ? ((!a.isWeapon) ? 1 : (-1)) : a.dist.CompareTo(b.dist)); List list2 = itemDrawnRects; list2.Clear(); int num3 = 0; Rect val4 = default(Rect); foreach (var item in list) { if (num3 >= 50) { break; } Vector3 val = WorldToScreen(cam, item.Item1.position + Vector3.up * 0.3f); if (val.z <= 0f) { continue; } Color val2 = (item.Item3 ? Settings.ColorWeapon : Settings.ColorItem); string text2 = ""; if (Settings.ItemNames) { text2 = item.Item2; } if (Settings.ItemDistance) { text2 += $"\n{item.Item4:F0}m"; } Vector2 val3 = labelStyle.CalcSize(new GUIContent(text2)); ((Rect)(ref val4))..ctor(val.x - val3.x / 2f, val.y - val3.y - 4f, val3.x, val3.y); if (item.Item3 || !OverlapsExisting(val4, list2)) { if (Settings.ItemNames || Settings.ItemDistance) { DrawLabelAt(val, text2, val2, val4); } if (Settings.ItemTracers) { DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height), new Vector2(val.x, val.y), val2, 1f); } list2.Add(val4); num3++; } } } private void DrawWorld(Camera cam, PlayerNetworking local) { //IL_004c: 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_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_020e: 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_021d: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Unknown result type (might be due to invalid IL or missing references) //IL_02c6: 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_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)local == (Object)null) { return; } int num = 0; if (Settings.WorldDoors) { foreach (PushableDoor cachedDoor in cachedDoors) { if ((Object)(object)cachedDoor == (Object)null || num >= 100) { break; } float num2 = Vector3.Distance(((GameEntityBase)local).Position, ((Component)cachedDoor).transform.position); if (num2 > Settings.MaxDistance) { continue; } Vector3 val = WorldToScreen(cam, ((Component)cachedDoor).transform.position + Vector3.up * 1f); if (val.z <= 0f) { continue; } if (Settings.WorldNames || Settings.WorldDistance) { string text = ""; if (Settings.WorldNames) { text = "Door"; } if (Settings.WorldDistance) { text += $"\n{num2:F0}m"; } DrawLabel(val, text, Settings.ColorDoor); } if (Settings.WorldTracers) { DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height), new Vector2(val.x, val.y), Settings.ColorDoor, 1f); } num++; } } if (!Settings.WorldHatches) { return; } foreach (GnomeHouse cachedHatch in cachedHatches) { if ((Object)(object)cachedHatch == (Object)null || num >= 100) { break; } float num3 = Vector3.Distance(((GameEntityBase)local).Position, ((Component)cachedHatch).transform.position); if (num3 > Settings.MaxDistance) { continue; } Vector3 val2 = WorldToScreen(cam, ((Component)cachedHatch).transform.position + Vector3.up * 2f); if (val2.z <= 0f) { continue; } if (Settings.WorldNames || Settings.WorldDistance) { string text2 = ""; if (Settings.WorldNames) { text2 = "Hatch"; } if (Settings.WorldDistance) { text2 += $"\n{num3:F0}m"; } DrawLabel(val2, text2, Settings.ColorHatch); } if (Settings.WorldTracers) { DrawLine(new Vector2((float)Screen.width / 2f, (float)Screen.height), new Vector2(val2.x, val2.y), Settings.ColorHatch, 1f); } num++; } } private void DrawHumanoidSkeleton(Camera cam, PlayerNetworking local, Animator anim, Color col) { //IL_0033: 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_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: 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_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)anim == (Object)null || (Object)(object)local == (Object)null || (Object)(object)cam == (Object)null) { return; } (HumanBodyBones, HumanBodyBones)[] skeletonBonePairs = SkeletonBonePairs; for (int i = 0; i < skeletonBonePairs.Length; i++) { (HumanBodyBones, HumanBodyBones) tuple = skeletonBonePairs[i]; Transform boneTransform = anim.GetBoneTransform(tuple.Item1); Transform boneTransform2 = anim.GetBoneTransform(tuple.Item2); if ((Object)(object)boneTransform == (Object)null || (Object)(object)boneTransform2 == (Object)null) { continue; } Vector3 position = boneTransform.position; Vector3 position2 = boneTransform2.position; float num = Vector3.Distance(((GameEntityBase)local).Position, position); float num2 = Vector3.Distance(((GameEntityBase)local).Position, position2); if (num > Settings.MaxDistance && num2 > Settings.MaxDistance) { continue; } Vector3 val = WorldToScreen(cam, position); Vector3 val2 = WorldToScreen(cam, position2); if (!(val.z <= 0f) && !(val2.z <= 0f)) { float num3 = 500f; if (!(val.x < 0f - num3) && !(val.x > (float)Screen.width + num3) && !(val.y < 0f - num3) && !(val.y > (float)Screen.height + num3) && !(val2.x < 0f - num3) && !(val2.x > (float)Screen.width + num3) && !(val2.y < 0f - num3) && !(val2.y > (float)Screen.height + num3)) { DrawLine(new Vector2(val.x, val.y), new Vector2(val2.x, val2.y), col, 1.5f); } } } } private Vector3 WorldToScreen(Camera cam, Vector3 worldPos) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0010: 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) Vector3 val = cam.WorldToScreenPoint(worldPos); val.y = (float)Screen.height - val.y; return val; } private void DrawLabel(Vector3 screenPos, string text, Color col) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown //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) //IL_0014: 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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) Vector2 val = labelStyle.CalcSize(new GUIContent(text)); Rect rect = default(Rect); ((Rect)(ref rect))..ctor(screenPos.x - val.x / 2f, screenPos.y - val.y - 4f, val.x, val.y); DrawLabelAt(screenPos, text, col, rect); } private void DrawLabelAt(Vector3 screenPos, string text, Color col, Rect rect) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0059: 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) labelStyle.normal.textColor = Color.black; GUI.Label(new Rect(((Rect)(ref rect)).x + 1f, ((Rect)(ref rect)).y + 1f, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, labelStyle); labelStyle.normal.textColor = col; GUI.Label(rect, text, labelStyle); } private static bool OverlapsExisting(Rect test, List drawn) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < drawn.Count; i++) { if (((Rect)(ref test)).Overlaps(drawn[i])) { return true; } } return false; } private void DrawBox(Rect rect, Color color) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) Color color2 = GUI.color; GUI.color = color; float num = 2f; GUI.DrawTexture(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y, ((Rect)(ref rect)).width, num), (Texture)(object)espTex); GUI.DrawTexture(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y + ((Rect)(ref rect)).height - num, ((Rect)(ref rect)).width, num), (Texture)(object)espTex); GUI.DrawTexture(new Rect(((Rect)(ref rect)).x, ((Rect)(ref rect)).y, num, ((Rect)(ref rect)).height), (Texture)(object)espTex); GUI.DrawTexture(new Rect(((Rect)(ref rect)).x + ((Rect)(ref rect)).width - num, ((Rect)(ref rect)).y, num, ((Rect)(ref rect)).height), (Texture)(object)espTex); GUI.color = color2; } private void DrawLine(Vector2 start, Vector2 end, Color color, float width) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: 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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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_002f: 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_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_0054: 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) Color color2 = GUI.color; GUI.color = color; Vector2 val = end - start; float num = Mathf.Atan2(val.y, val.x) * 57.29578f; Matrix4x4 matrix = GUI.matrix; GUIUtility.RotateAroundPivot(num, start); GUI.DrawTexture(new Rect(start.x, start.y - width / 2f, ((Vector2)(ref val)).magnitude, width), (Texture)(object)espTex); GUI.matrix = matrix; GUI.color = color2; } } public class ESPSettings { public bool PlayerEnabled; public bool PlayerBoxes = true; public bool PlayerNames = true; public bool PlayerHealth = true; public bool PlayerDistance = true; public bool PlayerTracers; public bool PlayerSkeleton; public bool NpcEnabled; public bool NpcBob = true; public bool NpcHuman = true; public bool NpcSpider = true; public bool NpcCat; public bool NpcMole; public bool NpcVacuum; public bool NpcRedcap; public bool NpcRat; public bool NpcRoach; public bool NpcBoar; public bool NpcDog; public bool NpcBeehive; public bool NpcBibi; public bool NpcFairy; public bool NpcJonathan; public bool NpcSealman; public bool NpcBoxes = true; public bool NpcNames = true; public bool NpcDistance = true; public bool NpcTracers; public bool NpcSkeleton = true; public bool ItemEnabled; public bool ItemNames = true; public bool ItemDistance = true; public bool ItemTracers; public string ItemFilter = ""; public bool ItemFilterWeaponsOnly; public bool WorldEnabled; public bool WorldDoors = true; public bool WorldHatches = true; public bool WorldNames = true; public bool WorldDistance = true; public bool WorldTracers; public bool TaskEnabled; public bool TaskNames = true; public bool TaskDistance = true; public bool TaskTracers; public float MaxDistance = 200f; public bool ShowKeybindsUi; public bool KeybindsUiRightSide; public float IntervalPlayers = 0.1f; public float IntervalNpcs = 0.2f; public float IntervalItems = 2f; public float IntervalCabinets = 5f; public float IntervalWorld = 5f; public float IntervalTasks = 0.5f; public Color ColorPlayerOther = new Color(0f, 0f, 1f); public Color ColorPlayerLocal = Color.cyan; public Color ColorBob = new Color(0f, 0.922f, 0.016f); public Color ColorHuman = new Color(1f, 0f, 1f); public Color ColorSpider = Color.red; public Color ColorCat = new Color(0.6f, 0.4f, 0.2f); public Color ColorMole = new Color(0f, 0f, 1f); public Color ColorVacuum = Color.gray; public Color ColorRedcap = new Color(0.8f, 0.2f, 0.2f); public Color ColorRat = new Color(0.5f, 0.35f, 0.2f); public Color ColorRoach = new Color(0.4f, 0.2f, 0.1f); public Color ColorBoar = new Color(0.5f, 0.2f, 0.05f); public Color ColorDog = new Color(0f, 0.958f, 1f); public Color ColorBeehive = new Color(1f, 0.8f, 0.1f); public Color ColorBibi = new Color(0.4f, 0.6f, 0.3f); public Color ColorFairy = new Color(1f, 0.4f, 0.7f); public Color ColorJonathan = new Color(0.2f, 0.6f, 0.8f); public Color ColorSealman = new Color(0.4f, 0.55f, 0.7f); public Color ColorItem = new Color(0f, 0.895f, 1f); public Color ColorTask = new Color(0.75f, 0f, 1f); public Color ColorTask1 = new Color(0.75f, 0f, 1f); public Color ColorTask2 = new Color(0f, 1f, 1f); public Color ColorTask3 = new Color(1f, 0.5f, 0f); public Color ColorTask4 = new Color(0.5f, 1f, 0f); public Color ColorTask5 = new Color(1f, 0.4f, 0.8f); public Color ColorWeapon = Color.red; public Color ColorDoor = new Color(0.3f, 0.7f, 1f); public Color ColorHatch = new Color(1f, 0.4f, 0.8f); public void Save() { PersistentConfig.SaveObject("ESP", this); PersistentConfig.SaveToDisk(); } public void Load() { PersistentConfig.LoadObject("ESP", this); } public void ResetToDefaults() { ESPSettings obj = new ESPSettings(); FieldInfo[] fields = typeof(ESPSettings).GetFields(BindingFlags.Instance | BindingFlags.Public); foreach (FieldInfo fieldInfo in fields) { fieldInfo.SetValue(this, fieldInfo.GetValue(obj)); } } } } namespace HotDogCheat.Features { public class BulletTimeFeature { private readonly HashSet playerRigidbodies = new HashSet(); private readonly HashSet worldRigidbodySet = new HashSet(); private readonly List worldRigidbodies = new List(); private readonly List originalKinematicStates = new List(); private readonly List savedLinearVelocities = new List(); private readonly List savedAngularVelocities = new List(); private bool rigidbodiesPaused; private readonly HashSet worldAnimatorSet = new HashSet(); private readonly List worldAnimators = new List(); private readonly List worldAnimatorSpeeds = new List(); private readonly HashSet worldAudioSet = new HashSet(); private readonly List worldAudioSources = new List(); private readonly List worldAudioWasPlaying = new List(); private bool resourcesPaused; private float rescanTimer; private readonly HashSet worldAISet = new HashSet(); private readonly List worldAIs = new List(); private readonly List originalAIEnabledStates = new List(); private bool aiPaused; private Rigidbody unkinematicedHeld; public bool Enabled { get; private set; } public void Toggle() { if (Enabled) { Disable(); } else { Enable(); } } public void Enable() { if (!Enabled) { Enabled = true; CachePlayerRigidbodies(); PauseWorldAI(); PauseWorldRigidbodies(); PauseWorldResources(); HotDogCheatMod.Log("Bullet Time: ON (world frozen)"); } } public void Disable() { if (Enabled) { Enabled = false; try { ReFreezeHeldItem(); } catch (Exception arg) { HotDogCheatMod.Log($"BulletTime.Disable: ReFreezeHeldItem failed: {arg}"); } try { ResumeWorldRigidbodies(); } catch (Exception arg2) { HotDogCheatMod.Log($"BulletTime.Disable: ResumeWorldRigidbodies failed: {arg2}"); } try { ResumeWorldResources(); } catch (Exception arg3) { HotDogCheatMod.Log($"BulletTime.Disable: ResumeWorldResources failed: {arg3}"); } try { ResumeWorldAI(); } catch (Exception arg4) { HotDogCheatMod.Log($"BulletTime.Disable: ResumeWorldAI failed: {arg4}"); } HotDogCheatMod.Log("Bullet Time: OFF (time resumed)"); } } public void OnUpdate() { if (Enabled) { rescanTimer += Time.unscaledDeltaTime; if (rescanTimer >= 0.25f) { rescanTimer = 0f; CachePlayerRigidbodies(); PauseWorldAI(); PauseWorldRigidbodies(); PauseWorldResources(); } UnkinematicHeldItems(); } } private void CachePlayerRigidbodies() { playerRigidbodies.Clear(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { CacheRigidbodiesInHierarchy(((Component)localPlayer).transform, 3); if ((Object)(object)localPlayer.Puppet != (Object)null) { CacheRigidbodiesInHierarchy(((Component)localPlayer.Puppet).transform, 3); } } } private void CacheRigidbodiesInHierarchy(Transform root, int maxLevels) { Transform val = root; int num = 0; while ((Object)(object)val != (Object)null && num < maxLevels) { Rigidbody[] componentsInChildren = ((Component)val).GetComponentsInChildren(true); foreach (Rigidbody val2 in componentsInChildren) { if (!((Object)(object)val2 == (Object)null) && !((Object)(object)((Component)val2).GetComponentInParent() != (Object)null)) { playerRigidbodies.Add(val2); } } val = val.parent; num++; } } private void PauseWorldRigidbodies() { //IL_0068: 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) Rigidbody[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (Rigidbody val in array) { if (!((Object)(object)val == (Object)null) && !playerRigidbodies.Contains(val) && !worldRigidbodySet.Contains(val)) { worldRigidbodySet.Add(val); worldRigidbodies.Add(val); originalKinematicStates.Add(val.isKinematic); savedLinearVelocities.Add(val.linearVelocity); savedAngularVelocities.Add(val.angularVelocity); val.isKinematic = true; } } rigidbodiesPaused = true; } private void ResumeWorldRigidbodies() { //IL_0051: 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) if (!rigidbodiesPaused) { return; } for (int i = 0; i < worldRigidbodies.Count; i++) { if ((Object)(object)worldRigidbodies[i] != (Object)null) { worldRigidbodies[i].isKinematic = originalKinematicStates[i]; worldRigidbodies[i].linearVelocity = savedLinearVelocities[i]; worldRigidbodies[i].angularVelocity = savedAngularVelocities[i]; } } worldRigidbodySet.Clear(); worldRigidbodies.Clear(); originalKinematicStates.Clear(); savedLinearVelocities.Clear(); savedAngularVelocities.Clear(); rigidbodiesPaused = false; } private void UnkinematicHeldItems() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); Rigidbody val = null; if ((Object)(object)localPlayer != (Object)null) { PlayerHandController val2 = ((Component)localPlayer).GetComponent(); if ((Object)(object)val2 == (Object)null) { val2 = ((Component)localPlayer).GetComponentInChildren(true); } if ((Object)(object)val2 != (Object)null && val2.ActivePushObject != null && (Object)(object)val2.ActivePushObject.Rb != (Object)null) { val = val2.ActivePushObject.Rb; } } if ((Object)(object)val == (Object)null) { FreeCamFeature freeCamFeature = HotDogCheatMod.Instance?.FeatureManager?.FreeCam; if (freeCamFeature != null && freeCamFeature.Enabled) { val = freeCamFeature.HeldRigidbody; } } if ((Object)(object)unkinematicedHeld != (Object)null && (Object)(object)unkinematicedHeld != (Object)(object)val) { ReFreezeHeldItem(); } if ((Object)(object)val != (Object)null && (Object)(object)val != (Object)(object)unkinematicedHeld) { val.isKinematic = false; UnpauseResourceTree(((Component)val).gameObject); unkinematicedHeld = val; } } private void ReFreezeHeldItem() { //IL_0025: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)unkinematicedHeld == (Object)null) { return; } Rigidbody val = unkinematicedHeld; unkinematicedHeld = null; try { bool isKinematic = val.isKinematic; Vector3 linearVelocity = val.linearVelocity; Vector3 angularVelocity = val.angularVelocity; GameObject gameObject = ((Component)val).gameObject; int num = worldRigidbodies.IndexOf(val); if (num < 0) { worldRigidbodySet.Add(val); worldRigidbodies.Add(val); originalKinematicStates.Add(isKinematic); savedLinearVelocities.Add(linearVelocity); savedAngularVelocities.Add(angularVelocity); num = worldRigidbodies.Count - 1; } else { savedLinearVelocities[num] = linearVelocity; savedAngularVelocities[num] = angularVelocity; } val.isKinematic = true; PauseResourceTree(gameObject); } catch (Exception arg) { HotDogCheatMod.Log($"BulletTime.ReFreezeHeldItem failed (continuing): {arg}"); } } private void PauseWorldAI() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); Transform val = (((Object)(object)localPlayer != (Object)null) ? ((Component)localPlayer).transform : null); Transform val2 = (((Object)(object)localPlayer != (Object)null && (Object)(object)localPlayer.Puppet != (Object)null) ? ((Component)localPlayer.Puppet).transform : null); GameEntityAI[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (GameEntityAI val3 in array) { if (!((Object)(object)val3 == (Object)null) && !worldAISet.Contains(val3) && (!((Object)(object)localPlayer != (Object)null) || !IsDescendantOfAny(((Component)val3).transform, val, val2))) { worldAISet.Add(val3); worldAIs.Add(val3); originalAIEnabledStates.Add(((Behaviour)val3).enabled); ((Behaviour)val3).enabled = false; } } aiPaused = true; } private void ResumeWorldAI() { if (!aiPaused) { return; } for (int i = 0; i < worldAIs.Count; i++) { if ((Object)(object)worldAIs[i] != (Object)null) { ((Behaviour)worldAIs[i]).enabled = originalAIEnabledStates[i]; } } worldAISet.Clear(); worldAIs.Clear(); originalAIEnabledStates.Clear(); aiPaused = false; } private void PauseWorldResources() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); Transform val = (((Object)(object)localPlayer != (Object)null) ? ((Component)localPlayer).transform : null); Transform val2 = (((Object)(object)localPlayer != (Object)null && (Object)(object)localPlayer.Puppet != (Object)null) ? ((Component)localPlayer.Puppet).transform : null); Animator[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (Animator val3 in array) { if (!((Object)(object)val3 == (Object)null) && (!((Object)(object)localPlayer != (Object)null) || !IsDescendantOfAny(((Component)val3).transform, val, val2)) && !worldAnimatorSet.Contains(val3)) { worldAnimatorSet.Add(val3); worldAnimators.Add(val3); worldAnimatorSpeeds.Add(val3.speed); val3.speed = 0f; } } AudioSource[] array2 = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (AudioSource val4 in array2) { if (!((Object)(object)val4 == (Object)null) && (!((Object)(object)localPlayer != (Object)null) || !IsDescendantOfAny(((Component)val4).transform, val, val2)) && !worldAudioSet.Contains(val4)) { worldAudioSet.Add(val4); worldAudioSources.Add(val4); worldAudioWasPlaying.Add(val4.isPlaying); val4.Pause(); } } resourcesPaused = true; } private void ResumeWorldResources() { if (!resourcesPaused) { return; } for (int i = 0; i < worldAnimators.Count; i++) { if ((Object)(object)worldAnimators[i] != (Object)null) { worldAnimators[i].speed = worldAnimatorSpeeds[i]; } } worldAnimatorSet.Clear(); worldAnimators.Clear(); worldAnimatorSpeeds.Clear(); for (int j = 0; j < worldAudioSources.Count; j++) { if ((Object)(object)worldAudioSources[j] != (Object)null && worldAudioWasPlaying[j]) { worldAudioSources[j].UnPause(); } } worldAudioSet.Clear(); worldAudioSources.Clear(); worldAudioWasPlaying.Clear(); resourcesPaused = false; } private void PauseResourceTree(GameObject root) { if ((Object)(object)root == (Object)null) { return; } Animator[] componentsInChildren = root.GetComponentsInChildren(true); foreach (Animator val in componentsInChildren) { if (!((Object)(object)val == (Object)null)) { if (!worldAnimatorSet.Contains(val)) { worldAnimatorSet.Add(val); worldAnimators.Add(val); worldAnimatorSpeeds.Add(val.speed); } val.speed = 0f; } } AudioSource[] componentsInChildren2 = root.GetComponentsInChildren(true); foreach (AudioSource val2 in componentsInChildren2) { if (!((Object)(object)val2 == (Object)null)) { if (!worldAudioSet.Contains(val2)) { worldAudioSet.Add(val2); worldAudioSources.Add(val2); worldAudioWasPlaying.Add(val2.isPlaying); } val2.Pause(); } } } private void UnpauseResourceTree(GameObject root) { if ((Object)(object)root == (Object)null) { return; } Animator[] componentsInChildren = root.GetComponentsInChildren(true); foreach (Animator val in componentsInChildren) { if ((Object)(object)val == (Object)null || !worldAnimatorSet.Contains(val)) { continue; } for (int num = worldAnimators.Count - 1; num >= 0; num--) { if ((Object)(object)worldAnimators[num] == (Object)(object)val) { val.speed = worldAnimatorSpeeds[num]; worldAnimatorSet.Remove(val); worldAnimators.RemoveAt(num); worldAnimatorSpeeds.RemoveAt(num); break; } } } AudioSource[] componentsInChildren2 = root.GetComponentsInChildren(true); foreach (AudioSource val2 in componentsInChildren2) { if ((Object)(object)val2 == (Object)null || !worldAudioSet.Contains(val2)) { continue; } val2.UnPause(); for (int num2 = worldAudioSources.Count - 1; num2 >= 0; num2--) { if ((Object)(object)worldAudioSources[num2] == (Object)(object)val2) { worldAudioSet.Remove(val2); worldAudioSources.RemoveAt(num2); worldAudioWasPlaying.RemoveAt(num2); break; } } } } private static bool IsDescendantOfAny(Transform t, params Transform[] ancestors) { if ((Object)(object)t == (Object)null || ancestors == null) { return false; } foreach (Transform val in ancestors) { if ((Object)(object)val == (Object)null) { continue; } Transform val2 = t; while ((Object)(object)val2 != (Object)null) { if ((Object)(object)val2 == (Object)(object)val) { return true; } val2 = val2.parent; } } return false; } } public class FreeCamFeature { public enum FreeCamMode { Normal, KnifeThrow, Gun, RPG, Shotgun, BlackHole, Interact, TeleportPlayer } public float MoveSpeed = 20f; private float uiAlpha; private float uiTimer; private float modeWheelOffset; private static readonly string[] modeNames = new string[8] { "NORMAL", "KNIFE THROW", "GUN", "RPG", "SHOTGUN", "BLACK HOLE", "INTERACT", "TELEPORT" }; private bool isSpawnerMode; private int spawnerSelectedIndex; private float yaw; private float pitch; private float lookSensitivity = 0.15f; private float knifeThrowPower = 30f; private const float knifeMinPower = 10f; private const float knifeMaxPower = 200f; private float knifeCooldown; private float knifeThrowRate = 4f; private float knifeDespawnTime = 7f; private float gunCooldown; private float gunCooldownTime = 0.4f; public bool GunRapidFire; private float gunRapidFireRate = 8f; private float rpgCooldown; private float rpgCooldownTime = 1f; public bool RpgRapidFire; private float rpgRapidFireRate = 4f; private float rpgProjectileSpeed = 40f; public bool RpgAccurate = true; private float shotgunCooldown; private float shotgunCooldownTime = 0.8f; public bool ShotgunRapidFire; private float shotgunRapidFireRate = 6f; private float blackHoleStrength = 45f; private float blackHoleRadius = 14f; private float blackHoleHostWarnCooldown; private float teleportCooldown; private const float TeleportCooldownTime = 0.3f; private const float HintLabelBottomOffset = 200f; private Rigidbody heldRigidbody; private IPlayerPushable heldPushable; private Vector3 heldLocalGrabPoint; private bool heldUsesGrabPoint; private bool heldOriginalUseGravity; private bool heldSavedGravity; private float holdDistance = 4f; private float holdStrength = 15f; private float interactGrabStrength = 1f; private bool pendingLeftClick; private float pendingLeftClickTime; private RaycastHit pendingLeftClickHit; private IInteractable pendingLeftClickInteractable; private const float InteractClickHoldThreshold = 0.18f; private PlayerNetworking localPlayer; private MonoBehaviour savedActor; private CursorLockMode savedCursorLockState; private bool savedCursorVisible; private Vector3 savedPlayerPos; private Transform cachedPlayerParent; private Vector3 savedPuppetParentPos; private Vector3 freeCamPosition; private Quaternion freeCamRotation; private Transform freeCamCamera; private GameObject freeCamCameraObject; private Camera originalCamera; private bool originalCameraEnabled; private string originalCameraTag; private AudioListener originalAudioListener; private bool originalAudioListenerEnabled; private AudioListener freeCamAudioListener; private Camera3D savedCameraController; private bool savedCameraControllerEnabled; private IInteractable hoveredInteractable; private InteractOutline hoveredOutline; private static FieldInfo _fTargetRoot; private static FieldInfo _fCanBeCarriedByBob; private static FieldInfo _fGunBulletCount; private static MethodInfo _mGunDoShoot; private GnomeHouse cachedGnomeHouse; private static FieldInfo _fRocketLauncherMissilePrefab; private static GameObject _cachedRpgMissilePrefab; public bool Enabled { get; private set; } public FreeCamMode CurrentMode { get; private set; } public float LookSensitivity { get { return lookSensitivity; } set { lookSensitivity = Mathf.Clamp(value, 0.02f, 2f); } } public float BlackHoleStrength { get { return blackHoleStrength; } set { blackHoleStrength = Mathf.Clamp(value, 5f, 300f); } } public float BlackHoleRadius { get { return blackHoleRadius; } set { blackHoleRadius = Mathf.Clamp(value, 2f, 80f); } } public float InteractGrabStrength { get { return interactGrabStrength; } set { interactGrabStrength = Mathf.Clamp(value, 1f, 5f); } } public float KnifeThrowPower { get { return knifeThrowPower; } set { knifeThrowPower = Mathf.Clamp(value, 10f, 200f); } } public float KnifeThrowRate { get { return knifeThrowRate; } set { knifeThrowRate = Mathf.Clamp(value, 1f, 30f); } } public float KnifeDespawnTime { get { return knifeDespawnTime; } set { knifeDespawnTime = Mathf.Clamp(value, 1f, 60f); } } public float GunCooldownTime { get { return gunCooldownTime; } set { gunCooldownTime = Mathf.Clamp(value, 0.01f, 2f); } } public float GunRapidFireRate { get { return gunRapidFireRate; } set { gunRapidFireRate = Mathf.Clamp(value, 1f, 30f); } } public float RpgCooldownTime { get { return rpgCooldownTime; } set { rpgCooldownTime = Mathf.Clamp(value, 0.01f, 2f); } } public float RpgRapidFireRate { get { return rpgRapidFireRate; } set { rpgRapidFireRate = Mathf.Clamp(value, 1f, 30f); } } public float RpgProjectileSpeed { get { return rpgProjectileSpeed; } set { rpgProjectileSpeed = Mathf.Clamp(value, 10f, 200f); } } public float ShotgunCooldownTime { get { return shotgunCooldownTime; } set { shotgunCooldownTime = Mathf.Clamp(value, 0.01f, 2f); } } public float ShotgunRapidFireRate { get { return shotgunRapidFireRate; } set { shotgunRapidFireRate = Mathf.Clamp(value, 1f, 30f); } } public Rigidbody HeldRigidbody => heldRigidbody; public void SetMode(FreeCamMode mode) { CurrentMode = mode; ShowModeUI(); ReleaseHeld(); ClearHoveredInteractable(); } public void Toggle() { if (Enabled) { Disable(); } else { Enable(); } } public void Enable() { //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: 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_0224: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02a4: Unknown result type (might be due to invalid IL or missing references) FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.FlyModeEnabled) { featureManager.ToggleFlyMode(enabled: false); } if ((Object)(object)cachedGnomeHouse == (Object)null) { cachedGnomeHouse = Object.FindFirstObjectByType(); } if ((Object)(object)cachedGnomeHouse != (Object)null && cachedGnomeHouse.IsVortexActive) { HotDogCheatMod.Log("FreeCam blocked: vortex transition in progress"); return; } localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } Camera main = Camera.main; if ((Object)(object)main == (Object)null) { return; } Transform val = CreateFreeCamCamera(main); if ((Object)(object)val == (Object)null) { return; } Enabled = true; savedPlayerPos = ((GameEntityBase)localPlayer).Position; cachedPlayerParent = ((Component)localPlayer).transform.parent; savedPuppetParentPos = (((Object)(object)cachedPlayerParent != (Object)null) ? cachedPlayerParent.position : Vector3.zero); freeCamPosition = val.position; savedCameraController = ((Component)main).GetComponent(); savedCameraControllerEnabled = (Object)(object)savedCameraController != (Object)null && ((Behaviour)savedCameraController).enabled; if ((Object)(object)savedCameraController != (Object)null) { ((Behaviour)savedCameraController).enabled = false; } Quaternion rotation = val.rotation; Vector3 eulerAngles = ((Quaternion)(ref rotation)).eulerAngles; yaw = eulerAngles.y; pitch = eulerAngles.x; if (pitch > 180f) { pitch -= 360f; } freeCamRotation = Quaternion.Euler(pitch, yaw, 0f); savedCursorLockState = Cursor.lockState; savedCursorVisible = Cursor.visible; Cursor.lockState = (CursorLockMode)1; Cursor.visible = false; savedActor = (MonoBehaviour)(object)localPlayer.Actor; if ((Object)(object)savedActor != (Object)null) { ((Behaviour)savedActor).enabled = false; } Rigidbody componentInChildren = ((Component)localPlayer).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.useGravity = false; componentInChildren.linearVelocity = Vector3.zero; componentInChildren.angularVelocity = Vector3.zero; } if ((Object)(object)((BehaviourBase)(localPlayer.Puppet?)).puppetMaster != (Object)null) { Muscle[] muscles = ((BehaviourBase)localPlayer.Puppet).puppetMaster.muscles; foreach (Muscle val2 in muscles) { if ((Object)(object)val2.rigidbody != (Object)null) { val2.rigidbody.useGravity = false; val2.rigidbody.linearVelocity = Vector3.zero; val2.rigidbody.angularVelocity = Vector3.zero; } } } localPlayer.ForceNotRagdoll(); ShowModeUI(); if ((Object)(object)cachedGnomeHouse == (Object)null) { cachedGnomeHouse = Object.FindFirstObjectByType(); } if ((Object)(object)cachedGnomeHouse != (Object)null) { cachedGnomeHouse.onVortexStart += OnVortexStarted; } HotDogCheatMod.Log("FreeCam enabled - Mode: " + modeNames[(int)CurrentMode]); } public void Disable() { //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)cachedGnomeHouse != (Object)null) { cachedGnomeHouse.onVortexStart -= OnVortexStarted; } Enabled = false; ReleaseHeld(); ClearHoveredInteractable(); ScaleTargetRoot(Vector3.one); if ((Object)(object)savedActor != (Object)null) { ((Behaviour)savedActor).enabled = true; } if ((Object)(object)savedCameraController != (Object)null) { ((Behaviour)savedCameraController).enabled = savedCameraControllerEnabled; savedCameraController = null; } if ((Object)(object)originalCamera != (Object)null) { if (!string.IsNullOrEmpty(originalCameraTag)) { ((Component)originalCamera).gameObject.tag = originalCameraTag; } ((Behaviour)originalCamera).enabled = originalCameraEnabled; originalCamera = null; } if ((Object)(object)originalAudioListener != (Object)null) { ((Behaviour)originalAudioListener).enabled = originalAudioListenerEnabled; originalAudioListener = null; } freeCamAudioListener = null; if ((Object)(object)freeCamCameraObject != (Object)null) { Object.Destroy((Object)(object)freeCamCameraObject); freeCamCameraObject = null; } freeCamCamera = null; if ((Object)(object)localPlayer != (Object)null) { if ((Object)(object)localPlayer.Actor != (Object)null) { ((PhysicsActor)localPlayer.Actor).Velocity = Vector3.zero; ((PhysicsActor)localPlayer.Actor).Teleport(savedPlayerPos); } else { ((Component)localPlayer).transform.position = savedPlayerPos; } } if ((Object)(object)localPlayer != (Object)null) { Rigidbody componentInChildren = ((Component)localPlayer).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.useGravity = true; } if ((Object)(object)((BehaviourBase)(localPlayer.Puppet?)).puppetMaster != (Object)null) { Muscle[] muscles = ((BehaviourBase)localPlayer.Puppet).puppetMaster.muscles; foreach (Muscle val in muscles) { if ((Object)(object)val.rigidbody != (Object)null) { val.rigidbody.useGravity = true; } } } } Cursor.lockState = savedCursorLockState; Cursor.visible = savedCursorVisible; HotDogCheatMod.Log("FreeCam disabled"); } private void OnVortexStarted() { if (Enabled) { HotDogCheatMod.Log("FreeCam auto-disabled: vortex transition started"); Disable(); } } public void OnUpdate() { //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) if (!Enabled || (Object)(object)localPlayer == (Object)null) { return; } Transform cameraTransform = GetCameraTransform(); if ((Object)(object)cameraTransform == (Object)null) { return; } HotDogCheatMod instance = HotDogCheatMod.Instance; if (instance != null && instance.IsMenuVisible) { ClearMenuBlockedInputState(); } else { HandleMouseLook(); HandleMovement(); HandleSpawnerToggle(); if (isSpawnerMode) { HandleSpawnerWheel(); HandleSpawnerMode(); } else { HandleModeSwitch(); HandleModeActions(); } } UpdateUI(); ApplyCameraTransform(cameraTransform); Rigidbody componentInChildren = ((Component)localPlayer).GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null) { componentInChildren.linearVelocity = Vector3.zero; componentInChildren.angularVelocity = Vector3.zero; } if (!((Object)(object)((BehaviourBase)(localPlayer.Puppet?)).puppetMaster != (Object)null)) { return; } Muscle[] muscles = ((BehaviourBase)localPlayer.Puppet).puppetMaster.muscles; foreach (Muscle val in muscles) { if ((Object)(object)val.rigidbody != (Object)null) { val.rigidbody.linearVelocity = Vector3.zero; val.rigidbody.angularVelocity = Vector3.zero; } } } private void ClearMenuBlockedInputState() { pendingLeftClick = false; pendingLeftClickInteractable = null; if ((Object)(object)heldRigidbody != (Object)null) { ReleaseHeld(); } } public void ApplyCameraPitch() { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) if (!Enabled) { return; } Transform cameraTransform = GetCameraTransform(); if ((Object)(object)cameraTransform == (Object)null) { return; } ApplyCameraTransform(cameraTransform); if ((Object)(object)localPlayer != (Object)null) { if ((Object)(object)cachedPlayerParent == (Object)null && (Object)(object)((Component)localPlayer).transform.parent != (Object)null) { cachedPlayerParent = ((Component)localPlayer).transform.parent; savedPuppetParentPos = cachedPlayerParent.position; savedPlayerPos = ((GameEntityBase)localPlayer).Position; } ((Component)localPlayer).transform.position = savedPlayerPos; if ((Object)(object)cachedPlayerParent != (Object)null) { cachedPlayerParent.position = savedPuppetParentPos; } } } private void ApplyCameraTransform(Transform cam) { //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_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) freeCamRotation = Quaternion.Euler(pitch, yaw, 0f); cam.SetPositionAndRotation(freeCamPosition, freeCamRotation); } private Transform CreateFreeCamCamera(Camera sourceCamera) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) originalCamera = sourceCamera; originalCameraEnabled = ((Behaviour)sourceCamera).enabled; originalCameraTag = ((Component)sourceCamera).gameObject.tag; freeCamCameraObject = new GameObject("HotDogCheat FreeCam Camera"); ((Object)freeCamCameraObject).hideFlags = (HideFlags)52; freeCamCameraObject.tag = "MainCamera"; freeCamCameraObject.transform.SetPositionAndRotation(((Component)sourceCamera).transform.position, ((Component)sourceCamera).transform.rotation); Camera obj = freeCamCameraObject.AddComponent(); obj.CopyFrom(sourceCamera); obj.depth = sourceCamera.depth + 100f; ((Behaviour)obj).enabled = true; MirrorCameraRenderComponents(sourceCamera, freeCamCameraObject); originalAudioListener = ((Component)sourceCamera).GetComponent(); if ((Object)(object)originalAudioListener == (Object)null) { originalAudioListener = Object.FindFirstObjectByType(); } if ((Object)(object)originalAudioListener != (Object)null) { originalAudioListenerEnabled = ((Behaviour)originalAudioListener).enabled; ((Behaviour)originalAudioListener).enabled = false; } freeCamAudioListener = freeCamCameraObject.AddComponent(); ((Behaviour)freeCamAudioListener).enabled = true; ((Component)sourceCamera).gameObject.tag = "Untagged"; ((Behaviour)sourceCamera).enabled = false; freeCamCamera = freeCamCameraObject.transform; return freeCamCamera; } private Transform GetCameraTransform() { if ((Object)(object)freeCamCamera != (Object)null) { return freeCamCamera; } Camera main = Camera.main; if (main == null) { return null; } return ((Component)main).transform; } private static void MirrorCameraRenderComponents(Camera sourceCamera, GameObject targetObject) { if ((Object)(object)sourceCamera == (Object)null || (Object)(object)targetObject == (Object)null) { return; } int num = 0; Component[] components = ((Component)sourceCamera).GetComponents(); foreach (Component val in components) { if (!ShouldMirrorCameraComponent(val)) { continue; } Type type = ((object)val).GetType(); if ((Object)(object)targetObject.GetComponent(type) != (Object)null) { continue; } try { Component val2 = targetObject.AddComponent(type); CopyComponentValues(val, val2); Behaviour val3 = (Behaviour)(object)((val is Behaviour) ? val : null); if (val3 != null) { Behaviour val4 = (Behaviour)(object)((val2 is Behaviour) ? val2 : null); if (val4 != null) { val4.enabled = val3.enabled; } } num++; } catch (Exception ex) { HotDogCheatMod.LogError("FreeCam could not mirror camera component " + type.Name + ": " + ex.Message); } } if (num > 0) { HotDogCheatMod.Log($"FreeCam mirrored {num} camera render component(s)"); } } private static bool ShouldMirrorCameraComponent(Component component) { if ((Object)(object)component == (Object)null) { return false; } Type type = ((object)component).GetType(); if (type == typeof(Camera) || type == typeof(Transform) || type == typeof(AudioListener)) { return false; } string text = type.FullName ?? type.Name; if (text == "Lightbug.CharacterControllerPro.Demo.Camera3D") { return false; } if (text.IndexOf("Camera3D", StringComparison.OrdinalIgnoreCase) >= 0) { return false; } if (text.IndexOf("Cinemachine", StringComparison.OrdinalIgnoreCase) >= 0) { return false; } return component is Behaviour; } private static void CopyComponentValues(Component sourceComponent, Component targetComponent) { Type type = ((object)sourceComponent).GetType(); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fields) { if (!fieldInfo.IsStatic && !fieldInfo.IsInitOnly && !fieldInfo.IsLiteral && !fieldInfo.IsNotSerialized && !(fieldInfo.DeclaringType == typeof(Object)) && !(fieldInfo.DeclaringType == typeof(Component)) && !(fieldInfo.DeclaringType == typeof(Behaviour))) { try { fieldInfo.SetValue(targetComponent, fieldInfo.GetValue(sourceComponent)); } catch { } } } PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (PropertyInfo propertyInfo in properties) { if (propertyInfo.CanRead && propertyInfo.CanWrite && propertyInfo.GetIndexParameters().Length == 0 && !(propertyInfo.DeclaringType == typeof(Object)) && !(propertyInfo.DeclaringType == typeof(Component)) && !(propertyInfo.DeclaringType == typeof(Behaviour))) { try { propertyInfo.SetValue(targetComponent, propertyInfo.GetValue(sourceComponent, null), null); } catch { } } } } public void OnGUI() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Expected O, but got Unknown //IL_00df: 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_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Expected O, but got Unknown //IL_0266: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: 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_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f6: Unknown result type (might be due to invalid IL or missing references) //IL_02fd: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_031a: Expected O, but got Unknown if (Enabled) { float num = 8f; float num2 = (float)Screen.width / 2f; float num3 = (float)Screen.height / 2f; GUI.color = new Color(1f, 1f, 1f, 0.7f); GUI.DrawTexture(new Rect(num2 - 1f, num3 - num, 2f, num * 2f), (Texture)(object)Texture2D.whiteTexture); GUI.DrawTexture(new Rect(num2 - num, num3 - 1f, num * 2f, 2f), (Texture)(object)Texture2D.whiteTexture); GUI.color = Color.white; if (uiAlpha > 0.01f) { DrawModeCarousel(); } if (CurrentMode == FreeCamMode.Interact && hoveredInteractable != null) { Rect val = new Rect(0f, (float)Screen.height / 2f + 18f, (float)Screen.width, 24f); GUIStyle val2 = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontSize = 14 }; val2.normal.textColor = Color.white; GUI.Label(val, "Press E", val2); } if (CurrentMode == FreeCamMode.BlackHole) { string text = $"BLACK HOLE Strength {blackHoleStrength:F0} Radius {blackHoleRadius:F0}"; Rect val3 = new Rect(0f, (float)Screen.height - 200f, (float)Screen.width, 24f); GUIStyle val4 = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontSize = 13 }; val4.normal.textColor = Color.white; GUI.Label(val3, text, val4); } if (CurrentMode == FreeCamMode.TeleportPlayer) { Rect val5 = new Rect(0f, (float)Screen.height - 200f, (float)Screen.width, 24f); GUIStyle val6 = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontSize = 14 }; val6.normal.textColor = Color.white; GUI.Label(val5, "Left Click = Teleport Player", val6); } if (CurrentMode == FreeCamMode.KnifeThrow) { float num4 = 200f; float num5 = 12f; float num6 = (float)Screen.width / 2f - num4 / 2f; float num7 = (float)Screen.height - 200f + 20f; float num8 = (float)Screen.height - 200f; float num9 = (knifeThrowPower - 10f) / 190f; GUI.Box(new Rect(num6, num7, num4, num5), ""); GUI.color = Color.Lerp(Color.yellow, Color.red, num9); GUI.DrawTexture(new Rect(num6 + 2f, num7 + 2f, (num4 - 4f) * num9, num5 - 4f), (Texture)(object)Texture2D.whiteTexture); GUI.color = Color.white; Rect val7 = new Rect(num6, num8, num4, 16f); string text2 = $"POWER: {knifeThrowPower:F0}"; GUIStyle val8 = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontSize = 12 }; val8.normal.textColor = Color.white; GUI.Label(val7, text2, val8); } } } private void HandleMouseLook() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) float num = Input.GetAxisRaw("Mouse X") * lookSensitivity; float num2 = Input.GetAxisRaw("Mouse Y") * lookSensitivity; yaw += num; pitch -= num2; pitch = Mathf.Clamp(pitch, -89f, 89f); freeCamRotation = Quaternion.Euler(pitch, yaw, 0f); } private void HandleMovement() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: 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_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) float num = Input.GetAxisRaw("Horizontal"); float num2 = Input.GetAxisRaw("Vertical"); if (Input.GetKey((KeyCode)119)) { num2 += 1f; } if (Input.GetKey((KeyCode)115)) { num2 -= 1f; } if (Input.GetKey((KeyCode)97)) { num -= 1f; } if (Input.GetKey((KeyCode)100)) { num += 1f; } Vector3 val = freeCamRotation * Vector3.forward; Vector3 val2 = freeCamRotation * Vector3.right; Vector3 val3 = val * num2 + val2 * num; if (Input.GetKey((KeyCode)32)) { val3 += Vector3.up; } if (Input.GetKey((KeyCode)304)) { val3 += Vector3.down; } if (!(val3 == Vector3.zero)) { float num3 = MoveSpeed * (Input.GetKey((KeyCode)306) ? 2f : 1f); freeCamPosition += ((Vector3)(ref val3)).normalized * num3 * Time.unscaledDeltaTime; } } private void HandleModeSwitch() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) float y = Input.mouseScrollDelta.y; if (!(Mathf.Abs(y) < 0.1f)) { if (y > 0f) { CurrentMode = (FreeCamMode)((int)(CurrentMode - 1 + modeNames.Length) % modeNames.Length); modeWheelOffset = -1f; } else { CurrentMode = (FreeCamMode)((int)(CurrentMode + 1) % modeNames.Length); modeWheelOffset = 1f; } ShowModeUI(); ReleaseHeld(); ClearHoveredInteractable(); } } private void ShowModeUI() { uiAlpha = 1f; uiTimer = 2f; } private void HandleSpawnerToggle() { if (Input.GetKeyDown((KeyCode)113)) { isSpawnerMode = !isSpawnerMode; ShowModeUI(); ReleaseHeld(); ClearHoveredInteractable(); HotDogCheatMod.Log(isSpawnerMode ? "FreeCam: spawner mode" : "FreeCam: normal mode"); } } private void HandleSpawnerWheel() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) float y = Input.mouseScrollDelta.y; if (!(Mathf.Abs(y) < 0.1f)) { if (y > 0f) { spawnerSelectedIndex = (spawnerSelectedIndex - 1 + SpawnerTab.ObjectNames.Length) % SpawnerTab.ObjectNames.Length; modeWheelOffset = -1f; } else { spawnerSelectedIndex = (spawnerSelectedIndex + 1) % SpawnerTab.ObjectNames.Length; modeWheelOffset = 1f; } ShowModeUI(); } } private void HandleSpawnerMode() { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) if (!Input.GetMouseButtonDown(0)) { return; } Transform cameraTransform = GetCameraTransform(); if (!((Object)(object)cameraTransform == (Object)null)) { string text = SpawnerTab.ObjectNames[spawnerSelectedIndex]; GameObject val = SpawnerActions.FindNetworkPrefab(text); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("FreeCam spawner: prefab not found: " + text); return; } Vector3 pos = cameraTransform.position + cameraTransform.forward * 3f; Quaternion rot = Quaternion.LookRotation(cameraTransform.forward); SpawnerActions.SpawnNetworkObject(val, pos, rot); HotDogCheatMod.Log("FreeCam spawner: " + text); } } private void UpdateUI() { modeWheelOffset = Mathf.MoveTowards(modeWheelOffset, 0f, Time.unscaledDeltaTime * 9f); if (uiTimer > 0f) { uiTimer -= Time.unscaledDeltaTime; uiAlpha = Mathf.Clamp01(uiTimer / 0.5f); } } private void HandleModeActions() { if (Input.GetKeyDown((KeyCode)325)) { switch (CurrentMode) { case FreeCamMode.Gun: GunRapidFire = !GunRapidFire; ShowModeUI(); HotDogCheatMod.Log($"Gun Rapid Fire: {GunRapidFire}"); break; case FreeCamMode.RPG: RpgRapidFire = !RpgRapidFire; ShowModeUI(); HotDogCheatMod.Log($"RPG Rapid Fire: {RpgRapidFire}"); break; case FreeCamMode.Shotgun: ShotgunRapidFire = !ShotgunRapidFire; ShowModeUI(); HotDogCheatMod.Log($"Shotgun Rapid Fire: {ShotgunRapidFire}"); break; } } switch (CurrentMode) { case FreeCamMode.KnifeThrow: HandleKnifeMode(); break; case FreeCamMode.Gun: HandleGunMode(); break; case FreeCamMode.RPG: HandleRpgMode(); break; case FreeCamMode.Shotgun: HandleShotgunMode(); break; case FreeCamMode.BlackHole: HandleBlackHoleMode(); break; case FreeCamMode.Interact: HandleInteractMode(); break; case FreeCamMode.TeleportPlayer: HandleTeleportPlayerMode(); break; } } private void HandleTeleportPlayerMode() { //IL_003f: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) teleportCooldown -= Time.unscaledDeltaTime; if (!Input.GetMouseButtonDown(0) || !(teleportCooldown <= 0f)) { return; } Transform cameraTransform = GetCameraTransform(); RaycastHit val = default(RaycastHit); if (!((Object)(object)cameraTransform == (Object)null) && Physics.Raycast(cameraTransform.position, cameraTransform.forward, ref val, 500f)) { teleportCooldown = 0.3f; bool enabled = (Object)(object)savedActor != (Object)null && ((Behaviour)savedActor).enabled; if ((Object)(object)savedActor != (Object)null) { ((Behaviour)savedActor).enabled = true; } if ((Object)(object)localPlayer.Actor != (Object)null) { ((PhysicsActor)localPlayer.Actor).Teleport(((RaycastHit)(ref val)).point + Vector3.up * 0.5f); } else { ((GameEntityBase)localPlayer).Teleport(((RaycastHit)(ref val)).point + Vector3.up * 0.5f); } if ((Object)(object)savedActor != (Object)null) { ((Behaviour)savedActor).enabled = enabled; } savedPlayerPos = ((GameEntityBase)localPlayer).Position; if ((Object)(object)cachedPlayerParent != (Object)null) { savedPuppetParentPos = cachedPlayerParent.position; } HotDogCheatMod.Log($"Teleported player to {((RaycastHit)(ref val)).point}"); } } private void HandleKnifeMode() { if (Input.GetKey((KeyCode)273)) { knifeThrowPower = Mathf.Min(200f, knifeThrowPower + 60f * Time.unscaledDeltaTime); } if (Input.GetKey((KeyCode)274)) { knifeThrowPower = Mathf.Max(10f, knifeThrowPower - 60f * Time.unscaledDeltaTime); } knifeCooldown -= Time.unscaledDeltaTime; if (Input.GetMouseButton(0) && knifeCooldown <= 0f) { knifeCooldown = 1f / KnifeThrowRate; ThrowKnife(); } } private async void ThrowKnife() { Transform cameraTransform = GetCameraTransform(); if ((Object)(object)cameraTransform == (Object)null) { return; } GameObject val = FindNetworkPrefab("Knife"); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Knife prefab not found!"); return; } Vector3 val2 = cameraTransform.position + cameraTransform.forward * 4f; GameObject val3 = Object.Instantiate(val, val2, cameraTransform.rotation * Quaternion.Euler(0f, 180f, 0f)); NetworkObject component = val3.GetComponent(); if ((Object)(object)component != (Object)null) { StealableObject component2 = val3.GetComponent(); if ((Object)(object)component2 != (Object)null) { if (_fCanBeCarriedByBob == null) { _fCanBeCarriedByBob = typeof(StealableObject).GetField("canBeCarriedByBob", BindingFlags.Instance | BindingFlags.NonPublic); } _fCanBeCarriedByBob?.SetValue(component2, false); } component.Spawn(false); Rigidbody component3 = val3.GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.linearVelocity = cameraTransform.forward * knifeThrowPower; } await DespawnAfter(component, (int)(KnifeDespawnTime * 1000f)); } else { Object.Destroy((Object)(object)val3); HotDogCheatMod.LogError("Knife prefab has no NetworkObject!"); } } private async Task DespawnAfter(NetworkObject netObj, int ms) { await Task.Delay(ms); if ((Object)(object)netObj != (Object)null && netObj.IsSpawned) { netObj.Despawn(true); } } private void HandleGunMode() { gunCooldown -= Time.unscaledDeltaTime; float num = (GunRapidFire ? (1f / GunRapidFireRate) : GunCooldownTime); if ((GunRapidFire ? Input.GetMouseButton(0) : Input.GetMouseButtonDown(0)) && gunCooldown <= 0f) { gunCooldown = num; ShootGun(); } } private async void ShootGun() { Transform cam = GetCameraTransform(); if ((Object)(object)cam == (Object)null) { return; } GameObject val = FindNetworkPrefab("Gun"); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Gun prefab not found!"); return; } Vector3 val2 = cam.position + cam.forward * 3f; GameObject obj = Object.Instantiate(val, val2, Quaternion.LookRotation(cam.forward)); NetworkObject netObj = obj.GetComponent(); if ((Object)(object)netObj == (Object)null) { Object.Destroy((Object)(object)obj); return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); foreach (Renderer val3 in componentsInChildren) { if ((Object)(object)val3 != (Object)null) { val3.enabled = false; } } netObj.Spawn(false); await Task.Delay(50); if ((Object)(object)obj == (Object)null) { return; } Gun component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { CacheGunReflection(); if (_fGunBulletCount?.GetValue(component) is NetworkVariable val4) { val4.Value = 1; } _mGunDoShoot?.Invoke(component, new object[2] { cam.forward, true }); } await Task.Delay(500); if ((Object)(object)obj != (Object)null && netObj.IsSpawned) { netObj.Despawn(true); } } private void HandleShotgunMode() { shotgunCooldown -= Time.unscaledDeltaTime; float num = (ShotgunRapidFire ? (1f / ShotgunRapidFireRate) : ShotgunCooldownTime); if ((ShotgunRapidFire ? Input.GetMouseButton(0) : Input.GetMouseButtonDown(0)) && shotgunCooldown <= 0f) { shotgunCooldown = num; ShootShotgun(); } } private async void ShootShotgun() { Transform cam = GetCameraTransform(); if ((Object)(object)cam == (Object)null) { return; } GameObject val = FindNetworkPrefab("Shotgun"); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Shotgun prefab not found!"); return; } Vector3 val2 = cam.position + cam.forward * 3f; GameObject obj = Object.Instantiate(val, val2, Quaternion.LookRotation(cam.forward)); NetworkObject netObj = obj.GetComponent(); if ((Object)(object)netObj == (Object)null) { Object.Destroy((Object)(object)obj); return; } Renderer[] componentsInChildren = obj.GetComponentsInChildren(true); foreach (Renderer val3 in componentsInChildren) { if ((Object)(object)val3 != (Object)null) { val3.enabled = false; } } netObj.Spawn(false); await Task.Delay(50); if ((Object)(object)obj == (Object)null) { return; } Gun component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { CacheGunReflection(); if (_fGunBulletCount?.GetValue(component) is NetworkVariable val4) { val4.Value = 1; } _mGunDoShoot?.Invoke(component, new object[2] { cam.forward, true }); } await Task.Delay(500); if ((Object)(object)obj != (Object)null && netObj.IsSpawned) { netObj.Despawn(true); } } private static void CacheGunReflection() { if (_fGunBulletCount == null) { _fGunBulletCount = typeof(Gun).GetField("n_currentBulletCount", BindingFlags.Instance | BindingFlags.NonPublic); } if (_mGunDoShoot == null) { _mGunDoShoot = typeof(Gun).GetMethod("DoShoot", BindingFlags.Instance | BindingFlags.Public); } } private void HandleRpgMode() { rpgCooldown -= Time.unscaledDeltaTime; float num = (RpgRapidFire ? (1f / RpgRapidFireRate) : RpgCooldownTime); if ((RpgRapidFire ? Input.GetMouseButton(0) : Input.GetMouseButtonDown(0)) && rpgCooldown <= 0f) { rpgCooldown = num; ShootRpg(); } } private async void ShootRpg() { Transform cam = GetCameraTransform(); if ((Object)(object)cam == (Object)null) { return; } NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null) { return; } GameObject val = _cachedRpgMissilePrefab; if ((Object)(object)val == (Object)null) { GameObject val2 = FindNetworkPrefab("RocketLauncher") ?? FindNetworkPrefabWithComponent(); if ((Object)(object)val2 != (Object)null) { RocketLauncher component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { if (_fRocketLauncherMissilePrefab == null) { _fRocketLauncherMissilePrefab = typeof(RocketLauncher).GetField("missilePrefab", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } object? obj = _fRocketLauncherMissilePrefab?.GetValue(component); val = (GameObject)((obj is GameObject) ? obj : null); if ((Object)(object)val != (Object)null) { _cachedRpgMissilePrefab = val; } } } } if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("RPG missile prefab not found!"); return; } Vector3 val3 = cam.position + cam.forward * 4f; Quaternion val4 = Quaternion.LookRotation(cam.forward, Vector3.up); NetworkObject netObj = NetworkObject.InstantiateAndSpawn(val, singleton, 0uL, false, false, false, val3, val4); if ((Object)(object)netObj == (Object)null) { return; } if (!singleton.IsServer) { float timeout = 0.5f; while ((Object)(object)netObj != (Object)null && !netObj.IsSpawned && timeout > 0f) { await Task.Delay(16); timeout -= 0.016f; } } if ((Object)(object)netObj == (Object)null || !netObj.IsSpawned) { return; } Grenade component2 = ((Component)netObj).GetComponent(); if (component2 != null) { component2.StartFuseRpc(); } Rigidbody component3 = ((Component)netObj).GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.linearVelocity = cam.forward * RpgProjectileSpeed; if (RpgAccurate) { component3.angularVelocity = Vector3.zero; component3.useGravity = false; } } } private void HandleBlackHoleMode() { if (Input.GetKey((KeyCode)273)) { BlackHoleStrength += 90f * Time.unscaledDeltaTime; } if (Input.GetKey((KeyCode)274)) { BlackHoleStrength -= 90f * Time.unscaledDeltaTime; } if (Input.GetKey((KeyCode)275)) { BlackHoleRadius += 25f * Time.unscaledDeltaTime; } if (Input.GetKey((KeyCode)276)) { BlackHoleRadius -= 25f * Time.unscaledDeltaTime; } if (Input.GetMouseButton(0)) { PullStealablesToCamera(); } } private void PullStealablesToCamera() { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && singleton.IsListening && !singleton.IsServer) { blackHoleHostWarnCooldown -= Time.unscaledDeltaTime; if (blackHoleHostWarnCooldown <= 0f) { blackHoleHostWarnCooldown = 2f; HotDogCheatMod.LogError("Black Hole works best as host because stealable physics are server controlled."); } return; } Transform cameraTransform = GetCameraTransform(); if ((Object)(object)cameraTransform == (Object)null) { return; } Vector3 val = cameraTransform.position + cameraTransform.forward * 3f; float num = blackHoleRadius * blackHoleRadius; StealableObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (StealableObject val2 in array) { if (!CanBlackHolePull(val2)) { continue; } Rigidbody val3 = (((Object)(object)val2.Rb != (Object)null) ? val2.Rb : ((Component)val2).GetComponent()); if (!((Object)(object)val3 == (Object)null) && !val3.isKinematic) { Vector3 val4 = val - val3.worldCenterOfMass; float sqrMagnitude = ((Vector3)(ref val4)).sqrMagnitude; if (!(sqrMagnitude > num) && !(sqrMagnitude < 0.01f)) { float num2 = Mathf.Sqrt(sqrMagnitude); float num3 = Mathf.Clamp01(1f - num2 / blackHoleRadius); Vector3 val5 = ((Vector3)(ref val4)).normalized * blackHoleStrength * Mathf.Lerp(0.35f, 1.4f, num3); val3.AddForce(val5, (ForceMode)5); val3.angularVelocity *= 0.96f; } } } } private static bool CanBlackHolePull(StealableObject stealable) { if ((Object)(object)stealable == (Object)null || !((Component)stealable).gameObject.activeInHierarchy || !stealable.CanSteal) { return false; } AttachableNetworkTransform component = ((Component)stealable).GetComponent(); if (!((Object)(object)component == (Object)null)) { return (Object)(object)component.AttachedTo == (Object)null; } return true; } private void HandleInteractMode() { //IL_0022: 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_00a2: Unknown result type (might be due to invalid IL or missing references) Transform cameraTransform = GetCameraTransform(); if ((Object)(object)cameraTransform == (Object)null) { return; } UpdateGameInteractTarget(cameraTransform); if (Input.GetMouseButtonDown(0)) { pendingLeftClick = Physics.Raycast(cameraTransform.position, cameraTransform.forward, ref pendingLeftClickHit, 15f); pendingLeftClickTime = Time.unscaledTime; pendingLeftClickInteractable = (pendingLeftClick ? FindInteractable(((RaycastHit)(ref pendingLeftClickHit)).collider) : null); } if (pendingLeftClick && (Object)(object)heldRigidbody == (Object)null && Input.GetMouseButton(0) && Time.unscaledTime - pendingLeftClickTime >= 0.18f) { TryGrab(pendingLeftClickHit); pendingLeftClick = false; pendingLeftClickInteractable = null; } if (Input.GetMouseButtonUp(0)) { if ((Object)(object)heldRigidbody != (Object)null) { ReleaseHeld(); } else if (pendingLeftClick && pendingLeftClickInteractable != null && pendingLeftClickInteractable.CanInteract) { pendingLeftClickInteractable.Interact(localPlayer); } pendingLeftClick = false; pendingLeftClickInteractable = null; } if ((Object)(object)heldRigidbody != (Object)null) { UpdateHeldObject(cameraTransform); } } private void UpdateGameInteractTarget(Transform cam) { //IL_0003: 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) IInteractable val = null; RaycastHit val2 = default(RaycastHit); if (Physics.Raycast(cam.position, cam.forward, ref val2, 15f)) { val = FindInteractable(((RaycastHit)(ref val2)).collider); } if (val != hoveredInteractable) { ClearHoveredInteractable(); hoveredInteractable = val; hoveredOutline = FindBestOutline(hoveredInteractable); } if ((Object)(object)hoveredOutline != (Object)null) { hoveredOutline.SetOutline(true); hoveredOutline.SetGlisten(true); } if (hoveredInteractable != null && Input.GetKeyDown((KeyCode)101) && hoveredInteractable.CanInteract) { hoveredInteractable.Interact(localPlayer); } } private InteractOutline FindBestOutline(IInteractable interactable) { if (interactable == null) { return null; } if ((Object)(object)interactable.InteractOutline != (Object)null) { return interactable.InteractOutline; } Component val = (Component)(object)((interactable is Component) ? interactable : null); if ((Object)(object)val == (Object)null) { return null; } InteractOutline component = val.GetComponent(); if ((Object)(object)component != (Object)null) { return component; } component = val.GetComponentInChildren(true); if ((Object)(object)component != (Object)null) { return component; } return val.GetComponentInParent(true); } private IInteractable FindInteractable(Collider collider) { if ((Object)(object)collider == (Object)null) { return null; } MonoBehaviour[] componentsInParent = ((Component)collider).GetComponentsInParent(true); foreach (MonoBehaviour obj in componentsInParent) { IInteractable val = (IInteractable)(object)((obj is IInteractable) ? obj : null); if (val != null && val.CanInteract) { return val; } } return null; } private void ClearHoveredInteractable() { if ((Object)(object)hoveredOutline != (Object)null) { hoveredOutline.SetOutline(false); hoveredOutline.SetGlisten(false); } hoveredOutline = null; hoveredInteractable = null; } private void TryGrab(RaycastHit hit) { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)((RaycastHit)(ref hit)).collider == (Object)null || (Object)(object)((Component)((RaycastHit)(ref hit)).collider).GetComponentInParent() != (Object)null) { return; } IPlayerPushable componentInParent = ((Component)((RaycastHit)(ref hit)).collider).GetComponentInParent(); Rigidbody val = ((componentInParent != null) ? componentInParent.Rb : null) ?? ((RaycastHit)(ref hit)).collider.attachedRigidbody ?? ((Component)((RaycastHit)(ref hit)).collider).GetComponent(); if ((Object)(object)val == (Object)null) { return; } if (val.isKinematic) { BulletTimeFeature bulletTimeFeature = HotDogCheatMod.Instance?.FeatureManager?.BulletTime; if (bulletTimeFeature == null || !bulletTimeFeature.Enabled || (Object)(object)((Component)val).GetComponentInParent() != (Object)null) { return; } val.isKinematic = false; } heldRigidbody = val; heldPushable = ((componentInParent != null && componentInParent.CanBePushed) ? componentInParent : null); heldLocalGrabPoint = ((Component)val).transform.InverseTransformPoint(((RaycastHit)(ref hit)).point); heldUsesGrabPoint = heldPushable != null || (Object)(object)((Component)((RaycastHit)(ref hit)).collider).GetComponentInParent() != (Object)null; Transform cameraTransform = GetCameraTransform(); if (!((Object)(object)cameraTransform == (Object)null)) { holdDistance = Vector3.Distance(cameraTransform.position, ((RaycastHit)(ref hit)).point); heldOriginalUseGravity = val.useGravity; heldSavedGravity = true; if (!heldUsesGrabPoint) { val.useGravity = false; } IPlayerPushable obj = heldPushable; if (obj != null) { obj.OnGrabStart(localPlayer); } HotDogCheatMod.Log("Grabbed: " + ((Object)val).name); } } private void UpdateHeldObject(Transform cam) { //IL_0001: 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_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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_015d: 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_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_003f: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) Vector3 val = cam.position + cam.forward * holdDistance; if (heldUsesGrabPoint) { Vector3 val2 = ((Component)heldRigidbody).transform.TransformPoint(heldLocalGrabPoint); Vector3 val3 = val - val2; IPlayerPushable obj = heldPushable; PushableDoor val4 = (PushableDoor)(object)((obj is PushableDoor) ? obj : null); if (val4 != null) { val4.Push(new PushParams { force = val3, forcePosition = val2, cameraRotation = freeCamRotation, cameraPos = cam.position }); if (interactGrabStrength > 1f) { heldRigidbody.AddForceAtPosition(val3 * holdStrength * (interactGrabStrength - 1f), val2, (ForceMode)5); } } else { heldRigidbody.AddForceAtPosition(val3 * holdStrength * interactGrabStrength, val2, (ForceMode)5); } Rigidbody obj2 = heldRigidbody; obj2.linearVelocity *= 0.96f; Rigidbody obj3 = heldRigidbody; obj3.angularVelocity *= 0.96f; } else { heldRigidbody.linearVelocity = (val - heldRigidbody.position) * holdStrength * interactGrabStrength; Rigidbody obj4 = heldRigidbody; obj4.angularVelocity *= 0.9f; } } private void ReleaseHeld() { pendingLeftClick = false; pendingLeftClickInteractable = null; IPlayerPushable obj = heldPushable; if (obj != null) { obj.OnGrabEnd(localPlayer); } if ((Object)(object)heldRigidbody != (Object)null && heldSavedGravity) { heldRigidbody.useGravity = heldOriginalUseGravity; } heldRigidbody = null; heldPushable = null; heldUsesGrabPoint = false; heldSavedGravity = false; } private void ScaleTargetRoot(Vector3 scale) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)localPlayer == (Object)null) { return; } Transform parent = ((Component)localPlayer).transform.parent; if ((Object)(object)parent == (Object)null) { return; } NetworkPuppet component = ((Component)parent).GetComponent(); if (!((Object)(object)component == (Object)null)) { if (_fTargetRoot == null) { _fTargetRoot = typeof(NetworkPuppet).GetField("targetRoot", BindingFlags.Instance | BindingFlags.NonPublic); } object? obj = _fTargetRoot?.GetValue(component); Transform val = (Transform)((obj is Transform) ? obj : null); if ((Object)(object)val != (Object)null) { val.localScale = scale; } } } private void DrawModeCarousel() { //IL_005b: 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_0193: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) float num = 320f; float num2 = (float)Screen.width / 2f - num / 2f; float num3 = (float)Screen.height / 2f - 120f; string[] array = (isSpawnerMode ? SpawnerTab.ObjectNames : modeNames); int num4 = (isSpawnerMode ? spawnerSelectedIndex : ((int)CurrentMode)); Color color = GUI.color; float num5 = num3 + 70f; float num6 = 28f; for (int i = -3; i <= 3; i++) { float num7 = (float)i + modeWheelOffset; float num8 = num5 + num7 * num6; if (!(num8 < num3) && !(num8 > num3 + 140f)) { float num9 = Mathf.Abs(num7); float num10 = uiAlpha * Mathf.Clamp01(1.1f - num9 * 0.3f); int num11 = ((num4 + i) % array.Length + array.Length) % array.Length; bool flag = num9 < 0.55f; GUIStyle val = new GUIStyle(GUI.skin.label) { alignment = (TextAnchor)4, fontSize = (flag ? 23 : 14), fontStyle = (FontStyle)(flag ? 1 : 0) }; val.normal.textColor = (flag ? new Color(1f, 0.72f, 0.18f, num10) : new Color(1f, 0.62f, 0.16f, num10 * 0.72f)); DrawTextShadow(new Rect(num2, num8 - 14f, num, 28f), array[num11], val, num10); } } GUI.color = color; } private static void DrawTextShadow(Rect rect, string text, GUIStyle style, float alpha) { //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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: 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) Color textColor = style.normal.textColor; style.normal.textColor = new Color(0f, 0f, 0f, alpha * 0.55f); GUI.Label(new Rect(((Rect)(ref rect)).x + 1f, ((Rect)(ref rect)).y + 1f, ((Rect)(ref rect)).width, ((Rect)(ref rect)).height), text, style); style.normal.textColor = textColor; GUI.Label(rect, text, style); } private static GameObject FindNetworkPrefab(string name) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) GameObject[] array = Resources.FindObjectsOfTypeAll(); Scene scene; foreach (GameObject val in array) { scene = val.scene; if (!((Scene)(ref scene)).IsValid() && ((Object)val).name.Equals(name, StringComparison.OrdinalIgnoreCase) && (Object)(object)val.GetComponent() != (Object)null) { return val; } } array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val2 in array) { scene = val2.scene; if (!((Scene)(ref scene)).IsValid() && !((Object)(object)val2.GetComponent() == (Object)null)) { StealableObject component = val2.GetComponent(); if ((Object)(object)component != (Object)null && ((object)component.ItemType/*cast due to .constrained prefix*/).ToString().Equals(name, StringComparison.OrdinalIgnoreCase)) { return val2; } } } return null; } private static GameObject FindNetworkPrefabWithComponent() where T : Component { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) GameObject[] array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val in array) { Scene scene = val.scene; if (!((Scene)(ref scene)).IsValid() && (Object)(object)val.GetComponent() != (Object)null && (Object)(object)val.GetComponent() != (Object)null) { return val; } } return null; } } public class MapManagerFeature { private const BindingFlags AnyInstance = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; private static FieldInfo levelDataField; private readonly List cachedMaps = new List(); private int selectedMapIndex = -1; public int SelectedMapIndex { get { return selectedMapIndex; } set { selectedMapIndex = value; } } public IReadOnlyList GetMaps() { RefreshMaps(); return cachedMaps; } public string GetCurrentNextMapName() { GameProgressionManager progression = GetProgression(); if ((Object)(object)progression == (Object)null || progression.LevelProgressionHandler == null) { return "Game progression not found"; } try { int num = progression.SelectedLevelIndex; if (num < 0 || num > 1) { num = 0; } return GetMapLabel(progression.LevelProgressionHandler.MapSelectionToNextLevel(num), num); } catch { return "No next map selected yet"; } } public string GetDisplayedOptionsText() { GameProgressionManager progression = GetProgression(); LevelProgressionHandler val = ((progression != null) ? progression.LevelProgressionHandler : null); if (val == null || val.ShowedLevelHistory == null || val.ShowedLevelHistory.Count < 2) { return "Options: none"; } IReadOnlyList maps = GetMaps(); int index = val.ShowedLevelHistory[val.ShowedLevelHistory.Count - 2]; int index2 = val.ShowedLevelHistory[val.ShowedLevelHistory.Count - 1]; return "Options: A=" + GetMapLabel(maps, index) + " | B=" + GetMapLabel(maps, index2); } public bool SetNextMap(int mapIndex) { IReadOnlyList maps = GetMaps(); if (mapIndex < 0 || mapIndex >= maps.Count) { HotDogCheatMod.LogError("Map Manager: invalid map index"); return false; } GameProgressionManager progression = GetProgression(); LevelProgressionHandler val = ((progression != null) ? progression.LevelProgressionHandler : null); if ((Object)(object)progression == (Object)null || val == null) { HotDogCheatMod.LogError("Map Manager: GameProgressionManager not found"); return false; } try { List showedLevelHistory = val.ShowedLevelHistory; if (showedLevelHistory == null) { val.GetNextLevelOptions(); showedLevelHistory = val.ShowedLevelHistory; } if (showedLevelHistory == null) { return false; } while (showedLevelHistory.Count < 2) { showedLevelHistory.Add(0); } int fallbackMapIndex = GetFallbackMapIndex(mapIndex, maps.Count); showedLevelHistory[showedLevelHistory.Count - 2] = mapIndex; showedLevelHistory[showedLevelHistory.Count - 1] = fallbackMapIndex; progression.SelectedLevelIndex = -1; progression.SelectedLevelIndex = 0; selectedMapIndex = mapIndex; HotDogCheatMod.Log("Map Manager: next map set to " + GetMapLabel(maps, mapIndex)); return true; } catch (Exception ex) { HotDogCheatMod.LogError("Map Manager failed: " + ex.Message); return false; } } public static string GetMapLabel(LevelInstance level, int index) { if (level == null) { return $"Map #{index + 1}"; } string sceneName = level.SceneName; if (string.IsNullOrEmpty(sceneName)) { return $"Map #{index + 1}"; } return GetFriendlyMapName(sceneName); } private static string GetFriendlyMapName(string sceneName) { return sceneName switch { "GamePlay" => "Suburbs", "GamePlay 1" => "Deep Forest", "GamePlay 2" => "Island", "GamePlay 3" => "Swamp Plot", "GamePlay 4" => "MountainTop", _ => sceneName, }; } private static string GetMapLabel(IReadOnlyList maps, int index) { if (maps == null || index < 0 || index >= maps.Count) { return $"Map #{index + 1}"; } return GetMapLabel(maps[index], index); } private void RefreshMaps() { cachedMaps.Clear(); LevelData levelData = GetLevelData(); if (levelData?.levels == null) { return; } foreach (LevelInstance level in levelData.levels) { if (level != null) { cachedMaps.Add(level); } } } private static int GetFallbackMapIndex(int selected, int count) { if (count <= 1) { return selected; } return (selected == 0) ? 1 : 0; } private static LevelData GetLevelData() { GameProgressionManager progression = GetProgression(); if ((Object)(object)progression == (Object)null) { return null; } if (levelDataField == null) { levelDataField = typeof(GameProgressionManager).GetField("levelData", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } object? obj = levelDataField?.GetValue(progression); return (LevelData)((obj is LevelData) ? obj : null); } private static GameProgressionManager GetProgression() { try { if ((Object)(object)GameProgressionManager.Instance != (Object)null) { return GameProgressionManager.Instance; } } catch { } return Object.FindFirstObjectByType(); } } } namespace HotDogCheat.Actions { public static class MassActions { public static void KillAll() { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { if (!((NetworkBehaviour)allPlayer).IsLocalPlayer) { PlayerActions.KillPlayer(allPlayer); } } HotDogCheatMod.Log("Killed all players"); } public static void HealAll() { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { PlayerActions.HealPlayer(allPlayer); } HotDogCheatMod.Log("Healed all players"); } public static void LaunchAll() { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { if (!((NetworkBehaviour)allPlayer).IsLocalPlayer) { PlayerActions.LaunchUp(allPlayer); } } HotDogCheatMod.Log("Launched all players"); } public static void FireAll() { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(allPlayer); if (statusEffects != null) { statusEffects.SetOnFire(true); } } HotDogCheatMod.Log("Set all players on fire"); } public static void ExtinguishAll() { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(allPlayer); if (statusEffects != null) { statusEffects.SetOnFire(false); } } HotDogCheatMod.Log("Extinguished all players"); } public static void StunAll(float duration) { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { if (!((NetworkBehaviour)allPlayer).IsLocalPlayer) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(allPlayer); if (statusEffects != null) { statusEffects.StunFor(duration); } } } HotDogCheatMod.Log($"Stunned all players for {duration}s"); } public static void TieAll() { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { if (!((NetworkBehaviour)allPlayer).IsLocalPlayer) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(allPlayer); if (statusEffects != null) { statusEffects.SetTied(true); } } } HotDogCheatMod.Log("Tied all players"); } public static void UntieAll() { foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(allPlayer); if (statusEffects != null) { statusEffects.SetTied(false); } } HotDogCheatMod.Log("Untied all players"); } public static void TeleportAllToMe() { //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_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) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } foreach (PlayerNetworking allPlayer in PlayerHelper.GetAllPlayers()) { if (!((NetworkBehaviour)allPlayer).IsLocalPlayer) { ((GameEntityBase)allPlayer).Teleport(((GameEntityBase)localPlayer).Position + Vector3.up * 2f); } } HotDogCheatMod.Log("Teleported all players to you"); } public static void MassItemTurnIn() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton != (Object)null && singleton.IsListening && !singleton.IsServer) { HotDogCheatMod.LogError("Mass item turn in must be run by the host."); return; } HomeInstance currentHomeInstance = GetCurrentHomeInstance(); if ((Object)(object)currentHomeInstance == (Object)null) { HotDogCheatMod.LogError("No active home turn-in trigger found."); return; } Vector3 homeTurnInPosition = GetHomeTurnInPosition(currentHomeInstance); StealableObject[] array = Object.FindObjectsByType((FindObjectsSortMode)0); int num = 0; StealableObject[] array2 = array; foreach (StealableObject stealable in array2) { if (CanMoveStealable(stealable)) { Vector3 position = homeTurnInPosition + GetStackOffset(num); MoveStealable(stealable, position); num++; } } Physics.SyncTransforms(); HotDogCheatMod.Log($"Mass item turn in moved {num} stealable item(s)."); } private static HomeInstance GetCurrentHomeInstance() { GameProgressionManager instance = GameProgressionManager.Instance; object obj; if (instance == null) { obj = null; } else { GnomiumDeposit deposit = instance.Deposit; if (deposit == null) { obj = null; } else { GnomeHouse house = deposit.House; if (house == null) { obj = null; } else { HomeManager playerHome = house.PlayerHome; obj = ((playerHome != null) ? playerHome.CurrentHome : null); } } } if ((Object)obj != (Object)null) { return GameProgressionManager.Instance.Deposit.House.PlayerHome.CurrentHome; } GnomeHouse val = Object.FindFirstObjectByType(); object obj2; if (val == null) { obj2 = null; } else { HomeManager playerHome2 = val.PlayerHome; obj2 = ((playerHome2 != null) ? playerHome2.CurrentHome : null); } if ((Object)obj2 != (Object)null) { return val.PlayerHome.CurrentHome; } return Object.FindFirstObjectByType(); } private static Vector3 GetHomeTurnInPosition(HomeInstance home) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) Collider val = null; float num = 0f; Collider[] componentsInChildren = ((Component)home).GetComponentsInChildren(); Bounds bounds; foreach (Collider val2 in componentsInChildren) { if (!((Object)(object)val2 == (Object)null) && val2.enabled && val2.isTrigger) { bounds = val2.bounds; Vector3 size = ((Bounds)(ref bounds)).size; float num2 = size.x * size.y * size.z; if ((Object)(object)val == (Object)null || num2 > num) { val = val2; num = num2; } } } if ((Object)(object)val != (Object)null) { bounds = val.bounds; return ((Bounds)(ref bounds)).center + Vector3.up * 0.5f; } return ((Component)home).transform.position + Vector3.up * 1.5f; } private static bool CanMoveStealable(StealableObject stealable) { if ((Object)(object)stealable == (Object)null || !((Component)stealable).gameObject.activeInHierarchy || !stealable.CanSteal) { return false; } if (IsExplosiveOrWeapon(stealable)) { return false; } AttachableNetworkTransform component = ((Component)stealable).GetComponent(); if ((Object)(object)component != (Object)null && (Object)(object)component.AttachedTo != (Object)null) { return false; } return true; } private static bool IsExplosiveOrWeapon(StealableObject stealable) { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Invalid comparison between Unknown and I4 if ((Object)(object)((Component)stealable).GetComponentInChildren(true) != (Object)null) { return true; } if ((Object)(object)((Component)stealable).GetComponentInChildren(true) != (Object)null) { return true; } if ((Object)(object)((Component)stealable).GetComponentInChildren(true) != (Object)null) { return true; } string text = ((Object)stealable).name.ToLowerInvariant(); if (text.Contains("grenade") || text.Contains("landmine") || text.Contains("land mine") || text.Contains("rocketlauncher") || text.Contains("rocket launcher") || text.Contains("rpg")) { return true; } if ((int)stealable.ItemType != 3) { return (int)stealable.ItemType == 97; } return true; } private static Vector3 GetStackOffset(int index) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) int num = index % 12; int num2 = index / 12; float num3 = (float)num * 30f * ((float)Math.PI / 180f); float num4 = 0.35f + (float)(num2 % 3) * 0.25f; return new Vector3(Mathf.Cos(num3) * num4, (float)num2 * 0.18f, Mathf.Sin(num3) * num4); } private static void MoveStealable(StealableObject stealable, Vector3 position) { //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) Rigidbody val = (((Object)(object)stealable.Rb != (Object)null) ? stealable.Rb : ((Component)stealable).GetComponent()); if ((Object)(object)val != (Object)null) { val.linearVelocity = Vector3.zero; val.angularVelocity = Vector3.zero; val.position = position; val.rotation = Quaternion.identity; val.WakeUp(); } ((Component)stealable).transform.SetPositionAndRotation(position, Quaternion.identity); } } public static class NPCActions { private class SpeedMember { public FieldInfo Field; public PropertyInfo Property; public float Original; public void Set(object target, float value) { if (Field != null) { Field.SetValue(target, value); } else { Property?.SetValue(target, value, null); } } } private static readonly BindingFlags AnyFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; private static FieldInfo _fHumanBlackboard; private static MethodInfo _mBlackboardSetValueGeneric; private static MethodInfo _mBlackboardSetValueClosed; private static readonly Dictionary WeaponNameVariants = new Dictionary { { "Gun", new string[1] { "Gun" } }, { "Shotgun", new string[2] { "Shotgun", "ShotgunItem" } }, { "Grenade", new string[1] { "Grenade" } }, { "Rocket_Launcher", new string[3] { "Rocket_Launcher", "RocketLauncher", "RPG" } } }; private static object cachedBobFollower; private static readonly List bobSpeedMembers = new List(); private static bool bobSpeedWarned; public static void TeleportBobToMe() { //IL_0025: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Bob val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported Bob to you"); } else { HotDogCheatMod.LogError("Bob not found!"); } } public static void TeleportBobAway() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) Bob val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { ((Component)val).transform.position = new Vector3(0f, -1000f, 0f); HotDogCheatMod.Log("Teleported Bob away"); } else { HotDogCheatMod.LogError("Bob not found!"); } } public static void KillBob() { Bob val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); HotDogCheatMod.Log("Killed Bob"); } else { HotDogCheatMod.LogError("Bob not found!"); } } public static void MakeBobDrop() { Bob val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { if ((Object)(object)val.CarriedStealable != (Object)null) { val.CarriedStealable = null; HotDogCheatMod.Log("Bob dropped his item"); } else { HotDogCheatMod.Log("Bob is not carrying anything"); } } else { HotDogCheatMod.LogError("Bob not found!"); } } public static void ApplyBobSpeedMultiplier(float multiplier) { Bob val = Object.FindFirstObjectByType(); if ((Object)(object)val == (Object)null) { return; } object component = ((Component)val).GetComponent("FollowerEntity"); if (component == null) { return; } if (cachedBobFollower != component) { cachedBobFollower = component; bobSpeedMembers.Clear(); CacheBobSpeedMembers(component); } if (bobSpeedMembers.Count == 0) { if (!bobSpeedWarned) { bobSpeedWarned = true; HotDogCheatMod.LogError("Could not find Bob speed fields on FollowerEntity."); } return; } multiplier = Mathf.Clamp(multiplier, 0.1f, 10f); foreach (SpeedMember bobSpeedMember in bobSpeedMembers) { bobSpeedMember.Set(component, bobSpeedMember.Original * multiplier); } } private static void CacheBobSpeedMembers(object follower) { string[] obj = new string[5] { "maxSpeed", "speed", "movementSpeed", "moveSpeed", "maxVelocity" }; Type type = follower.GetType(); string[] array = obj; foreach (string name in array) { FieldInfo field = type.GetField(name, AnyFlags); if (field != null && field.FieldType == typeof(float)) { bobSpeedMembers.Add(new SpeedMember { Field = field, Original = (float)field.GetValue(follower) }); continue; } PropertyInfo property = type.GetProperty(name, AnyFlags); if (property != null && property.PropertyType == typeof(float) && property.CanRead && property.CanWrite) { bobSpeedMembers.Add(new SpeedMember { Property = property, Original = (float)property.GetValue(follower, null) }); } } } public static void TeleportHumanToMe() { //IL_0025: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) HumanAILink val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported Human to you"); } else { HotDogCheatMod.LogError("Human not found!"); } } public static void TeleportHumanAway() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { ((Component)val).transform.position = new Vector3(0f, -1000f, 0f); HotDogCheatMod.Log("Teleported Human away"); } else { HotDogCheatMod.LogError("Human not found!"); } } public static void KillHuman() { HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { HealthBase component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.TakeDamage(999f); HotDogCheatMod.Log("Killed Human"); } } else { HotDogCheatMod.LogError("Human not found!"); } } public static void HumanReleasePlayer() { HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { if ((Object)(object)val.PlayerInHand != (Object)null) { val.ReleasePlayer(); HotDogCheatMod.Log("Human released player"); } else { HotDogCheatMod.Log("Human is not holding anyone"); } } else { HotDogCheatMod.LogError("Human not found!"); } } public static void HumanDropGun() { HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Human not found!"); return; } if (!val.IsHoldingWeapon) { HotDogCheatMod.Log("Human is not armed"); return; } DespawnHumanHeldWeapon(val); HotDogCheatMod.Log("Human dropped (despawned) weapon"); } public static void HumanGiveRandomWeapon() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Human not found!"); return; } string[] array = new string[4] { "Gun", "Shotgun", "Grenade", "Rocket_Launcher" }; string text = array[Random.Range(0, array.Length)]; GameObject val2 = null; string[] array2 = WeaponNameVariants[text]; for (int i = 0; i < array2.Length; i++) { val2 = SpawnerActions.FindNetworkPrefab(array2[i]); if ((Object)(object)val2 != (Object)null) { break; } } if ((Object)(object)val2 == (Object)null) { HotDogCheatMod.LogError("Prefab not found for: " + text); return; } DespawnHumanHeldWeapon(val); Vector3 val3 = ((Component)val).transform.position + ((Component)val).transform.forward * 1.5f + Vector3.up * 0.5f; GameObject obj = Object.Instantiate(val2, val3, Quaternion.identity); NetworkObject val4 = default(NetworkObject); if (obj.TryGetComponent(ref val4)) { val4.Spawn(false); } StealableObject component = obj.GetComponent(); if ((Object)(object)component == (Object)null) { HotDogCheatMod.LogError("Spawned object has no StealableObject!"); return; } if (_fHumanBlackboard == null) { _fHumanBlackboard = typeof(HumanAILink).GetField("blackboard", BindingFlags.Instance | BindingFlags.NonPublic); } object obj2 = _fHumanBlackboard?.GetValue(val); if (obj2 != null) { try { if (_mBlackboardSetValueGeneric == null) { MethodInfo[] methods = obj2.GetType().GetMethods(); foreach (MethodInfo methodInfo in methods) { if (methodInfo.Name == "SetVariableValue" && methodInfo.IsGenericMethodDefinition && methodInfo.GetParameters().Length == 2) { _mBlackboardSetValueGeneric = methodInfo; break; } } if (_mBlackboardSetValueGeneric != null) { _mBlackboardSetValueClosed = _mBlackboardSetValueGeneric.MakeGenericMethod(typeof(StealableObject)); } } _mBlackboardSetValueClosed?.Invoke(obj2, new object[2] { "objectToPickup", component }); } catch (Exception ex) { HotDogCheatMod.LogError("Blackboard set failed: " + ex.Message); } } val.DoPickupNow(component); HotDogCheatMod.Log("Human given random weapon: " + text); } private static void DespawnHumanHeldWeapon(HumanAILink human) { if ((Object)(object)human == (Object)null || !human.IsHoldingWeapon) { return; } StealableObject objectInHand = human.ObjectInHand; human.ReleaseObject(); if (!((Object)(object)objectInHand == (Object)null)) { NetworkObject val = default(NetworkObject); if (((Component)objectInHand).TryGetComponent(ref val) && val.IsSpawned) { val.Despawn(true); } else { Object.Destroy((Object)(object)((Component)objectInHand).gameObject); } } } public static void MakeHumanNaked() { HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { val.SetNaked(!val.Naked); HotDogCheatMod.Log($"Human naked: {val.Naked}"); } else { HotDogCheatMod.LogError("Human not found!"); } } public static void HumanMakeCalm() { HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { val.AngerPercentage = 0f; HotDogCheatMod.Log("Human is now calm"); } else { HotDogCheatMod.LogError("Human not found!"); } } public static void HumanMakeRage() { HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { val.AngerPercentage = 1f; HotDogCheatMod.Log("Human is now RAGING"); } else { HotDogCheatMod.LogError("Human not found!"); } } public static void TeleportCatToMe() { //IL_0025: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) CatAiLink val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 2f; HotDogCheatMod.Log("Teleported Cat to you"); } else { HotDogCheatMod.LogError("Cat not found!"); } } public static void CatAttackPlayer(PlayerNetworking target) { //IL_0020: 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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)target == (Object)null)) { CatAiLink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)target).Position + ((Component)target).transform.forward * 2f; val.anger = 100f; val.lookAtTarget = target; HotDogCheatMod.Log("Cat attacking player!"); } else { HotDogCheatMod.LogError("Cat not found!"); } } } public static async void SpamCatMeow() { CatAiLink cat = Object.FindFirstObjectByType(); if ((Object)(object)cat == (Object)null) { HotDogCheatMod.LogError("Cat not found!"); return; } for (int i = 0; i < 15; i++) { cat.PlayMeowRpc((MeowType)Random.Range(1, 3)); await Task.Delay(150); } HotDogCheatMod.Log("Spam meow done!"); } public static async void SpamCatHiss() { CatAiLink cat = Object.FindFirstObjectByType(); if ((Object)(object)cat == (Object)null) { HotDogCheatMod.LogError("Cat not found!"); return; } for (int i = 0; i < 15; i++) { cat.PlayMeowRpc((MeowType)0); await Task.Delay(200); } HotDogCheatMod.Log("Spam hiss done!"); } public static void TeleportSpiderToMe() { //IL_0025: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) Spider val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported Spider to you"); } else { HotDogCheatMod.LogError("Spider not found!"); } } public static void TeleportMeToSpider() { //IL_0025: 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) Spider val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((Component)val).transform.position + Vector3.up * 2f); } } public static void KillSpider() { Spider val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); HotDogCheatMod.Log("Killed Spider"); } else { HotDogCheatMod.LogError("Spider not found!"); } } public static void SpiderRelease() { Spider val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { if ((Object)(object)((PlayerKidnapper)val).CurrentlyHeld != (Object)null) { ((PlayerKidnapper)val).CurrentlyHeld = null; HotDogCheatMod.Log("Spider released player"); } else { HotDogCheatMod.Log("Spider is not holding anyone"); } } else { HotDogCheatMod.LogError("Spider not found!"); } } public static void TeleportVacuumToMe() { //IL_0025: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) VacuumAiLink val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported Vacuum to you"); } else { HotDogCheatMod.LogError("Vacuum not found!"); } } public static void TeleportMeToVacuum() { //IL_0025: 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) VacuumAiLink val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((Component)val).transform.position + Vector3.up * 2f); } else { HotDogCheatMod.LogError("Vacuum not found!"); } } public static void ToggleVacuum() { VacuumAiLink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { val.Interact(PlayerHelper.GetLocalPlayer()); HotDogCheatMod.Log("Toggled Vacuum"); } else { HotDogCheatMod.LogError("Vacuum not found!"); } } public static void VacuumReleaseAll() { VacuumAiLink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { PlayerMultiKidnapper component = ((Component)val).GetComponent(); if (component != null) { component.RemoveAllKidnapped(); } HotDogCheatMod.Log("Vacuum released all players"); } else { HotDogCheatMod.LogError("Vacuum not found!"); } } public static void TeleportMoleToMe() { //IL_0025: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) MoleAiLink val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 2f; HotDogCheatMod.Log("Teleported Mole to you"); } else { HotDogCheatMod.LogError("Mole not found!"); } } public static void TeleportMeToMole() { //IL_0025: 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) MoleAiLink val = Object.FindFirstObjectByType(); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((Component)val).transform.position + Vector3.up * 2f); } } public static void KillMole() { MoleAiLink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); HotDogCheatMod.Log("Killed Mole"); } else { HotDogCheatMod.LogError("Mole not found!"); } } public static GameEntityAI FindAIByName(string name) { GameEntityAI[] array = Object.FindObjectsByType((FindObjectsSortMode)0); foreach (GameEntityAI val in array) { if ((Object)(object)val != (Object)null && (Object)(object)((GameEntityBase)val).EntityData != (Object)null && ((Object)((GameEntityBase)val).EntityData).name == name) { return val; } } return null; } public static void TeleportEntityToMe(string name, string label) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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) GameEntityAI val = FindAIByName(name); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)val).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported " + label + " to you"); } else { HotDogCheatMod.LogError(label + " not found!"); } } public static void TeleportMeToEntity(string name, string label) { //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_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) GameEntityAI val = FindAIByName(name); PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)val != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((Component)val).transform.position + Vector3.up * 2f); } } public static void KillEntity(string name, string label) { GameEntityAI val = FindAIByName(name); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)((Component)val).gameObject); HotDogCheatMod.Log("Killed " + label); } else { HotDogCheatMod.LogError(label + " not found!"); } } public static GameEntityAI FindSealman() { return FindAIByName("Sealman"); } } public static class PlayerActions { private static bool hasSavedTeleportPosition; private static Vector3 savedTeleportPosition; private static PlayerNetworking spectateTarget; private static bool spectateActive; private static Vector3 spectateOriginalPos; private static bool wallPhaseActive; private static float wallPhaseTimer; public static float WallPhaseDuration = 5f; private static List wallPhaseRenderers = new List(); private static List wallPhaseColliders = new List(); private static Collider[] wallPhasePlayerColliders; private static Collider[] wallPhaseParentColliders; public static bool IsSpectateActive => spectateActive; public static bool IsWallPhaseActive => wallPhaseActive; private static void DelayedForceNotRagdoll(PlayerNetworking player) { if ((Object)(object)player == (Object)null) { return; } GameRunner.RunAfterFixedUpdates(3, delegate { if ((Object)(object)player != (Object)null) { player.ForceNotRagdoll(); } }); } public static void HealPlayer(PlayerNetworking player) { if (!((Object)(object)player == (Object)null)) { ((HealthBase)player.Health).Respawn(); HotDogCheatMod.Log("Healed player"); } } public static void KillPlayer(PlayerNetworking player) { if (!((Object)(object)player == (Object)null)) { ((HealthBase)player.Health).TakeDamage(999f); HotDogCheatMod.Log("Killed player"); } } public static void ForceRagdoll(PlayerNetworking player) { if (!((Object)(object)player == (Object)null)) { player.ForceRagdoll(); HotDogCheatMod.Log("Ragdoll forced"); } } public static void UnRagdoll(PlayerNetworking player) { if (!((Object)(object)player == (Object)null)) { player.ForceNotRagdoll(); HotDogCheatMod.Log("Unragdolled"); } } public static void LaunchUp(PlayerNetworking player) { //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) if (!((Object)(object)player == (Object)null)) { player.ForceRagdoll(); player.AddRagdollVelocity(Vector3.up * 50f); HotDogCheatMod.Log("Launched player up"); } } public static void Spin(PlayerNetworking player) { //IL_003e: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { player.ForceRagdoll(); player.AddRagdollVelocity(new Vector3(Random.Range(-20f, 20f), Random.Range(-20f, 20f), Random.Range(-20f, 20f))); HotDogCheatMod.Log("Spinning player"); } } public static void DismemberHead(PlayerNetworking player) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { player.Dismemberment.DismemberRpc((DismemberPart)32, 100f, ((GameEntityBase)player).Position, 30f, 5f); HotDogCheatMod.Log("Dismembered player's head"); } } public static void DismemberArms(PlayerNetworking player) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { player.Dismemberment.DismemberRpc((DismemberPart)6, 100f, ((GameEntityBase)player).Position, 30f, 5f); HotDogCheatMod.Log("Dismembered player's arms"); } } public static void DismemberLegs(PlayerNetworking player) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { player.Dismemberment.DismemberRpc((DismemberPart)24, 100f, ((GameEntityBase)player).Position, 30f, 5f); HotDogCheatMod.Log("Dismembered player's legs"); } } public static void SetOnFire(PlayerNetworking player) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if ((Object)(object)statusEffects != (Object)null) { statusEffects.SetOnFire(true); HotDogCheatMod.Log("Set player on fire"); } } public static void Extinguish(PlayerNetworking player) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if ((Object)(object)statusEffects != (Object)null) { statusEffects.SetOnFire(false); HotDogCheatMod.Log("Extinguished player"); } } public static void Stun(PlayerNetworking player, float duration) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if ((Object)(object)statusEffects != (Object)null) { statusEffects.StunFor(duration); HotDogCheatMod.Log($"Stunned player for {duration}s"); } } public static void Tie(PlayerNetworking player) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if ((Object)(object)statusEffects != (Object)null) { statusEffects.SetTied(true); HotDogCheatMod.Log("Tied player"); } } public static void Untie(PlayerNetworking player) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(player); if ((Object)(object)statusEffects != (Object)null) { statusEffects.SetTied(false); HotDogCheatMod.Log("Untied player"); } } public static void Kick(PlayerNetworking player) { if (!((Object)(object)player == (Object)null) && !((NetworkBehaviour)player).IsLocalPlayer) { NetworkManager singleton = NetworkManager.Singleton; if ((Object)(object)singleton == (Object)null || !singleton.IsServer) { HotDogCheatMod.LogError("You must be the host to kick players!"); return; } ulong ownerClientId = ((NetworkBehaviour)player).OwnerClientId; singleton.DisconnectClient(ownerClientId); HotDogCheatMod.Log($"Kicked player (ClientId: {ownerClientId})"); } } public static void TeleportToHut(PlayerNetworking player) { //IL_0072: 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) if ((Object)(object)player == (Object)null) { return; } GameProgressionManager instance = GameProgressionManager.Instance; object obj; if (instance == null) { obj = null; } else { GnomiumDeposit deposit = instance.Deposit; if (deposit == null) { obj = null; } else { GnomeHouse house = deposit.House; if (house == null) { obj = null; } else { HomeManager playerHome = house.PlayerHome; obj = ((playerHome != null) ? playerHome.CurrentHome : null); } } } HomeInstance val = (HomeInstance)obj; if ((Object)(object)val == (Object)null) { GnomeHouse obj2 = Object.FindFirstObjectByType(); object obj3; if (obj2 == null) { obj3 = null; } else { HomeManager playerHome2 = obj2.PlayerHome; obj3 = ((playerHome2 != null) ? playerHome2.CurrentHome : null); } val = (HomeInstance)obj3; } if ((Object)(object)val != (Object)null) { ((GameEntityBase)player).Teleport(val.PlayerRespawnPosition); DelayedForceNotRagdoll(player); HotDogCheatMod.Log("Teleported to hut"); return; } GnomeHouse val2 = Object.FindFirstObjectByType(); if ((Object)(object)val2 != (Object)null) { ((GameEntityBase)player).Teleport(val2.PlayerSpawnPosition); DelayedForceNotRagdoll(player); HotDogCheatMod.Log("Teleported to hut fallback spawn"); } } public static void TeleportToCrosshair() { //IL_0055: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.FreeCam != null && featureManager.FreeCam.Enabled) { HotDogCheatMod.LogError("Crosshair teleport disabled while FreeCam is on — use FreeCam's Teleport Player mode instead."); return; } Camera main = Camera.main; if ((Object)(object)main == (Object)null) { HotDogCheatMod.LogError("Crosshair teleport: no main camera."); return; } RaycastHit val = default(RaycastHit); if (!Physics.Raycast(((Component)main).transform.position, ((Component)main).transform.forward, ref val, 500f)) { HotDogCheatMod.Log("Crosshair teleport: nothing hit within 500m."); return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { ((GameEntityBase)localPlayer).Teleport(((RaycastHit)(ref val)).point + Vector3.up * 0.5f); DelayedForceNotRagdoll(localPlayer); HotDogCheatMod.Log($"Teleported to crosshair ({((RaycastHit)(ref val)).point})"); } } public static void SaveCurrentTeleport(PlayerNetworking player) { //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_0020: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { savedTeleportPosition = ((GameEntityBase)player).Position; hasSavedTeleportPosition = true; HotDogCheatMod.Log($"Saved teleport position: {savedTeleportPosition}"); } } public static void TeleportToSaved(PlayerNetworking player) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)player == (Object)null)) { if (!hasSavedTeleportPosition) { HotDogCheatMod.LogError("No saved teleport position yet."); return; } ((GameEntityBase)player).Teleport(savedTeleportPosition); DelayedForceNotRagdoll(player); HotDogCheatMod.Log("Teleported to saved position"); } } public static void DepositResourcesToStockpile() { //IL_0029: 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) GameProgressionManager instance = GameProgressionManager.Instance; GnomiumDeposit val = ((instance != null) ? instance.Deposit : null); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Resource stockpile deposit not found."); return; } val.DepositResourcesToStockpileRpc(default(RpcParams)); HotDogCheatMod.Log("Deposited inventory resources to stockpile"); } public static void TeleportPlayerToMe(PlayerNetworking target) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)target != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)target).Teleport(((GameEntityBase)localPlayer).Position); DelayedForceNotRagdoll(target); HotDogCheatMod.Log("Teleported player to you"); } } public static void TeleportMeToPlayer(PlayerNetworking target) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)target != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((GameEntityBase)target).Position); DelayedForceNotRagdoll(localPlayer); HotDogCheatMod.Log("Teleported you to player"); } } public static void SpiderKidnap(PlayerNetworking player) { Spider val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null && (Object)(object)player != (Object)null) { ((PlayerKidnapper)val).CurrentlyHeld = (GameEntityBase)(object)player; ((GameEntityBase)player).ApplyEffect((EffectType)2, 0f); HotDogCheatMod.Log("Spider kidnapped player"); } } public static void VacuumKidnap(PlayerNetworking player) { VacuumAiLink val = Object.FindFirstObjectByType(); if (!((Object)(object)val == (Object)null) && !((Object)(object)player == (Object)null)) { PlayerMultiKidnapper component = ((Component)val).GetComponent(); if ((Object)(object)component != (Object)null) { component.AddKidnapped((GameEntityBase)(object)player); ((GameEntityBase)player).ApplyEffect((EffectType)2, 0f); HotDogCheatMod.Log("Vacuum kidnapped player"); } } } public static void HumanKidnap(PlayerNetworking player) { HumanAILink val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null && (Object)(object)player != (Object)null) { val.kidnapper.CurrentlyHeld = (GameEntityBase)(object)player; ((GameEntityBase)player).ApplyEffect((EffectType)2, 0f); HotDogCheatMod.Log("Human kidnapped player"); } } public static void ReleaseFromAll(PlayerNetworking player) { if ((Object)(object)player == (Object)null) { return; } ((GameEntityBase)player).ApplyEffect((EffectType)3, 0f); Spider val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null && (Object)(object)((PlayerKidnapper)val).CurrentlyHeld == (Object)(object)player) { ((PlayerKidnapper)val).CurrentlyHeld = null; } HumanAILink val2 = Object.FindFirstObjectByType(); if ((Object)(object)val2 != (Object)null && (Object)(object)val2.PlayerInHand == (Object)(object)player) { val2.ReleasePlayer(); } VacuumAiLink val3 = Object.FindFirstObjectByType(); if ((Object)(object)val3 != (Object)null) { PlayerMultiKidnapper component = ((Component)val3).GetComponent(); if (component != null) { component.RemoveAllKidnapped(); } } HotDogCheatMod.Log("Released player from all kidnappers"); } public static void ShootAt(PlayerNetworking target) { //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Expected O, but got Unknown //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_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) //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)target == (Object)null) { return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } Gun[] array = Object.FindObjectsByType((FindObjectsSortMode)0); Gun val = null; Gun[] array2 = array; foreach (Gun val2 in array2) { if (((Component)val2).gameObject.activeInHierarchy) { val = val2; break; } } if ((Object)(object)val == (Object)null) { GameObject val3 = null; GameObject[] array3 = Resources.FindObjectsOfTypeAll(); foreach (GameObject val4 in array3) { if (((Object)val4).name.Equals("Gun", StringComparison.OrdinalIgnoreCase) && (Object)(object)val4.GetComponent() != (Object)null) { val3 = val4; break; } } if ((Object)(object)val3 == (Object)null) { HotDogCheatMod.LogError("Gun prefab not found!"); return; } Vector3 val5 = ((GameEntityBase)localPlayer).Position + Vector3.up * 100f; try { GameObject val6 = Object.Instantiate(val3, val5, Quaternion.identity); NetworkObject component = val6.GetComponent(); if (!((Object)(object)component != (Object)null)) { Object.Destroy((Object)(object)val6); return; } component.Spawn(false); val = val6.GetComponent(); } catch (Exception ex) { HotDogCheatMod.LogError("Gun spawn failed: " + ex.Message); return; } } if ((Object)(object)val == (Object)null) { return; } val.SetBulletCount(Mathf.Max(val.BulletCount, 10)); BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.NonPublic; Transform val7 = (Transform)(typeof(Gun).GetField("bulletSource", bindingAttr)?.GetValue(val)); if ((Object)(object)val7 == (Object)null) { HotDogCheatMod.LogError("bulletSource not found!"); return; } Vector3 val8 = ((GameEntityBase)target).Position + Vector3.up * 1f; Vector3 val9 = val8 - val7.position; Vector3 val10 = val8 - ((Vector3)(ref val9)).normalized * 3f; ((Component)val).transform.position = val10; val7.position = val10; val9 = val8 - val10; val7.forward = ((Vector3)(ref val9)).normalized; MethodInfo method = typeof(Gun).GetMethod("DoShoot", bindingAttr); if (method != null) { method.Invoke(val, new object[1] { val7.forward }); HotDogCheatMod.Log("Shot at player"); } else { val.ShootGunRpc(default(RpcParams)); HotDogCheatMod.Log("Shot at player (RPC fallback)"); } } public static void TaserPlayer(PlayerNetworking target) { if (!((Object)(object)target == (Object)null)) { target.OnGotTased(); HotDogCheatMod.Log("Tased player!"); } } public static void PepperSprayPlayer(PlayerNetworking target) { if (!((Object)(object)target == (Object)null)) { PlayerController component = ((Component)target).GetComponent(); if ((Object)(object)component != (Object)null) { component.SetBlind(); HotDogCheatMod.Log("Pepper sprayed player!"); } } } public static void ConfusePlayer(PlayerNetworking target) { StatusEffectHandler statusEffects = PlayerHelper.GetStatusEffects(target); if ((Object)(object)statusEffects != (Object)null) { statusEffects.AddStatus((Type)13, 6f); HotDogCheatMod.Log("Confused player (6s)!"); } } public static void StartSpectate(PlayerNetworking target) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)target == (Object)null)) { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { spectateTarget = target; spectateActive = true; spectateOriginalPos = ((GameEntityBase)localPlayer).Position; HotDogCheatMod.Log("Spectating player"); } } } public static void StopSpectate() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) if (spectateActive) { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer != (Object)null) { ((PhysicsActor)localPlayer.Actor).Teleport(spectateOriginalPos); } } spectateActive = false; spectateTarget = null; HotDogCheatMod.Log("Spectate stopped"); } public static void UpdateSpectate() { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) if (!spectateActive || (Object)(object)spectateTarget == (Object)null) { spectateActive = false; return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { Vector3 position = ((GameEntityBase)spectateTarget).Position; Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, 3f, -5f); Camera main = Camera.main; if ((Object)(object)main != (Object)null) { val = -((Component)main).transform.forward * 5f + Vector3.up * 3f; } Vector3 val2 = position + val; ((PhysicsActor)localPlayer.Actor).Teleport(val2); } } public static void WallPhase() { //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) if (wallPhaseActive) { HotDogCheatMod.Log("Wall Phase already active"); return; } Camera main = Camera.main; if ((Object)(object)main == (Object)null) { HotDogCheatMod.LogError("No main camera"); return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } RaycastHit[] array = Physics.RaycastAll(((Component)main).transform.position, ((Component)main).transform.forward, 15f); if (array.Length == 0) { HotDogCheatMod.Log("Wall Phase: nothing hit"); return; } float num = ((RaycastHit)(ref array[0])).distance + 2.5f; wallPhaseRenderers.Clear(); wallPhaseColliders.Clear(); HashSet hashSet = new HashSet(); RaycastHit[] array2 = array; for (int i = 0; i < array2.Length; i++) { RaycastHit val = array2[i]; if (((RaycastHit)(ref val)).distance > num) { continue; } GameObject gameObject = ((Component)((RaycastHit)(ref val)).collider).gameObject; if (hashSet.Contains(gameObject)) { continue; } hashSet.Add(gameObject); Renderer[] componentsInChildren = gameObject.GetComponentsInChildren(); if (componentsInChildren != null) { Renderer[] array3 = componentsInChildren; foreach (Renderer val2 in array3) { if ((Object)(object)val2 != (Object)null) { val2.enabled = false; wallPhaseRenderers.Add(val2); } } } Collider[] componentsInChildren2 = gameObject.GetComponentsInChildren(); if (componentsInChildren2 == null) { continue; } Collider[] array4 = componentsInChildren2; foreach (Collider val3 in array4) { if ((Object)(object)val3 != (Object)null) { wallPhaseColliders.Add(val3); } } } wallPhasePlayerColliders = ((Component)localPlayer).GetComponentsInChildren(); Transform parent = ((Component)localPlayer).transform.parent; wallPhaseParentColliders = (Collider[])(((Object)(object)parent != (Object)null) ? ((Array)((Component)parent).GetComponentsInChildren()) : ((Array)new Collider[0])); foreach (Collider wallPhaseCollider in wallPhaseColliders) { if ((Object)(object)wallPhaseCollider == (Object)null) { continue; } Collider[] array4 = wallPhasePlayerColliders; foreach (Collider val4 in array4) { if ((Object)(object)val4 != (Object)null) { Physics.IgnoreCollision(val4, wallPhaseCollider, true); } } array4 = wallPhaseParentColliders; foreach (Collider val5 in array4) { if ((Object)(object)val5 != (Object)null) { Physics.IgnoreCollision(val5, wallPhaseCollider, true); } } } wallPhaseActive = true; wallPhaseTimer = Mathf.Clamp(WallPhaseDuration, 1f, 60f); HotDogCheatMod.Log($"Wall Phase active on {hashSet.Count} objects ({wallPhaseTimer:F0}s)"); } public static void UpdateWallPhase() { if (wallPhaseActive) { wallPhaseTimer -= Time.deltaTime; if (wallPhaseTimer <= 0f) { RestoreWallPhase(); } } } private static void RestoreWallPhase() { if (!wallPhaseActive) { return; } foreach (Renderer wallPhaseRenderer in wallPhaseRenderers) { if ((Object)(object)wallPhaseRenderer != (Object)null) { wallPhaseRenderer.enabled = true; } } foreach (Collider wallPhaseCollider in wallPhaseColliders) { if ((Object)(object)wallPhaseCollider == (Object)null) { continue; } Collider[] array; if (wallPhasePlayerColliders != null) { array = wallPhasePlayerColliders; foreach (Collider val in array) { if ((Object)(object)val != (Object)null) { Physics.IgnoreCollision(val, wallPhaseCollider, false); } } } if (wallPhaseParentColliders == null) { continue; } array = wallPhaseParentColliders; foreach (Collider val2 in array) { if ((Object)(object)val2 != (Object)null) { Physics.IgnoreCollision(val2, wallPhaseCollider, false); } } } wallPhaseActive = false; wallPhaseRenderers.Clear(); wallPhaseColliders.Clear(); wallPhasePlayerColliders = null; wallPhaseParentColliders = null; HotDogCheatMod.Log("Wall Phase ended"); } } public static class RCCarActions { private struct CarSpeedOriginals { public float maxSpeed; public float power; } private static readonly Dictionary _carSpeedOriginals = new Dictionary(); private static readonly Dictionary _carSpeedMultiplier = new Dictionary(); public static void TeleportToMe(RCCar car) { //IL_001f: 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) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)car != (Object)null && (Object)(object)localPlayer != (Object)null) { ((Component)car).transform.position = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f; HotDogCheatMod.Log("Teleported RC Car to you"); } } public static void TeleportMeTo(RCCar car) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)car != (Object)null && (Object)(object)localPlayer != (Object)null) { ((GameEntityBase)localPlayer).Teleport(((Component)car).transform.position + Vector3.up * 2f); HotDogCheatMod.Log("Teleported you to RC Car"); } } public static void LaunchUp(RCCar car) { //IL_0010: 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) if (!((Object)(object)car == (Object)null)) { SetRigidbodyProperty(car, "linearVelocity", Vector3.up * 30f); HotDogCheatMod.Log("Launched RC Car up"); } } public static void Flip(RCCar car) { //IL_001b: 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) if (!((Object)(object)car == (Object)null)) { ((Component)car).transform.rotation = Quaternion.Euler(0f, ((Component)car).transform.eulerAngles.y, 0f); HotDogCheatMod.Log("Flipped RC Car upright"); } } public static void Spin(RCCar car) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)car == (Object)null)) { SetRigidbodyProperty(car, "angularVelocity", new Vector3(Random.Range(-10f, 10f), Random.Range(-10f, 10f), Random.Range(-10f, 10f))); HotDogCheatMod.Log("Spinning RC Car"); } } public static void Freeze(RCCar car) { //IL_0010: 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) if (!((Object)(object)car == (Object)null)) { SetRigidbodyProperty(car, "linearVelocity", Vector3.zero); SetRigidbodyProperty(car, "angularVelocity", Vector3.zero); HotDogCheatMod.Log("Froze RC Car"); } } public static void SuperSpeed(RCCar car) { //IL_0016: 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) if (!((Object)(object)car == (Object)null)) { SetRigidbodyProperty(car, "linearVelocity", ((Component)car).transform.forward * 50f); HotDogCheatMod.Log("Super speed RC Car!"); } } public static float GetSpeedMultiplier(RCCar car) { if ((Object)(object)car == (Object)null) { return 1f; } if (!_carSpeedMultiplier.TryGetValue(((Object)car).GetInstanceID(), out var value)) { return 1f; } return value; } public static void SetSpeedMultiplier(RCCar car, float multiplier) { if ((Object)(object)car == (Object)null) { return; } Car component = ((Component)car).GetComponent(); if ((Object)(object)component == (Object)null) { HotDogCheatMod.LogError("RC Car speed: ArcadeCar.Logic.Car component not found on " + ((Object)car).name); return; } if (component.Settings == null) { HotDogCheatMod.LogError("RC Car speed: Car.Settings is null"); return; } int instanceID = ((Object)car).GetInstanceID(); multiplier = Mathf.Clamp(multiplier, 1f, 10f); if (!_carSpeedOriginals.TryGetValue(instanceID, out var value)) { value = new CarSpeedOriginals { maxSpeed = component.Settings.MaxSpeed, power = component.Settings.Power }; _carSpeedOriginals[instanceID] = value; } _carSpeedMultiplier[instanceID] = multiplier; if (value.maxSpeed > 0f) { component.Settings.MaxSpeed = value.maxSpeed * multiplier; } if (value.power > 0f) { component.Settings.Power = value.power * multiplier; } HotDogCheatMod.Log($"RC Car '{((Object)car).name}': speed → {multiplier:F2}x (MaxSpeed={component.Settings.MaxSpeed:F1}, Power={component.Settings.Power:F0})"); } public static void Duplicate(RCCar car) { //IL_001b: 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_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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)car == (Object)null) { return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } Vector3 val = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 3f + Vector3.up * 0.5f; try { GameObject val2 = Object.Instantiate(((Component)car).gameObject, val, ((Component)car).transform.rotation); NetworkObject component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { component.Spawn(false); HotDogCheatMod.Log("Duplicated RC Car!"); } else { Object.Destroy((Object)(object)val2); HotDogCheatMod.LogError("No NetworkObject!"); } } catch (Exception ex) { HotDogCheatMod.LogError("Duplicate failed: " + ex.Message); } } public static void EjectDriver(RCCar car) { if ((Object)(object)((car != null) ? ((PlayerSittable)car).CurrentSitter : null) != (Object)null) { ((PlayerSittable)car).CurrentSitter = null; HotDogCheatMod.Log("Ejected driver"); } } public static void Delete(RCCar car) { if ((Object)(object)car != (Object)null) { Object.Destroy((Object)(object)((Component)car).gameObject); HotDogCheatMod.Log("Deleted RC Car"); } } public static void LaunchAll() { List allRCCars = PlayerHelper.GetAllRCCars(); foreach (RCCar item in allRCCars) { LaunchUp(item); } HotDogCheatMod.Log($"Launched {allRCCars.Count} RC Cars"); } public static void SuperSpeedAll() { List allRCCars = PlayerHelper.GetAllRCCars(); foreach (RCCar item in allRCCars) { SuperSpeed(item); } HotDogCheatMod.Log($"Super speed {allRCCars.Count} RC Cars"); } public static void DeleteAll() { List allRCCars = PlayerHelper.GetAllRCCars(); int count = allRCCars.Count; foreach (RCCar item in allRCCars) { Object.Destroy((Object)(object)((Component)item).gameObject); } HotDogCheatMod.Log($"Deleted {count} RC Cars"); } private static void SetRigidbodyProperty(RCCar car, string propName, Vector3 value) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) Component component = ((Component)car).GetComponent(typeof(Rigidbody)); if (!((Object)(object)component == (Object)null)) { ((object)component).GetType().GetProperty(propName)?.SetValue(component, value); } } } public static class SpawnerActions { public static List LoadItemsList() { List list = new List(); AllItems val = Resources.FindObjectsOfTypeAll().FirstOrDefault(); if (val?.items != null) { ItemData[] items = val.items; foreach (ItemData val2 in items) { list.Add(((CraftableItemBase)val2).Name); } HotDogCheatMod.Log($"Total: {list.Count} items loaded"); } else { HotDogCheatMod.LogError("AllItems not found!"); } return list; } public static void SpawnItem(string itemName) { //IL_003a: 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_0054: 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_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_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) AllItems val = Resources.FindObjectsOfTypeAll().FirstOrDefault(); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("AllItems not found!"); return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { HotDogCheatMod.LogError("Local player not found!"); return; } Vector3 val2 = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 2f + Vector3.up * 1f; try { HotDogCheatMod.Log(((Object)(object)val.SpawnItemInstance(itemName, val2) != (Object)null) ? ("Spawned: " + itemName) : ("Failed to spawn: " + itemName)); } catch (Exception ex) { HotDogCheatMod.LogError("Exception: " + ex.Message); } } public static void SpawnObject(string objectName) { //IL_003c: 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_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { HotDogCheatMod.LogError("Local player not found!"); return; } GameObject val = FindNetworkPrefab(objectName); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Object prefab not found: " + objectName); return; } Vector3 pos = ((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 2f + Vector3.up * 1f; SpawnNetworkObject(val, pos, Quaternion.identity); } public static async void RainItems(string objectName, int count, bool allPlayers) { GameObject prefab = FindNetworkPrefab(objectName); if ((Object)(object)prefab == (Object)null) { HotDogCheatMod.LogError("Prefab not found for rain: " + objectName); return; } List targets = new List(); if (allPlayers) { targets.AddRange(PlayerHelper.GetAllPlayers()); } else { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer != (Object)null) { targets.Add(localPlayer); } } if (targets.Count == 0) { HotDogCheatMod.LogError("No players to rain on!"); return; } int spawned = 0; for (int i = 0; i < count; i++) { Vector3 pos = ((GameEntityBase)targets[Random.Range(0, targets.Count)]).Position + new Vector3(Random.Range(-8f, 8f), Random.Range(10f, 18f), Random.Range(-8f, 8f)); if (SpawnNetworkObject(prefab, pos, Random.rotation)) { spawned++; } if (i % 10 == 0) { await Task.Delay(50); } } HotDogCheatMod.Log(string.Format("Item Rain: {0}/{1} '{2}' on {3}", spawned, count, objectName, allPlayers ? "all players" : "you")); } public static GameObject FindNetworkPrefab(string name) { //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) GameObject[] array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val in array) { if (((Object)val).name.Equals(name, StringComparison.OrdinalIgnoreCase) && (Object)(object)val.GetComponent() != (Object)null) { return val; } } StealableSpawnConfiguration[] array2 = Resources.FindObjectsOfTypeAll(); for (int i = 0; i < array2.Length; i++) { foreach (StealableSpawnPrefab spawnPrefab in array2[i].spawnPrefabs) { if (!((Object)(object)spawnPrefab.prefab == (Object)null) && !((Object)(object)spawnPrefab.prefab.GetComponent() == (Object)null)) { StealableObject component = spawnPrefab.prefab.GetComponent(); if ((Object)(object)component != (Object)null && ((object)component.ItemType/*cast due to .constrained prefix*/).ToString().Equals(name, StringComparison.OrdinalIgnoreCase)) { return spawnPrefab.prefab; } } } } array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val2 in array) { if (!((Object)(object)val2.GetComponent() == (Object)null)) { StealableObject component2 = val2.GetComponent(); if ((Object)(object)component2 != (Object)null && ((object)component2.ItemType/*cast due to .constrained prefix*/).ToString().Equals(name, StringComparison.OrdinalIgnoreCase)) { return val2; } } } array = Resources.FindObjectsOfTypeAll(); foreach (GameObject val3 in array) { if ((Object)(object)val3.GetComponent() == (Object)null) { continue; } Component[] components = val3.GetComponents(); foreach (Component val4 in components) { if ((Object)(object)val4 != (Object)null && ((object)val4).GetType().Name.Equals(name, StringComparison.OrdinalIgnoreCase)) { return val3; } } } return null; } public static bool SpawnNetworkObject(GameObject prefab, Vector3 pos, Quaternion rot) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) try { GameObject val = Object.Instantiate(prefab, pos, rot); NetworkObject component = val.GetComponent(); if ((Object)(object)component != (Object)null) { component.Spawn(false); return true; } Object.Destroy((Object)(object)val); return false; } catch (Exception ex) { HotDogCheatMod.LogError("Spawn failed: " + ex.Message); return false; } } public static void SpawnAndCompleteHelicopter() { //IL_006c: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)NetworkManager.Singleton == (Object)null || !NetworkManager.Singleton.IsServer) { HotDogCheatMod.LogError("Helicopter test: Must be host."); return; } Helicopter val = Object.FindObjectOfType(); if ((Object)(object)val == (Object)null) { GameObject val2 = FindNetworkPrefab("Helicopter"); if ((Object)(object)val2 == (Object)null) { HotDogCheatMod.LogError("Helicopter prefab not found!"); return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); Vector3 val3 = (((Object)(object)localPlayer != (Object)null) ? (((GameEntityBase)localPlayer).Position + ((Component)localPlayer).transform.forward * 8f + Vector3.up * 10f) : Vector3.zero); GameObject obj = Object.Instantiate(val2, val3, Quaternion.identity); val = obj.GetComponent(); NetworkObject component = obj.GetComponent(); if ((Object)(object)component != (Object)null) { component.Spawn(false); } if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("Helicopter component missing on prefab!"); return; } HotDogCheatMod.Log("Helicopter spawned."); } HelicopterPart[] componentsInChildren = ((Component)val).GetComponentsInChildren(); HelicopterPart[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { array[i].HasPart = true; } val.IsOn = true; HotDogCheatMod.Log($"Helicopter completed! {componentsInChildren.Length} parts filled, engine started."); } public static void DespawnHelicopter() { if ((Object)(object)NetworkManager.Singleton == (Object)null || !NetworkManager.Singleton.IsServer) { HotDogCheatMod.LogError("Helicopter despawn: Must be host."); return; } Helicopter[] array = Object.FindObjectsOfType(); if (array.Length == 0) { HotDogCheatMod.Log("No helicopters to despawn."); return; } Helicopter[] array2 = array; NetworkObject val = default(NetworkObject); for (int i = 0; i < array2.Length; i++) { if (((Component)array2[i]).TryGetComponent(ref val)) { val.Despawn(true); } } HotDogCheatMod.Log($"Despawned {array.Length} helicopter(s)."); } } } namespace HotDogCheat.Core { public class FeatureManager { public enum ModdedLauncherModeType { Gun, Shotgun, RPG } public FreeCamFeature FreeCam = new FreeCamFeature(); public MapManagerFeature MapManager = new MapManagerFeature(); public BulletTimeFeature BulletTime = new BulletTimeFeature(); public bool GodModeEnabled; public bool FlyModeEnabled; public float FlySpeed = 10f; public bool AntiKidnapEnabled; public bool NoFallDamageEnabled; public bool InstantRespawnEnabled; public bool SuperPunchEnabled; public bool ModdedLauncherEnabled; public ModdedLauncherModeType ModdedLauncherMode; public bool GrapplingHookModEnabled; public float GrapplingHookMaxRange = 30f; public float GrapplingHookMinRange = 3f; public float GrapplingHookSpeed = 15f; public bool GnomiumGlovesModEnabled; public float GnomiumGlovesMaxDistance = 10f; public float GnomiumGlovesForceMultiplier = 1f; public bool GnomiumGlovesInstantInteraction; public bool SpringShoesModEnabled; public float SpringShoesMinInertiaTransfer = 1f; public float SpringShoesMaxJumpVelocity = 50f; public bool SpringShoesNoHeadHit; public float SpringShoesActiveInertiaTransfer = 1f; public float SpringShoesPassiveInertiaTransfer = 1f; public float SpringShoesStaminaPerActiveJump = 10f; public bool GliderModEnabled; public float GliderMaxFlightVelocity = 20f; public float GliderGravity = 5f; public float GliderDrag = 0.5f; public float GliderTurnSpeed = 3f; public float GliderVelocityGainOnEnter = 5f; public float GliderFartAccelMlp = 2f; public bool GlueGlovesModEnabled; public float GlueGlovesClimbHSpeed = 1f; public float GlueGlovesClimbVSpeed = 3f; public float GlueGlovesClimbAccel = 10f; public float GlueGlovesPassiveStamina = 8f; public float GlueGlovesActiveStamina = 20f; public bool GlueGlovesAnySurface = true; public bool InfiniteStaminaEnabled; public bool InfiniteHandsEnabled; public bool NoRagdollEnabled; public bool NoclipEnabled; public bool InfiniteJumpsEnabled; public bool FreeCraftingEnabled; public bool BackpackEnabled; public bool BackpackExtraEnabled; public bool NeverDropItemsEnabled; public bool InfiniteTimeEnabled; public bool InstantLimbRegrowEnabled; public bool NpcIgnoreEnabled; public bool SuppressKarmaSpikeFeedback; public float SpeedMultiplier = 1f; public float BobSpeedMultiplier = 1f; private float lastAppliedBobSpeed = 1f; public float StaminaMultiplier = 1f; public float JumpMultiplier = 1f; public float HpRegenMultiplier = 1f; public float GnomeiumMultiplier = 1f; private int backpackCurrentTarget = -1; private float originalBaseSpeed = -1f; private float originalBoostSpeed = -1f; private bool speedOriginalsSaved; private float noRagdollNextForceTime; private float noRagdollVortexGraceUntil; private PlayerHealth hpRegenHealth; private float originalHealingPerSecond; private bool hpRegenOriginalsSaved; private NormalMovement fallDamageNM; private float originalFallDistThresholdFirst; private bool fallDamageOriginalsSaved; private CharacterActor staminaActor; private float originalMaxStamina; private bool staminaOriginalsSaved; private bool infiniteTimeWasSet; private PlayerHandController infiniteHandsController; private bool infiniteHandsOriginalsSaved; private float originalMaxHandStretch; private float originalHandReach; private float originalHandBreak; private float originalOverStretchDuration; private float originalHandStretchSpeed; private static readonly BindingFlags AnyFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; private static FieldInfo _fGodMode; private static FieldInfo _fMaxHandStretch; private static FieldInfo _fHandReach; private static FieldInfo _fHandBreak; private static FieldInfo _fOverStretchDur; private static FieldInfo _fHandStretchSpeed; private static FieldInfo _fCurrentStamina; private static FieldInfo _fTimeActive; private static FieldInfo _fHealingPerSecond; private static FieldInfo _fFallDistThresholdFirst; private static FieldInfo _fHookMinRange; private static FieldInfo _fHookMaxRange; private static FieldInfo _fHookSpeed; private static FieldInfo _fGloveMaxDistance; private static FieldInfo _fGloveForceMultiplier; private static FieldInfo _fGloveInteractHoldDur; private static FieldInfo _fSpringMinInertia; private static FieldInfo _fSpringMaxJumpVel; private static FieldInfo _fSpringHeadHitThresh; private static FieldInfo _fSpringActiveInertia; private static FieldInfo _fSpringPassiveInertia; private static FieldInfo _fSpringStaminaPerJump; private static FieldInfo _fGlueClimbHSpeed; private static FieldInfo _fGlueClimbVSpeed; private static FieldInfo _fGlueClimbAccel; private static FieldInfo _fGluePassiveStam; private static FieldInfo _fGlueActiveStam; private static FieldInfo _fGlueFilterByTag; private static FieldInfo _fGliderMaxFlightVel; private static FieldInfo _fGliderGravity; private static FieldInfo _fGliderDrag; private static FieldInfo _fGliderTurnSpeed; private static FieldInfo _fGliderVelGainEnter; private static FieldInfo _fGliderFartAccel; private static FieldInfo _fLimbRegrowTime; private GrapplingHook grapplingHookInstance; private float grapplingOrigMinRange; private float grapplingOrigMaxRange; private float grapplingOrigSpeed; private bool grapplingOriginalsSaved; private GnomiumGloves gnomiumGlovesInstance; private float glovesOrigMaxDistance; private float glovesOrigForceMultiplier; private float glovesOrigInteractHoldDur; private bool glovesOriginalsSaved; private NormalMovement springShoesNM; private float springOrigMinInertia; private float springOrigMaxJumpVel; private float springOrigHeadHitThresh; private float springOrigActiveInertia; private float springOrigPassiveInertia; private float springOrigStaminaPerJump; private bool springShoesOriginalsSaved; private WallSlide glueGlovesWallSlide; private float glueOrigClimbHSpeed; private float glueOrigClimbVSpeed; private float glueOrigClimbAccel; private float glueOrigPassiveStam; private float glueOrigActiveStam; private bool glueGlovesOrigFilterByTag; private bool glueGlovesOriginalsSaved; private GliderGliding gliderInstance; private float gliderOrigMaxFlightVel; private float gliderOrigGravity; private float gliderOrigDrag; private float gliderOrigTurnSpeed; private float gliderOrigVelGainEnter; private float gliderOrigFartAccel; private bool gliderOriginalsSaved; private DismembermentController limbRegrowDC; private float origLimbRegrowTime; private bool limbRegrowOriginalsSaved; private bool flyNoclipActive; private PlayerNetworking flyStatePlayer; private MonoBehaviour flySavedActor; private MonoBehaviour flySavedStateController; private bool flySavedActorEnabled; private bool flySavedStateControllerEnabled; private bool flyControllerStateSaved; private List> flySavedGravityStates; private Vector3 flyPosition; private bool flyPositionValid; private List> noclipSavedLayers; public void OnUpdate() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { UpdateGodMode(localPlayer); UpdateInfiniteHands(localPlayer); UpdateNoRagdoll(localPlayer); UpdateFlyNoclip(localPlayer); UpdateAntiKidnap(localPlayer); UpdateInfiniteStamina(localPlayer); UpdateStaminaMultiplier(localPlayer); UpdateSpeed(localPlayer); UpdateHpRegenMultiplier(localPlayer); UpdateNoFallDamage(localPlayer); UpdateGrapplingHookMod(localPlayer); UpdateGnomiumGlovesMod(localPlayer); UpdateSpringShoesMod(localPlayer); UpdateGlueGlovesMod(localPlayer); UpdateGliderMod(localPlayer); UpdateInstantLimbRegrow(localPlayer); PlayerActions.UpdateWallPhase(); if (!Mathf.Approximately(BobSpeedMultiplier, lastAppliedBobSpeed)) { NPCActions.ApplyBobSpeedMultiplier(BobSpeedMultiplier); lastAppliedBobSpeed = BobSpeedMultiplier; } FreeCam.OnUpdate(); BulletTime.OnUpdate(); } } public void OnLateUpdate() { FreeCam.ApplyCameraPitch(); } private void UpdateGodMode(PlayerNetworking local) { if (GodModeEnabled && (Object)(object)local.Health != (Object)null) { ((HealthBase)local.Health).Respawn(); } } private void EnsureHandFieldsCached() { if (!(_fMaxHandStretch != null)) { Type? typeFromHandle = typeof(PlayerHandController); _fMaxHandStretch = typeFromHandle.GetField("maxHandStretchDistance", AnyFlags); _fHandReach = typeFromHandle.GetField("handReachDistance", AnyFlags); _fHandBreak = typeFromHandle.GetField("handBreakDistance", AnyFlags); _fOverStretchDur = typeFromHandle.GetField("overStretchDuration", AnyFlags); _fHandStretchSpeed = typeFromHandle.GetField("handStretchSpeed", AnyFlags); } } private PlayerHandController FindHandController(PlayerNetworking local) { if ((Object)(object)local == (Object)null) { return null; } PlayerHandController val = ((Component)local).GetComponent(); if ((Object)(object)val == (Object)null) { val = ((Component)local).GetComponentInChildren(true); } if ((Object)(object)val == (Object)null) { Transform parent = ((Component)local).transform.parent; if ((Object)(object)parent != (Object)null) { val = ((Component)parent).GetComponentInChildren(true); } } return val; } private void UpdateInfiniteHands(PlayerNetworking local) { if (!InfiniteHandsEnabled) { RestoreInfiniteHands(); return; } PlayerHandController val = FindHandController(local); if ((Object)(object)val == (Object)null) { HotDogCheatMod.LogError("PlayerHandController not found anywhere!"); return; } EnsureHandFieldsCached(); SaveInfiniteHandsOriginals(val); _fMaxHandStretch?.SetValue(val, 999f); _fHandReach?.SetValue(val, 2f); _fHandBreak?.SetValue(val, 999999f); _fOverStretchDur?.SetValue(val, 0f); _fHandStretchSpeed?.SetValue(val, 1f); } private void SaveInfiniteHandsOriginals(PlayerHandController hc) { if (!infiniteHandsOriginalsSaved || !((Object)(object)infiniteHandsController == (Object)(object)hc)) { RestoreInfiniteHands(); infiniteHandsController = hc; originalMaxHandStretch = GetFloatField(_fMaxHandStretch, hc); originalHandReach = GetFloatField(_fHandReach, hc); originalHandBreak = GetFloatField(_fHandBreak, hc); originalOverStretchDuration = GetFloatField(_fOverStretchDur, hc); originalHandStretchSpeed = GetFloatField(_fHandStretchSpeed, hc); infiniteHandsOriginalsSaved = true; } } private void RestoreInfiniteHands() { if (infiniteHandsOriginalsSaved && !((Object)(object)infiniteHandsController == (Object)null)) { _fMaxHandStretch?.SetValue(infiniteHandsController, originalMaxHandStretch); _fHandReach?.SetValue(infiniteHandsController, originalHandReach); _fHandBreak?.SetValue(infiniteHandsController, originalHandBreak); _fOverStretchDur?.SetValue(infiniteHandsController, originalOverStretchDuration); _fHandStretchSpeed?.SetValue(infiniteHandsController, originalHandStretchSpeed); infiniteHandsController = null; infiniteHandsOriginalsSaved = false; } } private static float GetFloatField(FieldInfo field, object instance) { if (field == null || instance == null) { return 0f; } object value = field.GetValue(instance); if (value is float) { return (float)value; } return 0f; } private void SetGodMode(PlayerNetworking local, bool value) { if (_fGodMode == null) { _fGodMode = typeof(PlayerNetworking).GetField("godMode", AnyFlags); } if (_fGodMode != null) { _fGodMode.SetValue(local, value); } } private void UpdateNoRagdoll(PlayerNetworking local) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) if (!NoRagdollEnabled) { noRagdollNextForceTime = 0f; noRagdollVortexGraceUntil = 0f; } else { if (((GameEntityBase)local).IsDead || ((GameEntityBase)local).IsGrabbed) { return; } if ((int)((GameEntityBase)local).CurrentContainment != 0) { noRagdollVortexGraceUntil = Time.unscaledTime + 2f; } else if (IsVortexActiveForPlayer(local)) { noRagdollVortexGraceUntil = Time.unscaledTime + 2f; } else { if (Time.unscaledTime < noRagdollVortexGraceUntil) { return; } if ((Object)(object)local.Dismemberment != (Object)null && local.Dismemberment.IsMissingLeg) { if (NoFallDamageEnabled) { return; } CharacterStateController stateController = local.StateController; if (!(((stateController != null) ? stateController.CurrentState : null) is Crawling)) { CharacterStateController stateController2 = local.StateController; if (stateController2 != null) { stateController2.ForceState(); } } } else { StatusEffectHandler statusEffects = local.StatusEffects; if ((!((Object)(object)statusEffects != (Object)null) || (!statusEffects.Tied && !(statusEffects.StunnedDuration > 0f))) && !IsPlayerInWater(local) && !((Object)(object)local.Puppet == (Object)null) && (int)local.Puppet.state != 0 && !(Time.unscaledTime < noRagdollNextForceTime)) { noRagdollNextForceTime = Time.unscaledTime + 0.15f; local.ForceNotRagdoll(); } } } } } private bool IsPlayerInWater(PlayerNetworking local) { //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_0067: 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_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)local).transform.position; if (((BehaviourBase)(local.Puppet?)).puppetMaster?.muscles != null && ((BehaviourBase)local.Puppet).puppetMaster.muscles.Length != 0) { Rigidbody rigidbody = ((BehaviourBase)local.Puppet).puppetMaster.muscles[0].rigidbody; if ((Object)(object)rigidbody != (Object)null) { position = rigidbody.position; } } return Utils.CheckIsInWater(position, ((Component)local).transform.position, LayerMask.op_Implicit(1), LayerMask.op_Implicit(16), 0.2f); } private bool IsVortexActiveForPlayer(PlayerNetworking local) { GnomeHouse val = Object.FindFirstObjectByType(); if ((Object)(object)val == (Object)null) { return false; } if (!val.IsVortexActive) { return val.IsPlayerInVortex(local); } return true; } private void UpdateAntiKidnap(PlayerNetworking local) { if (!AntiKidnapEnabled) { return; } ((GameEntityBase)local).ApplyEffect((EffectType)3, 0f); Spider val = Object.FindFirstObjectByType(); if ((Object)(object)val != (Object)null && (Object)(object)((PlayerKidnapper)val).CurrentlyHeld == (Object)(object)local) { ((PlayerKidnapper)val).CurrentlyHeld = null; } HumanAILink val2 = Object.FindFirstObjectByType(); if ((Object)(object)val2 != (Object)null && (Object)(object)val2.PlayerInHand == (Object)(object)local) { val2.ReleasePlayer(); } VacuumAiLink val3 = Object.FindFirstObjectByType(); if ((Object)(object)val3 != (Object)null) { PlayerMultiKidnapper component = ((Component)val3).GetComponent(); if (component != null) { component.RemoveAllKidnapped(); } } } private void UpdateInfiniteStamina(PlayerNetworking local) { if (!InfiniteStaminaEnabled) { return; } CharacterActor componentInChildren = ((Component)local).GetComponentInChildren(); if (!((Object)(object)componentInChildren == (Object)null)) { if (_fCurrentStamina == null) { _fCurrentStamina = typeof(CharacterActor).GetField("currentStamina", AnyFlags); } if (_fCurrentStamina != null) { _fCurrentStamina.SetValue(componentInChildren, componentInChildren.maxStamina); } } } private void UpdateStaminaMultiplier(PlayerNetworking local) { CharacterActor componentInChildren = ((Component)local).GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)null) { return; } if (Mathf.Approximately(StaminaMultiplier, 1f)) { RestoreStaminaMultiplier(componentInChildren); return; } if (!staminaOriginalsSaved || (Object)(object)staminaActor != (Object)(object)componentInChildren) { RestoreStaminaMultiplier(staminaActor); staminaActor = componentInChildren; originalMaxStamina = componentInChildren.maxStamina; staminaOriginalsSaved = true; } componentInChildren.maxStamina = originalMaxStamina * StaminaMultiplier; } private void RestoreStaminaMultiplier(CharacterActor actor) { if (staminaOriginalsSaved && !((Object)(object)staminaActor == (Object)null)) { staminaActor.maxStamina = originalMaxStamina; staminaActor = null; originalMaxStamina = -1f; staminaOriginalsSaved = false; } } private void UpdateHpRegenMultiplier(PlayerNetworking local) { if ((Object)(object)local == (Object)null) { return; } PlayerHealth val = ((Component)local).GetComponent() ?? ((Component)local).GetComponentInChildren(true); if ((Object)(object)val == (Object)null) { return; } if (Mathf.Approximately(HpRegenMultiplier, 1f)) { RestoreHpRegenMultiplier(); return; } if (!hpRegenOriginalsSaved || (Object)(object)hpRegenHealth != (Object)(object)val) { RestoreHpRegenMultiplier(); hpRegenHealth = val; if (_fHealingPerSecond == null) { _fHealingPerSecond = typeof(PlayerHealth).GetField("healingPerSecond", AnyFlags); } originalHealingPerSecond = GetFloatField(_fHealingPerSecond, val); hpRegenOriginalsSaved = true; } _fHealingPerSecond?.SetValue(val, originalHealingPerSecond * HpRegenMultiplier); } private void RestoreHpRegenMultiplier() { if (hpRegenOriginalsSaved && !((Object)(object)hpRegenHealth == (Object)null)) { _fHealingPerSecond?.SetValue(hpRegenHealth, originalHealingPerSecond); hpRegenHealth = null; originalHealingPerSecond = -1f; hpRegenOriginalsSaved = false; } } private void UpdateNoFallDamage(PlayerNetworking local) { if ((Object)(object)local == (Object)null) { return; } NormalMovement componentInChildren = ((Component)local).GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)null) { return; } if (!NoFallDamageEnabled) { RestoreNoFallDamage(); return; } if (!fallDamageOriginalsSaved || (Object)(object)fallDamageNM != (Object)(object)componentInChildren) { RestoreNoFallDamage(); fallDamageNM = componentInChildren; if (_fFallDistThresholdFirst == null) { _fFallDistThresholdFirst = typeof(NormalMovement).GetField("fallDistanceThresholdFirst", AnyFlags); } originalFallDistThresholdFirst = GetFloatField(_fFallDistThresholdFirst, componentInChildren); fallDamageOriginalsSaved = true; } _fFallDistThresholdFirst?.SetValue(componentInChildren, float.MaxValue); } private void RestoreNoFallDamage() { if (fallDamageOriginalsSaved && !((Object)(object)fallDamageNM == (Object)null)) { _fFallDistThresholdFirst?.SetValue(fallDamageNM, originalFallDistThresholdFirst); fallDamageNM = null; originalFallDistThresholdFirst = -1f; fallDamageOriginalsSaved = false; } } private void UpdateSpeed(PlayerNetworking local) { NormalMovement componentInChildren = ((Component)local).GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)null) { return; } if (Mathf.Approximately(SpeedMultiplier, 1f)) { RestoreSpeed(componentInChildren); return; } if (!speedOriginalsSaved) { originalBaseSpeed = componentInChildren.planarMovementParameters.baseSpeedLimit; originalBoostSpeed = componentInChildren.planarMovementParameters.boostSpeedLimit; speedOriginalsSaved = true; } componentInChildren.planarMovementParameters.baseSpeedLimit = originalBaseSpeed * SpeedMultiplier; componentInChildren.planarMovementParameters.boostSpeedLimit = originalBoostSpeed * SpeedMultiplier; } private void RestoreSpeed(NormalMovement nm) { if (speedOriginalsSaved) { nm.planarMovementParameters.baseSpeedLimit = originalBaseSpeed; nm.planarMovementParameters.boostSpeedLimit = originalBoostSpeed; originalBaseSpeed = -1f; originalBoostSpeed = -1f; speedOriginalsSaved = false; } } private void CacheGrapplingHookFields() { if (!(_fHookMinRange != null)) { Type? typeFromHandle = typeof(GrapplingHook); _fHookMinRange = typeFromHandle.GetField("hookMinRange", AnyFlags); _fHookMaxRange = typeFromHandle.GetField("hookMaxRange", AnyFlags); _fHookSpeed = typeFromHandle.GetField("hookSpeed", AnyFlags); } } private void UpdateGrapplingHookMod(PlayerNetworking local) { if (!GrapplingHookModEnabled) { RestoreGrapplingHook(); return; } CacheGrapplingHookFields(); if ((Object)(object)grapplingHookInstance == (Object)null) { grapplingHookInstance = Object.FindFirstObjectByType(); } if ((Object)(object)grapplingHookInstance == (Object)null || !((NetworkBehaviour)grapplingHookInstance).IsLocalPlayer) { RestoreGrapplingHook(); return; } GrapplingHook val = grapplingHookInstance; if (!grapplingOriginalsSaved) { RestoreGrapplingHook(); grapplingHookInstance = val; grapplingOrigMinRange = GetFloatField(_fHookMinRange, val); grapplingOrigMaxRange = GetFloatField(_fHookMaxRange, val); grapplingOrigSpeed = GetFloatField(_fHookSpeed, val); GrapplingHookMinRange = grapplingOrigMinRange; GrapplingHookMaxRange = grapplingOrigMaxRange; GrapplingHookSpeed = grapplingOrigSpeed; grapplingOriginalsSaved = true; } _fHookMinRange?.SetValue(val, GrapplingHookMinRange); _fHookMaxRange?.SetValue(val, GrapplingHookMaxRange); _fHookSpeed?.SetValue(val, GrapplingHookSpeed); } private void RestoreGrapplingHook() { if (grapplingOriginalsSaved && !((Object)(object)grapplingHookInstance == (Object)null)) { _fHookMinRange?.SetValue(grapplingHookInstance, grapplingOrigMinRange); _fHookMaxRange?.SetValue(grapplingHookInstance, grapplingOrigMaxRange); _fHookSpeed?.SetValue(grapplingHookInstance, grapplingOrigSpeed); grapplingHookInstance = null; grapplingOriginalsSaved = false; } } private void CacheGnomiumGlovesFields() { if (!(_fGloveMaxDistance != null)) { Type? typeFromHandle = typeof(GnomiumGloves); _fGloveMaxDistance = typeFromHandle.GetField("maxDistance", AnyFlags); _fGloveForceMultiplier = typeFromHandle.GetField("forceMultiplier", AnyFlags); _fGloveInteractHoldDur = typeFromHandle.GetField("interactionHoldDuration", AnyFlags); } } private void UpdateGnomiumGlovesMod(PlayerNetworking local) { if (!GnomiumGlovesModEnabled) { RestoreGnomiumGloves(); return; } CacheGnomiumGlovesFields(); if ((Object)(object)gnomiumGlovesInstance == (Object)null) { gnomiumGlovesInstance = Object.FindFirstObjectByType(); } if ((Object)(object)gnomiumGlovesInstance == (Object)null || !((NetworkBehaviour)gnomiumGlovesInstance).IsLocalPlayer) { RestoreGnomiumGloves(); return; } GnomiumGloves val = gnomiumGlovesInstance; if (!glovesOriginalsSaved) { RestoreGnomiumGloves(); gnomiumGlovesInstance = val; glovesOrigMaxDistance = GetFloatField(_fGloveMaxDistance, val); glovesOrigForceMultiplier = GetFloatField(_fGloveForceMultiplier, val); glovesOrigInteractHoldDur = GetFloatField(_fGloveInteractHoldDur, val); glovesOriginalsSaved = true; } _fGloveMaxDistance?.SetValue(val, GnomiumGlovesMaxDistance); _fGloveForceMultiplier?.SetValue(val, GnomiumGlovesForceMultiplier); _fGloveInteractHoldDur?.SetValue(val, GnomiumGlovesInstantInteraction ? 0f : glovesOrigInteractHoldDur); } private void RestoreGnomiumGloves() { if (glovesOriginalsSaved && !((Object)(object)gnomiumGlovesInstance == (Object)null)) { _fGloveMaxDistance?.SetValue(gnomiumGlovesInstance, glovesOrigMaxDistance); _fGloveForceMultiplier?.SetValue(gnomiumGlovesInstance, glovesOrigForceMultiplier); _fGloveInteractHoldDur?.SetValue(gnomiumGlovesInstance, glovesOrigInteractHoldDur); gnomiumGlovesInstance = null; glovesOriginalsSaved = false; } } private void CacheSpringShoesFields() { if (!(_fSpringMinInertia != null)) { Type? typeFromHandle = typeof(NormalMovement); _fSpringMinInertia = typeFromHandle.GetField("minSpringJumpInertiaTransferVelocity", AnyFlags); _fSpringMaxJumpVel = typeFromHandle.GetField("maxSpringJumpVelocity", AnyFlags); _fSpringHeadHitThresh = typeFromHandle.GetField("springJumpHeadHitThresholdVelocity", AnyFlags); _fSpringActiveInertia = typeFromHandle.GetField("activeInertiaTransferOnJump", AnyFlags); _fSpringPassiveInertia = typeFromHandle.GetField("passiveInertiaTransferOnJump", AnyFlags); _fSpringStaminaPerJump = typeFromHandle.GetField("staminaUsageOnActiveJump", AnyFlags); } } private void UpdateSpringShoesMod(PlayerNetworking local) { if (!SpringShoesModEnabled) { RestoreSpringShoes(); return; } CacheSpringShoesFields(); if ((Object)(object)springShoesNM == (Object)null) { springShoesNM = ((Component)local).GetComponentInChildren(); } if ((Object)(object)springShoesNM == (Object)null) { RestoreSpringShoes(); return; } if (!springShoesOriginalsSaved) { RestoreSpringShoes(); springOrigMinInertia = GetFloatField(_fSpringMinInertia, springShoesNM); springOrigMaxJumpVel = GetFloatField(_fSpringMaxJumpVel, springShoesNM); springOrigHeadHitThresh = GetFloatField(_fSpringHeadHitThresh, springShoesNM); springOrigActiveInertia = GetFloatField(_fSpringActiveInertia, springShoesNM); springOrigPassiveInertia = GetFloatField(_fSpringPassiveInertia, springShoesNM); springOrigStaminaPerJump = GetFloatField(_fSpringStaminaPerJump, springShoesNM); SpringShoesMinInertiaTransfer = springOrigMinInertia; SpringShoesMaxJumpVelocity = springOrigMaxJumpVel; SpringShoesActiveInertiaTransfer = springOrigActiveInertia; SpringShoesPassiveInertiaTransfer = springOrigPassiveInertia; SpringShoesStaminaPerActiveJump = springOrigStaminaPerJump; springShoesOriginalsSaved = true; } _fSpringMinInertia?.SetValue(springShoesNM, SpringShoesMinInertiaTransfer); _fSpringMaxJumpVel?.SetValue(springShoesNM, SpringShoesMaxJumpVelocity); _fSpringHeadHitThresh?.SetValue(springShoesNM, SpringShoesNoHeadHit ? float.MaxValue : springOrigHeadHitThresh); _fSpringActiveInertia?.SetValue(springShoesNM, SpringShoesActiveInertiaTransfer); _fSpringPassiveInertia?.SetValue(springShoesNM, SpringShoesPassiveInertiaTransfer); _fSpringStaminaPerJump?.SetValue(springShoesNM, SpringShoesStaminaPerActiveJump); } private void RestoreSpringShoes() { if (springShoesOriginalsSaved && !((Object)(object)springShoesNM == (Object)null)) { _fSpringMinInertia?.SetValue(springShoesNM, springOrigMinInertia); _fSpringMaxJumpVel?.SetValue(springShoesNM, springOrigMaxJumpVel); _fSpringHeadHitThresh?.SetValue(springShoesNM, springOrigHeadHitThresh); _fSpringActiveInertia?.SetValue(springShoesNM, springOrigActiveInertia); _fSpringPassiveInertia?.SetValue(springShoesNM, springOrigPassiveInertia); _fSpringStaminaPerJump?.SetValue(springShoesNM, springOrigStaminaPerJump); springShoesNM = null; springShoesOriginalsSaved = false; } } private void CacheGlueGlovesFields() { if (!(_fGlueClimbHSpeed != null)) { Type? typeFromHandle = typeof(WallSlide); _fGlueClimbHSpeed = typeFromHandle.GetField("wallClimbHorizontalSpeed", AnyFlags); _fGlueClimbVSpeed = typeFromHandle.GetField("wallClimbVerticalSpeed", AnyFlags); _fGlueClimbAccel = typeFromHandle.GetField("wallClimbAcceleration", AnyFlags); _fGluePassiveStam = typeFromHandle.GetField("passiveStaminaUsage", AnyFlags); _fGlueActiveStam = typeFromHandle.GetField("activeStaminaUsage", AnyFlags); _fGlueFilterByTag = typeFromHandle.GetField("filterByTag", AnyFlags); } } private WallSlide FindLocalWallSlide(PlayerNetworking local) { if (local == null) { return null; } return ((Component)local).GetComponentInChildren(true); } private void UpdateGlueGlovesMod(PlayerNetworking local) { if (!GlueGlovesModEnabled) { RestoreGlueGloves(); return; } CacheGlueGlovesFields(); if ((Object)(object)glueGlovesWallSlide == (Object)null) { glueGlovesWallSlide = FindLocalWallSlide(local); } if ((Object)(object)glueGlovesWallSlide == (Object)null) { RestoreGlueGloves(); return; } if (!glueGlovesOriginalsSaved) { RestoreGlueGloves(); glueOrigClimbHSpeed = GetFloatField(_fGlueClimbHSpeed, glueGlovesWallSlide); glueOrigClimbVSpeed = GetFloatField(_fGlueClimbVSpeed, glueGlovesWallSlide); glueOrigClimbAccel = GetFloatField(_fGlueClimbAccel, glueGlovesWallSlide); glueOrigPassiveStam = GetFloatField(_fGluePassiveStam, glueGlovesWallSlide); glueOrigActiveStam = GetFloatField(_fGlueActiveStam, glueGlovesWallSlide); object obj = _fGlueFilterByTag?.GetValue(glueGlovesWallSlide); bool flag = default(bool); int num; if (obj is bool) { flag = (bool)obj; num = 1; } else { num = 0; } glueGlovesOrigFilterByTag = (byte)((uint)num & (flag ? 1u : 0u)) != 0; GlueGlovesClimbHSpeed = glueOrigClimbHSpeed; GlueGlovesClimbVSpeed = glueOrigClimbVSpeed; GlueGlovesClimbAccel = glueOrigClimbAccel; GlueGlovesPassiveStamina = glueOrigPassiveStam; GlueGlovesActiveStamina = glueOrigActiveStam; glueGlovesOriginalsSaved = true; } _fGlueClimbHSpeed?.SetValue(glueGlovesWallSlide, GlueGlovesClimbHSpeed); _fGlueClimbVSpeed?.SetValue(glueGlovesWallSlide, GlueGlovesClimbVSpeed); _fGlueClimbAccel?.SetValue(glueGlovesWallSlide, GlueGlovesClimbAccel); _fGluePassiveStam?.SetValue(glueGlovesWallSlide, GlueGlovesPassiveStamina); _fGlueActiveStam?.SetValue(glueGlovesWallSlide, GlueGlovesActiveStamina); _fGlueFilterByTag?.SetValue(glueGlovesWallSlide, !GlueGlovesAnySurface); } private void RestoreGlueGloves() { if (glueGlovesOriginalsSaved && !((Object)(object)glueGlovesWallSlide == (Object)null)) { _fGlueClimbHSpeed?.SetValue(glueGlovesWallSlide, glueOrigClimbHSpeed); _fGlueClimbVSpeed?.SetValue(glueGlovesWallSlide, glueOrigClimbVSpeed); _fGlueClimbAccel?.SetValue(glueGlovesWallSlide, glueOrigClimbAccel); _fGluePassiveStam?.SetValue(glueGlovesWallSlide, glueOrigPassiveStam); _fGlueActiveStam?.SetValue(glueGlovesWallSlide, glueOrigActiveStam); _fGlueFilterByTag?.SetValue(glueGlovesWallSlide, glueGlovesOrigFilterByTag); glueGlovesWallSlide = null; glueGlovesOriginalsSaved = false; } } private void CacheGliderFields() { if (!(_fGliderMaxFlightVel != null)) { Type? typeFromHandle = typeof(GliderGliding); _fGliderMaxFlightVel = typeFromHandle.GetField("maxFlightVelocity", AnyFlags); _fGliderGravity = typeFromHandle.GetField("gravity", AnyFlags); _fGliderDrag = typeFromHandle.GetField("dragCoefficient", AnyFlags); _fGliderTurnSpeed = typeFromHandle.GetField("turnSpeed", AnyFlags); _fGliderVelGainEnter = typeFromHandle.GetField("velocityGainOnEnter", AnyFlags); _fGliderFartAccel = typeFromHandle.GetField("fartAccelMlp", AnyFlags); } } private void UpdateGliderMod(PlayerNetworking local) { if (!GliderModEnabled) { RestoreGlider(); return; } CacheGliderFields(); if ((Object)(object)gliderInstance == (Object)null) { gliderInstance = ((Component)local).GetComponentInChildren(true); } if ((Object)(object)gliderInstance == (Object)null) { RestoreGlider(); return; } if (!gliderOriginalsSaved) { RestoreGlider(); gliderOrigMaxFlightVel = GetFloatField(_fGliderMaxFlightVel, gliderInstance); gliderOrigGravity = GetFloatField(_fGliderGravity, gliderInstance); gliderOrigDrag = GetFloatField(_fGliderDrag, gliderInstance); gliderOrigTurnSpeed = GetFloatField(_fGliderTurnSpeed, gliderInstance); gliderOrigVelGainEnter = GetFloatField(_fGliderVelGainEnter, gliderInstance); gliderOrigFartAccel = GetFloatField(_fGliderFartAccel, gliderInstance); GliderMaxFlightVelocity = gliderOrigMaxFlightVel; GliderGravity = gliderOrigGravity; GliderDrag = gliderOrigDrag; GliderTurnSpeed = gliderOrigTurnSpeed; GliderVelocityGainOnEnter = gliderOrigVelGainEnter; GliderFartAccelMlp = gliderOrigFartAccel; gliderOriginalsSaved = true; } _fGliderMaxFlightVel?.SetValue(gliderInstance, GliderMaxFlightVelocity); _fGliderGravity?.SetValue(gliderInstance, GliderGravity); _fGliderDrag?.SetValue(gliderInstance, GliderDrag); _fGliderTurnSpeed?.SetValue(gliderInstance, GliderTurnSpeed); _fGliderVelGainEnter?.SetValue(gliderInstance, GliderVelocityGainOnEnter); _fGliderFartAccel?.SetValue(gliderInstance, GliderFartAccelMlp); } private void RestoreGlider() { if (gliderOriginalsSaved && !((Object)(object)gliderInstance == (Object)null)) { _fGliderMaxFlightVel?.SetValue(gliderInstance, gliderOrigMaxFlightVel); _fGliderGravity?.SetValue(gliderInstance, gliderOrigGravity); _fGliderDrag?.SetValue(gliderInstance, gliderOrigDrag); _fGliderTurnSpeed?.SetValue(gliderInstance, gliderOrigTurnSpeed); _fGliderVelGainEnter?.SetValue(gliderInstance, gliderOrigVelGainEnter); _fGliderFartAccel?.SetValue(gliderInstance, gliderOrigFartAccel); gliderInstance = null; gliderOriginalsSaved = false; } } public void SetFreeCrafting(bool enabled, bool forceApply = false) { if (FreeCraftingEnabled != enabled || forceApply) { FreeCraftingEnabled = enabled; if (FreeCraftingEnabled) { ApplyFreeCrafting(); } else { RestoreFreeCrafting(); } HotDogCheatMod.Log($"Free Crafting: {FreeCraftingEnabled}"); } } public void ApplyFreeCrafting() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { SetGodMode(localPlayer, value: true); HotDogCheatMod.Log("Free Crafting enabled"); } } public void RestoreFreeCrafting() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { if (!GodModeEnabled) { SetGodMode(localPlayer, value: false); } HotDogCheatMod.Log("Free Crafting disabled"); } } private void CacheLimbRegrowFields() { if (!(_fLimbRegrowTime != null)) { _fLimbRegrowTime = typeof(DismembermentController).GetField("limbRegrowTime", AnyFlags); } } private void UpdateInstantLimbRegrow(PlayerNetworking local) { if (!InstantLimbRegrowEnabled) { RestoreInstantLimbRegrow(); return; } CacheLimbRegrowFields(); if ((Object)(object)limbRegrowDC == (Object)null) { limbRegrowDC = ((Component)local).GetComponentInChildren(true); } if ((Object)(object)limbRegrowDC == (Object)null) { RestoreInstantLimbRegrow(); return; } if (!limbRegrowOriginalsSaved) { RestoreInstantLimbRegrow(); origLimbRegrowTime = GetFloatField(_fLimbRegrowTime, limbRegrowDC); limbRegrowOriginalsSaved = true; } _fLimbRegrowTime?.SetValue(limbRegrowDC, 0.01f); } private void RestoreInstantLimbRegrow() { if (limbRegrowOriginalsSaved && !((Object)(object)limbRegrowDC == (Object)null)) { _fLimbRegrowTime?.SetValue(limbRegrowDC, origLimbRegrowTime); limbRegrowDC = null; limbRegrowOriginalsSaved = false; } } public void ApplyBackpack() { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } PlayerInventory inventory = localPlayer.Inventory; if (!((Object)(object)inventory == (Object)null)) { int num = (BackpackExtraEnabled ? 8 : (BackpackEnabled ? 6 : (-1))); if (num >= 0) { backpackCurrentTarget = num; ((InventoryBase)inventory).ResizeInventory(num); HotDogCheatMod.Log($"Backpack: resized to {num}"); } } } public void RestoreBackpack() { if (BackpackEnabled || BackpackExtraEnabled) { return; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if (!((Object)(object)localPlayer == (Object)null)) { PlayerInventory inventory = localPlayer.Inventory; if (!((Object)(object)inventory == (Object)null)) { backpackCurrentTarget = -1; ((InventoryBase)inventory).ResizeInventory(4); HotDogCheatMod.Log("Backpack: restored to 4"); } } } public void ApplyInfiniteTime() { if (!infiniteTimeWasSet && TrySetTimeActive(value: false)) { infiniteTimeWasSet = true; HotDogCheatMod.Log("Time frozen"); } } public void SetInfiniteTime(bool enabled, bool forceApply = false) { if (InfiniteTimeEnabled != enabled || forceApply) { InfiniteTimeEnabled = enabled; if (InfiniteTimeEnabled) { ApplyInfiniteTime(); } else { RestoreInfiniteTime(); } HotDogCheatMod.Log($"Infinite Time: {InfiniteTimeEnabled}"); } } public void RestoreInfiniteTime() { if (infiniteTimeWasSet) { TrySetTimeActive(value: true); infiniteTimeWasSet = false; HotDogCheatMod.Log("Time unfrozen"); } } private bool TrySetTimeActive(bool value) { GameProgressionManager instance = GameProgressionManager.Instance; if ((Object)(object)instance == (Object)null) { return false; } if (_fTimeActive == null) { _fTimeActive = typeof(GameProgressionManager).GetField("n_timeActive", AnyFlags); } if (_fTimeActive == null) { return false; } if (!(_fTimeActive.GetValue(instance) is NetworkVariable val)) { return false; } val.Value = value; return true; } public void ToggleFlyMode(bool enabled) { if (enabled && FreeCam.Enabled) { FreeCam.Disable(); } FlyModeEnabled = enabled; SetFlyNoclipState(enabled); HotDogCheatMod.Log($"Fly Mode: {enabled}"); } public void ToggleNoclip(bool enabled) { NoclipEnabled = enabled; PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { return; } if (enabled) { noclipSavedLayers = new List>(); SaveAndSetLayer(((Component)localPlayer).gameObject); Collider[] componentsInChildren = ((Component)localPlayer).GetComponentsInChildren(true); foreach (Collider val in componentsInChildren) { if ((Object)(object)val != (Object)null) { SaveAndSetLayer(((Component)val).gameObject); } } Transform parent = ((Component)localPlayer).transform.parent; if ((Object)(object)parent != (Object)null) { componentsInChildren = ((Component)parent).GetComponentsInChildren(true); foreach (Collider val2 in componentsInChildren) { if ((Object)(object)val2 != (Object)null) { SaveAndSetLayer(((Component)val2).gameObject); } } } } else if (noclipSavedLayers != null) { foreach (KeyValuePair noclipSavedLayer in noclipSavedLayers) { if ((Object)(object)noclipSavedLayer.Key != (Object)null) { noclipSavedLayer.Key.layer = noclipSavedLayer.Value; } } noclipSavedLayers = null; } HotDogCheatMod.Log($"Noclip: {enabled}"); void SaveAndSetLayer(GameObject go) { if (!((Object)(object)go == (Object)null)) { noclipSavedLayers.Add(new KeyValuePair(go, go.layer)); go.layer = LayerMask.NameToLayer("Ignore Raycast"); } } } private void SetFlyNoclipState(bool enabled) { //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null) { if (!enabled) { RestoreFlyControllerState(); } return; } if (!FlyModeEnabled) { RestoreFlyControllerState(); flyNoclipActive = false; return; } if (!flyControllerStateSaved || (Object)(object)flyStatePlayer != (Object)(object)localPlayer) { SaveFlyControllerState(localPlayer); } flyNoclipActive = true; if (!flyPositionValid) { flyPosition = ((Component)localPlayer).transform.position; flyPositionValid = true; } CharacterActor actor = localPlayer.Actor; if ((Object)(object)actor != (Object)null) { ((Behaviour)actor).enabled = false; } CharacterStateController stateController = localPlayer.StateController; if ((Object)(object)stateController != (Object)null) { ((Behaviour)stateController).enabled = false; } ZeroPlayerPhysics(localPlayer, disableGravity: true, null); } private void SaveFlyControllerState(PlayerNetworking local) { RestoreFlyControllerState(); flyStatePlayer = local; flySavedActor = (MonoBehaviour)(object)local.Actor; flySavedStateController = (MonoBehaviour)(object)local.StateController; flySavedActorEnabled = (Object)(object)flySavedActor != (Object)null && ((Behaviour)flySavedActor).enabled; flySavedStateControllerEnabled = (Object)(object)flySavedStateController != (Object)null && ((Behaviour)flySavedStateController).enabled; flySavedGravityStates = new List>(); foreach (Rigidbody playerRigidbody in GetPlayerRigidbodies(local)) { if ((Object)(object)playerRigidbody != (Object)null) { flySavedGravityStates.Add(new KeyValuePair(playerRigidbody, playerRigidbody.useGravity)); } } flyControllerStateSaved = true; } private void RestoreFlyControllerState() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (!flyControllerStateSaved) { return; } MonoBehaviour obj = flySavedActor; CharacterActor val = (CharacterActor)(object)((obj is CharacterActor) ? obj : null); if ((Object)(object)val != (Object)null && (Object)(object)flyStatePlayer != (Object)null) { ((Behaviour)val).enabled = true; ((PhysicsActor)val).Velocity = Vector3.zero; ((PhysicsActor)val).Teleport(((Component)flyStatePlayer).transform.position); } else if ((Object)(object)flySavedActor != (Object)null) { ((Behaviour)flySavedActor).enabled = flySavedActorEnabled; } if ((Object)(object)flySavedStateController != (Object)null) { ((Behaviour)flySavedStateController).enabled = flySavedStateControllerEnabled; } if (flySavedGravityStates != null) { foreach (KeyValuePair flySavedGravityState in flySavedGravityStates) { if ((Object)(object)flySavedGravityState.Key != (Object)null) { flySavedGravityState.Key.useGravity = flySavedGravityState.Value; } } } flyStatePlayer = null; flySavedActor = null; flySavedStateController = null; flySavedGravityStates = null; flyPositionValid = false; flyControllerStateSaved = false; } private IEnumerable GetPlayerRigidbodies(PlayerNetworking local) { HashSet seen = new HashSet(); if ((Object)(object)local == (Object)null) { yield break; } Rigidbody[] componentsInChildren = ((Component)local).GetComponentsInChildren(true); foreach (Rigidbody val in componentsInChildren) { if ((Object)(object)val != (Object)null && seen.Add(val)) { yield return val; } } Transform parent = ((Component)local).transform.parent; if ((Object)(object)parent != (Object)null) { componentsInChildren = ((Component)parent).GetComponentsInChildren(true); foreach (Rigidbody val2 in componentsInChildren) { if ((Object)(object)val2 != (Object)null && seen.Add(val2)) { yield return val2; } } } if (!((Object)(object)((BehaviourBase)(local.Puppet?)).puppetMaster != (Object)null)) { yield break; } Muscle[] muscles = ((BehaviourBase)local.Puppet).puppetMaster.muscles; for (int i = 0; i < muscles.Length; i++) { Rigidbody rigidbody = muscles[i].rigidbody; if ((Object)(object)rigidbody != (Object)null && seen.Add(rigidbody)) { yield return rigidbody; } } } private void ZeroPlayerPhysics(PlayerNetworking local, bool disableGravity, Rigidbody preserve) { //IL_0033: 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) foreach (Rigidbody playerRigidbody in GetPlayerRigidbodies(local)) { if (!((Object)(object)playerRigidbody == (Object)null)) { if (disableGravity) { playerRigidbody.useGravity = false; } if (!((Object)(object)playerRigidbody == (Object)(object)preserve)) { playerRigidbody.linearVelocity = Vector3.zero; playerRigidbody.angularVelocity = Vector3.zero; } } } } private void UpdateFlyNoclip(PlayerNetworking local) { //IL_0025: 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_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_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_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_0056: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) if (!FlyModeEnabled) { return; } Camera main = Camera.main; Transform val = ((main != null) ? ((Component)main).transform : null); if (!((Object)(object)val == (Object)null)) { Vector3 val2 = Vector3.zero; if (Input.GetKey((KeyCode)119)) { val2 += val.forward; } if (Input.GetKey((KeyCode)115)) { val2 -= val.forward; } if (Input.GetKey((KeyCode)97)) { val2 -= val.right; } if (Input.GetKey((KeyCode)100)) { val2 += val.right; } if (Input.GetKey((KeyCode)32)) { val2 += Vector3.up; } if (Input.GetKey((KeyCode)304)) { val2 += Vector3.down; } float num = FlySpeed * (Input.GetKey((KeyCode)306) ? 2f : 1f); if (!flyNoclipActive || (Object)(object)flyStatePlayer != (Object)(object)local) { SetFlyNoclipState(enabled: true); } Vector3 velocity = Vector3.zero; if (val2 != Vector3.zero) { velocity = ((Vector3)(ref val2)).normalized * num; } DriveFlyPlayer(local, velocity); ZeroPlayerPhysics(local, disableGravity: true, null); } } private void DriveFlyPlayer(PlayerNetworking local, Vector3 velocity) { //IL_002a: 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_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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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_005e: 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 (!((Object)(object)local == (Object)null)) { if (!flyPositionValid) { flyPosition = ((Component)local).transform.position; flyPositionValid = true; } if (velocity != Vector3.zero) { float num = ((Time.unscaledDeltaTime > 0f) ? Time.unscaledDeltaTime : Time.deltaTime); flyPosition += velocity * num; } ((Component)local).transform.position = flyPosition; } } } [BepInPlugin("com.catfishgod420.hotdogcheat", "HotDogCheat", "1.0.4")] [BepInProcess("Gnomium.exe")] public class HotDogCheatMod : BaseUnityPlugin { private MenuManager menuManager; private FeatureManager featureManager; private ESPRenderer espRenderer; private Overlay overlay; private KeybindManager keybindManager; private Harmony harmony; private HotdogConfig hotdogConfig; public static HotDogCheatMod Instance { get; private set; } public FeatureManager FeatureManager => featureManager; public bool IsMenuVisible => menuManager?.IsVisible ?? false; private void Awake() { //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown Instance = this; HotdogLogger.Initialize(((BaseUnityPlugin)this).Logger); hotdogConfig = new HotdogConfig(((BaseUnityPlugin)this).Config); featureManager = new FeatureManager(); espRenderer = new ESPRenderer(); menuManager = new MenuManager(featureManager, espRenderer); overlay = new Overlay(); PersistentConfig.LoadFromDisk(); espRenderer.Settings.Load(); LoadFeatureConfig(); if (featureManager.FreeCraftingEnabled) { featureManager.SetFreeCrafting(enabled: true, forceApply: true); } if (featureManager.InfiniteTimeEnabled) { featureManager.SetInfiniteTime(enabled: true, forceApply: true); } keybindManager = new KeybindManager(featureManager, espRenderer.Settings); Log("Persistent config: " + PersistentConfig.ConfigPath); harmony = new Harmony("com.catfishgod420.hotdogcheat"); harmony.PatchAll(typeof(Patches)); } private void OnDestroy() { Harmony obj = harmony; if (obj != null) { obj.UnpatchSelf(); } harmony = null; if ((Object)(object)Instance == (Object)(object)this) { Instance = null; } } private void LoadFeatureConfig() { hotdogConfig.LoadFeatureDefaults(featureManager); PersistentConfig.LoadObject("Features", featureManager); PersistentConfig.LoadObject("FreeCam", featureManager.FreeCam); } public void SaveFeatureConfig() { hotdogConfig.SaveFeatureDefaults(featureManager); PersistentConfig.SaveObject("Features", featureManager); PersistentConfig.SaveObject("FreeCam", featureManager.FreeCam); PersistentConfig.SaveToDisk(); } public void SaveAllConfig() { espRenderer.Settings.Save(); SaveFeatureConfig(); PersistentConfig.SaveToDisk(); Log("Config saved: " + PersistentConfig.ConfigPath); } private void Update() { if (Input.GetKeyDown((KeyCode)277) || Input.GetKeyDown((KeyCode)283)) { menuManager.ToggleMenu(); } keybindManager?.Update(menuManager.IsVisible); featureManager.OnUpdate(); PlayerActions.UpdateSpectate(); } private void LateUpdate() { featureManager.OnLateUpdate(); } private void OnGUI() { overlay.Draw(); espRenderer.Draw(); featureManager.FreeCam.OnGUI(); if (menuManager.IsVisible) { menuManager.Draw(); } keybindManager?.DrawGUI(); } public static void Log(string msg) { HotdogLogger.Info(msg); } public static void LogError(string msg) { HotdogLogger.Error(msg); } } internal static class Patches { private static FieldInfo _fIsAllowedToCancelJump; private static PropertyInfo _piCharacterActions; internal static bool KarmaWriteFromMod; private static MethodInfo _mOnEntityHitMeRpc; private static FieldInfo _fHealthBase; private static FieldInfo _fMgMarbleOrigin; private static FieldInfo _fMgShootLayers; private static FieldInfo _fMgShootFeedback; private static FieldInfo _fMgCamera; private static FieldInfo _fRpcExecStage; private static FieldInfo _fMgMaxProjectileDist; private static MethodInfo _miPlayFeedbacks0; private static MethodInfo _miWantToShootRpc; private static GameObject _cachedMissilePrefab; private static GameObject _cachedDecalPrefab; private static GameObject _cachedGunPrefab; private static GameObject _cachedShotgunPrefab; private static FieldInfo _fGunShotPlayer; private static MethodInfo _miGunPlayFeedbacks; private static MethodInfo _miShotgunPlayFeedbacks; [HarmonyPrefix] [HarmonyPatch(typeof(InventoryBase), "DropInventoryContents")] private static bool Prefix_DropInventoryContents(InventoryBase __instance) { HotDogCheatMod instance = HotDogCheatMod.Instance; if (instance != null && instance.FeatureManager?.NeverDropItemsEnabled == true) { PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer != (Object)null && (Object)(object)__instance == (Object)(object)localPlayer.Inventory) { return false; } } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(InventoryBase), "HasResourcesForCrafting")] private static void Postfix_HasResourcesForCrafting(ref bool __result) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.FreeCraftingEnabled) { __result = true; } } [HarmonyPrefix] [HarmonyPatch(typeof(InventoryBase), "RemoveCraftingRecipeResources")] private static bool Prefix_RemoveCraftingRecipeResources() { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager == null) { return true; } return !featureManager.FreeCraftingEnabled; } [HarmonyPrefix] [HarmonyPatch(typeof(NormalMovement), "ProcessRegularJump")] private static void Prefix_ProcessRegularJump(NormalMovement __instance) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && !Mathf.Approximately(featureManager.JumpMultiplier, 1f)) { VerticalMovementParameters verticalMovementParameters = __instance.verticalMovementParameters; verticalMovementParameters.jumpSpeed *= featureManager.JumpMultiplier; __instance.verticalMovementParameters = verticalMovementParameters; } } [HarmonyPostfix] [HarmonyPatch(typeof(NormalMovement), "ProcessRegularJump")] private static void Postfix_ProcessRegularJump(NormalMovement __instance) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager == null) { return; } if (!Mathf.Approximately(featureManager.JumpMultiplier, 1f)) { VerticalMovementParameters verticalMovementParameters = __instance.verticalMovementParameters; verticalMovementParameters.jumpSpeed /= featureManager.JumpMultiplier; __instance.verticalMovementParameters = verticalMovementParameters; } if (featureManager.InfiniteJumpsEnabled) { if (_fIsAllowedToCancelJump == null) { _fIsAllowedToCancelJump = typeof(NormalMovement).GetField("isAllowedToCancelJump", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); } _fIsAllowedToCancelJump?.SetValue(__instance, false); } } [HarmonyPostfix] [HarmonyPatch(typeof(NormalMovement), "CanJump")] private static void Postfix_CanJump(NormalMovement __instance, ref JumpResult __result) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager == null || !featureManager.InfiniteJumpsEnabled) { return; } if (_piCharacterActions == null) { BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; Type type = ((object)__instance).GetType(); while (type != null && _piCharacterActions == null) { _piCharacterActions = type.GetProperty("CharacterActions", bindingAttr); type = type.BaseType; } } object obj = _piCharacterActions?.GetValue(__instance); if (obj != null) { object obj2 = obj.GetType().GetField("jump")?.GetValue(obj); if (obj2 != null && (bool?)obj2.GetType().GetProperty("Started")?.GetValue(obj2) == true) { __result = (JumpResult)2; } } } [HarmonyPostfix] [HarmonyPatch(typeof(GnomiumDeposit), "GetRewardFromCompletedTasks")] private static void Postfix_GetRewardFromCompletedTasks(ref int __result) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && !Mathf.Approximately(featureManager.GnomeiumMultiplier, 1f)) { __result = Mathf.RoundToInt((float)__result * featureManager.GnomeiumMultiplier); } } [HarmonyPrefix] [HarmonyPatch(typeof(GameProgressionManager), "OnKarmaChanged")] private static bool Prefix_OnKarmaChanged(float old, float current) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.SuppressKarmaSpikeFeedback && KarmaWriteFromMod) { return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerNetworking), "get_FallDamage")] private static void Postfix_get_FallDamage(PlayerNetworking __instance, ref bool __result) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.NoFallDamageEnabled && ((NetworkBehaviour)__instance).IsLocalPlayer) { __result = false; } } [HarmonyPrefix] [HarmonyPatch(typeof(PlayerNetworking), "Respawn")] private static void Prefix_PlayerRespawn(PlayerNetworking __instance, ref float initialDelay) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.InstantRespawnEnabled && !((Object)(object)__instance == (Object)null) && ((NetworkBehaviour)__instance).IsLocalPlayer) { initialDelay = 0f; } } private static void CacheModdedLauncherFields() { if (!(_fRpcExecStage != null)) { BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; Type? typeFromHandle = typeof(MarbleGun); _fMgMarbleOrigin = typeFromHandle.GetField("marbleOrigin", bindingAttr); _fMgShootLayers = typeFromHandle.GetField("shootLayers", bindingAttr); _fMgShootFeedback = typeFromHandle.GetField("shootFeedback", bindingAttr); _fMgCamera = typeFromHandle.GetField("camera", bindingAttr); _fMgMaxProjectileDist = typeFromHandle.GetField("maxProjectileTravelDistance", bindingAttr); _miWantToShootRpc = typeFromHandle.GetMethod("WantToShootRpc", bindingAttr); Type type = _fMgShootFeedback?.FieldType; if (type != null) { _miPlayFeedbacks0 = type.GetMethod("PlayFeedbacks", Type.EmptyTypes); } _fRpcExecStage = typeof(NetworkBehaviour).GetField("__rpc_exec_stage", bindingAttr); } } [HarmonyPrefix] [HarmonyPatch(typeof(MarbleGun), "OnUsageStart")] private static bool Prefix_OnUsageStart(MarbleGun __instance) { //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_010e: 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_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager == null || !featureManager.ModdedLauncherEnabled) { return true; } if (!((NetworkBehaviour)__instance).IsLocalPlayer) { return true; } CacheModdedLauncherFields(); object obj = _fMgShootFeedback?.GetValue(__instance); _miPlayFeedbacks0?.Invoke(obj, null); object? obj2 = _fMgMarbleOrigin?.GetValue(__instance); Transform val = (Transform)((obj2 is Transform) ? obj2 : null); object? obj3 = _fMgCamera?.GetValue(__instance); MonoBehaviour val2 = (MonoBehaviour)((obj3 is MonoBehaviour) ? obj3 : null); if ((Object)(object)val == (Object)null || (Object)(object)val2 == (Object)null) { return false; } float num = ((float?)_fMgMaxProjectileDist?.GetValue(__instance)) ?? 100f; int num2 = ((_fMgShootLayers?.GetValue(__instance) is int num3) ? num3 : (-1)); Vector3 position = val.position; Vector3 val3 = ((Component)val2).transform.position + ((Component)val2).transform.forward * num; RaycastHit val4 = default(RaycastHit); if (Physics.Raycast(position, val3 - position, ref val4, num, num2)) { NetworkBehaviour component = ((Component)((RaycastHit)(ref val4)).collider).GetComponent(); _miWantToShootRpc?.Invoke(__instance, new object[4] { ((RaycastHit)(ref val4)).point, ((RaycastHit)(ref val4)).normal, true, (object)(((Object)(object)component != (Object)null) ? new NetworkBehaviourReference(component) : default(NetworkBehaviourReference)) }); } else { _miWantToShootRpc?.Invoke(__instance, new object[4] { val3, Vector3.zero, false, (object)default(NetworkBehaviourReference) }); } return false; } [HarmonyPrefix] [HarmonyPatch(typeof(MarbleGun), "WantToShootRpc")] private static bool Prefix_WantToShootRpc(MarbleGun __instance, Vector3 endPos, Vector3 normal, bool hit, NetworkBehaviourReference shotTarget) { //IL_0068: 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) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: 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) FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager == null || !featureManager.ModdedLauncherEnabled) { return true; } CacheModdedLauncherFields(); object obj = _fRpcExecStage?.GetValue(__instance); if (obj == null || (int)obj != 1) { return true; } object? obj2 = _fMgMarbleOrigin?.GetValue(__instance); Transform val = (Transform)((obj2 is Transform) ? obj2 : null); if ((Object)(object)val == (Object)null) { return false; } Vector3 val2 = endPos - val.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; int layerMask = ((_fMgShootLayers?.GetValue(__instance) is int num) ? num : (-1)); switch (featureManager.ModdedLauncherMode) { case FeatureManager.ModdedLauncherModeType.Gun: DoGunHitscan(val.position, normalized, layerMask); break; case FeatureManager.ModdedLauncherModeType.Shotgun: DoShotgunHitscan(val.position, normalized, layerMask); break; case FeatureManager.ModdedLauncherModeType.RPG: DoRPGLaunch(__instance, val.position, normalized); break; } return false; } private static void DoGunHitscan(Vector3 origin, Vector3 dir, int layerMask) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_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_006e: Unknown result type (might be due to invalid IL or missing references) CacheWeaponPrefabs(); PlayGunshotAudio(origin); RaycastHit val = default(RaycastHit); if (Physics.Raycast(origin, dir, ref val, 100f, layerMask)) { HealthBase val2 = default(HealthBase); if (Utils.TryGetHealth(((RaycastHit)(ref val)).collider, ref val2)) { val2.Kill(); } if ((Object)(object)_cachedDecalPrefab != (Object)null) { Object.Instantiate(_cachedDecalPrefab, ((RaycastHit)(ref val)).point + ((RaycastHit)(ref val)).normal * 0.03f, Quaternion.LookRotation(-((RaycastHit)(ref val)).normal)); } } } private static void DoShotgunHitscan(Vector3 origin, Vector3 dir, int layerMask) { //IL_0005: 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_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) CacheWeaponPrefabs(); PlayGunshotAudio(origin, shotgun: true); int num = 6; float num2 = 8f; RaycastHit val2 = default(RaycastHit); HealthBase val3 = default(HealthBase); for (int i = 0; i < num; i++) { Vector3 val = dir; if (i > 0) { val = Quaternion.AngleAxis(Random.Range(0f - num2, num2), Vector3.up) * dir; val = Quaternion.AngleAxis(Random.Range(0f - num2, num2), Vector3.right) * val; } if (Physics.Raycast(origin, val, ref val2, 100f, layerMask)) { if (Utils.TryGetHealth(((RaycastHit)(ref val2)).collider, ref val3)) { val3.Kill(); } if ((Object)(object)_cachedDecalPrefab != (Object)null) { Object.Instantiate(_cachedDecalPrefab, ((RaycastHit)(ref val2)).point + ((RaycastHit)(ref val2)).normal * 0.03f, Quaternion.LookRotation(-((RaycastHit)(ref val2)).normal)); } } } } private static void PlayGunshotAudio(Vector3 position, bool shotgun = false) { //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) GameObject val = (shotgun ? _cachedShotgunPrefab : _cachedGunPrefab); if ((Object)(object)val == (Object)null) { return; } GameObject val2 = Object.Instantiate(val, position, Quaternion.identity); Renderer[] componentsInChildren = val2.GetComponentsInChildren(true); foreach (Renderer val3 in componentsInChildren) { if ((Object)(object)val3 != (Object)null) { val3.enabled = false; } } Collider[] componentsInChildren2 = val2.GetComponentsInChildren(true); foreach (Collider val4 in componentsInChildren2) { if ((Object)(object)val4 != (Object)null) { val4.enabled = false; } } Gun component = val2.GetComponent(); if ((Object)(object)component != (Object)null) { object obj = _fGunShotPlayer?.GetValue(component); (shotgun ? _miShotgunPlayFeedbacks : _miGunPlayFeedbacks)?.Invoke(obj, null); } Object.Destroy((Object)(object)val2, 3f); } private static void DoRPGLaunch(MarbleGun instance, Vector3 origin, Vector3 dir) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_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_0037: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) CacheWeaponPrefabs(); if ((Object)(object)_cachedMissilePrefab == (Object)null) { return; } NetworkManager networkManager = ((NetworkBehaviour)instance).NetworkManager; if ((Object)(object)networkManager == (Object)null) { return; } Vector3 val = origin + dir * 0.5f; Quaternion val2 = Quaternion.LookRotation(dir, Vector3.up); NetworkObject val3 = NetworkObject.InstantiateAndSpawn(_cachedMissilePrefab, networkManager, 0uL, false, false, false, val, val2); if ((Object)(object)val3 != (Object)null) { Grenade component = ((Component)val3).GetComponent(); if (component != null) { component.StartFuseRpc(); } } } private static void CacheWeaponPrefabs() { if ((Object)(object)_cachedMissilePrefab != (Object)null && (Object)(object)_cachedDecalPrefab != (Object)null && (Object)(object)_cachedGunPrefab != (Object)null && (Object)(object)_cachedShotgunPrefab != (Object)null) { return; } if ((Object)(object)_cachedMissilePrefab == (Object)null) { GameObject val = SpawnerActions.FindNetworkPrefab("RocketLauncher"); if ((Object)(object)val != (Object)null) { RocketLauncher component = val.GetComponent(); if ((Object)(object)component != (Object)null) { object? obj = typeof(RocketLauncher).GetField("missilePrefab", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(component); _cachedMissilePrefab = (GameObject)((obj is GameObject) ? obj : null); } } } if ((Object)(object)_cachedGunPrefab == (Object)null) { _cachedGunPrefab = SpawnerActions.FindNetworkPrefab("Gun"); if ((Object)(object)_cachedGunPrefab != (Object)null) { Gun component2 = _cachedGunPrefab.GetComponent(); if ((Object)(object)component2 != (Object)null) { object? obj2 = typeof(Gun).GetField("decalPrefab", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(component2); _cachedDecalPrefab = (GameObject)((obj2 is GameObject) ? obj2 : null); _fGunShotPlayer = typeof(Gun).GetField("gunShotPlayer", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); object obj3 = _fGunShotPlayer?.GetValue(component2); if (obj3 != null) { _miGunPlayFeedbacks = obj3.GetType().GetMethod("PlayFeedbacks", Type.EmptyTypes); } } } } if (!((Object)(object)_cachedShotgunPrefab == (Object)null)) { return; } _cachedShotgunPrefab = SpawnerActions.FindNetworkPrefab("Shotgun"); if (!((Object)(object)_cachedShotgunPrefab != (Object)null)) { return; } Gun component3 = _cachedShotgunPrefab.GetComponent(); if ((Object)(object)component3 != (Object)null) { object obj4 = typeof(Gun).GetField("gunShotPlayer", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.GetValue(component3); if (obj4 != null) { _miShotgunPlayFeedbacks = obj4.GetType().GetMethod("PlayFeedbacks", Type.EmptyTypes); } } } [HarmonyPrefix] [HarmonyPatch(typeof(GameEntityBase), "OnHitWithPunch")] private static bool Prefix_OnHitWithPunch(GameEntityBase __instance, Collider hitCollider, Vector3 hitDirection, Vector3 hitPoint, GameEntityBase hitter) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager == null || !featureManager.SuperPunchEnabled) { return true; } PlayerNetworking localPlayer = PlayerHelper.GetLocalPlayer(); if ((Object)(object)localPlayer == (Object)null || (Object)(object)hitter != (Object)(object)localPlayer) { return true; } if (_fHealthBase == null) { _fHealthBase = typeof(GameEntityBase).GetField("healthBase", BindingFlags.Instance | BindingFlags.NonPublic); } object? obj = _fHealthBase?.GetValue(__instance); object? obj2 = ((obj is HealthBase) ? obj : null); if (obj2 != null) { ((HealthBase)obj2).Kill(); } __instance.OnGotHit(hitCollider, hitDirection, hitPoint); AiPuppetHandler component = ((Component)__instance).GetComponent(); ((MonoBehaviour)__instance).StartCoroutine(DelayedSuperKnockback(__instance, hitDirection * 30f, component)); if (_mOnEntityHitMeRpc == null) { _mOnEntityHitMeRpc = typeof(GameEntityBase).GetMethod("OnEntityHitMeRpc", BindingFlags.Instance | BindingFlags.NonPublic); } _mOnEntityHitMeRpc?.Invoke(__instance, new object[1] { (object)new NetworkBehaviourReference((NetworkBehaviour)(object)hitter) }); return false; } private static IEnumerator DelayedSuperKnockback(GameEntityBase entity, Vector3 velocity, AiPuppetHandler puppetHandler) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) yield return (object)new WaitForSeconds(0.15f); if (!((Object)(object)entity == (Object)null)) { if ((Object)(object)puppetHandler != (Object)null) { puppetHandler.AddForce(velocity, (ForceMode)2); } else { entity.AddVelocityRpc(velocity); } } } [HarmonyPrefix] [HarmonyPatch(typeof(PlayerNetworking), "CanBeAggroedBy")] private static bool Prefix_CanBeAggroedBy(PlayerNetworking __instance, ref bool __result) { FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.NpcIgnoreEnabled && (Object)(object)__instance != (Object)null && ((NetworkBehaviour)__instance).IsLocalPlayer) { __result = false; return false; } return true; } [HarmonyPostfix] [HarmonyPatch(typeof(MedicalTerminal), "OnPlayerDied")] private static void Postfix_MedicalTerminal_OnPlayerDied(MedicalTerminal __instance, PlayerNetworking obj) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Invalid comparison between Unknown and I4 FeatureManager featureManager = HotDogCheatMod.Instance?.FeatureManager; if (featureManager != null && featureManager.InstantRespawnEnabled && !((Object)(object)obj == (Object)null) && ((NetworkBehaviour)obj).IsLocalPlayer) { GameProgressionManager instance = GameProgressionManager.Instance; if (!((Object)(object)instance == (Object)null) && (int)instance.CurrentGameState == 1 && instance.CurrentPlayerCount == 1 && (Object)(object)NetworkManager.Singleton != (Object)null && NetworkManager.Singleton.IsServer && __instance.CanRespawnDeadPlayers) { __instance.RespawnPlayersNow(); } } } } internal sealed class HotdogConfig { private const string FeatureSection = "HotDogCheat_Features"; private readonly ConfigFile config; private readonly ConfigEntry infiniteTime; private readonly ConfigEntry infiniteStamina; private readonly ConfigEntry antiKidnap; private readonly ConfigEntry instantRespawn; private readonly ConfigEntry freeCrafting; private readonly ConfigEntry backpack; private readonly ConfigEntry backpackExtra; private readonly ConfigEntry neverDropItems; private readonly ConfigEntry suppressKarmaSpikeFeedback; private readonly ConfigEntry speedMultiplier; private readonly ConfigEntry bobSpeedMultiplier; private readonly ConfigEntry staminaMultiplier; private readonly ConfigEntry gnomeiumMultiplier; private readonly ConfigEntry flySpeed; private readonly ConfigEntry freeCamMoveSpeed; private readonly ConfigEntry freeCamLookSensitivity; private readonly ConfigEntry freeCamBlackHoleStrength; private readonly ConfigEntry freeCamBlackHoleRadius; private readonly ConfigEntry freeCamInteractGrabStrength; public HotdogConfig(ConfigFile config) { this.config = config; infiniteTime = Bind("InfiniteTime", defaultValue: false); infiniteStamina = Bind("InfiniteStamina", defaultValue: false); antiKidnap = Bind("AntiKidnap", defaultValue: false); instantRespawn = Bind("InstantRespawn", defaultValue: false); freeCrafting = Bind("FreeCrafting", defaultValue: false); backpack = Bind("Backpack", defaultValue: false); backpackExtra = Bind("BackpackExtra", defaultValue: false); neverDropItems = Bind("NeverDropItems", defaultValue: false); suppressKarmaSpikeFeedback = Bind("SuppressKarmaSpikeFeedback", defaultValue: false); speedMultiplier = Bind("SpeedMultiplier", 1f); bobSpeedMultiplier = Bind("BobSpeedMultiplier", 1f); staminaMultiplier = Bind("StaminaMultiplier", 1f); gnomeiumMultiplier = Bind("GnomeiumMultiplier", 1f); flySpeed = Bind("FlySpeed", 10f); freeCamMoveSpeed = Bind("FreeCamMoveSpeed", 20f); freeCamLookSensitivity = Bind("FreeCamLookSensitivity", 0.15f); freeCamBlackHoleStrength = Bind("FreeCamBlackHoleStrength", 45f); freeCamBlackHoleRadius = Bind("FreeCamBlackHoleRadius", 14f); freeCamInteractGrabStrength = Bind("FreeCamInteractGrabStrength", 1f); } public void LoadFeatureDefaults(FeatureManager featureManager) { featureManager.InfiniteTimeEnabled = infiniteTime.Value; featureManager.InfiniteStaminaEnabled = infiniteStamina.Value; featureManager.AntiKidnapEnabled = antiKidnap.Value; featureManager.InstantRespawnEnabled = instantRespawn.Value; featureManager.FreeCraftingEnabled = freeCrafting.Value; featureManager.BackpackEnabled = backpack.Value; featureManager.BackpackExtraEnabled = backpackExtra.Value; featureManager.NeverDropItemsEnabled = neverDropItems.Value; featureManager.SuppressKarmaSpikeFeedback = suppressKarmaSpikeFeedback.Value; featureManager.SpeedMultiplier = speedMultiplier.Value; featureManager.BobSpeedMultiplier = bobSpeedMultiplier.Value; featureManager.StaminaMultiplier = staminaMultiplier.Value; featureManager.GnomeiumMultiplier = gnomeiumMultiplier.Value; featureManager.FlySpeed = flySpeed.Value; featureManager.FreeCam.MoveSpeed = freeCamMoveSpeed.Value; featureManager.FreeCam.LookSensitivity = freeCamLookSensitivity.Value; featureManager.FreeCam.BlackHoleStrength = freeCamBlackHoleStrength.Value; featureManager.FreeCam.BlackHoleRadius = freeCamBlackHoleRadius.Value; featureManager.FreeCam.InteractGrabStrength = freeCamInteractGrabStrength.Value; } public void SaveFeatureDefaults(FeatureManager featureManager) { infiniteTime.Value = featureManager.InfiniteTimeEnabled; infiniteStamina.Value = featureManager.InfiniteStaminaEnabled; antiKidnap.Value = featureManager.AntiKidnapEnabled; instantRespawn.Value = featureManager.InstantRespawnEnabled; freeCrafting.Value = featureManager.FreeCraftingEnabled; backpack.Value = featureManager.BackpackEnabled; backpackExtra.Value = featureManager.BackpackExtraEnabled; neverDropItems.Value = featureManager.NeverDropItemsEnabled; suppressKarmaSpikeFeedback.Value = featureManager.SuppressKarmaSpikeFeedback; speedMultiplier.Value = featureManager.SpeedMultiplier; bobSpeedMultiplier.Value = featureManager.BobSpeedMultiplier; staminaMultiplier.Value = featureManager.StaminaMultiplier; gnomeiumMultiplier.Value = featureManager.GnomeiumMultiplier; flySpeed.Value = featureManager.FlySpeed; freeCamMoveSpeed.Value = featureManager.FreeCam.MoveSpeed; freeCamLookSensitivity.Value = featureManager.FreeCam.LookSensitivity; freeCamBlackHoleStrength.Value = featureManager.FreeCam.BlackHoleStrength; freeCamBlackHoleRadius.Value = featureManager.FreeCam.BlackHoleRadius; freeCamInteractGrabStrength.Value = featureManager.FreeCam.InteractGrabStrength; config.Save(); } private ConfigEntry Bind(string key, T defaultValue) { return config.Bind("HotDogCheat_Features", key, defaultValue, (ConfigDescription)null); } } internal static class HotdogLogger { private static ManualLogSource source; public static void Initialize(ManualLogSource logger) { source = logger; } public static void Info(string message) { if (source != null) { source.LogInfo((object)message); } else { Debug.Log((object)("[HotDogCheat] " + message)); } } public static void Error(string message) { if (source != null) { source.LogError((object)message); } else { Debug.LogError((object)("[HotDogCheat] " + message)); } } } public class KeybindManager { public class BindableAction { public string Id; public string Category; public string Label; public Action Execute; } private readonly FeatureManager features; private readonly ESPSettings esp; private readonly List actions = new List(); private readonly Dictionary actionsById = new Dictionary(); private readonly Dictionary bindings = new Dictionary(); private Vector2 pickerScroll; private Vector2 appliedScroll; private Rect pickerRect = UiLayout.KeybindPickerRect; private Rect captureRect = UiLayout.KeybindCaptureRect; private GUIStyle cachedHeaderStyle; private GUIStyle cachedRowStyle; private UiProfileKind activeProfile = UiLayout.CurrentKind; private int cachedHeaderVersion = -1; private int cachedRowVersion = -1; private bool pickerOpen; private BindableAction captureAction; public static KeybindManager Instance { get; private set; } public IEnumerable Actions => actions; public IEnumerable> AppliedBindings { get { foreach (KeyValuePair binding in bindings) { if (actionsById.TryGetValue(binding.Key, out var value)) { yield return new KeyValuePair(value, binding.Value); } } } } public KeybindManager(FeatureManager features, ESPSettings esp) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) Instance = this; this.features = features; this.esp = esp; RegisterActions(); LoadBindings(); } public void TogglePicker() { pickerOpen = !pickerOpen; captureAction = null; } public void Update(bool menuOpen) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Invalid comparison between Unknown and I4 //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) if (!menuOpen && (pickerOpen || captureAction != null)) { pickerOpen = false; captureAction = null; } if (menuOpen && Input.GetKeyDown((KeyCode)291)) { TogglePicker(); } else if (captureAction != null) { KeyCode val = ReadPressedKey(); if ((int)val != 0) { if ((int)val == 27) { captureAction = null; return; } Bind(captureAction.Id, val); captureAction = null; } } else { if (menuOpen || pickerOpen) { return; } foreach (KeyValuePair binding in bindings) { if (Input.GetKeyDown(binding.Value) && actionsById.TryGetValue(binding.Key, out var value)) { value.Execute?.Invoke(); } } } } public void DrawGUI() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown //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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) SyncLayoutProfile(); if (pickerOpen) { pickerRect = GUI.Window(4201, pickerRect, new WindowFunction(DrawPickerWindow), "Keybinds", Styles.Background); } if (captureAction != null) { ((Rect)(ref captureRect)).x = ((Rect)(ref pickerRect)).x + (((Rect)(ref pickerRect)).width - ((Rect)(ref captureRect)).width) / 2f; ((Rect)(ref captureRect)).y = ((Rect)(ref pickerRect)).y + ((Rect)(ref pickerRect)).height + 6f; captureRect = GUI.Window(4202, captureRect, new WindowFunction(DrawCaptureWindow), "Press a Key", Styles.Background); } } private void SyncLayoutProfile() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_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) UiProfileKind currentKind = UiLayout.CurrentKind; if (activeProfile != currentKind) { activeProfile = currentKind; pickerRect = UiLayout.KeybindPickerRect; captureRect = UiLayout.KeybindCaptureRect; cachedHeaderStyle = null; cachedRowStyle = null; } } public void DrawOverlayList() { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: 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 (!esp.ShowKeybindsUi) { return; } List> list = new List>(AppliedBindings); if (list.Count == 0) { return; } float overlayKeybindWidth = UiLayout.OverlayKeybindWidth; float overlayKeybindRowHeight = UiLayout.OverlayKeybindRowHeight; float overlayKeybindHeaderHeight = UiLayout.OverlayKeybindHeaderHeight; float overlayKeybindMargin = UiLayout.OverlayKeybindMargin; float num = overlayKeybindHeaderHeight + (float)list.Count * overlayKeybindRowHeight; float num2 = (esp.KeybindsUiRightSide ? ((float)Screen.width - overlayKeybindWidth - overlayKeybindMargin) : overlayKeybindMargin); float overlayKeybindY = UiLayout.OverlayKeybindY; GUI.Box(new Rect(num2, overlayKeybindY, overlayKeybindWidth, num), ""); GUI.Label(new Rect(num2 + 8f, overlayKeybindY + 3f, overlayKeybindWidth - 16f, overlayKeybindHeaderHeight - 6f), "KEYBINDS", HeaderStyle()); overlayKeybindY += overlayKeybindHeaderHeight; GUIStyle val = RowStyle(); foreach (KeyValuePair item in list) { GUI.Label(new Rect(num2 + 8f, overlayKeybindY, overlayKeybindWidth - 16f, overlayKeybindRowHeight), $"{item.Value} - {item.Key.Label}", val); overlayKeybindY += overlayKeybindRowHeight; } } public void DrawAppliedBindingsEditor() { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) List> list = new List>(AppliedBindings); if (list.Count == 0) { GUILayout.Label("No keybinds applied. Open the menu and press F10 to add one.", Styles.Label, Array.Empty()); return; } appliedScroll = GUILayout.BeginScrollView(appliedScroll, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(260f) }); foreach (KeyValuePair item in list) { GUILayout.BeginHorizontal(Array.Empty()); GUILayout.Label($"{item.Value} - {item.Key.Label}", Styles.Label, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(330f) }); if (GUILayout.Button("X", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.W(32f) })) { Unbind(item.Key.Id); } GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); } private void DrawPickerWindow(int id) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) GUI.DrawTexture(new Rect(0f, 0f, ((Rect)(ref pickerRect)).width, ((Rect)(ref pickerRect)).height), (Texture)(object)Styles.TexDark); GUILayout.BeginVertical(Array.Empty()); GUILayout.Label("Click a feature, then press the key you want.", Styles.Label, Array.Empty()); GUILayout.Space(UiLayout.Space(6f)); pickerScroll = GUILayout.BeginScrollView(pickerScroll, Array.Empty()); string text = null; foreach (BindableAction action in actions) { if (text != action.Category) { GUILayout.Space(UiLayout.Space(6f)); GUILayout.Label(action.Category, Styles.Box, Array.Empty()); text = action.Category; } KeyCode value; string text2 = (bindings.TryGetValue(action.Id, out value) ? $" [{value}]" : ""); if (GUILayout.Button(action.Label + text2, Styles.Button, Array.Empty())) { captureAction = action; } } GUILayout.EndScrollView(); GUILayout.Space(UiLayout.Space(8f)); if (GUILayout.Button("Close", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(30f) })) { pickerOpen = false; } GUILayout.EndVertical(); GUI.DragWindow(); } private void DrawCaptureWindow(int id) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) GUI.DrawTexture(new Rect(0f, 0f, ((Rect)(ref captureRect)).width, ((Rect)(ref captureRect)).height), (Texture)(object)Styles.TexDark); GUILayout.BeginVertical(Array.Empty()); GUILayout.Space(UiLayout.Space(12f)); GUILayout.Label((captureAction != null) ? captureAction.Label : "", Styles.Box, Array.Empty()); GUILayout.Label("Press any key. Escape cancels.", Styles.Label, Array.Empty()); GUILayout.Space(UiLayout.Space(16f)); if (GUILayout.Button("Cancel", Styles.Button, (GUILayoutOption[])(object)new GUILayoutOption[1] { UiLayout.H(30f) })) { captureAction = null; } GUILayout.EndVertical(); } private void Bind(string actionId, KeyCode key) { //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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) List list = new List(); foreach (KeyValuePair binding in bindings) { if (binding.Value == key) { list.Add(binding.Key); } } foreach (string item in list) { bindings.Remove(item); } bindings[actionId] = key; SaveBindings(); HotDogCheatMod.Log($"Bound {actionsById[actionId].Label} to {key}"); } public void Unbind(string actionId) { if (bindings.Remove(actionId)) { SaveBindings(); if (actionsById.TryGetValue(actionId, out var value)) { HotDogCheatMod.Log("Removed keybind: " + value.Label); } } } private void LoadBindings() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) bindings.Clear(); foreach (KeyValuePair item in PersistentConfig.GetSection("Keybinds")) { if (actionsById.ContainsKey(item.Key) && Enum.TryParse(item.Value, out KeyCode result)) { bindings[item.Key] = result; } } } private void SaveBindings() { //IL_002e: 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) PersistentConfig.RemoveSection("Keybinds"); foreach (KeyValuePair binding in bindings) { PersistentConfig.SetValue("Keybinds", binding.Key, ((object)binding.Value/*cast due to .constrained prefix*/).ToString()); } PersistentConfig.SaveToDisk(); } private void RegisterActions() { Add("self.heal", "Self", "Heal Self", delegate { PlayerActions.HealPlayer(PlayerHelper.GetLocalPlayer()); }); Add("self.god", "Self", "Toggle God Mode", delegate { Toggle(ref features.GodModeEnabled, "God Mode"); }); Add("self.noragdoll", "Self", "Toggle No Ragdoll", delegate { Toggle(ref features.NoRagdollEnabled, "No Ragdoll"); }); Add("self.infinitearms", "Self", "Toggle Infinite Arms", delegate { Toggle(ref features.InfiniteHandsEnabled, "Infinite Arms"); }); Add("self.fly", "Self", "Toggle Fly Mode", delegate { features.ToggleFlyMode(!features.FlyModeEnabled); }); Add("self.nofalldamage", "Self", "Toggle No Fall Damage", delegate { Toggle(ref features.NoFallDamageEnabled, "No Fall Damage"); }); Add("self.antikidnap", "Self", "Toggle Anti-Kidnap", delegate { Toggle(ref features.AntiKidnapEnabled, "Anti-Kidnap"); }); Add("self.stamina", "Self", "Toggle Infinite Stamina", delegate { Toggle(ref features.InfiniteStaminaEnabled, "Infinite Stamina"); }); Add("self.keepinventory", "Self", "Toggle Keep Inventory", delegate { Toggle(ref features.NeverDropItemsEnabled, "Keep Inventory"); }); Add("self.depositresources", "Self", "Deposit Resources to Stockpile", PlayerActions.DepositResourcesToStockpile); Add("self.freecraft", "Self", "Toggle Free Crafting", delegate { features.SetFreeCrafting(!features.FreeCraftingEnabled); }); Add("self.infinitetime", "Self", "Toggle Infinite Time", delegate { features.SetInfiniteTime(!features.InfiniteTimeEnabled); }); Add("self.bullettime", "Self", "Toggle Bullet Time", features.BulletTime.Toggle); Add("freecam.toggle", "FreeCam", "Toggle FreeCam", features.FreeCam.Toggle); Add("freecam.normal", "FreeCam", "Set FreeCam Normal Mode", delegate { features.FreeCam.SetMode(FreeCamFeature.FreeCamMode.Normal); }); Add("freecam.interact", "FreeCam", "Set FreeCam Interact Mode", delegate { features.FreeCam.SetMode(FreeCamFeature.FreeCamMode.Interact); }); Add("freecam.blackhole", "FreeCam", "Set FreeCam Black Hole Mode", delegate { features.FreeCam.SetMode(FreeCamFeature.FreeCamMode.BlackHole); }); Add("freecam.gun", "FreeCam", "Set FreeCam Gun Mode", delegate { features.FreeCam.SetMode(FreeCamFeature.FreeCamMode.Gun); }); Add("freecam.rpg", "FreeCam", "Set FreeCam RPG Mode", delegate { features.FreeCam.SetMode(FreeCamFeature.FreeCamMode.RPG); }); Add("freecam.knife", "FreeCam", "Set FreeCam Knife Mode", delegate { features.FreeCam.SetMode(FreeCamFeature.FreeCamMode.KnifeThrow); }); Add("teleport.hut", "Teleport", "Teleport to Hut", delegate { PlayerActions.TeleportToHut(PlayerHelper.GetLocalPlayer()); }); Add("teleport.crosshair", "Teleport", "Teleport to Crosshair", PlayerActions.TeleportToCrosshair); Add("teleport.save", "Teleport", "Save Current Position", delegate { PlayerActions.SaveCurrentTeleport(PlayerHelper.GetLocalPlayer()); }); Add("teleport.saved", "Teleport", "Teleport to Saved Position", delegate { PlayerActions.TeleportToSaved(PlayerHelper.GetLocalPlayer()); }); Add("teleport.turnin", "Teleport", "Mass Item Turn In", MassActions.MassItemTurnIn); Add("self.wallphase", "Self", "Wall Phase", PlayerActions.WallPhase); Add("self.killself", "Self", "Kill Self", delegate { PlayerActions.KillPlayer(PlayerHelper.GetLocalPlayer()); }); Add("self.ragdoll", "Self", "Ragdoll Self", delegate { PlayerActions.ForceRagdoll(PlayerHelper.GetLocalPlayer()); }); Add("self.unragdoll", "Self", "Unragdoll Self", delegate { PlayerActions.UnRagdoll(PlayerHelper.GetLocalPlayer()); }); Add("self.instantrespawn", "Self", "Toggle Instant Respawn", delegate { Toggle(ref features.InstantRespawnEnabled, "Instant Respawn"); }); Add("self.infinitejumps", "Self", "Toggle Infinite Jumps", delegate { Toggle(ref features.InfiniteJumpsEnabled, "Infinite Jumps"); }); Add("self.backpack", "Self", "Toggle Backpack (+2)", delegate { features.BackpackEnabled = !features.BackpackEnabled; HotDogCheatMod.Log($"Backpack (+2): {features.BackpackEnabled}"); if (features.BackpackEnabled || features.BackpackExtraEnabled) { features.ApplyBackpack(); } else { features.RestoreBackpack(); } }); Add("self.backpackextra", "Self", "Toggle Backpack EXTRA (6)", delegate { features.BackpackExtraEnabled = !features.BackpackExtraEnabled; HotDogCheatMod.Log($"Backpack EXTRA (6): {features.BackpackExtraEnabled}"); if (features.BackpackExtraEnabled || features.BackpackEnabled) { features.ApplyBackpack(); } else { features.RestoreBackpack(); } }); Add("visual.players", "Visuals", "Toggle Player ESP", delegate { Toggle(ref esp.PlayerEnabled, "Player ESP"); }); Add("visual.sealman", "Visuals", "Toggle Sealman ESP", delegate { Toggle(ref esp.NpcSealman, "Sealman ESP"); }); Add("visual.npcs", "Visuals", "Toggle NPC ESP", delegate { Toggle(ref esp.NpcEnabled, "NPC ESP"); }); Add("visual.items", "Visuals", "Toggle Item ESP", delegate { Toggle(ref esp.ItemEnabled, "Item ESP"); }); Add("visual.tasks", "Visuals", "Toggle Tasks ESP", delegate { Toggle(ref esp.TaskEnabled, "Tasks ESP"); }); Add("visual.keybindui", "Visuals", "Toggle Keybinds UI", delegate { Toggle(ref esp.ShowKeybindsUi, "Keybinds UI"); }); } private void Add(string id, string category, string label, Action execute) { BindableAction bindableAction = new BindableAction { Id = id, Category = category, Label = label, Execute = execute }; actions.Add(bindableAction); actionsById[id] = bindableAction; } private static void Toggle(ref bool value, string label) { value = !value; HotDogCheatMod.Log($"{label}: {value}"); } private static KeyCode ReadPressedKey() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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_002e: 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_004f: Unknown result type (might be due to invalid IL or missing references) foreach (KeyCode value in Enum.GetValues(typeof(KeyCode))) { if ((int)value != 0 && Input.GetKeyDown(value)) { return value; } } return (KeyCode)0; } private GUIStyle HeaderStyle() { //IL_0020: 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown if (cachedHeaderStyle == null || cachedHeaderVersion != UiLayout.StyleVersion) { GUIStyle val = new GUIStyle(GUI.skin.label) { fontSize = UiLayout.ControlFont, fontStyle = (FontStyle)1 }; val.normal.textColor = new Color(1f, 0.85f, 0.25f, 0.95f); cachedHeaderStyle = val; cachedHeaderVersion = UiLayout.StyleVersion; } return cachedHeaderStyle; } private GUIStyle RowStyle() { //IL_0020: 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_0030: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown if (cachedRowStyle == null || cachedRowVersion != UiLayout.StyleVersion) { GUIStyle val = new GUIStyle(GUI.skin.label) { fontSize = UiLayout.ControlFont }; val.normal.textColor = new Color(0.95f, 0.95f, 1f, 0.85f); cachedRowStyle = val; cachedRowVersion = UiLayout.StyleVersion; } return cachedRowStyle; } } public static class PersistentConfig { private static readonly Dictionary Values = new Dictionary(); private static bool loaded; public static string ConfigPath => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "HotDogCheat", "HotDogCheat.cfg"); public static void LoadFromDisk() { Values.Clear(); loaded = true; if (!File.Exists(ConfigPath)) { return; } string[] array = File.ReadAllLines(ConfigPath); for (int i = 0; i < array.Length; i++) { string text = array[i].Trim(); if (text.Length != 0 && !text.StartsWith("#")) { int num = text.IndexOf('='); if (num > 0) { string key = text.Substring(0, num).Trim(); string value = text.Substring(num + 1).Trim(); Values[key] = value; } } } } public static void SaveToDisk() { EnsureLoaded(); string directoryName = Path.GetDirectoryName(ConfigPath); if (!Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } List list = new List(Values.Keys); list.Sort(StringComparer.OrdinalIgnoreCase); List list2 = new List { "# HotDogCheat persistent config", "# This file survives DLL swaps." }; foreach (string item in list) { list2.Add(item + "=" + Values[item]); } File.WriteAllLines(ConfigPath, list2.ToArray()); } public static void LoadObject(string section, object target) { EnsureLoaded(); if (target == null) { return; } Type type = target.GetType(); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); foreach (FieldInfo fieldInfo in fields) { if (TryGet(section + "." + fieldInfo.Name, fieldInfo.FieldType, out var value)) { fieldInfo.SetValue(target, value); } } PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public); foreach (PropertyInfo propertyInfo in properties) { if (propertyInfo.CanRead && !(propertyInfo.GetSetMethod(nonPublic: false) == null) && propertyInfo.GetIndexParameters().Length == 0 && TryGet(section + "." + propertyInfo.Name, propertyInfo.PropertyType, out var value2)) { propertyInfo.SetValue(target, value2, null); } } } public static void SaveObject(string section, object source) { EnsureLoaded(); if (source == null) { return; } Type type = source.GetType(); FieldInfo[] fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public); foreach (FieldInfo fieldInfo in fields) { if (TryFormat(fieldInfo.FieldType, fieldInfo.GetValue(source), out var value)) { Values[section + "." + fieldInfo.Name] = value; } } PropertyInfo[] properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public); foreach (PropertyInfo propertyInfo in properties) { if (propertyInfo.CanRead && !(propertyInfo.GetSetMethod(nonPublic: false) == null) && propertyInfo.GetIndexParameters().Length == 0 && TryFormat(propertyInfo.PropertyType, propertyInfo.GetValue(source, null), out var value2)) { Values[section + "." + propertyInfo.Name] = value2; } } } public static IEnumerable> GetSection(string section) { EnsureLoaded(); string prefix = section + "."; foreach (KeyValuePair value in Values) { if (value.Key.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) { yield return new KeyValuePair(value.Key.Substring(prefix.Length), value.Value); } } } public static void SetValue(string section, string key, string value) { EnsureLoaded(); Values[section + "." + key] = value; } public static void RemoveValue(string section, string key) { EnsureLoaded(); Values.Remove(section + "." + key); } public static void RemoveSection(string section) { EnsureLoaded(); string value = section + "."; List list = new List(); foreach (string key in Values.Keys) { if (key.StartsWith(value, StringComparison.OrdinalIgnoreCase)) { list.Add(key); } } foreach (string item in list) { Values.Remove(item); } } private static void EnsureLoaded() { if (!loaded) { LoadFromDisk(); } } private static bool TryGet(string key, Type type, out object value) { //IL_0162: Unknown result type (might be due to invalid IL or missing references) value = null; if (!Values.TryGetValue(key, out var value2)) { return false; } try { if (type == typeof(bool)) { if (bool.TryParse(value2, out var result)) { value = result; return true; } return false; } if (type == typeof(float)) { if (float.TryParse(value2, NumberStyles.Float, CultureInfo.InvariantCulture, out var result2)) { value = result2; return true; } return false; } if (type == typeof(int)) { if (int.TryParse(value2, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result3)) { value = result3; return true; } return false; } if (type == typeof(string)) { value = value2; return true; } if (type == typeof(Color)) { string[] array = value2.Split(new char[1] { ',' }); if (array.Length < 3) { return false; } float num = float.Parse(array[0], CultureInfo.InvariantCulture); float num2 = float.Parse(array[1], CultureInfo.InvariantCulture); float num3 = float.Parse(array[2], CultureInfo.InvariantCulture); float num4 = ((array.Length >= 4) ? float.Parse(array[3], CultureInfo.InvariantCulture) : 1f); value = (object)new Color(num, num2, num3, num4); return true; } } catch { return false; } return false; } private static bool TryFormat(Type type, object rawValue, out string value) { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) value = null; if (type == typeof(bool) || type == typeof(int) || type == typeof(string)) { value = Convert.ToString(rawValue, CultureInfo.InvariantCulture); return true; } if (type == typeof(float)) { value = ((float)rawValue).ToString("R", CultureInfo.InvariantCulture); return true; } if (type == typeof(Color)) { Color val = (Color)rawValue; value = string.Join(",", val.r.ToString("R", CultureInfo.InvariantCulture), val.g.ToString("R", CultureInfo.InvariantCulture), val.b.ToString("R", CultureInfo.InvariantCulture), val.a.ToString("R", CultureInfo.InvariantCulture)); return true; } return false; } } }