Merge branch 'resynch-fix' into 'master'
Fix clients being resynched at the wrong gametic See merge request STJr/SRB2Internal!391
This commit is contained in:
commit
bb9a0de4f5
|
@ -3841,7 +3841,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Ignore tics from those not synched
|
// Ignore tics from those not synched
|
||||||
if (resynch_inprogress[node])
|
if (resynch_inprogress[node] && nettics[node] == gametic)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// To save bytes, only the low byte of tic numbers are sent
|
// To save bytes, only the low byte of tic numbers are sent
|
||||||
|
@ -4699,7 +4699,7 @@ void TryRunTics(tic_t realtics)
|
||||||
if (player_joining)
|
if (player_joining)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (neededtic > gametic)
|
if (neededtic > gametic && !resynch_local_inprogress)
|
||||||
{
|
{
|
||||||
if (advancedemo)
|
if (advancedemo)
|
||||||
D_StartTitle();
|
D_StartTitle();
|
||||||
|
@ -4852,10 +4852,15 @@ void NetUpdate(void)
|
||||||
|
|
||||||
for (i = 0; i < MAXNETNODES; ++i)
|
for (i = 0; i < MAXNETNODES; ++i)
|
||||||
if (resynch_inprogress[i])
|
if (resynch_inprogress[i])
|
||||||
|
{
|
||||||
|
if (!nodeingame[i] || nettics[i] == gametic)
|
||||||
{
|
{
|
||||||
SV_SendResynch(i);
|
SV_SendResynch(i);
|
||||||
counts = -666;
|
counts = -666;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
counts = 0; // Let the client catch up with the server
|
||||||
|
}
|
||||||
|
|
||||||
// Do not make tics while resynching
|
// Do not make tics while resynching
|
||||||
if (counts != -666)
|
if (counts != -666)
|
||||||
|
|
Loading…
Reference in a new issue