From 53e4b1efb049966ca881a4d7285908d3bceb26f8 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Thu, 18 Nov 2010 23:10:36 +0200 Subject: [PATCH] nerf the damage flash (same amount of damage now raises alpha by half the amount it used to), allow coloring the gentle flash with a custom color --- defaultXonotic.cfg | 7 ++++--- qcsrc/client/View.qc | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index ee4658857..671cd055f 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1369,13 +1369,14 @@ seta hud_showbinds_limit 2 "maximum number of bound keys to show for a command. seta hud_damage 1 "an improved version of gl_polyblend, draw an image instead when hurt" seta hud_damage_gentle_alpha_multiplier 0.25 "how much to multiply alpha of flash when using the cl_gentle version, it's much more opaque than the non-gentle version" +seta hud_damage_gentle_color "1 0.7 1" "color of flash for cl_gentle version" seta hud_damage_color "1 0 0" "color of flash" -seta hud_damage_factor 0.05 "(damage * factor) = how much to add to the alpha value" +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 "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 50 "at which health we start lowering pain_treshold" +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" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 87891a034..0e23e38cc 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -721,7 +721,7 @@ void CSQC_UpdateView(float w, float h) } } else - myhealth_gentlergb = '1 0.7 1'; + myhealth_gentlergb = stov(cvar_string("hud_damage_gentle_color")); drawfill('0 0 0', eX * vid_conwidth + eY * vid_conheight, myhealth_gentlergb, cvar("hud_damage_gentle_alpha_multiplier") * bound(0, myhealth_flash_temp, 1), DRAWFLAG_NORMAL); } -- 2.39.2