mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 23:23:52 +00:00
Remove duplicate zTurn call
This commit is contained in:
parent
d0bc1b75e8
commit
1a95b7a154
2 changed files with 3 additions and 5 deletions
|
@ -189,7 +189,7 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
|
||||||
mObstacleCheck.update(actor, duration);
|
mObstacleCheck.update(actor, duration);
|
||||||
|
|
||||||
// handle obstacles on the way
|
// handle obstacles on the way
|
||||||
evadeObstacles(actor, pos);
|
evadeObstacles(actor);
|
||||||
|
|
||||||
// turn to next path point by X,Z axes
|
// turn to next path point by X,Z axes
|
||||||
zTurn(actor, mPathFinder.getZAngleToNext(pos.pos[0], pos.pos[1]));
|
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;
|
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);
|
MWMechanics::Movement& movement = actor.getClass().getMovementSettings(actor);
|
||||||
|
|
||||||
// check if stuck due to obstacles
|
// check if stuck due to obstacles
|
||||||
|
|
|
@ -124,7 +124,7 @@ namespace MWMechanics
|
||||||
|
|
||||||
bool doesPathNeedRecalc(const osg::Vec3f& newDest, const MWWorld::CellStore* currentCell);
|
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);
|
void openDoors(const MWWorld::Ptr& actor);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue