]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use a tracebox instead of traceline to check if player is flying, it fixes #843 ...
authorterencehill <piuntn@gmail.com>
Thu, 9 Aug 2018 12:24:00 +0000 (14:24 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 9 Aug 2018 12:24:00 +0000 (14:24 +0200)
qcsrc/common/physics/player.qc

index 2f4ebb1ff002c9c37278901d70a4838bb0e043e1..f6ab29715a298c07a7bc9c317d0a69d4d9636298 100644 (file)
@@ -809,7 +809,8 @@ bool IsFlying(entity this)
                return false;
        if(this.waterlevel >= WATERLEVEL_SWIMMING)
                return false;
-       traceline(this.origin, this.origin - '0 0 48', MOVE_NORMAL, this);
+       tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 24', MOVE_NORMAL, this);
+       //traceline(this.origin, this.origin - '0 0 48', MOVE_NORMAL, this);
        if(trace_fraction < 1)
                return false;
        return true;