mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 21:01:04 +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...
|
// but since the network layer doesn't provide ordered packets...
|
||||||
CL_PrepareDownloadSaveGame(tmpsave);
|
CL_PrepareDownloadSaveGame(tmpsave);
|
||||||
#endif
|
#endif
|
||||||
if ((*asksent + NEWTICRATE*3) < I_GetTime() && CL_SendJoin())
|
if (( I_GetTime() - NEWTICRATE*3 ) >= *asksent && CL_SendJoin())
|
||||||
{
|
{
|
||||||
*asksent = I_GetTime();
|
*asksent = I_GetTime();
|
||||||
cl_mode = CL_WAITJOINRESPONSE;
|
cl_mode = CL_WAITJOINRESPONSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CL_WAITJOINRESPONSE:
|
case CL_WAITJOINRESPONSE:
|
||||||
if ((*asksent + NEWTICRATE*3) < I_GetTime())
|
if (( I_GetTime() - NEWTICRATE*3 ) >= *asksent && CL_SendJoin())
|
||||||
{
|
{
|
||||||
cl_mode = CL_ASKJOIN;
|
cl_mode = CL_ASKJOIN;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue