- fixed handling of statistics data.

Blood had the logic wrong and it wasn't saved in savegames.
This commit is contained in:
Christoph Oelckers 2020-01-25 16:47:06 +01:00
parent 7765fa45cd
commit 8f41964f56
3 changed files with 3 additions and 1 deletions

View File

@ -975,6 +975,7 @@ void ProcessFrame(void)
seqKillAll(); seqKillAll();
if (gGameOptions.uGameFlags&2) if (gGameOptions.uGameFlags&2)
{ {
STAT_Update(true);
if (gGameOptions.nGameType == 0) if (gGameOptions.nGameType == 0)
{ {
if (gGameOptions.uGameFlags&8) if (gGameOptions.uGameFlags&8)

View File

@ -104,7 +104,7 @@ void CEndGameMgr::Setup(void)
at1 = gInputMode; at1 = gInputMode;
gInputMode = kInputEndGame; gInputMode = kInputEndGame;
at0 = 1; at0 = 1;
STAT_Update(true); STAT_Update(false);
EndLevel(); EndLevel();
sndStartSample(268, 128, -1, 1); sndStartSample(268, 128, -1, 1);
inputState.keyFlushScans(); inputState.keyFlushScans();

View File

@ -506,6 +506,7 @@ void SaveStatistics()
{ {
sjson_node* levj = sjson_mkobject(ctx); sjson_node* levj = sjson_mkobject(ctx);
SaveOneLevel(ctx, levj, lev); SaveOneLevel(ctx, levj, lev);
sjson_append_element(levels, levj);
} }
sjson_append_member(ctx, root, "levels", levels); sjson_append_member(ctx, root, "levels", levels);