From 96055fbc03ac708c140507ae5c0a22b3e0bdac43 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Wed, 29 Mar 2023 03:10:16 +1100 Subject: [PATCH] - Clean out all games setting `gameaction = ga_level` and do it centrally. --- source/core/mainloop.cpp | 3 +-- source/games/blood/src/blood.cpp | 1 - source/games/duke/src/premap.cpp | 1 - source/games/exhumed/src/gameloop.cpp | 1 - source/games/sw/src/game.cpp | 1 - 5 files changed, 1 insertion(+), 6 deletions(-) diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 6f7681280..d24cbb6d7 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -153,6 +153,7 @@ void NewGame(MapRecord* map, int skill, bool ns = false) newGameStarted = true; ShowIntermission(nullptr, map, nullptr, [=](bool) { gi->NewGame(map, skill, ns); + gameaction = ga_level; ResetStatusBar(); Net_ClearFifo(); }); @@ -189,7 +190,6 @@ static void GameTicker() FX_StopAllSounds(); FX_SetReverb(0); gi->FreeLevelData(); - gameaction = ga_level; NewGame(g_nextmap, -1); BackupSaveGame = ""; } @@ -217,7 +217,6 @@ static void GameTicker() FX_SetReverb(0); gi->FreeLevelData(); C_FlushDisplay(); - gameaction = ga_level; BackupSaveGame = ""; NewGame(g_nextmap, g_nextskill, ga == ga_newgamenostopsound); break; diff --git a/source/games/blood/src/blood.cpp b/source/games/blood/src/blood.cpp index 20dff8e1d..70ab04d74 100644 --- a/source/games/blood/src/blood.cpp +++ b/source/games/blood/src/blood.cpp @@ -383,7 +383,6 @@ void NewLevel(MapRecord *sng, int skill, bool newgame) if (skill != -1) gGameOptions.nDifficulty = skill; gSkill = gGameOptions.nDifficulty; StartLevel(sng, newgame); - gameaction = ga_level; } void GameInterface::NewGame(MapRecord *sng, int skill, bool) diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index 5058ca783..e32d9daeb 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -1181,7 +1181,6 @@ void GameInterface::NewGame(MapRecord* map, int skill, bool) PlayerColorChanged(); inputState.ClearAllInput(); - gameaction = ga_level; } //--------------------------------------------------------------------------- diff --git a/source/games/exhumed/src/gameloop.cpp b/source/games/exhumed/src/gameloop.cpp index f7e522d77..6ade4c483 100644 --- a/source/games/exhumed/src/gameloop.cpp +++ b/source/games/exhumed/src/gameloop.cpp @@ -147,7 +147,6 @@ void GameInterface::NewGame(MapRecord *map, int skill, bool frommenu) // start a new game on the given level InitNewGame(); InitLevel(map); - gameaction = ga_level; } int GameInterface::GetCurrentSkill() diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index 051604fdf..c91450871 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -693,7 +693,6 @@ void GameInterface::NewGame(MapRecord *map, int skill, bool) ShadowWarrior::NewGame = true; InitLevel(map); InitRunLevel(); - gameaction = ga_level; } //---------------------------------------------------------------------------