diff --git a/src/client/component/exploit.cpp b/src/client/component/exploit.cpp index ed84360..3b0ba31 100644 --- a/src/client/component/exploit.cpp +++ b/src/client/component/exploit.cpp @@ -65,12 +65,14 @@ private: static void add_key_hooks() { key_catcher::on_key_press( "O", []([[maybe_unused]] const game::LocalClientNum_t& local_client) { - command::execute("exploit"); + game::Dvar_SetBool(cl_exploit, true); + console::info("Enabled cl_exploit"); }); key_catcher::on_key_press( "L", []([[maybe_unused]] const game::LocalClientNum_t& local_client) { - command::execute("undoExploit"); + game::Dvar_SetBool(cl_exploit, false); + console::info("Disabled cl_exploit"); }); key_catcher::on_key_press( @@ -80,25 +82,11 @@ private: } static void add_exploit_commands() { - command::add("exploit", []([[maybe_unused]] const command::params& params) { - game::Dvar_SetBool(cl_exploit, true); - console::info("Enabled cl_exploit"); - }); - - command::add("undoExploit", - []([[maybe_unused]] const command::params& params) { - game::Dvar_SetBool(cl_exploit, false); - console::info("Disabled cl_exploit"); - }); - command::add( "sendCommand", []([[maybe_unused]] const command::params& params) { if (params.size() < 2) return; - if (*game::connectionState <= game::connstate_t::CA_CHALLENGING) - return; - const auto cmd = std::format("queryserverinfo ;{}", params.join(1)); console::info("Sending OOB packet {}", cmd); game::NET_OutOfBandPrint(game::NS_SERVER,