]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
default to using texture rectangle shadowmaps when available
[xonotic/darkplaces.git] / cl_main.c
index 768b2004b9d4ff95e250453d769e1e7b6189bfdf..926c65a947d500b662b1d0d1c542a26b179e1f42 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -72,6 +72,8 @@ cvar_t cl_beams_quakepositionhack = {CVAR_SAVE, "cl_beams_quakepositionhack", "1
 cvar_t cl_beams_instantaimhack = {CVAR_SAVE, "cl_beams_instantaimhack", "0", "makes your lightning gun aiming update instantly"};
 cvar_t cl_beams_lightatend = {CVAR_SAVE, "cl_beams_lightatend", "0", "make a light at the end of the beam"};
 
+cvar_t cl_deathfade = {CVAR_SAVE, "cl_deathfade", "0", "fade screen to dark red when dead, value = how fast the fade is"};
+
 cvar_t cl_noplayershadow = {CVAR_SAVE, "cl_noplayershadow", "0","hide player shadow"};
 
 cvar_t cl_dlights_decayradius = {CVAR_SAVE, "cl_dlights_decayradius", "1", "reduces size of light flashes over time"};
@@ -1229,7 +1231,7 @@ void CL_UpdateViewModel(void)
        ent->state_previous = ent->state_current;
        ent->state_current = defaultstate;
        ent->state_current.time = cl.time;
-       ent->state_current.number = -1;
+       ent->state_current.number = (unsigned short)-1;
        ent->state_current.active = true;
        ent->state_current.modelindex = cl.stats[STAT_WEAPON];
        ent->state_current.frame = cl.stats[STAT_WEAPONFRAME];
@@ -1918,7 +1920,7 @@ void CL_Locs_FreeNode(cl_locnode_t *node)
                        return;
                }
        }
-       Con_Printf("CL_Locs_FreeNode: no such node! (%p)\n", node);
+       Con_Printf("CL_Locs_FreeNode: no such node! (%p)\n", (void *)node);
 }
 
 void CL_Locs_AddNode(vec3_t mins, vec3_t maxs, const char *name)
@@ -2238,6 +2240,7 @@ void CL_Init (void)
        Cvar_RegisterVariable (&cl_anglespeedkey);
        Cvar_RegisterVariable (&cl_shownet);
        Cvar_RegisterVariable (&cl_nolerp);
+       Cvar_RegisterVariable (&cl_deathfade);
        Cvar_RegisterVariable (&lookspring);
        Cvar_RegisterVariable (&lookstrafe);
        Cvar_RegisterVariable (&sensitivity);