X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=protocol.c;h=7ae6db28d62ee4b4a34a9b365538f5bea4a73455;hp=7577d69008f69fd066b14d3ca5f79e882b4937db;hb=603987edca0ef1132be0d2e1698c9e850cf3b08f;hpb=0960c1f25d397c09f680454759f4ea747975c8c9 diff --git a/protocol.c b/protocol.c index 7577d690..7ae6db28 100644 --- a/protocol.c +++ b/protocol.c @@ -639,23 +639,23 @@ void EntityState_ReadFields(entity_state_t *e, unsigned int bits) e->origin[2] = MSG_ReadCoord32f(); } } - if ((cl.protocol == PROTOCOL_DARKPLACES1 || cl.protocol == PROTOCOL_DARKPLACES2 || cl.protocol == PROTOCOL_DARKPLACES3 || cl.protocol == PROTOCOL_DARKPLACES4) && (e->flags & RENDER_LOWPRECISION)) + if ((cl.protocol == PROTOCOL_DARKPLACES5 || cl.protocol == PROTOCOL_DARKPLACES6) && !(e->flags & RENDER_LOWPRECISION)) { if (bits & E_ANGLE1) - e->angles[0] = MSG_ReadAngle8i(); + e->angles[0] = MSG_ReadAngle16i(); if (bits & E_ANGLE2) - e->angles[1] = MSG_ReadAngle8i(); + e->angles[1] = MSG_ReadAngle16i(); if (bits & E_ANGLE3) - e->angles[2] = MSG_ReadAngle8i(); + e->angles[2] = MSG_ReadAngle16i(); } else { if (bits & E_ANGLE1) - e->angles[0] = MSG_ReadAngle16i(); + e->angles[0] = MSG_ReadAngle8i(); if (bits & E_ANGLE2) - e->angles[1] = MSG_ReadAngle16i(); + e->angles[1] = MSG_ReadAngle8i(); if (bits & E_ANGLE3) - e->angles[2] = MSG_ReadAngle16i(); + e->angles[2] = MSG_ReadAngle8i(); } if (bits & E_MODEL1) e->modelindex = (e->modelindex & 0xFF00) | (unsigned int) MSG_ReadByte(); @@ -2026,7 +2026,7 @@ void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int num entityframe5_packetlog_t *packetlog; if (prog->max_edicts > d->maxedicts) - EntityFrame5_ExpandEdicts(d, (prog->max_edicts + 255) & ~255); + EntityFrame5_ExpandEdicts(d, prog->max_edicts); framenum = d->latestframenum + 1; d->viewentnum = viewentnum; @@ -2038,6 +2038,7 @@ void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int num break; if (packetlognumber == ENTITYFRAME5_MAXPACKETLOGS) { + Con_DPrintf("EntityFrame5_WriteFrame: packetlog overflow for a client, resetting\n"); EntityFrame5_LostFrame(d, framenum); packetlognumber = 0; } @@ -2090,8 +2091,7 @@ void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int num num++; } // all remaining entities are dead - // note: this must use prog->max_edicts, not prog->num_edicts, because prog->num_edicts can both increase and decrease, where as prog->max_edicts only increases (if prog->num_edicts is used, sometimes some entities are missed when the prog->num_edicts count goes back down after firing some shots) - for (;num < prog->max_edicts;num++) + for (;num < d->maxedicts;num++) { if (CHECKPVSBIT(d->visiblebits, num)) { @@ -2111,7 +2111,7 @@ void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int num // build lists of entities by priority level memset(entityframe5_prioritychaincounts, 0, sizeof(entityframe5_prioritychaincounts)); l = 0; - for (num = 0;num < prog->num_edicts;num++) + for (num = 0;num < d->maxedicts;num++) { if (d->priorities[num]) {