1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Check for hidden path only for actors wandering manually

Actors who doesn't wander over pathgrid.
This commit is contained in:
elsid 2020-05-16 16:26:39 +02:00
parent e616188265
commit 489a92de95
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

@ -292,7 +292,8 @@ namespace MWMechanics
completeManualWalking(actor, storage);
}
if (storage.mState == AiWanderStorage::Wander_Walking
if (storage.mIsWanderingManually
&& storage.mState == AiWanderStorage::Wander_Walking
&& (mPathFinder.getPathSize() == 0
|| isDestinationHidden(actor, mPathFinder.getPath().back())
|| isAreaOccupiedByOtherActor(actor, mPathFinder.getPath().back())))