diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index b356c6e7d..440814fb7 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -67,7 +67,7 @@ namespace MWMechanics AiWander::WanderState mState; unsigned short mIdleAnimation; - std::vector mBadIdles; //Idle animations that when called cause errors + std::vector mBadIdles; // Idle animations that when called cause errors PathFinder mPathFinder; @@ -393,16 +393,13 @@ namespace MWMechanics short unsigned& idleAnimation = storage.mIdleAnimation; idleAnimation = getRandomIdle(); - // If we should be moving if (!idleAnimation && mDistance) { storage.mState = Wander_MoveNow; return; } - // If we aren't going to just stand if(idleAnimation) { - // If the idle animation actually exists if(std::find(storage.mBadIdles.begin(), storage.mBadIdles.end(), idleAnimation)==storage.mBadIdles.end()) { if(!playIdle(actor, idleAnimation)) @@ -416,7 +413,6 @@ namespace MWMechanics // Recreate vanilla (broken?) behavior of resetting start time of AIWander: mStartTime = MWBase::Environment::get().getWorld()->getTimeStamp(); storage.mState = Wander_IdleNow; - return; } void AiWander::evadeObstacles(const MWWorld::Ptr& actor, AiWanderStorage& storage, float duration)