From 6b984eab55e2e4d6826b6cfa3a722eb95911807f Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 28 Dec 2023 16:25:54 +0000 Subject: [PATCH] G_DoCompleted: Gamedata-handling updates - Don't give Chao Keys, roundsplayed for failing a round in time attack modes (Prison Break/SPB Attack/Special Mode) - Always defer a save, since playtime is constantly incremented over the course of the round and may not be saved with crashes at certain points --- src/g_game.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 3cf98d008..623b0194d 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4158,7 +4158,10 @@ static void G_DoCompleted(void) // Then, do gamedata-relevant material. // This has to be done second because some Challenges // are dependent on round standings. - if (legitimateexit && !demo.playback && !mapreset) + if (legitimateexit && !demo.playback && !mapreset + && ((modeattacking == ATTACKING_NONE) + || !(players[consoleplayer].pflags & PF_NOCONTEST)) + ) { if (gametype != GT_TUTORIAL) { @@ -4174,11 +4177,12 @@ static void G_DoCompleted(void) gamedata->roundsplayed[roundtype]++; } gamedata->pendingkeyrounds++; - - M_UpdateUnlockablesAndExtraEmblems(true, true); - gamedata->deferredsave = true; } + M_UpdateUnlockablesAndExtraEmblems(true, true); + // eh, why not always save? makes sure playtime is never lost + gamedata->deferredsave = true; + // Then, update some important game state. { legitimateexit = false;