diff --git a/source/core/cheats.cpp b/source/core/cheats.cpp index a27a4fa3b..d8695173a 100644 --- a/source/core/cheats.cpp +++ b/source/core/cheats.cpp @@ -304,7 +304,7 @@ static MapRecord* levelwarp_common(FCommandLine& argv, const char *cmdname, cons CCMD(levelwarp) { - if (gamestate != GS_LEVEL) + if (!gi->CanSave()) { Printf("Use the startgame command when not in a game.\n"); return; @@ -359,7 +359,7 @@ CCMD(changemap) Printf(PRINT_BOLD, "changemap : warp to the given map, identified by its name.\n"); return; } - if (gamestate != GS_LEVEL) + if (!gi->CanSave()) { Printf("Use the map command when not in a game.\n"); return; diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 918e7ef27..5798dc737 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -632,7 +632,7 @@ void EraseScreen(int nVal) bool GameInterface::CanSave() { - return !bRecord && !bPlayback && !paused && !bInDemo && nTotalPlayers == 1; + return gamestate == GS_LEVEL && !bRecord && !bPlayback && !paused && !bInDemo && nTotalPlayers == 1; } ::GameStats GameInterface::getStats()