From: fgsfds Date: Fri, 15 Apr 2022 23:28:12 +0000 (+0300) Subject: net: make packet timeout less aggressive X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=e699f4476a023f7fb6a5f9ec4a7d99ff1ad8b8fc;p=d2df-sdl.git net: make packet timeout less aggressive --- diff --git a/src/game/g_net.pas b/src/game/g_net.pas index edd6024..dabb738 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -161,8 +161,8 @@ var NetAutoBanPerm: Boolean = True; NetAutoBanWarn: Boolean = False; - NetAuthTimeout: Integer = 15 * 1000; - NetPacketTimeout: Integer = 30 * 1000; + NetAuthTimeout: Integer = 30 * 1000; + NetPacketTimeout: Integer = 60 * 1000; NetState: Integer = NET_STATE_NONE; @@ -1683,7 +1683,7 @@ begin else if (State = NET_STATE_GAME) and (MsgTime > 0) and (MsgTime <= gTime) then begin g_Net_Penalize(@NetClients[ID], 'message timeout'); - AuthTime := gTime + 500; // do it twice a second to give them a chance + MsgTime := gTime + (NetPacketTimeout div 2) + 500; // wait less for the next check end; end; end;