Fix master server dvars

This commit is contained in:
Federico Cecchetto 2022-06-25 18:48:47 +02:00
parent 4566cc5d26
commit 0f8499a9b9

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");