Fix start position for AiWander random point selection

pull/556/head
elsid 5 years ago
parent 7dfbeff049
commit 8e0b638145
No known key found for this signature in database
GPG Key ID: B845CB9FEE18AB40

@ -330,7 +330,7 @@ namespace MWMechanics
if (!isWaterCreature && !isFlyingCreature)
{
// findRandomPointAroundCircle uses wanderDistance as limit for random and not as exact distance
if (const auto destination = navigator->findRandomPointAroundCircle(halfExtents, currentPosition, wanderDistance, navigatorFlags))
if (const auto destination = navigator->findRandomPointAroundCircle(halfExtents, mInitialActorPosition, wanderDistance, navigatorFlags))
mDestination = *destination;
else
mDestination = getRandomPointAround(mInitialActorPosition, wanderRadius);

Loading…
Cancel
Save