From 0570bbe91e3be682ca3fc708ad54dbfcb90b268f Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 30 Mar 2007 03:26:51 +0000 Subject: [PATCH] fix bug which caused CL_Move to not see any network bmodels (doors, etc), which caused particles, blood, and coronas to ignore doors and such git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7023 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cl_main.c b/cl_main.c index f41d1a1b..025c48ad 100644 --- a/cl_main.c +++ b/cl_main.c @@ -1119,7 +1119,7 @@ void CL_UpdateNetworkCollisionEntities(void) // start on the entity after the world cl.num_brushmodel_entities = 0; - for (i = 1;i < cl.num_entities;i++) + for (i = cl.maxclients + 1;i < cl.num_entities;i++) { if (cl.entities_active[i]) { @@ -1128,7 +1128,7 @@ void CL_UpdateNetworkCollisionEntities(void) { // do not interpolate the bmodels for this CL_UpdateNetworkEntity(ent, 32, false); - cl.brushmodel_entities[cl.num_brushmodel_entities++] = ent->state_current.number; + cl.brushmodel_entities[cl.num_brushmodel_entities++] = i; } } } @@ -1368,7 +1368,6 @@ void CL_LinkNetworkEntity(entity_t *e) void CL_RelinkWorld(void) { entity_t *ent = &cl.entities[0]; - cl.brushmodel_entities[cl.num_brushmodel_entities++] = 0; // FIXME: this should be done at load ent->render.matrix = identitymatrix; CL_UpdateRenderEntity(&ent->render); @@ -1706,12 +1705,9 @@ int CL_ReadFromServer(void) V_DriftPitch(); V_FadeViewFlashs(); - if (cl.movement_predicted) - { - // if prediction is enabled we have to update all the collidable - // network entities before the prediction code can be run - CL_UpdateNetworkCollisionEntities(); - } + // if prediction is enabled we have to update all the collidable + // network entities before the prediction code can be run + CL_UpdateNetworkCollisionEntities(); // now update the player prediction CL_ClientMovement_Replay(); -- 2.39.2