1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Fix bug: NPCs doesn't move if the target is exactly above or exactly below.

This commit is contained in:
Petr Mikheev 2020-12-24 04:18:39 +01:00
parent cadd1e7529
commit bc2cec86e9

View file

@ -309,7 +309,7 @@ namespace MWMechanics
if (mPath.size() > 1 && isAlmostStraight(position, mPath[0], mPath[1], pointTolerance))
mPath.pop_front();
if (mPath.size() == 1 && sqrDistanceIgnoreZ(mPath.front(), position) < destinationTolerance * destinationTolerance)
if (mPath.size() == 1 && (mPath.front() - position).length2() < destinationTolerance * destinationTolerance)
mPath.pop_front();
}