]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable chase_front while observing, it doesn't make any sense
authorterencehill <piuntn@gmail.com>
Mon, 22 Mar 2021 16:15:07 +0000 (17:15 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 22 Mar 2021 16:15:07 +0000 (17:15 +0100)
qcsrc/lib/csqcmodel/cl_player.qc

index 15d9d279889ea215d90afc24178f385269a7c161..69c206133f4b4e71b20e0e460b1c6484ce474a5f 100644 (file)
@@ -479,7 +479,7 @@ vector CSQCPlayer_ApplyChase(entity this, vector v)
        {
                makevectors(view_angles);
                forward = v_forward;
-               if(autocvar_chase_front)
+               if(autocvar_chase_front && spectatee_status != -1)
                        forward = normalize(forward * -1);
                // trace a little further so it hits a surface more consistently (to avoid 'snapping' on the edge of the range)
                float cdist = -autocvar_chase_back - 8;
@@ -491,7 +491,7 @@ vector CSQCPlayer_ApplyChase(entity this, vector v)
                v.y = 1 * trace_endpos.y + 8 * forward.y + 4 * trace_plane_normal.y;
                v.z = 1 * trace_endpos.z + 8 * forward.z + 4 * trace_plane_normal.z;
 
-               if(autocvar_chase_front)
+               if(autocvar_chase_front && spectatee_status != -1)
                {
                        // now flip the view so the player is looking at themselves
                        vector newang = vectoangles(forward);