diff options
author | rubidium <rubidium@openttd.org> | 2010-12-07 21:09:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-12-07 21:09:30 +0000 |
commit | 49162ab39b7c2bb473fccaa7b693b226033fd584 (patch) | |
tree | ce35309020d5c8b35fdc5033130aae96c0f3046d /src/command.cpp | |
parent | e170b1d83e0142fdcc4260a2f3d623324de1415f (diff) | |
download | openttd-49162ab39b7c2bb473fccaa7b693b226033fd584.tar.xz |
(svn r21428) -Fix [FS#4021]: vehicles could be built while the game it paused. Now you can enable or disable that with a setting
Diffstat (limited to 'src/command.cpp')
-rw-r--r-- | src/command.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp index be30d11e6..273e22bd0 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -515,6 +515,11 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac int x = TileX(tile) * TILE_SIZE; int y = TileY(tile) * TILE_SIZE; + if (_pause_mode != PM_UNPAUSED && !IsCommandAllowedWhilePaused(cmd)) { + ShowErrorMessage(GB(cmd, 16, 16), STR_ERROR_NOT_ALLOWED_WHILE_PAUSED, WL_INFO, x, y); + return false; + } + #ifdef ENABLE_NETWORK /* Only set p2 when the command does not come from the network. */ if (!(cmd & CMD_NETWORK_COMMAND) && GetCommandFlags(cmd) & CMD_CLIENT_ID && p2 == 0) p2 = CLIENT_ID_SERVER; |