- Clean out all games setting gameaction = ga_level and do it centrally.

This commit is contained in:
Mitchell Richters 2023-03-29 03:10:16 +11:00
parent 9618ba1e78
commit 96055fbc03
5 changed files with 1 additions and 6 deletions

View file

@ -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;

View file

@ -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)

View file

@ -1181,7 +1181,6 @@ void GameInterface::NewGame(MapRecord* map, int skill, bool)
PlayerColorChanged();
inputState.ClearAllInput();
gameaction = ga_level;
}
//---------------------------------------------------------------------------

View file

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

View file

@ -693,7 +693,6 @@ void GameInterface::NewGame(MapRecord *map, int skill, bool)
ShadowWarrior::NewGame = true;
InitLevel(map);
InitRunLevel();
gameaction = ga_level;
}
//---------------------------------------------------------------------------