diff --git a/Ripterms/Modules/ClientBrandChanger.cpp b/Ripterms/Modules/ClientBrandChanger.cpp index 61e35eb..de9c771 100644 --- a/Ripterms/Modules/ClientBrandChanger.cpp +++ b/Ripterms/Modules/ClientBrandChanger.cpp @@ -8,28 +8,21 @@ void Ripterms::Modules::ClientBrandChanger::renderGUI() static bool runonce = true; if (runonce) { - std::strcpy(name, getClientModName().toStdString().c_str()); + std::strcpy(client_name, getClientModName().toStdString().c_str()); runonce = false; } - ImGui::Text("Client Brand Changer:"); - ImGui::InputText("name", name, sizeof(name)); - if (ImGui::Button("change")) - { - enabled = true; - } - ImGui::SameLine(); + ImGui::Text("Client brand:"); + ImGui::InputText("name", client_name, sizeof(client_name)); if (ImGui::Button("reset")) { - enabled = false; - std::strcpy(name, getClientModName().toStdString().c_str()); + std::strcpy(client_name, getClientModName().toStdString().c_str()); } } void Ripterms::Modules::ClientBrandChanger::onGetClientModName(JNIEnv* env, bool* cancel) { - if (!enabled) - return; - jobject new_name = env->NewStringUTF(name); + if (!enabled || client_name[0] == '\0') return; + jobject new_name = env->NewStringUTF(client_name); Ripterms::JavaHook::set_return_value(cancel, *(void**)new_name); *cancel = true; } diff --git a/Ripterms/Modules/Modules.h b/Ripterms/Modules/Modules.h index e4b31f5..2a9478d 100644 --- a/Ripterms/Modules/Modules.h +++ b/Ripterms/Modules/Modules.h @@ -136,7 +136,7 @@ namespace Ripterms void renderGUI() override; void onGetClientModName(JNIEnv* env, bool* cancel) override; private: - char name[128] = { 0 }; + char client_name[256] = { '\0' }; String getClientModName(); }; @@ -212,7 +212,7 @@ namespace Ripterms class Sprint : public IModule { public: - Sprint() : IModule("Sprint", "Same as contantly holding your sprint key") {} + Sprint() : IModule("Sprint", "Same as constantly holding your sprint key") {} void run() override; };