Fix master server dvars

This commit is contained in:
Federico Cecchetto 2022-06-25 18:48:47 +02:00
parent 46c09265aa
commit fc72e1724e

View File

@ -373,16 +373,22 @@ namespace server_list
public:
void post_unpack() override
{
if (!game::environment::is_mp()) return;
scheduler::once([]()
if (!game::environment::is_sp())
{
// add dvars to change destination master server ip/port
master_server_ip = dvars::register_string("masterServerIP", "master.h1.gg", game::DVAR_FLAG_NONE,
"IP of the destination master server to connect to");
master_server_port = dvars::register_string("masterServerPort", "20810", game::DVAR_FLAG_NONE,
"Port of the destination master server to connect to");
}, scheduler::pipeline::main);
scheduler::once([]()
{
// add dvars to change destination master server ip/port
master_server_ip = dvars::register_string("masterServerIP", "master.h1.gg", game::DVAR_FLAG_NONE,
"IP of the destination master server to connect to");
master_server_port = dvars::register_string("masterServerPort", "20810", game::DVAR_FLAG_NONE,
"Port of the destination master server to connect to");
}, scheduler::pipeline::main);
}
if (!game::environment::is_mp())
{
return;
}
localized_strings::override("PLATFORM_SYSTEM_LINK_TITLE", "SERVER LIST");