summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-10-20 11:58:34 +0000
committerrubidium <rubidium@openttd.org>2010-10-20 11:58:34 +0000
commitaf9a6b6b42917515381f183446e304a76c811c57 (patch)
tree139ea13b8346e0fa682ea367af9ba758755e6680 /src
parent6431055810c8b22a5b6b6d204b20700b75c01bc1 (diff)
downloadopenttd-af9a6b6b42917515381f183446e304a76c811c57.tar.xz
(svn r21001) -Fix [FS#4170] (r20936): clients were not always notified of a player leaving the game
Diffstat (limited to 'src')
-rw-r--r--src/network/network_server.cpp6
1 files 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);
}
}