]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
set pain_threshold_health back at 50. And s/treshold/threshold/g
authorFruitieX <fruitiex@gmail.com>
Thu, 18 Nov 2010 21:36:45 +0000 (23:36 +0200)
committerFruitieX <fruitiex@gmail.com>
Thu, 18 Nov 2010 21:36:45 +0000 (23:36 +0200)
defaultXonotic.cfg
qcsrc/client/View.qc

index 671cd055f0059cd011a31ac56c50ec36562b90d3..72a1ded11efc7d975ac1693cb205fae2f9497ccb 100644 (file)
@@ -1374,11 +1374,11 @@ seta hud_damage_color "1 0 0" "color of flash"
 seta hud_damage_factor 0.025 "(damage * factor) = how much to add to the alpha value"
 seta hud_damage_fade_rate 1 "how much to subtract from the alpha value each second"
 seta hud_damage_maxalpha 2 "how much to limit the alpha value to"
-seta hud_damage_pain_treshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
-seta hud_damage_pain_treshold_lower 1.25 "how much we lower pain_treshold with when nearing 0 health (if pain_treshold gets negative then we always draw a flash at alpha = fabs(pain_treshold)"
-seta hud_damage_pain_treshold_lower_health 70 "at which health we start lowering pain_treshold"
-seta hud_damage_pain_treshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"
-seta hud_damage_pain_treshold_pulsating_period 0.8 "one pulse every X seconds"
+seta hud_damage_pain_threshold 0.1 "how much alpha to ignore (must be bigger than the hud_damage_factor so that e.g. rot is ignored)"
+seta hud_damage_pain_threshold_lower 1.25 "how much we lower pain_threshold with when nearing 0 health (if pain_threshold gets negative then we always draw a flash at alpha = fabs(pain_threshold)"
+seta hud_damage_pain_threshold_lower_health 50 "at which health we start lowering pain_threshold"
+seta hud_damage_pain_threshold_pulsating_min 0.6 "minimum value when calculating the pulse: max(pulsating_min, fabs(sin(PI * time / period))"
+seta hud_damage_pain_threshold_pulsating_period 0.8 "one pulse every X seconds"
 
 // scoreboard
 seta scoreboard_columns default
index 0e23e38cce6ed352e4835daf02e88c07f10ce116..82a45b7138f707cac89ca81e89054827505b6bbf 100644 (file)
@@ -678,17 +678,17 @@ void CSQC_UpdateView(float w, float h)
                // add new damage
                myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * cvar("hud_damage_factor"), cvar("hud_damage_maxalpha"));
 
-               float pain_treshold, pain_treshold_lower, pain_treshold_lower_health;
-               pain_treshold = cvar("hud_damage_pain_treshold");
-               pain_treshold_lower = cvar("hud_damage_pain_treshold_lower");
-               pain_treshold_lower_health = cvar("hud_damage_pain_treshold_lower_health");
+               float pain_threshold, pain_threshold_lower, pain_threshold_lower_health;
+               pain_threshold = cvar("hud_damage_pain_threshold");
+               pain_threshold_lower = cvar("hud_damage_pain_threshold_lower");
+               pain_threshold_lower_health = cvar("hud_damage_pain_threshold_lower_health");
 
-               if(pain_treshold_lower && myhealth < pain_treshold_lower_health)
+               if(pain_threshold_lower && myhealth < pain_threshold_lower_health)
                {
-                       pain_treshold = pain_treshold - max(cvar("hud_damage_pain_treshold_pulsating_min"), fabs(sin(M_PI * time / cvar("hud_damage_pain_treshold_pulsating_period")))) * pain_treshold_lower * (1 - max(0, myhealth)/pain_treshold_lower_health);
+                       pain_threshold = pain_threshold - max(cvar("hud_damage_pain_threshold_pulsating_min"), fabs(sin(M_PI * time / cvar("hud_damage_pain_threshold_pulsating_period")))) * pain_threshold_lower * (1 - max(0, myhealth)/pain_threshold_lower_health);
                }
 
-               myhealth_flash_temp = bound(0, myhealth_flash - pain_treshold, 1);
+               myhealth_flash_temp = bound(0, myhealth_flash - pain_threshold, 1);
 
                if(myhealth_prev < 1)
                {
@@ -715,7 +715,7 @@ void CSQC_UpdateView(float w, float h)
                {
                        if(autocvar_cl_gentle_damage == 2)
                        {
-                               if(myhealth_flash < pain_treshold) // only randomize when the flash is gone
+                               if(myhealth_flash < pain_threshold) // only randomize when the flash is gone
                                {
                                        myhealth_gentlergb = eX * random() + eY * random() + eZ * random();
                                }