diff --git a/src/common/global.cpp b/src/common/global.cpp index ef70c7f2..d05a2250 100644 --- a/src/common/global.cpp +++ b/src/common/global.cpp @@ -272,14 +272,14 @@ void ConVar_InitShipped(void) base_tickinterval_sp->RemoveFlags(FCVAR_DEVELOPMENTONLY); base_tickinterval_mp->RemoveFlags(FCVAR_DEVELOPMENTONLY); - mp_gamemode->RemoveFlags(FCVAR_DEVELOPMENTONLY); - -#ifdef DEDICATED - // The base callback is for client builds only, must be removed from the - // dedicated server as it features client globals. + // The base callback is for client builds only, must be replaced with the + // dedicated server variant as the original one runs this through + // CEngineClient::SetupGamemode(). The callback is effectively the same + // with the exception that it calls SetupGamemode directly, and not + // through an interface like CEngineClient. mp_gamemode->RemoveChangeCallback(mp_gamemode->GetChangeCallback(0), 0); -#endif // DEDICATED mp_gamemode->InstallChangeCallback(MP_GameMode_Changed_f, nullptr, false); + net_usesocketsforloopback->RemoveFlags(FCVAR_DEVELOPMENTONLY); #ifndef DEDICATED language_cvar->InstallChangeCallback(LanguageChanged_f, nullptr, false);