From af9a6b6b42917515381f183446e304a76c811c57 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 20 Oct 2010 11:58:34 +0000 Subject: (svn r21001) -Fix [FS#4170] (r20936): clients were not always notified of a player leaving the game --- src/network/network_server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 94c829fe5..8d867bb1e 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -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); } } -- cgit v1.2.3-70-g09d2