From daad8d985963786242782bd72c7527aa02059006 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 16 Jan 2013 18:03:39 -0800 Subject: [PATCH] Don't update the character controller while paused --- apps/openmw/mwmechanics/actors.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 749fb26654..101a0a51d5 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -260,16 +260,18 @@ namespace MWMechanics } } - std::vector > movement; - for(PtrControllerMap::iterator iter(mActors.begin());iter != mActors.end();++iter) + if(!paused) { - iter->second.update(duration); - Ogre::Vector3 vector = MWWorld::Class::get(iter->first).getMovementVector(iter->first); - if(vector!=Ogre::Vector3::ZERO) - movement.push_back(std::make_pair(iter->first.getRefData().getHandle(), vector)); - } - if (!paused) + std::vector > movement; + for(PtrControllerMap::iterator iter(mActors.begin());iter != mActors.end();++iter) + { + iter->second.update(duration); + Ogre::Vector3 vector = MWWorld::Class::get(iter->first).getMovementVector(iter->first); + if(vector!=Ogre::Vector3::ZERO) + movement.push_back(std::make_pair(iter->first.getRefData().getHandle(), vector)); + } MWBase::Environment::get().getWorld()->doPhysics (movement, duration); + } } void Actors::restoreDynamicStats()