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

Remove duplicate zTurn call

This commit is contained in:
elsid 2018-08-18 18:41:48 +03:00
parent d0bc1b75e8
commit 1a95b7a154
No known key found for this signature in database
GPG key ID: B845CB9FEE18AB40
2 changed files with 3 additions and 5 deletions

View file

@ -189,7 +189,7 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
mObstacleCheck.update(actor, duration);
// handle obstacles on the way
evadeObstacles(actor, pos);
evadeObstacles(actor);
// turn to next path point by X,Z axes
zTurn(actor, mPathFinder.getZAngleToNext(pos.pos[0], pos.pos[1]));
@ -198,10 +198,8 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
return false;
}
void MWMechanics::AiPackage::evadeObstacles(const MWWorld::Ptr& actor, const ESM::Position& pos)
void MWMechanics::AiPackage::evadeObstacles(const MWWorld::Ptr& actor)
{
zTurn(actor, mPathFinder.getZAngleToNext(pos.pos[0], pos.pos[1]));
MWMechanics::Movement& movement = actor.getClass().getMovementSettings(actor);
// check if stuck due to obstacles

View file

@ -124,7 +124,7 @@ namespace MWMechanics
bool doesPathNeedRecalc(const osg::Vec3f& newDest, const MWWorld::CellStore* currentCell);
void evadeObstacles(const MWWorld::Ptr& actor, const ESM::Position& pos);
void evadeObstacles(const MWWorld::Ptr& actor);
void openDoors(const MWWorld::Ptr& actor);