// if this is an update on our player, update interpolation state
if (enumber == cl.playerentity)
{
+ // force a recalculation of the player prediction
+ cl.movement_replay = true;
+
VectorCopy (cl.mpunchangle[0], cl.mpunchangle[1]);
VectorCopy (cl.mpunchvector[0], cl.mpunchvector[1]);
VectorCopy (cl.mvelocity[0], cl.mvelocity[1]);
cl.entitydatabaseqw = EntityFrameQW_AllocDatabase(cls.levelmempool);
d = cl.entitydatabaseqw;
- newsnapindex = cls.netcon->qw.incoming_sequence & QW_UPDATE_MASK;
+ // there is no cls.netcon in demos, so this reading code can't access
+ // cls.netcon-> at all... so cls.qw_incoming_sequence and
+ // cls.qw_outgoing_sequence are updated every time the corresponding
+ // cls.netcon->qw. variables are updated
+ // read the number of this frame to echo back in next input packet
+ cl.qw_validsequence = cls.qw_incoming_sequence;
+ newsnapindex = cl.qw_validsequence & QW_UPDATE_MASK;
newsnap = d->snapshot + newsnapindex;
memset(newsnap, 0, sizeof(*newsnap));
oldsnapindex = -1;
Con_DPrintf("WARNING: from mismatch\n");
if (oldsnapindex != -1)
{
- if (cls.netcon->qw.outgoing_sequence - oldsnapindex >= QW_UPDATE_BACKUP-1)
+ if (cls.qw_outgoing_sequence - oldsnapindex >= QW_UPDATE_BACKUP-1)
{
Con_DPrintf("delta update too old\n");
newsnap->invalid = invalid = true; // too old
delta = false;
}
- // read the number of this frame to echo back in next input packet
- cl.qw_validsequence = cls.netcon->qw.incoming_sequence;
+ // if we can't decode this frame properly, report that to the server
if (invalid)
cl.qw_validsequence = 0;