summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-02 12:57:47 +0000
committersmatz <smatz@openttd.org>2009-06-02 12:57:47 +0000
commit78a25e84e9d7935404f13c041e8a93c4e9b6ff47 (patch)
tree7fa52e46b112e588147f29b01a0238ecd374c0ba
parentbe04b7e29c57290c44f2712c27e83296b7bdc163 (diff)
downloadopenttd-78a25e84e9d7935404f13c041e8a93c4e9b6ff47.tar.xz
(svn r16504) -Fix [FS#2948](r16435): one couldn't build anything in the scenario editor
-rw-r--r--src/command.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 19805d7f8..f6f3b2e2e 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -526,7 +526,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallbac
/* 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 ((cmd_flags & (CMD_SPECTATOR | CMD_SERVER)) == 0 && !Company::IsValidID(_current_company)) {
+ if (_game_mode == GM_NORMAL && (cmd_flags & (CMD_SPECTATOR | CMD_SERVER)) == 0 && !Company::IsValidID(_current_company)) {
if (my_cmd) ShowErrorMessage(_error_message, error_part1, x, y);
return false;
}