From: havoc Date: Wed, 15 Feb 2006 02:54:14 +0000 (+0000) Subject: fix very stupid bug that caused entities to sometimes not be removed (priority was... X-Git-Tag: xonotic-v0.1.0preview~4328 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e933ad8188ac4bf949fb311039b059ec624a2a7e;p=xonotic%2Fdarkplaces.git fix very stupid bug that caused entities to sometimes not be removed (priority was not being updated when deltabits were added back to an entity, so the priority remained at the no-update-necessary level despite the fact it should be sent again) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5983 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/protocol.c b/protocol.c index 58fbc0ba..27f4ad58 100644 --- a/protocol.c +++ b/protocol.c @@ -2043,6 +2043,8 @@ void EntityFrame5_CL_ReadFrame(void) for (i = 0;i < LATESTFRAMENUMS-1;i++) cl.latestframenums[i] = cl.latestframenums[i+1]; cl.latestframenums[LATESTFRAMENUMS-1] = MSG_ReadLong(); + if (developer_networkentities.integer) + Con_Printf("recv: svc_entities %i\n", cl.latestframenums[LATESTFRAMENUMS-1]); if (cl.protocol != PROTOCOL_QUAKE && cl.protocol != PROTOCOL_QUAKEDP && cl.protocol != PROTOCOL_NEHAHRAMOVIE && cl.protocol != PROTOCOL_DARKPLACES1 && cl.protocol != PROTOCOL_DARKPLACES2 && cl.protocol != PROTOCOL_DARKPLACES3 && cl.protocol != PROTOCOL_DARKPLACES4 && cl.protocol != PROTOCOL_DARKPLACES5 && cl.protocol != PROTOCOL_DARKPLACES6) cl.servermovesequence = MSG_ReadLong(); // read entity numbers until we find a 0x8000 @@ -2131,7 +2133,10 @@ void EntityFrame5_LostFrame(entityframe5_database_t *d, int framenum) // if the bits haven't all been cleared, there were some bits // lost with this packet, so set them again now if (bits) + { d->deltabits[s->number] |= bits; + d->priorities[s->number] = EntityState5_Priority(d, s->number); + } } // mark lost stats for (j = 0;j < MAX_CL_STATS;j++) @@ -2297,6 +2302,8 @@ void EntityFrame5_WriteFrame(sizebuf_t *msg, entityframe5_database_t *d, int num } } // write state updates + if (developer_networkentities.integer) + Con_Printf("send: svc_entities %i\n", framenum); d->latestframenum = framenum; MSG_WriteByte(msg, svc_entities); MSG_WriteLong(msg, framenum);