From: terencehill Date: Thu, 27 Jul 2017 19:06:47 +0000 (+0200) Subject: tracewalk: fix lava not being checked in the last step X-Git-Tag: xonotic-v0.8.5~2378^2~114 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0f444548d4f8f648aa2804304436099725737bb1;p=xonotic%2Fxonotic-data.pk3dir.git tracewalk: fix lava not being checked in the last step --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index ebf2f6e16..157caf6d3 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -515,12 +515,6 @@ bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float e else move = trace_endpos; - if (flatdist <= 0) - { - org = move; - continue; - } - // trace down from stepheight as far as possible and move there, // if this starts in solid we try again without the stepup, and // if that also fails we assume it is a wall @@ -544,6 +538,13 @@ bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float e } } + if (flatdist <= 0) + { + if(move.z >= end2.z && org.z < end2.z) + org.z = end2.z; + continue; + } + if(org.z > move.z - 1 || !SUBMERGED(org)) { nav_action = NAV_WALK;