mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 18:39:59 +00:00
Remove useless else
This commit is contained in:
parent
c9f3064cbd
commit
63b3a70ca8
@ -178,21 +178,19 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
|
||||
smoothTurn(actor, getXAngleToPoint(start, dest), 0);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
||||
if (mRotateOnTheRunChecks == 0
|
||||
|| isReachableRotatingOnTheRun(actor, *mPathFinder.getPath().begin())) // to prevent circling around a path point
|
||||
{
|
||||
if (mRotateOnTheRunChecks == 0
|
||||
|| isReachableRotatingOnTheRun(actor, *mPathFinder.getPath().begin())) // to prevent circling around a path point
|
||||
{
|
||||
actor.getClass().getMovementSettings(actor).mPosition[1] = 1; // move to the target
|
||||
if (mRotateOnTheRunChecks > 0) mRotateOnTheRunChecks--;
|
||||
}
|
||||
|
||||
mObstacleCheck.update(actor, duration);
|
||||
|
||||
// handle obstacles on the way
|
||||
evadeObstacles(actor, pos);
|
||||
actor.getClass().getMovementSettings(actor).mPosition[1] = 1; // move to the target
|
||||
if (mRotateOnTheRunChecks > 0) mRotateOnTheRunChecks--;
|
||||
}
|
||||
|
||||
mObstacleCheck.update(actor, duration);
|
||||
|
||||
// handle obstacles on the way
|
||||
evadeObstacles(actor, pos);
|
||||
|
||||
// turn to next path point by X,Z axes
|
||||
zTurn(actor, mPathFinder.getZAngleToNext(pos.pos[0], pos.pos[1]));
|
||||
smoothTurn(actor, mPathFinder.getXAngleToNext(pos.pos[0], pos.pos[1], pos.pos[2]), 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user