]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
avoid using broken globals in g_walljump, should fix #2313 martin-t/walljump
authorMartin Taibr <taibr.martin@gmail.com>
Sun, 20 Oct 2019 15:29:57 +0000 (17:29 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Sun, 20 Oct 2019 15:29:57 +0000 (17:29 +0200)
qcsrc/common/mutators/mutator/walljump/walljump.qc

index c462a7e2b7c869398e733019a107f69049d16472..519159d917b386b9488261845caeed486f4f378c 100644 (file)
@@ -23,10 +23,12 @@ vector PlayerTouchWall(entity this)
 
        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)
+       vector forward, right, _up;
+       MAKE_VECTORS(this.angles, forward, right, _up);
+       TRACE(start + forward * scaler)
+       TRACE(start - forward * scaler)
+       TRACE(start + right * scaler)
+       TRACE(start - right * scaler)
 #undef TRACE
        return '0 0 0';
 }