]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
added cl_deathnoviewmodel, cl_deathscoreboard and cl_deathtilt cvars so that games...
[xonotic/darkplaces.git] / cl_main.c
index 632e185056080ddda5e08182f312d8e9ae74216a..75ec32603672cd0dccb0e977440cb2122f69de87 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -63,6 +63,8 @@ cvar_t cl_noplayershadow = {CVAR_SAVE, "cl_noplayershadow", "0"};
 
 cvar_t cl_prydoncursor = {0, "cl_prydoncursor", "0"};
 
 
 cvar_t cl_prydoncursor = {0, "cl_prydoncursor", "0"};
 
+cvar_t cl_deathnoviewmodel = {0, "cl_deathnoviewmodel", "1"};
+
 vec3_t cl_playerstandmins;
 vec3_t cl_playerstandmaxs;
 vec3_t cl_playercrouchmins;
 vec3_t cl_playerstandmins;
 vec3_t cl_playerstandmaxs;
 vec3_t cl_playercrouchmins;
@@ -1010,7 +1012,7 @@ static void CL_RelinkNetworkEntities(void)
        ent->state_current.modelindex = cl.stats[STAT_WEAPON];
        ent->state_current.frame = cl.stats[STAT_WEAPONFRAME];
        ent->state_current.flags = RENDER_VIEWMODEL;
        ent->state_current.modelindex = cl.stats[STAT_WEAPON];
        ent->state_current.frame = cl.stats[STAT_WEAPONFRAME];
        ent->state_current.flags = RENDER_VIEWMODEL;
-       if (cl.stats[STAT_HEALTH] <= 0 || cl.intermission)
+       if ((cl.stats[STAT_HEALTH] <= 0 && cl_deathnoviewmodel.integer) || cl.intermission)
                ent->state_current.modelindex = 0;
        else if (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
        {
                ent->state_current.modelindex = 0;
        else if (cl.stats[STAT_ITEMS] & IT_INVISIBILITY)
        {
@@ -1465,6 +1467,8 @@ void CL_Init (void)
 
        Cvar_RegisterVariable(&cl_prydoncursor);
 
 
        Cvar_RegisterVariable(&cl_prydoncursor);
 
+       Cvar_RegisterVariable(&cl_deathnoviewmodel);
+
        Cmd_AddCommand("timerefresh", CL_TimeRefresh_f);
 
        CL_Parse_Init();
        Cmd_AddCommand("timerefresh", CL_TimeRefresh_f);
 
        CL_Parse_Init();