]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't automatically enable dynamic HUD effects on frame start; it fixes fullscreen...
authorterencehill <piuntn@gmail.com>
Sun, 18 Jun 2017 11:27:42 +0000 (13:27 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 18 Jun 2017 11:27:42 +0000 (13:27 +0200)
qcsrc/client/hud/hud.qc
qcsrc/client/hud/hud.qh

index 36de6b3f1622599438eda71ed03222b80ba4e2dd..118483f76104d67f0cf7cea7dcf5ff93ece3f11d 100644 (file)
@@ -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()
index 9f0f4e7bf0e9c5c1c5c77038450f71e435d98744..444b33ec445db4e0cc82e3d459b7c7b0cc32bdb7 100644 (file)
@@ -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);