]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
use dmg_take, tweak two values to make the effect a bit more visible at hud_damage 1
authorFruitieX <fruitiex@gmail.com>
Mon, 20 Dec 2010 13:36:37 +0000 (15:36 +0200)
committerFruitieX <fruitiex@gmail.com>
Mon, 20 Dec 2010 13:36:37 +0000 (15:36 +0200)
defaultXonotic.cfg
qcsrc/client/Defs.qc
qcsrc/client/View.qc

index 18ce4a988194079a8b0ef0368ea96a8a1401ae92..464de94eee9f22c3d69234d58538a56b68997ff6 100644 (file)
@@ -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"
index 2d780381eedced49f15c67549f6455c535ae3a67..88f0a51b0673e17f6984e4b27bf673ad0b5f3a5b 100644 (file)
@@ -156,7 +156,7 @@ float               scoreboard_showaccuracy;
 // float               coop;
 // float               deathmatch;
 
-// float               dmg_take;
+float          dmg_take;
 // float               dmg_save;
 // vector              dmg_origin;
 
index 908e6dbf17fbc63b9cff14daa7e4d7f49d0866da..121488d57d1225313c23a92601e27a15bf89b4fb 100644 (file)
@@ -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;