- enabled autosaves.

Fixes #55
This only creates them but does not auto-resume from them.
This commit is contained in:
Christoph Oelckers 2020-09-05 22:39:27 +02:00
parent 45882a02cc
commit 7dbae8b8f4
4 changed files with 4 additions and 0 deletions

View file

@ -342,6 +342,7 @@ void GameInterface::Ticker()
gFrameCount++; gFrameCount++;
gFrameClock += 4; gFrameClock += 4;
if (gFrameClock == 8) gameaction = ga_autosave; // let the game run for 1 frame before saving.
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {

View file

@ -453,6 +453,7 @@ void GameInterface::Ticker()
sPlayerInput[nLocalPlayer].horizon = PlayerList[nLocalPlayer].q16horiz; sPlayerInput[nLocalPlayer].horizon = PlayerList[nLocalPlayer].q16horiz;
leveltime++; leveltime++;
if (leveltime == 2) gameaction = ga_autosave; // let the game run for 1 frame before saving.
GameMove(); GameMove();
r_NoInterpolate = false; r_NoInterpolate = false;
} }

View file

@ -100,6 +100,7 @@ void GameInterface::Ticker()
r_NoInterpolate = false; r_NoInterpolate = false;
ud.levelclock+= 4; // This must be at the end of this block so that the first tic receives a value of 0! ud.levelclock+= 4; // This must be at the end of this block so that the first tic receives a value of 0!
if (ud.levelclock == 8) gameaction = ga_autosave; // let the game run for 1 frame before saving.
} }
else r_NoInterpolate = true; else r_NoInterpolate = true;

View file

@ -7577,6 +7577,7 @@ domovethings(void)
} }
PlayClock += synctics; PlayClock += synctics;
if (PlayClock == 2*synctics) gameaction = ga_autosave; // let the game run for 1 frame before saving.
thinktime.Reset(); thinktime.Reset();
thinktime.Clock(); thinktime.Clock();