mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
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:
parent
0ac9b88343
commit
58e4ff0817
1 changed files with 2 additions and 2 deletions
|
@ -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
|
//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--)
|
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...
|
continue; //packetloss/choke, it's really only a problem for the oldframe, but...
|
||||||
|
|
||||||
if (cl.inframes[i&UPDATE_MASK].packet_entities.servertime >= servertime)
|
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*/
|
/*just grab the most recent frame that is valid*/
|
||||||
for (i = cls.netchan.incoming_sequence; i >= cls.netchan.incoming_sequence-UPDATE_MASK; i--)
|
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...
|
continue; //packetloss/choke, it's really only a problem for the oldframe, but...
|
||||||
*oldf = *newf = i;
|
*oldf = *newf = i;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue