From 58e4ff08176beac88c93011c2b3edf8f20508a49 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 12 Jun 2013 15:37:20 +0000 Subject: [PATCH] Smoother with a little packetloss/choking. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4391 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_ents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/client/cl_ents.c b/engine/client/cl_ents.c index c8ceeae6..e3599136 100644 --- a/engine/client/cl_ents.c +++ b/engine/client/cl_ents.c @@ -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;