diff options
author | truelight <truelight@openttd.org> | 2004-12-15 21:13:52 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-15 21:13:52 +0000 |
commit | 2f6a26ab2d8b8781dc78063f54e0102e5191c63a (patch) | |
tree | 7dad5cae0e7fb3089a2b3e52a45d1b9e3a90e1f0 /players.c | |
parent | 093540e9b5d5f0d271c218c0ea9b70fd1f7de7b4 (diff) | |
download | openttd-2f6a26ab2d8b8781dc78063f54e0102e5191c63a.tar.xz |
(svn r1108) -Fix: [Network] Fixed problem around slow clients:
They joined, they got the map, but it took some time before the new
player was created. In this time a player could do stuff, causing a
player-id-mismatch, and the player was kicked out. Now a player get's a
nice GUI which says: registering.. When that is gone, the player is
joined and can play safely. Tnx to Moriarty for bugging me with this bug ;)
Diffstat (limited to 'players.c')
-rw-r--r-- | players.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -643,6 +643,13 @@ int32 CmdPlayerCtrl(int x, int y, uint32 flags, uint32 p1, uint32 p2) switch(p1 & 0xff) { case 0: // make new player p = DoStartupNewPlayer(false); + +#ifdef ENABLE_NETWORK + if (_networking && !_network_server && _local_player == OWNER_SPECTATOR) + /* In case we are a client joining a server... */ + DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0); +#endif /* ENABLE_NETWORK */ + if (p != NULL) { if (_local_player == OWNER_SPECTATOR) { _local_player = p->index; |