1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 00:45:32 +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
}