mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-25 22:10:41 -04:00
Merge branch 'movement_fix2' into 'master'
Fix bug: NPCs don't move if the target is exactly above or exactly below. See merge request OpenMW/openmw!496
This commit is contained in:
commit
f917037ead
@ -309,7 +309,7 @@ namespace MWMechanics
|
|||||||
if (mPath.size() > 1 && isAlmostStraight(position, mPath[0], mPath[1], pointTolerance))
|
if (mPath.size() > 1 && isAlmostStraight(position, mPath[0], mPath[1], pointTolerance))
|
||||||
mPath.pop_front();
|
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();
|
mPath.pop_front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user