Remove duplicate zTurn call

pull/541/head
elsid 6 years ago
parent d0bc1b75e8
commit 1a95b7a154
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -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

@ -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);

Loading…
Cancel
Save