1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 13:53:51 +00:00

Don't consider a path completed unless we're close

This commit is contained in:
Evil Eye 2020-12-25 15:58:11 +01:00
parent a4f6448f34
commit d2a28d915a

View file

@ -158,7 +158,7 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
zTurn(actor, getZAngleToPoint(position, dest)); zTurn(actor, getZAngleToPoint(position, dest));
smoothTurn(actor, getXAngleToPoint(position, dest), 0); smoothTurn(actor, getXAngleToPoint(position, dest), 0);
world->removeActorPath(actor); world->removeActorPath(actor);
return true; return isDestReached;
} }
world->updateActorPath(actor, mPathFinder.getPath(), halfExtents, position, dest); world->updateActorPath(actor, mPathFinder.getPath(), halfExtents, position, dest);