diff --git a/DevourClient/Callbacks/OnUpdate.cpp b/DevourClient/Callbacks/OnUpdate.cpp index 71a70e7..e33253a 100644 --- a/DevourClient/Callbacks/OnUpdate.cpp +++ b/DevourClient/Callbacks/OnUpdate.cpp @@ -18,4 +18,7 @@ void OnUpdate() { if (settings::unlimited_uv) { Misc::UnlimitedUV(settings::unlimited_uv); } -} + if (settings::steam_name_spoof) { + Misc::SetSteamName(settings::new_name); + } +} \ No newline at end of file diff --git a/DevourClient/Features/Menu.cpp b/DevourClient/Features/Menu.cpp index bd3358f..1839d4f 100644 --- a/DevourClient/Features/Menu.cpp +++ b/DevourClient/Features/Menu.cpp @@ -300,10 +300,10 @@ void DrawMiscTab() { } ImGui::Checkbox("Change Steam name", &settings::steam_name_spoof); - ImGui::InputText("New name", &settings::new_name); + ImGui::InputText("New name##steam", &settings::new_name); ImGui::Checkbox("Change server name", &settings::server_name_spoof); - ImGui::InputText("New name", &settings::server_name); + ImGui::InputText("New name##server", &settings::server_name); ImGui::Checkbox("Fly", &settings::fly); @@ -324,10 +324,6 @@ void DrawMiscTab() { if (ImGui::Button("Inspector")) { inspector = !inspector; } - - if (inspector) { - DrawInspector(); - } #endif ImGui::Spacing(); @@ -341,6 +337,12 @@ void DrawMenu(bool open_menu) { ImGui::SetNextWindowSize(ImVec2(240.000f, 300.000f), ImGuiCond_Once); ImGui::Begin("Devour Client", NULL, 2); +#if _DEBUG + if (inspector) { + DrawInspector(); + } +#endif + ImGui::SameLine(); if (ImGui::Button("Visuals")) {//, ImVec2(0.000f, 0.000f))) { current_tab = tabs::VISUALS; diff --git a/DevourClient/Features/Misc/Misc.cpp b/DevourClient/Features/Misc/Misc.cpp index 3cd7bca..276be76 100644 --- a/DevourClient/Features/Misc/Misc.cpp +++ b/DevourClient/Features/Misc/Misc.cpp @@ -27,3 +27,16 @@ void Misc::UnlimitedUV(bool active) { std::cout << "Unlimited UV error"; } } +void Misc::SetSteamName(std::string name) { + Unity::CGameObject* MenuController = Unity::GameObject::Find("MenuController"); + if (!MenuController) { + return; + } + + Unity::CComponent* Menu = MenuController->GetComponent("Horror.Menu"); + if (!Menu) { + return; + } + + Menu->SetMemberValue("steamName", IL2CPP::String::New(name)); +} diff --git a/DevourClient/Features/Misc/Misc.hpp b/DevourClient/Features/Misc/Misc.hpp index fcc59d6..661267d 100644 --- a/DevourClient/Features/Misc/Misc.hpp +++ b/DevourClient/Features/Misc/Misc.hpp @@ -9,4 +9,5 @@ namespace Misc { void SetRank(int rank); void WalkInlobby(bool walk); void UnlimitedUV(bool active); + void SetSteamName(std::string name); }