]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
fix crashs on maps with missing textures
[xonotic/darkplaces.git] / cl_main.c
index e251750ca0832f3c7166238dbd61b8dd218abf07..3a238c3ffa40d5340b244fc704f74d949c2fc2d4 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -746,18 +746,6 @@ static void CL_RelinkNetworkEntities(void)
        }
 }
 
-static void CL_RelinkViewModel(void)
-{
-       entity_t *ent;
-       if (!r_drawviewmodel.integer || chase_active.integer || envmap || !r_drawentities.integer || cl.items & IT_INVISIBILITY || cl.stats[STAT_HEALTH] <= 0 || cl.viewent.render.model == NULL)
-               return;
-
-       ent = &cl.viewent;
-       // FIXME: set up view model here?
-       if (r_refdef.numentities < r_refdef.maxentities)
-               r_refdef.entities[r_refdef.numentities++] = &ent->render;
-}
-
 void CL_Effect(vec3_t org, int modelindex, int startframe, int framecount, float framerate)
 {
        int i;
@@ -951,7 +939,6 @@ void CL_RelinkEntities (void)
        CL_RelinkWorld();
        CL_RelinkStaticEntities();
        CL_RelinkNetworkEntities();
-       CL_RelinkViewModel();
        CL_RelinkEffects();
        CL_RelinkBeams();
        CL_MoveParticles();