cvar_t cl_anglespeedkey = {CVAR_SAVE, "cl_anglespeedkey","1.5"};
-cvar_t cl_nodelta = {0, "cl_nodelta", "0"};
-
/*
================
CL_AdjustAngles
// FIXME: should ack latest 3 frames perhaps?
if (cl.latestframenum > 0)
{
- i = cl.latestframenum;
- if (cl_nodelta.integer)
- i = -1;
if (developer_networkentities.integer >= 1)
- Con_Printf("send clc_ackentities %i\n", i);
+ Con_Printf("send clc_ackentities %i\n", cl.latestframenum);
MSG_WriteByte(&buf, clc_ackentities);
- MSG_WriteLong(&buf, i);
+ MSG_WriteLong(&buf, cl.latestframenum);
}
// deliver the message
Cmd_AddCommand ("-button7", IN_Button7Up);
Cmd_AddCommand ("+button8", IN_Button8Down);
Cmd_AddCommand ("-button8", IN_Button8Up);
-
- Cvar_RegisterVariable(&cl_nodelta);
}
void EntityFrame_AckFrame(entityframe_database_t *d, int frame)
{
int i;
- if (d->ackframenum < frame)
- d->ackframenum = frame;
+ d->ackframenum = frame;
for (i = 0;i < d->numframes && d->frames[i].framenum < frame;i++);
// ignore outdated frame acks (out of order packets)
if (i == 0)
EntityFrame_AddFrame(d, eye, d->latestframenum, numstates, states);
- EntityFrame_FetchFrame(d, d->ackframenum > 0 ? d->ackframenum : -1, o);
+ EntityFrame_FetchFrame(d, d->ackframenum, o);
MSG_WriteByte (msg, svc_entities);
MSG_WriteLong (msg, o->framenum);
d = Mem_Alloc(pool, sizeof(*d));
d->mempool = pool;
EntityFrame4_ResetDatabase(d);
- d->ackframenum = -1;
return d;
}
void EntityFrame4_ResetDatabase(entityframe4_database_t *d)
{
int i;
- d->ackframenum = -1;
d->referenceframenum = -1;
for (i = 0;i < MAX_ENTITY_HISTORY;i++)
d->commit[i].numentities = 0;
if (!d->commit[i].numentities)
{
d->currentcommit = d->commit + i;
- d->currentcommit->framenum = d->ackframenum = framenum;
+ d->currentcommit->framenum = framenum;
d->currentcommit->numentities = 0;
}
}
int i;
memset(d, 0, sizeof(*d));
d->latestframenum = 0;
- d->ackframenum = -1;
for (i = 0;i < MAX_EDICTS;i++)
d->states[i] = defaultstate;
}
int i, j, k, l, bits;
entityframe5_changestate_t *s, *s2;
entityframe5_packetlog_t *p, *p2;
- if (framenum <= d->ackframenum)
- return;
- d->ackframenum = framenum;
// scan for packets made obsolete by this ack
for (i = 0, p = d->packetlog;i < ENTITYFRAME5_MAXPACKETLOGS;i++, p++)
{
if (host_client->entitydatabase)
EntityFrame_AckFrame(host_client->entitydatabase, num);
else if (host_client->entitydatabase4)
- EntityFrame4_AckFrame(host_client->entitydatabase4, host_client->entitydatabase4->ackframenum, true);
+ EntityFrame4_AckFrame(host_client->entitydatabase4, num, true);
else if (host_client->entitydatabase5)
EntityFrame5_AckFrame(host_client->entitydatabase5, num, host_client - svs.clients + 1);
break;