summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:50:36 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:50:36 +0000
commit577fe0238e7f4681fdf96b8aed241908a9f72de9 (patch)
tree96a9e5a6d7ef530dcd88d42d633a479ba7e18e6d /src/command.cpp
parent561b25d0319674716b51d63594e146132d0a33e3 (diff)
downloadopenttd-577fe0238e7f4681fdf96b8aed241908a9f72de9.tar.xz
(svn r23602) -Add: support for DEITY commands, commands where no real company was involved in (Rubidium)
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 31c4843f0..f2bf49c13 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -609,7 +609,7 @@ CommandCost DoCommandPInternal(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd,
/* If the company isn't valid it may only do server command or start a new company!
* The server will ditch any server commands a client sends to it, so effectively
* this guards the server from executing functions for an invalid company. */
- if (_game_mode == GM_NORMAL && !exec_as_spectator && !Company::IsValidID(_current_company)) {
+ if (_game_mode == GM_NORMAL && !exec_as_spectator && !Company::IsValidID(_current_company) && !(_current_company == OWNER_DEITY && (cmd_flags & CMD_DEITY) != 0)) {
return_dcpi(CMD_ERROR, false);
}