]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/View.qc
use dmg_take, tweak two values to make the effect a bit more visible at hud_damage 1
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / View.qc
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;