mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
- fixed crash when entering 'finishgame' in the console outside of a level.
This commit is contained in:
parent
36b6253c3d
commit
68cd0fad76
1 changed files with 6 additions and 0 deletions
|
@ -592,6 +592,12 @@ CCMD(printstats)
|
|||
|
||||
CCMD(finishgame)
|
||||
{
|
||||
bool gamestatecheck = gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_FINALE;
|
||||
if (!gamestatecheck)
|
||||
{
|
||||
Printf("Cannot use 'finishgame' while not in a game!\n");
|
||||
return;
|
||||
}
|
||||
// This CCMD simulates an end-of-game action and exists to end mods that never exit their last level.
|
||||
Net_WriteByte(DEM_FINISHGAME);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue