feat: remove color prefixes from server name in console title
This commit is contained in:
parent
f4047555b3
commit
819550c89f
@ -17,17 +17,18 @@ namespace dedicated_info
|
||||
{
|
||||
const auto sv_running = game::Dvar_FindVar("sv_running");
|
||||
const auto server_name = game::get_dvar_string("live_steam_server_name");
|
||||
const 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(),
|
||||
|
@ -131,6 +131,9 @@ namespace game
|
||||
WEAK symbol<void(client_s* cl_0, svscmd_type type, const char* fmt, ...)> SV_SendServerCommand{0x0, 0x140537F10};
|
||||
WEAK symbol<bool(int clientNum)> SV_IsTestClient{0x14224B5C0, 0x14052FF40};
|
||||
|
||||
// Utils
|
||||
WEAK symbol<const char* (const char* str)> I_CleanStr{ 0x1422E9C10, 0x140580E80 };
|
||||
|
||||
// Variables
|
||||
|
||||
WEAK symbol<cmd_function_s> cmd_functions{0x15689FF58, 0x14946F860};
|
||||
|
Loading…
Reference in New Issue
Block a user