From 54b7fb02034f703e539295edff80935144ea735a Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 17 May 2005 18:22:59 +0000 Subject: (svn r2339) - Fix: on a dedicated server, after the joining of a player, the player was set to player 0 instead of remaining OWNER_SPECTATOR. Fix this, and allow the dedicated server to execute commands (so 'patch ') now works and not only when a client is connected. --- command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'command.c') diff --git a/command.c b/command.c index 24f6817e1..44cb446d1 100644 --- a/command.c +++ b/command.c @@ -413,8 +413,9 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, _error_message_2 = cmd >> 16; _additional_cash_required = 0; - // spectator has no rights. - if (_current_player == OWNER_SPECTATOR) { + /** Spectator has no rights except for the dedicated server which + * is a spectator but is the server, so can do anything */ + if (_current_player == OWNER_SPECTATOR && !_network_dedicated) { ShowErrorMessage(_error_message, _error_message_2, x, y); _cmd_text = NULL; return false; -- cgit v1.2.3-70-g09d2