mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r21001) -Fix [FS#4170] (r20936): clients were not always notified of a player leaving the game
This commit is contained in:
parent
6431055810
commit
af9a6b6b42
|
@ -935,7 +935,7 @@ DEF_GAME_RECEIVE_COMMAND(Server, PACKET_CLIENT_ERROR)
|
|||
|
||||
FOR_ALL_CLIENT_SOCKETS(new_cs) {
|
||||
if (new_cs->status > STATUS_AUTHORIZED) {
|
||||
this->SendErrorQuit(this->client_id, errorno);
|
||||
new_cs->SendErrorQuit(this->client_id, errorno);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -961,8 +961,8 @@ DEF_GAME_RECEIVE_COMMAND(Server, PACKET_CLIENT_QUIT)
|
|||
NetworkTextMessage(NETWORK_ACTION_LEAVE, CC_DEFAULT, false, client_name, NULL, STR_NETWORK_MESSAGE_CLIENT_LEAVING);
|
||||
|
||||
FOR_ALL_CLIENT_SOCKETS(new_cs) {
|
||||
if (new_cs->status > STATUS_AUTHORIZED) {
|
||||
this->SendQuit(this->client_id);
|
||||
if (new_cs->status > STATUS_AUTHORIZED && new_cs != this) {
|
||||
new_cs->SendQuit(this->client_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue