summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-03-30 22:17:47 +0000
committertruelight <truelight@openttd.org>2007-03-30 22:17:47 +0000
commita76488861990d586352e3d4e5f7686be782480c3 (patch)
treec0c7d4057eb1945a074cc78a471627f815b71fa4
parent94b3ea7b34d884f7963edbc475d02c9b9cec0d92 (diff)
downloadopenttd-a76488861990d586352e3d4e5f7686be782480c3.tar.xz
(svn r9529) -Fix [FS#705]: when 2 clients joined together, the second asserted on the NewCompany command of the first
-rw-r--r--src/players.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/players.cpp b/src/players.cpp
index 62123ed7e..32ec42725 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -821,8 +821,8 @@ int32 CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
/* This is the joining client who wants a new company */
- if (_local_player != _network_playas) {
- assert(_local_player == PLAYER_SPECTATOR && _network_playas == p->index);
+ if (_local_player != _network_playas && _network_playas == p->index) {
+ assert(_local_player == PLAYER_SPECTATOR);
SetLocalPlayer(p->index);
MarkWholeScreenDirty();
}