- moved high level code out of i_time.cpp.

This commit is contained in:
Christoph Oelckers 2020-03-18 13:58:10 +01:00
commit fabe772833
3 changed files with 28 additions and 26 deletions

View file

@ -174,6 +174,26 @@ extern bool insave;
extern TDeletingArray<FLightDefaults *> LightDefaults;
CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL)
{
if (netgame)
{
Printf("Time scale cannot be changed in net games.\n");
self = 1.0f;
}
else if (self >= 0.05f)
{
I_FreezeTime(true);
TimeScale = self;
I_FreezeTime(false);
}
else
{
Printf("Time scale must be at least 0.05!\n");
}
}
// PUBLIC DATA DEFINITIONS -------------------------------------------------
CUSTOM_CVAR (Int, fraglimit, 0, CVAR_SERVERINFO)
@ -2883,6 +2903,7 @@ static int D_DoomMain_Internal (void)
int D_DoomMain()
{
int ret = 0;
GameTicRate = TICRATE;
try
{
ret = D_DoomMain_Internal();