summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}