(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:
truelight
2004-12-15 21:13:52 +00:00
parent 9595ee80e3
commit fa1f026367
6 changed files with 30 additions and 8 deletions

View File

@@ -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;