mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 10:21:09 +00:00
call doPhysics function once per frame
This commit is contained in:
parent
88b0908104
commit
40d772b33a
@ -179,6 +179,8 @@ bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt)
|
||||
|
||||
focusFrameCounter = 0;
|
||||
}
|
||||
|
||||
mEnvironment.mWorld->doPhysics (mEnvironment.mFrameDuration);
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
@ -833,4 +833,9 @@ namespace MWWorld
|
||||
if (y<0)
|
||||
--cellY;
|
||||
}
|
||||
|
||||
void World::doPhysics (float duration)
|
||||
{
|
||||
mScene.doPhysics (duration, *this);
|
||||
}
|
||||
}
|
||||
|
@ -162,6 +162,9 @@ namespace MWWorld
|
||||
|
||||
void positionToIndex (float x, float y, int &cellX, int &cellY) const;
|
||||
///< Convert position to cell numbers
|
||||
|
||||
void doPhysics (float duration);
|
||||
///< Run physics simulation and modify \a world accordingly.
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user