1
0
Fork 0
forked from fte/fteqw

Smoother with a little packetloss/choking.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4391 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-06-12 15:37:20 +00:00
parent 0ac9b88343
commit 58e4ff0817

View file

@ -2880,7 +2880,7 @@ static qboolean CL_ChooseInterpolationFrames(int *newf, int *oldf, float servert
//we should be picking the packet just after the server time, and the one just before
for (i = cls.netchan.incoming_sequence; i >= cls.netchan.incoming_sequence-UPDATE_MASK; i--)
{
if (cl.inframes[i&UPDATE_MASK].receivedtime < 0 || cl.inframes[i&UPDATE_MASK].invalid)
if (cl.inframes[i&UPDATE_MASK].receivedtime < 0 || cl.inframes[i&UPDATE_MASK].latency < 0 || cl.inframes[i&UPDATE_MASK].invalid)
continue; //packetloss/choke, it's really only a problem for the oldframe, but...
if (cl.inframes[i&UPDATE_MASK].packet_entities.servertime >= servertime)
@ -2915,7 +2915,7 @@ static qboolean CL_ChooseInterpolationFrames(int *newf, int *oldf, float servert
/*just grab the most recent frame that is valid*/
for (i = cls.netchan.incoming_sequence; i >= cls.netchan.incoming_sequence-UPDATE_MASK; i--)
{
if (cl.inframes[i&UPDATE_MASK].receivedtime < 0 || cl.inframes[i&UPDATE_MASK].invalid)
if (cl.inframes[i&UPDATE_MASK].receivedtime < 0 || cl.inframes[i&UPDATE_MASK].latency < 0 || cl.inframes[i&UPDATE_MASK].invalid)
continue; //packetloss/choke, it's really only a problem for the oldframe, but...
*oldf = *newf = i;
return true;