From: terencehill Date: Sat, 26 Mar 2016 22:55:27 +0000 (+0100) Subject: 1 1 1" "HUD following scale for the x, y and z axis" X-Git-Tag: xonotic-v0.8.2~882^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4c5c55d15ec9ac8d7a6e3575643d3aa7be612df7;p=xonotic%2Fxonotic-data.pk3dir.git 1 1 1" "HUD following scale for the x, y and z axis" --- diff --git a/_hud_common.cfg b/_hud_common.cfg index 90a363f7a..0b9ecc068 100644 --- a/_hud_common.cfg +++ b/_hud_common.cfg @@ -65,6 +65,7 @@ seta hud_panel_update_interval 2 "how often (in seconds) common panel cvars are seta hud_dynamic_follow 1 "HUD moves around following player's movement (effect shared with cl_followmodel, can be enabled independently from it though)" seta hud_dynamic_follow_scale 0.01 "HUD following scale" +seta hud_dynamic_follow_scale_xyz "1 1 1" "HUD following scale for the x, y and z axis" seta hud_dynamic_shake 1 "shake the HUD when hurt" seta hud_dynamic_shake_damage_max 90 "damage value at which the HUD shake effect is maximum" diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index 6c245d0d1..795b84998 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -505,6 +505,9 @@ void Hud_Dynamic_Frame() entity view = CSQCModel_server2csqc(player_localentnum - 1); calc_followmodel_ofs(view); ofs = -cl_followmodel_ofs * autocvar_hud_dynamic_follow_scale; + ofs.x *= autocvar_hud_dynamic_follow_scale_xyz.z; + ofs.y *= autocvar_hud_dynamic_follow_scale_xyz.x; + ofs.z *= autocvar_hud_dynamic_follow_scale_xyz.y; if (fabs(ofs.x) < 0.001) ofs.x = 0; if (fabs(ofs.y) < 0.001) ofs.y = 0; diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 4b1265689..0217b1861 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -164,6 +164,7 @@ float current_player; float autocvar_hud_dynamic_follow; float autocvar_hud_dynamic_follow_scale; +vector autocvar_hud_dynamic_follow_scale_xyz; vector hud_dynamic_shake_realofs; float hud_dynamic_shake_factor;