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:
parent
d2f5a886c7
commit
daad8d9859
1 changed files with 10 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue