forked from mirror/OpenTTD
(svn r2108) -Fix: the server now also unpause when a client desyncs or something
This commit is contained in:
10
network.c
10
network.c
@@ -515,12 +515,12 @@ void NetworkCloseClient(NetworkClientState *cs)
|
|||||||
SEND_COMMAND(PACKET_SERVER_ERROR_QUIT)(new_cs, cs->index, errorno);
|
SEND_COMMAND(PACKET_SERVER_ERROR_QUIT)(new_cs, cs->index, errorno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* When the client was PRE_ACTIVE, the server was in pause mode, so unpause */
|
/* When the client was PRE_ACTIVE, the server was in pause mode, so unpause */
|
||||||
if (cs->status == STATUS_PRE_ACTIVE && _network_pause_on_join) {
|
if (cs->status == STATUS_PRE_ACTIVE && _network_pause_on_join) {
|
||||||
DoCommandP(0, 0, 0, NULL, CMD_PAUSE);
|
DoCommandP(0, 0, 0, NULL, CMD_PAUSE);
|
||||||
NetworkServer_HandleChat(NETWORK_ACTION_CHAT, DESTTYPE_BROADCAST, 0, "Game unpaused", NETWORK_SERVER_INDEX);
|
NetworkServer_HandleChat(NETWORK_ACTION_CHAT, DESTTYPE_BROADCAST, 0, "Game unpaused", NETWORK_SERVER_INDEX);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
closesocket(cs->socket);
|
closesocket(cs->socket);
|
||||||
|
Reference in New Issue
Block a user