From 49162ab39b7c2bb473fccaa7b693b226033fd584 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 7 Dec 2010 21:09:30 +0000 Subject: (svn r21428) -Fix [FS#4021]: vehicles could be built while the game it paused. Now you can enable or disable that with a setting --- src/command.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/command.cpp') 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; -- cgit v1.2.3-54-g00ecf