diff --git a/src/client/component/dedicated_info.cpp b/src/client/component/dedicated_info.cpp index a15cf369..1e36c58b 100644 --- a/src/client/component/dedicated_info.cpp +++ b/src/client/component/dedicated_info.cpp @@ -16,18 +16,19 @@ namespace dedicated_info void set_server_info_in_console_title() { const auto sv_running = game::Dvar_FindVar("sv_running"); - const auto server_name = game::get_dvar_string("live_steam_server_name"); + auto server_name = game::get_dvar_string("live_steam_server_name"); + auto clean_server_name = game::I_CleanStr(server_name.data()); if (!sv_running || !sv_running->current.enabled) { - console::set_title(server_name + " - not running"); + console::set_title(utils::string::va("%s - not running", clean_server_name)); return; } const auto mapname = game::get_dvar_string("mapname"); const std::string window_text = utils::string::va("%s on %s [%d/%d] (%d)", - server_name.data(), + clean_server_name, mapname.data(), getinfo::get_client_count(), getinfo::get_max_client_count(), diff --git a/src/client/game/symbols.hpp b/src/client/game/symbols.hpp index 128f8364..4cc58b9e 100644 --- a/src/client/game/symbols.hpp +++ b/src/client/game/symbols.hpp @@ -131,6 +131,9 @@ namespace game WEAK symbol SV_SendServerCommand{0x0, 0x140537F10}; WEAK symbol SV_IsTestClient{0x14224B5C0, 0x14052FF40}; + // Utils + WEAK symbol I_CleanStr{0x1422E9C10, 0x140580E80}; + // Variables WEAK symbol cmd_functions{0x15689FF58, 0x14946F860};