diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 3eaff2fe14..2f0d52772f 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -179,6 +179,8 @@ bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt) focusFrameCounter = 0; } + + mEnvironment.mWorld->doPhysics (mEnvironment.mFrameDuration); } catch (const std::exception& e) { diff --git a/apps/openmw/mwworld/world.cpp b/apps/openmw/mwworld/world.cpp index 9ec5ea52c9..38e553286d 100644 --- a/apps/openmw/mwworld/world.cpp +++ b/apps/openmw/mwworld/world.cpp @@ -833,4 +833,9 @@ namespace MWWorld if (y<0) --cellY; } + + void World::doPhysics (float duration) + { + mScene.doPhysics (duration, *this); + } } diff --git a/apps/openmw/mwworld/world.hpp b/apps/openmw/mwworld/world.hpp index ce66a63d7e..e44bdf27c6 100644 --- a/apps/openmw/mwworld/world.hpp +++ b/apps/openmw/mwworld/world.hpp @@ -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. }; }