]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
A fix to my last commit. Also set saturation to 0 when dead, for a black & white...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Feb 2013 21:57:44 +0000 (23:57 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 7 Feb 2013 21:57:44 +0000 (23:57 +0200)
data/defaultVT.cfg
data/qcsrc/client/View.qc
data/qcsrc/menu/voret/dialog_settings_effects.c
data/qcsrc/server/cl_client.qc
docs/TODO.txt

index d9e9e1c7aae1fc30cabf7221725356cfa108df14..10c01db47d60b5b937bec358a369bd24d25f863a 100644 (file)
@@ -1189,7 +1189,8 @@ seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"
 seta hud_cartoon 0 "cartoon effect, reverses when you own a powerup, default is 1.5"\r
 seta hud_cartoon_tolerance 0.15 "where to apply the cartoon effect between bright and dark areas"\r
 \r
-seta hud_saturation 0 "saturation changes based on the amount of armor you have"\r
+seta hud_saturation_armor 0 "saturation changes based on the amount of armor you have"\r
+seta hud_saturation_death 0 "black and white vision when dead"\r
 \r
 seta hud_stomach 0.75 "displays a splash on the screen when inside the stomach, value specifies alpha"\r
 seta hud_stomach_color "1 1 0" "color of the stomach screen splash"\r
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
index 1a63722965eb85f8ac7561955d334af7da593407..313f8a1eef301308ba2f90baa4bf7014523512d3 100644 (file)
@@ -164,7 +164,8 @@ void fillVoretEffectsSettingsTab(entity me)
        me.TR(me);\r
                me.TD(me, 1, 1, e = makeVoretCheckBoxEx(1.5, 0, "hud_cartoon", "Cartoon lines"));\r
                me.TD(me, 1, 1, e = makeVoretCheckBoxEx(0.5, 0, "hud_postprocessing_maxbluralpha", "Content blur"));\r
-               me.TD(me, 1, 1, e = makeVoretCheckBox(0, "hud_saturation", "Armor saturation"));\r
+               me.TD(me, 1, 1, e = makeVoretCheckBox(0, "hud_saturation_armor", "Saturation"));\r
+               makeMulti(e, "hud_saturation_death");\r
 \r
        me.gotoRC(me, me.rows - 1, 0);\r
                me.TD(me, 1, me.columns, makeVoretCommandButton("Apply immediately", '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));\r
index e996aa8a1b7d0804f8a9d1e381f977722cde1472..ea0cee0d810fe7c091002cebe5239e6ade066f57 100644 (file)
@@ -2675,6 +2675,7 @@ void PlayerPreThink (void)
 \r
                if(frametime)\r
                {\r
+                       vector glowcolor = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;\r
                        if(self.health <= 0 && cvar("g_deathglow"))\r
                        {\r
                                if(self.glowmod_x > 0)\r
@@ -2693,16 +2694,15 @@ void PlayerPreThink (void)
                        else\r
                        {\r
                                // set weapon and player glowmod\r
-                               self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;\r
+                               self.glowmod = glowcolor;\r
                                if(self.armorvalue < cvar("g_power"))\r
                                        self.glowmod = '-1 -1 -1'; // turn glow off when power is down\r
                                else if(self.armorvalue < cvar("g_armorglow"))\r
-                                       self.glowmod = self.glowmod * (self.armorvalue / cvar("g_armorglow")); // glow intensity reflects armor charge\r
+                                       self.glowmod = glowcolor * (self.armorvalue / cvar("g_armorglow")); // glow intensity reflects armor charge\r
                        }\r
 \r
-                       self.weaponentity_glowmod = self.glowmod;\r
                        if(cvar("g_weaponloadglow") && self.clip_size)\r
-                               self.weaponentity_glowmod = self.weaponentity_glowmod * (self.clip_load / self.clip_size); // glow intensity reflects weapon load\r
+                               self.weaponentity_glowmod = glowcolor * (self.clip_load / self.clip_size); // glow intensity reflects weapon load\r
 \r
                        player_powerups();\r
                }\r
index d31973859f9afbb923e9051de92bb609ccf98a98..c7401f994e941586230ce06eb2619bb5896a5946 100644 (file)
 - 0.8 BUG: At startup, make a script re-set sound and music volume so they're not the last set by vore status in-game\r
 \r
 - 0.8 BUG: Normal grabber shoot seems to play melee animation on player models\r
+\r
+- 0.8: Rename "vore delay" to something more appropriate for the sbar rings\r