forked from mirror/OpenTTD
(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 ;)
This commit is contained in:
@@ -487,8 +487,6 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
|
||||
}
|
||||
_opt_mod_ptr = &_opt;
|
||||
|
||||
DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
|
||||
|
||||
// Say we received the map and loaded it correctly!
|
||||
SEND_COMMAND(PACKET_CLIENT_MAP_OK)();
|
||||
|
||||
@@ -498,6 +496,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
|
||||
if (_network_playas == OWNER_SPECTATOR) {
|
||||
// The client wants to be a spectator..
|
||||
_local_player = OWNER_SPECTATOR;
|
||||
DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
|
||||
} else {
|
||||
// send a command to make a new player
|
||||
_local_player = 0;
|
||||
|
Reference in New Issue
Block a user