Mercurial > hg > openttd
changeset 16300:dc73a1365f96 draft
(svn r21008) -Change: don't make client reconnect waiting time depend on the company; in coop games that does not spread clients at all, and most companies have a low number causing it not to be spread out either. Use the ClientID instead. Based on a patch by dihedral.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 22 Oct 2010 14:41:26 +0000 (2010-10-22) |
parents | 5c920b2c2509 |
children | a08403902168 |
files | src/network/network_client.cpp |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -911,11 +911,10 @@ DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_NEWGAME) { - /* To trottle the reconnects a bit, every clients waits - * his _local_company value before reconnecting - * COMPANY_SPECTATOR is currently 255, so to avoid long wait periods - * set the max to 10. */ - _network_reconnect = min(_local_company + 1, 10); + /* To trottle the reconnects a bit, every clients waits its + * Client ID modulo 16. This way reconnects should be spread + * out a bit. */ + _network_reconnect = _network_own_client_id % 16; _switch_mode_errorstr = STR_NETWORK_MESSAGE_SERVER_REBOOT; return NETWORK_RECV_STATUS_SERVER_ERROR;