]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use new method of getting angle vectors in walljump code, fixes a potential issue...
authorMario <mario.mario@y7mail.com>
Sat, 28 Dec 2019 11:38:17 +0000 (21:38 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 28 Dec 2019 11:38:29 +0000 (21:38 +1000)
qcsrc/common/mutators/mutator/walljump/walljump.qc

index c462a7e2b7c869398e733019a107f69049d16472..46e18059c8a8dba9f9f8e71433d14950ad9476f7 100644 (file)
@@ -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';
 }