1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 12:39:55 +00:00

Do not allow wandering actor to have empty path

This commit is contained in:
elsid 2020-05-16 16:07:17 +02:00
parent 71350c6dff
commit e616188265
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

View File

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