mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-23 12:14:11 +01:00
Codechange: Use EnumBitSet for PauseMode. (#13553)
This commit is contained in:
@@ -57,8 +57,8 @@
|
||||
* needs manual action to continue. */
|
||||
ShowScriptDebugWindow(ScriptObject::GetRootCompany());
|
||||
|
||||
if ((_pause_mode & PM_PAUSED_NORMAL) == PM_UNPAUSED) {
|
||||
ScriptObject::Command<CMD_PAUSE>::Do(PM_PAUSED_NORMAL, true);
|
||||
if (!_pause_mode.Test(PauseMode::Normal)) {
|
||||
ScriptObject::Command<CMD_PAUSE>::Do(PauseMode::Normal, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,17 +19,17 @@
|
||||
|
||||
/* static */ bool ScriptGame::Pause()
|
||||
{
|
||||
return ScriptObject::Command<CMD_PAUSE>::Do(PM_PAUSED_GAME_SCRIPT, true);
|
||||
return ScriptObject::Command<CMD_PAUSE>::Do(PauseMode::GameScript, true);
|
||||
}
|
||||
|
||||
/* static */ bool ScriptGame::Unpause()
|
||||
{
|
||||
return ScriptObject::Command<CMD_PAUSE>::Do(PM_PAUSED_GAME_SCRIPT, false);
|
||||
return ScriptObject::Command<CMD_PAUSE>::Do(PauseMode::GameScript, false);
|
||||
}
|
||||
|
||||
/* static */ bool ScriptGame::IsPaused()
|
||||
{
|
||||
return !!_pause_mode;
|
||||
return _pause_mode.Any();
|
||||
}
|
||||
|
||||
/* static */ ScriptGame::LandscapeType ScriptGame::GetLandscape()
|
||||
|
||||
Reference in New Issue
Block a user