(svn r21428) -Fix [FS#4021]: vehicles could be built while the game it paused. Now you can enable or disable that with a setting
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user