mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 03:32:36 +00:00
Stop wandering when destination is hidden or occupied by other actor
This commit is contained in:
parent
4a0c056489
commit
9404b1dd72
@ -293,6 +293,11 @@ namespace MWMechanics
|
|||||||
completeManualWalking(actor, storage);
|
completeManualWalking(actor, storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wanderState == AiWanderStorage::Wander_Walking
|
||||||
|
&& (isDestinationHidden(actor, mPathFinder.getPath().back())
|
||||||
|
|| isAreaOccupiedByOtherActor(actor, mPathFinder.getPath().back())))
|
||||||
|
completeManualWalking(actor, storage);
|
||||||
|
|
||||||
return false; // AiWander package not yet completed
|
return false; // AiWander package not yet completed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user