]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2657 "Arc beam does not follow player direction in 3rd person if cl_lockview...
authorterencehill <piuntn@gmail.com>
Sat, 29 Jan 2022 00:04:55 +0000 (01:04 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 29 Jan 2022 00:04:55 +0000 (01:04 +0100)
qcsrc/common/weapons/weapon/arc.qc

index 7c2ab081cf07e55f9248e22d699ef4d725b2bcf0..73198a7a40dff82766009c2f4514725785664f95 100644 (file)
@@ -938,7 +938,14 @@ void Draw_ArcBeam(entity this)
                // into a weapon system for client code.
 
                // find where we are aiming
-               vector myviewangle = ((autocvar_chase_active) ? warpzone_save_view_angles : view_angles);
+               vector myviewangle = view_angles;
+               if (autocvar_chase_active)
+               {
+                       if (autocvar_cl_lockview)
+                               myviewangle = eX * csqcplayer.v_angle.x + eY * csqcplayer.angles.y;
+                       else
+                               myviewangle = warpzone_save_view_angles;
+               }
                vector forward, right, up;
                MAKE_VECTORS(myviewangle, forward, right, up);
                entity wepent = viewmodels[this.beam_slot];