From f62ec684c3aea0cddcd7243fb10455ba3b5c9d27 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 28 Dec 2019 21:38:17 +1000 Subject: [PATCH] Use new method of getting angle vectors in walljump code, fixes a potential issue with invalid angles --- qcsrc/common/mutators/mutator/walljump/walljump.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/mutators/mutator/walljump/walljump.qc b/qcsrc/common/mutators/mutator/walljump/walljump.qc index c462a7e2b..46e18059c 100644 --- a/qcsrc/common/mutators/mutator/walljump/walljump.qc +++ b/qcsrc/common/mutators/mutator/walljump/walljump.qc @@ -21,12 +21,15 @@ vector PlayerTouchWall(entity this) if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) \ return trace_plane_normal; + vector forward, right, up; + MAKE_VECTORS(this.angles, forward, right, up); + float dist = 10, max_normal = 0.2, scaler = 100; vector start = this.origin; - TRACE(start + v_forward * scaler) - TRACE(start - v_forward * scaler) - TRACE(start + v_right * scaler) - TRACE(start - v_right * scaler) + TRACE(start + forward * scaler) + TRACE(start - forward * scaler) + TRACE(start + right * scaler) + TRACE(start - right * scaler) #undef TRACE return '0 0 0'; } -- 2.39.2