From: terencehill Date: Sat, 11 Jun 2016 22:16:20 +0000 (+0200) Subject: Don't shake the hud when changing spectated player X-Git-Tag: xonotic-v0.8.2~805^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8879e39a219031ffcf8e427fa4f8610163753053;p=xonotic%2Fxonotic-data.pk3dir.git Don't shake the hud when changing spectated player --- diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index c87cb5a89..ee1000755 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -446,12 +446,15 @@ void Hud_Dynamic_Frame() if(autocvar_hud_dynamic_shake > 0) { + static float old_health = 0; + float health = max(-1, STAT(HEALTH)); if(hud_dynamic_shake_factor == -1) // don't allow the effect for this frame + { hud_dynamic_shake_factor = 0; + old_health = health; + } else { - static float old_health = 0; - float health = max(-1, STAT(HEALTH)); float new_hud_dynamic_shake_factor = 0; if (old_health - health >= autocvar_hud_dynamic_shake_damage_min && autocvar_hud_dynamic_shake_damage_max > autocvar_hud_dynamic_shake_damage_min