Allow unpausing upstream savegames using PM_COMMAND_DURING_PAUSE

This commit is contained in:
Jonathan G Rennison
2023-09-03 18:12:53 +01:00
parent 428e1c364e
commit 80fa53bc58
2 changed files with 6 additions and 0 deletions

View File

@@ -184,6 +184,11 @@ CommandCost CmdPause(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2,
if ((p2 & 1) == 0) {
_pause_mode = static_cast<PauseMode>(_pause_mode & (byte)~p1);
_pause_countdown = (p2 >> 1);
/* If the only remaining reason to be paused is that we saw a command during pause, unpause. */
if (_pause_mode == PM_COMMAND_DURING_PAUSE) {
_pause_mode = PM_UNPAUSED;
}
} else {
_pause_mode = static_cast<PauseMode>(_pause_mode | (byte)p1);
}