1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 07:53:52 +00:00

Don't update the character controller while paused

This commit is contained in:
Chris Robinson 2013-01-16 18:03:39 -08:00
parent d2f5a886c7
commit daad8d9859

View file

@ -260,16 +260,18 @@ namespace MWMechanics
}
}
std::vector<std::pair<std::string, Ogre::Vector3> > 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<std::pair<std::string, Ogre::Vector3> > 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()