Mercurial > hg > openttd
changeset 3547:8d947a150298 draft
(svn r4413) -Fix: fixed a bug which pushed the client back to the main menu when a
server is in the mainserver-list which sends out illegal signals. Many
tnx to 'test' for finding and isolating the problem.
-Fix: also specify the problem a bit better
author | truelight <truelight@openttd.org> |
---|---|
date | Fri, 14 Apr 2006 12:19:51 +0000 |
parents | 509a7fa9f988 |
children | 8c180b85d5d1 |
files | network_data.c network_udp.c |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/network_data.c +++ b/network_data.c @@ -125,7 +125,7 @@ NetworkCloseClient(cs); // Clients drop back to the main menu - if (!_network_server) { + if (!_network_server && _networking) { _switch_mode = SM_MENU; _networking = false; _switch_mode_errorstr = STR_NETWORK_ERR_LOSTCONNECTION;
--- a/network_udp.c +++ b/network_udp.c @@ -328,8 +328,12 @@ if (type < PACKET_UDP_END && _network_udp_packet[type] != NULL && !_udp_cs.quited) { _network_udp_packet[type](p, client_addr); - } else { - DEBUG(net, 0)("[NET][UDP] Received invalid packet type %d", type); + } else { + if (!_udp_cs.quited) { + DEBUG(net, 0)("[NET][UDP] Received invalid packet type %d", type); + } else { + DEBUG(net, 0)("[NET][UDP] Received illegal packet"); + } } }