mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-16 00:42:45 +01:00
Codechange: Use EnumBitSet for PauseMode. (#13553)
This commit is contained in:
@@ -1081,7 +1081,7 @@ struct ScriptDebugWindow : public Window {
|
||||
}
|
||||
|
||||
/* If the last AI/Game Script is unpaused, unpause the game too. */
|
||||
if ((_pause_mode & PM_PAUSED_NORMAL) == PM_PAUSED_NORMAL) {
|
||||
if (_pause_mode.Test(PauseMode::Normal)) {
|
||||
bool all_unpaused = !Game::IsPaused();
|
||||
if (all_unpaused) {
|
||||
for (const Company *c : Company::Iterate()) {
|
||||
@@ -1092,7 +1092,7 @@ struct ScriptDebugWindow : public Window {
|
||||
}
|
||||
if (all_unpaused) {
|
||||
/* All scripts have been unpaused => unpause the game. */
|
||||
Command<CMD_PAUSE>::Post(PM_PAUSED_NORMAL, false);
|
||||
Command<CMD_PAUSE>::Post(PauseMode::Normal, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1144,8 +1144,8 @@ struct ScriptDebugWindow : public Window {
|
||||
}
|
||||
|
||||
/* Pause the game. */
|
||||
if ((_pause_mode & PM_PAUSED_NORMAL) == PM_UNPAUSED) {
|
||||
Command<CMD_PAUSE>::Post(PM_PAUSED_NORMAL, true);
|
||||
if (!_pause_mode.Test(PauseMode::Normal)) {
|
||||
Command<CMD_PAUSE>::Post(PauseMode::Normal, true);
|
||||
}
|
||||
|
||||
/* Highlight row that matched */
|
||||
|
||||
Reference in New Issue
Block a user