From 6466744922d3260fd843212f818c7562abf7b43b Mon Sep 17 00:00:00 2001 From: FruitieX Date: Mon, 20 Dec 2010 15:36:37 +0200 Subject: [PATCH] use dmg_take, tweak two values to make the effect a bit more visible at hud_damage 1 --- defaultXonotic.cfg | 4 ++-- qcsrc/client/Defs.qc | 2 +- qcsrc/client/View.qc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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; -- 2.39.2