mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
call doPhysics function once per frame
This commit is contained in:
parent
88b0908104
commit
40d772b33a
3 changed files with 10 additions and 0 deletions
|
@ -179,6 +179,8 @@ bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt)
|
||||||
|
|
||||||
focusFrameCounter = 0;
|
focusFrameCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mEnvironment.mWorld->doPhysics (mEnvironment.mFrameDuration);
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -833,4 +833,9 @@ namespace MWWorld
|
||||||
if (y<0)
|
if (y<0)
|
||||||
--cellY;
|
--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;
|
void positionToIndex (float x, float y, int &cellX, int &cellY) const;
|
||||||
///< Convert position to cell numbers
|
///< Convert position to cell numbers
|
||||||
|
|
||||||
|
void doPhysics (float duration);
|
||||||
|
///< Run physics simulation and modify \a world accordingly.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue