added cl_noplayershadow cvar to allow disabling player shadow
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 10 Feb 2003 21:04:09 +0000 (21:04 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 10 Feb 2003 21:04:09 +0000 (21:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2730 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index 56b8a50..ec48129 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -56,6 +56,8 @@ cvar_t cl_stainmaps = {CVAR_SAVE, "cl_stainmaps", "1"};
 cvar_t cl_beams_polygons = {CVAR_SAVE, "cl_beams_polygons", "1"};
 cvar_t cl_beams_relative = {CVAR_SAVE, "cl_beams_relative", "1"};
 
+cvar_t cl_noplayershadow = {CVAR_SAVE, "cl_noplayershadow", "0"};
+
 mempool_t *cl_scores_mempool;
 mempool_t *cl_refdef_mempool;
 mempool_t *cl_entities_mempool;
@@ -761,7 +763,7 @@ static void CL_RelinkNetworkEntities(void)
                 && !(ent->state_current.effects & EF_ADDITIVE)
                 && (ent->state_current.alpha == 255)
                 && !(ent->render.flags & RENDER_VIEWMODEL)
-                && (i != cl.viewentity || (!cl.intermission && !Nehahrademcompatibility)))
+                && (i != cl.viewentity || (!cl.intermission && !Nehahrademcompatibility && !cl_noplayershadow.integer)))
                        ent->render.flags |= RENDER_SHADOW;
 
                if (r_refdef.numentities < r_refdef.maxentities)
@@ -1480,6 +1482,7 @@ void CL_Init (void)
        Cvar_RegisterVariable(&cl_stainmaps);
        Cvar_RegisterVariable(&cl_beams_polygons);
        Cvar_RegisterVariable(&cl_beams_relative);
+       Cvar_RegisterVariable(&cl_noplayershadow);
 
        R_LightningBeams_Init();