- fixed a warning and set NOINITCALL for a few CVARs accessing the current level.

These inits are done at a time when the data isn't even initialized so they will get overwritten anyway.
This commit is contained in:
Christoph Oelckers 2019-02-24 09:57:46 +01:00
commit 6129f9a9cc
10 changed files with 53 additions and 39 deletions

View file

@ -40,33 +40,6 @@ FStringTable GStrings;
// Game speed
EGameSpeed GameSpeed = SPEED_Normal;
// Show developer messages if true.
CVAR (Int, developer, 0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
// [RH] Feature control cvars
CVAR (Bool, var_friction, true, CVAR_SERVERINFO);
CVAR (Bool, alwaysapplydmflags, false, CVAR_SERVERINFO);
CUSTOM_CVAR (Float, teamdamage, 0.f, CVAR_SERVERINFO)
{
for (auto Level : AllLevels())
{
Level->teamdamage = self;
}
}
CUSTOM_CVAR (String, language, "auto", CVAR_ARCHIVE|CVAR_NOINITCALL)
{
SetLanguageIDs ();
GStrings.UpdateLanguage();
for (auto Level : AllLevels())
{
// does this even make sense on secondary levels...?
if (Level->info != nullptr) Level->LevelName = Level->info->LookupLevelName();
}
}
// [RH] Network arbitrator
int Net_Arbitrator = 0;