From: FruitieX Date: Thu, 18 Nov 2010 21:36:45 +0000 (+0200) Subject: set pain_threshold_health back at 50. And s/treshold/threshold/g X-Git-Tag: xonotic-v0.1.0preview~119^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1d85ceb3d18b156174176e795d2737fca9c46125;p=xonotic%2Fxonotic-data.pk3dir.git set pain_threshold_health back at 50. And s/treshold/threshold/g --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 671cd055f..72a1ded11 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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 diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 0e23e38cc..82a45b713 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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(); }