mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +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)
|
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.
|
// This CCMD simulates an end-of-game action and exists to end mods that never exit their last level.
|
||||||
Net_WriteByte(DEM_FINISHGAME);
|
Net_WriteByte(DEM_FINISHGAME);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue