]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/client/View.qc
A fix to my last commit. Also set saturation to 0 when dead, for a black & white...
[voretournament/voretournament.git] / data / qcsrc / client / View.qc
index 2ef460109ed8c78d161c47090c2d7f7af2296dad..d42a90e4442c3f42a918f311631ddda89d0be3fc 100644 (file)
@@ -970,7 +970,7 @@ void CSQC_UpdateView(float w, float h)
                // change saturation based on the amount of armor we have\r
                // ranges between 0.5 and 1 saturation, over 0 armor and half the armor limit\r
 \r
-               if(cvar("hud_saturation") && armor_max && spectatee_status != -1 && getstati(STAT_HEALTH) > 0)\r
+               if(cvar("hud_saturation_armor") && armor_max && spectatee_status != -1 && getstati(STAT_HEALTH) > 0)\r
                {\r
                        float saturation;\r
                        saturation = 0.5 + (getstati(STAT_ARMOR) / armor_max);\r
@@ -979,6 +979,11 @@ void CSQC_UpdateView(float w, float h)
                        if(cvar("r_glsl_saturation") != saturation)\r
                                cvar_set("r_glsl_saturation", ftos(saturation));\r
                }\r
+               else if (cvar("hud_saturation_death") && getstati(STAT_HEALTH) <= 0)\r
+               {\r
+                       if(cvar("r_glsl_saturation") != 0)\r
+                               cvar_set("r_glsl_saturation", "0");\r
+               }\r
                else if(cvar("r_glsl_saturation") != 1)\r
                        cvar_set("r_glsl_saturation", "1");\r
        }\r