Skip to content

Commit

Permalink
Merge pull request #2679 from elsid/fix_aiwander_start
Browse files Browse the repository at this point in the history
Fix start position for AiWander random point selection (bug #5262)
  • Loading branch information
akortunov committed Jan 29, 2020
2 parents 7dfbeff + 8e0b638 commit 92ea66b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/openmw/mwmechanics/aiwander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 92ea66b

Please sign in to comment.