1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-17 01:10:10 +00:00

Stop wandering when destination is hidden or occupied by other actor

This commit is contained in:
elsid 2020-02-09 18:37:24 +01:00
parent 4a0c056489
commit 9404b1dd72
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -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
}