]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
Configure all of the CL_MeshEntities* meshes the same, the material flags decide...
[xonotic/darkplaces.git] / cl_main.c
index b13cb5f4085914d2a0d8fd293830e0555ed1cf20..d570702995973a692d8c59dad0a49f3be305c949 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -1776,7 +1776,10 @@ void CL_RelinkBeams(void)
                                r_refdef.scene.lights[r_refdef.scene.numlights] = &r_refdef.scene.templights[r_refdef.scene.numlights];r_refdef.scene.numlights++;
                        }
                        if (cl_beams_polygons.integer)
+                       {
+                               CL_Beam_AddPolygons(b);
                                continue;
+                       }
                }
 
                // calculate pitch and yaw
@@ -1945,7 +1948,9 @@ void CL_UpdateWorld(void)
                // update the engine-based viewmodel
                CL_UpdateViewModel();
 
-               CSQC_RelinkAllEntities(ENTMASK_ENGINE | ENTMASK_ENGINEVIEWMODELS);
+               // when csqc is loaded, it will call this in CSQC_UpdateView
+               if (!cl.csqc_loaded)
+                       CSQC_RelinkAllEntities(ENTMASK_ENGINE | ENTMASK_ENGINEVIEWMODELS);
 
                // decals, particles, and explosions will be updated during rneder
        }
@@ -2401,7 +2406,7 @@ void CL_MeshEntities_Init(void)
                ent->state_current.active = true;
                ent->render.model = cl_meshentitymodels + i;
                ent->render.alpha = 1;
-               ent->render.flags = RENDER_LIGHT;
+               ent->render.flags = RENDER_SHADOW | RENDER_LIGHT;
                ent->render.framegroupblend[0].lerp = 1;
                ent->render.frameblend[0].lerp = 1;
                VectorSet(ent->render.colormod, 1, 1, 1);
@@ -2412,7 +2417,6 @@ void CL_MeshEntities_Init(void)
                Matrix4x4_CreateIdentity(&ent->render.matrix);
                CL_UpdateRenderEntity(&ent->render);
        }
-       cl_meshentities[MESH_CSQCPOLYGONS].render.flags = RENDER_SHADOW | RENDER_LIGHT;
        R_RegisterModule("cl_meshentities", CL_MeshEntities_Restart, CL_MeshEntities_Restart, CL_MeshEntities_Restart, CL_MeshEntities_Restart, CL_MeshEntities_Restart);
 }