]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix bug which caused CL_Move to not see any network bmodels (doors, etc), which cause...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Mar 2007 03:26:51 +0000 (03:26 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Mar 2007 03:26:51 +0000 (03:26 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7023 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index f41d1a1b5782da5c3ec40216547ebc6271ae3e40..025c48ad5e489cc42133227cfcd4e44f5fc91d30 100644 (file)
--- 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();