diff --git a/src/g_game.c b/src/g_game.c index 8439d6bb372e31e65126f699f069f057123736cf..bb3a064abb4f2204970d68f35e02ade8ff1260d3 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2041,6 +2041,12 @@ void G_Ticker(boolean run) P_InvincGrowMusic(); K_TickMidVote(); + + if (leveltime >= starttime && savescum) + { + G_ClearSavescumFlag(); + G_HandleSaveLevel(false); + } } if (g_fast_forward == 0 && demo.attract == DEMO_ATTRACT_CREDITS) @@ -3951,7 +3957,7 @@ void G_HandleSaveLevel(boolean removecondition) return; if ((roundqueue.position == 1 && roundqueue.entries[0].overridden == false) - || (players[consoleplayer].lives <= 1 && savescummer)) // because a life is lost on reload EDIT 11-21-24: and we need to make sure the life *should* be lost, because this now runs at menu exit to check for Position. + || (players[consoleplayer].lives <= 1 && !savescummer)) // because a life is lost on reload EDIT 11-21-24: and we need to make sure the life *should* be lost, because this now runs at menu exit to check for Position. goto doremove; G_SaveGame(); diff --git a/src/menus/transient/pause-game.c b/src/menus/transient/pause-game.c index e7c8838cbe75d7324221a947b3b8a490be91329e..1fa9c4275f1baa69b8d3183e1dbafb2d7794b456 100644 --- a/src/menus/transient/pause-game.c +++ b/src/menus/transient/pause-game.c @@ -564,8 +564,6 @@ static void M_ExitGameResponse(INT32 ch) } else { - G_ClearSavescumFlag(); - G_HandleSaveLevel(false); G_SetExitGameFlag(); M_SetMenuDelay(pid); // prevent another input } diff --git a/src/p_saveg.c b/src/p_saveg.c index 4b429f2bf29d0e6eb84f1873912022f8a3ce49ae..d67686496a09cc83c4b5f8286159b950fef77f35 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -99,7 +99,7 @@ static inline void P_ArchivePlayer(savebuffer_t *save, boolean savescumcheck) //CONS_Printf(M_GetText("\nLife or death for eggboy?")); // Prevent an exploit from occuring. - if ((leveltime >= starttime) || savescumcheck) + if (!savescumcheck) { //CONS_Printf(M_GetText("\nDEATH!")); WRITESINT8(save->p, (player->lives - 1)); @@ -6155,7 +6155,7 @@ static inline void P_ArchiveMisc(savebuffer_t *save, boolean savescummer) WRITEUINT32(save->p, rank->totalLaps); // If we're not deducting a life from the player, don't tick up their continues either. - if ((leveltime >= starttime) || savescummer) + if (!savescummer) { //CONS_Printf(M_GetText("Continue used!/n")); WRITEUINT32(save->p, (rank->continuesUsed + 1)); diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 2b9d608077bd53624a51b0a290f8c1cb63a8e3ac..86cc965bd0284aeb87f3eda8a98adf2f708f80a4 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1664,11 +1664,8 @@ void I_Quit(void) // Make sure you lose points for ALT-F4 // ...but make sure you don't lose a life if you quit early in Grand Prix. if (Playing()) - { - G_ClearSavescumFlag(); - G_HandleSaveLevel(false); K_PlayerForfeit(consoleplayer, true); - } + G_SaveGameData(); // Tails 12-08-2002 //added:16-02-98: when recording a demo, should exit using 'q' key,