diff --git a/user/features/esp/esp.cpp b/user/features/esp/esp.cpp index 03576bb..146b230 100644 --- a/user/features/esp/esp.cpp +++ b/user/features/esp/esp.cpp @@ -106,7 +106,6 @@ void ComputePositionAndDrawESP(app::Object_1__Array* ents, ImColor color, bool u void ESP::RunAzazelESP() { app::GameObject__Array* ents = Object::FindGameObjectsWithTag("Azazel"); - //app::Object_1__Array *ents = Object::FindObjectsOfType("SurvivalAzazelBehaviour", ""); if (ents == NULL) return; @@ -128,6 +127,8 @@ void ESP::RunDemonESP() { std::vector demons_c = { "SurvivalDemonBehaviour", "SpiderBehaviour", "GhostBehaviour", "BoarBehaviour", "CorpseBehaviour" }; for (std::string& class_ : demons_c) { + if (SceneName() != "Menu") + return; app::Object_1__Array *ents = Object::FindObjectsOfType(class_.c_str(), ""); if (ents == nullptr) continue; @@ -147,6 +148,8 @@ void ESP::RunItemsESP() { ComputePositionAndDrawESP(ents, col, true); } + if (SceneName() != "Menu") + return; ents = Object::FindObjectsOfType("KeyBehaviour", ""); if (ents != nullptr && ents->vector[0] != nullptr) { ComputePositionAndDrawESP(ents, col, false, "Key"); diff --git a/user/hooks/hooks.cpp b/user/hooks/hooks.cpp index b10d9d4..def0949 100644 --- a/user/hooks/hooks.cpp +++ b/user/hooks/hooks.cpp @@ -759,20 +759,19 @@ HRESULT __stdcall hookD3D11Present(IDXGISwapChain* pSwapChain, UINT SyncInterval DrawMenu(open_menu); } - // to-do: move it to "fixed update" hook if (settings::player_esp) ESP::RunPlayersESP(); - if (settings::goat_esp) + if (settings::goat_esp && SceneName() != "Menu") ESP::RunGoatsESP(); - if (settings::item_esp) + if (settings::item_esp && SceneName() != "Menu") ESP::RunItemsESP(); if (settings::demon_esp) ESP::RunDemonESP(); - if (settings::azazel_esp) + if (settings::azazel_esp && SceneName() != "Menu") ESP::RunAzazelESP(); ImGui::GetIO().MouseDrawCursor = open_menu;