mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 13:09:42 +00:00
Reset shorcutting if actor can't move by z-axis on reaction time
If actor was shortcutting because it was swimming, then when it started walking it still be shortcutting, but there will be no new path, because shortcut path builds only for actor able moving by z-axis and pathfinder path only for not shortcutting actor.
This commit is contained in:
parent
92b34e8bb4
commit
7c5bedc35a
1 changed files with 2 additions and 2 deletions
|
@ -132,8 +132,8 @@ bool MWMechanics::AiPackage::pathTo(const MWWorld::Ptr& actor, const osg::Vec3f&
|
|||
const bool actorCanMoveByZ = canActorMoveByZAxis(actor);
|
||||
|
||||
// Prohibit shortcuts for AiWander, if the actor can not move in 3 dimensions.
|
||||
if (actorCanMoveByZ)
|
||||
mIsShortcutting = shortcutPath(position, dest, actor, &destInLOS, actorCanMoveByZ); // try to shortcut first
|
||||
mIsShortcutting = actorCanMoveByZ
|
||||
&& shortcutPath(position, dest, actor, &destInLOS, actorCanMoveByZ); // try to shortcut first
|
||||
|
||||
if (!mIsShortcutting)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue