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
}
}
+ 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;