From: Mario Date: Sat, 28 Dec 2019 11:38:17 +0000 (+1000) Subject: Use new method of getting angle vectors in walljump code, fixes a potential issue... X-Git-Tag: xonotic-v0.8.5~1181 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f62ec684c3aea0cddcd7243fb10455ba3b5c9d27;p=xonotic%2Fxonotic-data.pk3dir.git Use new method of getting angle vectors in walljump code, fixes a potential issue with invalid angles --- 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'; }