mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Rearrange time comparsion on asksent to make it underflow friendly
This fixes '-connect'. NEWTICRATE*5 is subtracted from asksent after CL_LOADFILES. If this happens too early, an underflow will occur.
This commit is contained in:
parent
cadb4719cf
commit
1cd7c3b747
1 changed files with 2 additions and 2 deletions
|
@ -2414,14 +2414,14 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
// but since the network layer doesn't provide ordered packets...
|
||||
CL_PrepareDownloadSaveGame(tmpsave);
|
||||
#endif
|
||||
if ((*asksent + NEWTICRATE*3) < I_GetTime() && CL_SendJoin())
|
||||
if (( I_GetTime() - NEWTICRATE*3 ) >= *asksent && CL_SendJoin())
|
||||
{
|
||||
*asksent = I_GetTime();
|
||||
cl_mode = CL_WAITJOINRESPONSE;
|
||||
}
|
||||
break;
|
||||
case CL_WAITJOINRESPONSE:
|
||||
if ((*asksent + NEWTICRATE*3) < I_GetTime())
|
||||
if (( I_GetTime() - NEWTICRATE*3 ) >= *asksent && CL_SendJoin())
|
||||
{
|
||||
cl_mode = CL_ASKJOIN;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue