mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
(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.
This commit is contained in:
parent
6e3a46d295
commit
3a1a915c9a
@ -911,11 +911,10 @@ DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_SHUTDOWN)
|
|||||||
|
|
||||||
DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_NEWGAME)
|
DEF_GAME_RECEIVE_COMMAND(Client, PACKET_SERVER_NEWGAME)
|
||||||
{
|
{
|
||||||
/* To trottle the reconnects a bit, every clients waits
|
/* To trottle the reconnects a bit, every clients waits its
|
||||||
* his _local_company value before reconnecting
|
* Client ID modulo 16. This way reconnects should be spread
|
||||||
* COMPANY_SPECTATOR is currently 255, so to avoid long wait periods
|
* out a bit. */
|
||||||
* set the max to 10. */
|
_network_reconnect = _network_own_client_id % 16;
|
||||||
_network_reconnect = min(_local_company + 1, 10);
|
|
||||||
_switch_mode_errorstr = STR_NETWORK_MESSAGE_SERVER_REBOOT;
|
_switch_mode_errorstr = STR_NETWORK_MESSAGE_SERVER_REBOOT;
|
||||||
|
|
||||||
return NETWORK_RECV_STATUS_SERVER_ERROR;
|
return NETWORK_RECV_STATUS_SERVER_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user