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,8 +373,8 @@ namespace server_list
public: public:
void post_unpack() override void post_unpack() override
{ {
if (!game::environment::is_mp()) return; if (!game::environment::is_sp())
{
scheduler::once([]() scheduler::once([]()
{ {
// add dvars to change destination master server ip/port // add dvars to change destination master server ip/port
@ -383,6 +383,12 @@ namespace server_list
master_server_port = dvars::register_string("masterServerPort", "20810", game::DVAR_FLAG_NONE, master_server_port = dvars::register_string("masterServerPort", "20810", game::DVAR_FLAG_NONE,
"Port of the destination master server to connect to"); "Port of the destination master server to connect to");
}, scheduler::pipeline::main); }, scheduler::pipeline::main);
}
if (!game::environment::is_mp())
{
return;
}
localized_strings::override("PLATFORM_SYSTEM_LINK_TITLE", "SERVER LIST"); localized_strings::override("PLATFORM_SYSTEM_LINK_TITLE", "SERVER LIST");