From: FruitieX Date: Mon, 20 Dec 2010 13:36:37 +0000 (+0200) Subject: use dmg_take, tweak two values to make the effect a bit more visible at hud_damage 1 X-Git-Tag: xonotic-v0.1.0preview~2^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6466744922d3260fd843212f818c7562abf7b43b;p=xonotic%2Fxonotic-data.pk3dir.git use dmg_take, tweak two values to make the effect a bit more visible at hud_damage 1 --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 18ce4a988..464de94ee 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1421,8 +1421,8 @@ seta hud_damage_gentle_alpha_multiplier 0.25 "how much to multiply alpha of flas 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.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_fade_rate 0.75 "how much to subtract from the alpha value each second" +seta hud_damage_maxalpha 1.5 "how much to limit the alpha value to" 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" diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index 2d780381e..88f0a51b0 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -156,7 +156,7 @@ float scoreboard_showaccuracy; // float coop; // float deathmatch; -// float dmg_take; +float dmg_take; // float dmg_save; // vector dmg_origin; diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 908e6dbf1..121488d57 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -676,7 +676,7 @@ void CSQC_UpdateView(float w, float h) // fade out myhealth_flash = max(0, myhealth_flash - autocvar_hud_damage_fade_rate * frametime); // add new damage - myhealth_flash = bound(0, myhealth_flash + max(0, myhealth_prev - myhealth) * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha); + myhealth_flash = bound(0, myhealth_flash + dmg_take * autocvar_hud_damage_factor, autocvar_hud_damage_maxalpha); float pain_threshold, pain_threshold_lower, pain_threshold_lower_health; pain_threshold = autocvar_hud_damage_pain_threshold;