From: terencehill Date: Mon, 22 Mar 2021 16:17:26 +0000 (+0100) Subject: Fix #2530 "Observer camera in 3rd person mode with spectate through walls enabled... X-Git-Tag: xonotic-v0.8.5~491 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f0e6d92b3260426a2f5606e74ad6dfd261a4807e;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2530 "Observer camera in 3rd person mode with spectate through walls enabled gets caught on walls" --- diff --git a/qcsrc/lib/csqcmodel/cl_player.qc b/qcsrc/lib/csqcmodel/cl_player.qc index 69c206133..5b35bfa4e 100644 --- a/qcsrc/lib/csqcmodel/cl_player.qc +++ b/qcsrc/lib/csqcmodel/cl_player.qc @@ -486,7 +486,16 @@ vector CSQCPlayer_ApplyChase(entity this, vector v) chase_dest.x = v.x + forward.x * cdist; chase_dest.y = v.y + forward.y * cdist; chase_dest.z = v.z + forward.z * cdist + autocvar_chase_up; - traceline(v, chase_dest, MOVE_NOMONSTERS, NULL); + if (this.move_movetype == MOVETYPE_NOCLIP) + { + // as if traceline hasn't hit anything + trace_endpos = chase_dest; + trace_plane_normal = '0 0 0'; + } + else + { + traceline(v, chase_dest, MOVE_NOMONSTERS, NULL); + } v.x = 1 * trace_endpos.x + 8 * forward.x + 4 * trace_plane_normal.x; 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;