mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-17 10:10:23 +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);
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user