diff options
author | rubidium <rubidium@openttd.org> | 2009-02-04 16:57:40 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-02-04 16:57:40 +0000 |
commit | cd9c35b84e6d3eea538368071acb3301484071e8 (patch) | |
tree | 8d496172c0314b3053ddb8b378873620545af85f /src | |
parent | a49197f522ea4377c731c69ac6e4117c49170682 (diff) | |
download | openttd-cd9c35b84e6d3eea538368071acb3301484071e8.tar.xz |
(svn r15337) -Fix: don't allow a spectating server to build stuff.
Diffstat (limited to 'src')
-rw-r--r-- | src/command.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp index 723f7f7dc..cea9162ad 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -523,6 +523,9 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac /* Do not even think about executing out-of-bounds tile-commands */ if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (cmd_flags & CMD_ALL_TILES) == 0))) return false; + /* If the server is a spectator, it may only do server commands! */ + if (_current_company == COMPANY_SPECTATOR && (cmd_flags & CMD_SERVER) == 0) return false; + bool notest = (cmd_flags & CMD_NO_TEST) != 0; _docommand_recursive = 1; |