- 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();