cl.latestframenums[LATESTFRAMENUMS-1] = framenum = MSG_ReadLong();
// read the start number
enumber = (unsigned short) MSG_ReadShort();
- if (developer_networkentities.integer >= 1)
+ if (developer_networkentities.integer >= 10)
{
Con_Printf("recv svc_entities num:%i ref:%i database: ref:%i commits:", framenum, referenceframenum, d->referenceframenum);
for (i = 0;i < MAX_ENTITY_HISTORY;i++)
MSG_WriteByte(msg, svc_entities);
MSG_WriteLong(msg, d->referenceframenum);
MSG_WriteLong(msg, d->currentcommit->framenum);
- if (developer_networkentities.integer >= 1)
+ if (developer_networkentities.integer >= 10)
{
Con_Printf("send svc_entities num:%i ref:%i (database: ref:%i commits:", d->currentcommit->framenum, d->referenceframenum, d->referenceframenum);
for (i = 0;i < MAX_ENTITY_HISTORY;i++)
void EntityState5_WriteUpdate(int number, const entity_state_t *s, int changedbits, sizebuf_t *msg)
{
unsigned int bits = 0;
+ qboolean lowprecision;
prvm_eval_t *val;
val = PRVM_EDICTFIELDVALUE((&prog->edicts[s->number]), prog->fieldoffsets.SendEntity);
else
{
bits = changedbits;
- if ((bits & E5_ORIGIN) && (!(s->flags & RENDER_LOWPRECISION) || s->origin[0] < -4096 || s->origin[0] >= 4096 || s->origin[1] < -4096 || s->origin[1] >= 4096 || s->origin[2] < -4096 || s->origin[2] >= 4096))
+ lowprecision = (s->flags & RENDER_LOWPRECISION);
+ if ((bits & E5_ORIGIN) && (!lowprecision || s->origin[0] < -4096 || s->origin[0] >= 4096 || s->origin[1] < -4096 || s->origin[1] >= 4096 || s->origin[2] < -4096 || s->origin[2] >= 4096))
bits |= E5_ORIGIN32;
- if ((bits & E5_ANGLES) && !(s->flags & RENDER_LOWPRECISION))
+ if ((bits & E5_ANGLES) && !lowprecision)
bits |= E5_ANGLES16;
if ((bits & E5_MODEL) && s->modelindex >= 256)
bits |= E5_MODEL16;
}
}
-void EntityState5_ReadUpdate(entity_state_t *s)
+void EntityState5_ReadUpdate(entity_state_t *s, int number)
{
int bits;
bits = MSG_ReadByte();
if (developer_networkentities.integer >= 2)
{
- Con_Printf("ReadFields e%i", s->number);
+ Con_Printf("ReadFields e%i", number);
if (bits & E5_ORIGIN)
Con_Printf(" E5_ORIGIN %f %f %f", s->origin[0], s->origin[1], s->origin[2]);
for (i = 0;i < LATESTFRAMENUMS-1;i++)
cl.latestframenums[i] = cl.latestframenums[i+1];
cl.latestframenums[LATESTFRAMENUMS-1] = MSG_ReadLong();
- if (developer_networkentities.integer)
+ if (developer_networkentities.integer >= 10)
Con_Printf("recv: svc_entities %i\n", cl.latestframenums[LATESTFRAMENUMS-1]);
if (cls.protocol != PROTOCOL_QUAKE && cls.protocol != PROTOCOL_QUAKEDP && cls.protocol != PROTOCOL_NEHAHRAMOVIE && cls.protocol != PROTOCOL_DARKPLACES1 && cls.protocol != PROTOCOL_DARKPLACES2 && cls.protocol != PROTOCOL_DARKPLACES3 && cls.protocol != PROTOCOL_DARKPLACES4 && cls.protocol != PROTOCOL_DARKPLACES5 && cls.protocol != PROTOCOL_DARKPLACES6)
cls.servermovesequence = MSG_ReadLong();
else
{
// update entity
- EntityState5_ReadUpdate(s);
+ EntityState5_ReadUpdate(s, enumber);
}
// set the cl.entities_active flag
cl.entities_active[enumber] = s->active;
{
if (d->priorities[num])
{
- if (d->priorities[num] < (E5_PROTOCOL_PRIORITYLEVELS - 1))
- d->priorities[num] = EntityState5_Priority(d, num);
- l = num;
- priority = d->priorities[num];
- if (entityframe5_prioritychaincounts[priority] < ENTITYFRAME5_MAXSTATES)
- entityframe5_prioritychains[priority][entityframe5_prioritychaincounts[priority]++] = num;
+ if (d->deltabits[num])
+ {
+ if (d->priorities[num] < (E5_PROTOCOL_PRIORITYLEVELS - 1))
+ d->priorities[num] = EntityState5_Priority(d, num);
+ l = num;
+ priority = d->priorities[num];
+ if (entityframe5_prioritychaincounts[priority] < ENTITYFRAME5_MAXSTATES)
+ entityframe5_prioritychains[priority][entityframe5_prioritychaincounts[priority]++] = num;
+ }
+ else
+ d->priorities[num] = 0;
}
}
}
}
// write state updates
- if (developer_networkentities.integer)
+ if (developer_networkentities.integer >= 10)
Con_Printf("send: svc_entities %i\n", framenum);
d->latestframenum = framenum;
MSG_WriteByte(msg, svc_entities);