summaryrefslogtreecommitdiff
path: root/network_client.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-10-15 23:42:18 +0000
committerDarkvater <darkvater@openttd.org>2006-10-15 23:42:18 +0000
commit7cac86186e8333fc98d2cd7eb863c6a7e5a58378 (patch)
tree5b4057bdf59208c59da0569dec380a6d35884cd9 /network_client.c
parent085a6b497fb7c939986a9b95f8f178a83793b029 (diff)
downloadopenttd-7cac86186e8333fc98d2cd7eb863c6a7e5a58378.tar.xz
(svn r6786) -Codechange: To join a new company CMD_PLAYER_CTRL is executed with so far a
local spectator (awaiting assignment from server). Since a spectator cannot execute any commands, a local player is impersonated. Move this impersonation to the server side where CMD_PLAYER_CTRL is handled specially anyways.
Diffstat (limited to 'network_client.c')
-rw-r--r--network_client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/network_client.c b/network_client.c
index 8f6379a67..836c0611d 100644
--- a/network_client.c
+++ b/network_client.c
@@ -521,9 +521,8 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
} else {
/* We have arrived and ready to start playing; send a command to make a new player;
* the server will give us a client-id and let us in */
- _local_player = 0;
- NetworkSend_Command(0, 0, 0, CMD_PLAYER_CTRL, NULL);
_local_player = PLAYER_SPECTATOR;
+ NetworkSend_Command(0, 0, 0, CMD_PLAYER_CTRL, NULL);
}
} else {
// take control over an existing company