]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix some things with the sharpen effect
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 01:13:36 +0000 (03:13 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 26 Feb 2011 01:13:36 +0000 (03:13 +0200)
data/defaultVoretournament.cfg
data/qcsrc/client/View.qc

index 984d53b46868d40596585a2f4be4425bf3db9209..4143405054726ccfa0548b58809c782560bdcf63 100644 (file)
@@ -1082,6 +1082,7 @@ seta hud_damage_pain_threshold_lower 1.5 "how much we lower pain_threshold with
 seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"\r
 seta hud_damage_pain_threshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"\r
 seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"\r
+seta hud_powerup 0.5 "power of the sharpen effect when owning the shield or strength powerups"\r
 \r
 seta hud_stomach 0.65 "displays a splash on the screen when inside the stomach, value specifies alpha"\r
 seta hud_stomach_color "0.75 1 0" "color of the stomach screen splash"\r
@@ -1091,7 +1092,6 @@ seta hud_stomach_fade_out 0.03 "how quickly the stomach splash disappears when y
 seta hud_postprocessing 1 "enables the ability for effects such as hud_damage_blur and hud_contents to apply a postprocessing method upon the screen - enabling this disables manual editing of the postprocess cvars"\r
 seta hud_postprocessing_maxbluralpha 0.5 "maximum alpha which the blur postprocess can be"\r
 seta hud_postprocessing_maxblurradius 10 "maximum radius which the blur postprocess can be"\r
-seta hud_postprocessing_maxsharpenalpha 0.75 "maximum alpha which the sharpen postprocess can be"\r
 \r
 seta hud_contents 1 "an improved version of gl_polyblend for liquids such as water/lava/slime, draw a filler when inside the liquid"\r
 seta hud_contents_factor 1 "factor at which to multiply the current faded value."\r
index aabe319c0fa1f876509b8cbb508b7407432cacf2..73a9f4da8d10a52848c3f8d93bd83d1ab35afbf5 100644 (file)
@@ -635,18 +635,18 @@ void CSQC_UpdateView(float w, float h)
                        cvar_set("r_glsl_postprocess_uservec1_enable", "0");\r
                }\r
 \r
-               if(cvar("hud_postprocessing_maxsharpenalpha"))\r
+               if(cvar("hud_powerup"))\r
                {\r
                        float sharpen_intensity;\r
                        if (getstatf(STAT_STRENGTH_FINISHED) - time > 0)\r
                                sharpen_intensity += (getstatf(STAT_STRENGTH_FINISHED) - time);\r
                        if (getstatf(STAT_INVINCIBLE_FINISHED) - time > 0)\r
                                sharpen_intensity += (getstatf(STAT_INVINCIBLE_FINISHED) - time);\r
-                       sharpen_intensity = bound(0, sharpen_intensity, 5); // powerup warning time is 5 seconds, so match it\r
+                       sharpen_intensity = bound(0, sharpen_intensity, 5); // powerup warning time is 5 seconds, so fade the effect from there\r
 \r
                        if(sharpen_intensity > 0)\r
                        {\r
-                               cvar_set("r_glsl_postprocess_uservec2", strcat("1 ", ftos(-sharpen_intensity * cvar("hud_postprocessing_maxsharpenalpha")), " 0 0"));\r
+                               cvar_set("r_glsl_postprocess_uservec2", strcat("0 ", ftos(-sharpen_intensity * cvar("hud_powerup")), " 0 0"));\r
                                cvar_set("r_glsl_postprocess_uservec2_enable", "1");\r
                        }\r
                        else\r
@@ -663,7 +663,7 @@ void CSQC_UpdateView(float w, float h)
                cvar_set("r_glsl_postprocess_uservec1", "0 0 0 0");\r
                cvar_set("r_glsl_postprocess_uservec1_enable", "0");\r
        }\r
-       if not(cvar("hud_postprocessing_maxsharpenalpha") && cvar("hud_postprocessing"))\r
+       if not(cvar("hud_powerup") && cvar("hud_postprocessing"))\r
        {\r
                // don't allow sharpen to get stuck on if we disable the cvar while powered up\r
                cvar_set("r_glsl_postprocess_uservec2", "0 0 0 0");\r