From: terencehill Date: Sun, 18 Jun 2017 11:27:42 +0000 (+0200) Subject: Don't automatically enable dynamic HUD effects on frame start; it fixes fullscreen... X-Git-Tag: xonotic-v0.8.5~2725 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4e88dc587eea024b35c84065a22cc4d9baa05c4e;p=xonotic%2Fxonotic-data.pk3dir.git Don't automatically enable dynamic HUD effects on frame start; it fixes fullscreen overlay when frozen being unintentionally set dynamic. --- diff --git a/qcsrc/client/hud/hud.qc b/qcsrc/client/hud/hud.qc index 36de6b3f1..118483f76 100644 --- a/qcsrc/client/hud/hud.qc +++ b/qcsrc/client/hud/hud.qc @@ -490,8 +490,6 @@ void calc_followmodel_ofs(entity view); void Hud_Dynamic_Frame() { vector ofs = '0 0 0'; - hud_scale = '1 1 0'; - hud_shift = '0 0 0'; if (autocvar_hud_dynamic_follow) { entity view = CSQCModel_server2csqc(player_localentnum - 1); @@ -508,12 +506,12 @@ void Hud_Dynamic_Frame() ofs.y = bound(-0.1, ofs.y, 0.1); ofs.z = bound(-0.1, ofs.z, 0.1); - hud_shift.x = ofs.y * vid_conwidth; - hud_shift.y = ofs.z * vid_conheight; - hud_shift.z = ofs.x; + hud_shift_current.x = ofs.y * vid_conwidth; + hud_shift_current.y = ofs.z * vid_conheight; + hud_shift_current.z = ofs.x; - hud_scale.x = (1 + hud_shift.z); - hud_scale.y = hud_scale.x; + hud_scale_current.x = (1 + hud_shift_current.z); + hud_scale_current.y = hud_scale_current.x; } if(autocvar_hud_dynamic_shake > 0) @@ -550,16 +548,15 @@ void Hud_Dynamic_Frame() if(hud_dynamic_shake_factor > 0) { - hud_shift.x += hud_dynamic_shake_realofs.x; - hud_shift.y += hud_dynamic_shake_realofs.y; + hud_shift_current.x += hud_dynamic_shake_realofs.x; + hud_shift_current.y += hud_dynamic_shake_realofs.y; } } hud_scale_center.x = 0.5 * vid_conwidth; hud_scale_center.y = 0.5 * vid_conheight; - hud_scale_current = hud_scale; - hud_shift_current = hud_shift; + HUD_Scale_Disable(); } void HUD_Main() diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 9f0f4e7bf..444b33ec4 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -169,9 +169,9 @@ vector cl_followmodel_ofs; float cl_followmodel_time; vector hud_scale; -vector hud_scale_current; +vector hud_scale_current = '1 1 0'; vector hud_shift; -vector hud_shift_current; +vector hud_shift_current = '0 0 0'; vector hud_scale_center; float stringwidth_colors(string s, vector theSize);