From: terencehill Date: Sat, 29 Jan 2022 00:04:55 +0000 (+0100) Subject: Fix #2657 "Arc beam does not follow player direction in 3rd person if cl_lockview... X-Git-Tag: xonotic-v0.8.5~224 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=899b1fdc0b5d7532d0f98c2f5fb8683793a9bfde;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2657 "Arc beam does not follow player direction in 3rd person if cl_lockview is 1" --- diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 7c2ab081c..73198a7a4 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -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];