diff --git a/DevourClient/Hacks/Misc.cs b/DevourClient/Hacks/Misc.cs index 758e554..2748fa6 100644 --- a/DevourClient/Hacks/Misc.cs +++ b/DevourClient/Hacks/Misc.cs @@ -48,13 +48,13 @@ namespace DevourClient.Hacks public static void WalkInLobby(bool walk) { try { - if (Helpers.Entities.LocalPlayer_.GetComponent() == null) + if (Helpers.Entities.LocalPlayer_.p_GameObject.GetComponent() == null) { - Helpers.Entities.LocalPlayer_.AddComponent(); - Helpers.Entities.LocalPlayer_.GetComponent().enabled = false; + Helpers.Entities.LocalPlayer_.p_GameObject.AddComponent(); + Helpers.Entities.LocalPlayer_.p_GameObject.GetComponent().enabled = false; } - Helpers.Entities.LocalPlayer_.GetComponent().enabled = walk; + Helpers.Entities.LocalPlayer_.p_GameObject.GetComponent().enabled = walk; } catch { return; } } diff --git a/DevourClient/Helpers/StateHelper.cs b/DevourClient/Helpers/StateHelper.cs index ae50e46..6092bd3 100644 --- a/DevourClient/Helpers/StateHelper.cs +++ b/DevourClient/Helpers/StateHelper.cs @@ -21,12 +21,12 @@ namespace DevourClient.Helpers public static Il2Cpp.NolanBehaviour GetPlayer() { - if (Entities.LocalPlayer_ == null) + if (Entities.LocalPlayer_.p_GameObject == null) { return null!; } - return Entities.LocalPlayer_.GetComponent(); + return Entities.LocalPlayer_.p_GameObject.GetComponent(); } public static bool IsPlayerCrawling() @@ -55,8 +55,8 @@ namespace DevourClient.Helpers } public class Entities - { - public static GameObject LocalPlayer_ = default!; + { + public static BasePlayer LocalPlayer_ = default!; public static BasePlayer[] Players = default!; public static Il2Cpp.GoatBehaviour[] GoatsAndRats = default!; public static Il2Cpp.SurvivalInteractable[] SurvivalInteractables = default!; @@ -76,7 +76,7 @@ namespace DevourClient.Helpers { if (currentPlayers[i].GetComponent().entity.IsOwner) { - LocalPlayer_ = currentPlayers[i]; + LocalPlayer_.p_GameObject = currentPlayers[i]; break; } } diff --git a/DevourClient/MelonMain.cs b/DevourClient/MelonMain.cs index d9c3cfe..dec1c3e 100644 --- a/DevourClient/MelonMain.cs +++ b/DevourClient/MelonMain.cs @@ -142,7 +142,7 @@ namespace DevourClient { try { - Helpers.Entities.LocalPlayer_.GetComponent().TimeScale = this._PlayerSpeedMultiplier; + Helpers.Entities.LocalPlayer_.p_GameObject.GetComponent().TimeScale = this._PlayerSpeedMultiplier; } catch { return; } }