From a3ab8dfbb44aef52e895e8746e525d82519799b5 Mon Sep 17 00:00:00 2001 From: elsid Date: Thu, 28 Jan 2021 12:48:19 +0000 Subject: [PATCH] Revert "Merge branch 'movement_fix2' into 'master'" This reverts merge request !496 --- apps/openmw/mwmechanics/pathfinding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwmechanics/pathfinding.cpp b/apps/openmw/mwmechanics/pathfinding.cpp index 595f9d629c..276321b81a 100644 --- a/apps/openmw/mwmechanics/pathfinding.cpp +++ b/apps/openmw/mwmechanics/pathfinding.cpp @@ -309,7 +309,7 @@ namespace MWMechanics if (mPath.size() > 1 && isAlmostStraight(position, mPath[0], mPath[1], pointTolerance)) mPath.pop_front(); - if (mPath.size() == 1 && (mPath.front() - position).length2() < destinationTolerance * destinationTolerance) + if (mPath.size() == 1 && sqrDistanceIgnoreZ(mPath.front(), position) < destinationTolerance * destinationTolerance) mPath.pop_front(); }