]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
Update Xonotic's SDL version to 2.0.10
[xonotic/darkplaces.git] / cl_main.c
index 519332bad1c96eafc41710cecb0524d313752f99..d570702995973a692d8c59dad0a49f3be305c949 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -1813,12 +1813,7 @@ void CL_RelinkBeams(void)
                        entrender = CL_NewTempEntity (0);
                        if (!entrender)
                                return;
-                       //VectorCopy (org, ent->render.origin);
                        entrender->model = b->model;
-                       //ent->render.effects = EF_FULLBRIGHT;
-                       //ent->render.angles[0] = pitch;
-                       //ent->render.angles[1] = yaw;
-                       //ent->render.angles[2] = rand()%360;
                        Matrix4x4_CreateFromQuakeEntity(&entrender->matrix, org[0], org[1], org[2], -pitch, yaw, lhrandom(0, 360), 1);
                        CL_UpdateRenderEntity(entrender);
                        VectorMA(org, 30, dist, org);
@@ -1890,6 +1885,7 @@ void CSQC_RelinkAllEntities (int drawmask)
        CL_RelinkStaticEntities();
        CL_RelinkBeams();
        CL_RelinkEffects();
+       CL_RelinkLightFlashes();
 
        // link stuff
        if (drawmask & ENTMASK_ENGINE)
@@ -1952,8 +1948,9 @@ void CL_UpdateWorld(void)
                // update the engine-based viewmodel
                CL_UpdateViewModel();
 
-               CL_RelinkLightFlashes();
-               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
        }
@@ -2409,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);
@@ -2420,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);
 }