------------------------------------------------------------------------

r4201 | acceptthis | 2013-02-14 22:51:59 +0000 (Thu, 14 Feb 2013) | 1 line

show pending packets as if choked. and mark them as lost once they actually are.
------------------------------------------------------------------------


git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4199 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-03-12 22:55:17 +00:00
parent 26e60cd5a7
commit fd20fea722

View file

@ -325,11 +325,22 @@ int CL_CalcNet (void)
sent = NET_TIMINGS;
for (i=cls.netchan.outgoing_sequence-UPDATE_BACKUP+1
; i <= (cl_countpendingpl.ival?cls.netchan.outgoing_sequence:cl.parsecount)
; i <= cls.netchan.outgoing_sequence
; i++)
{
frame = &cl.inframes[i&UPDATE_MASK];
if (frame->latency == -1)
if (i > cl.parsecount)
{
// no response yet
if (cl_countpendingpl.ival)
{
packet_latency[i&NET_TIMINGSMASK] = 9999;
lost++;
}
else
packet_latency[i&NET_TIMINGSMASK] = 10000;
}
else if (frame->latency == -1)
{
packet_latency[i&NET_TIMINGSMASK] = 9999; // dropped
lost++;
@ -3922,6 +3933,11 @@ void CL_ParseClientdata (void)
// calculate latency
frame->latency = realtime - parsecounttime;
//and mark any missing ones as dropped
for (i = (oldparsecountmod+1)&UPDATE_MASK; i != parsecountmod; i=((i+1)&UPDATE_MASK))
{
cl.inframes[i].latency = -1;
}
if (frame->latency < 0 || frame->latency > 1.0)
{