mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-21 04:41:35 +00:00
pause all animations
This commit is contained in:
parent
cadc753216
commit
b7aa7e4cef
1 changed files with 7 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include <OgreCompositionTargetPass.h>
|
#include <OgreCompositionTargetPass.h>
|
||||||
#include <OgreCompositionPass.h>
|
#include <OgreCompositionPass.h>
|
||||||
#include <OgreHardwarePixelBuffer.h>
|
#include <OgreHardwarePixelBuffer.h>
|
||||||
|
#include <OgreControllerManager.h>
|
||||||
|
|
||||||
#include <extern/shiny/Main/Factory.hpp>
|
#include <extern/shiny/Main/Factory.hpp>
|
||||||
#include <extern/shiny/Platforms/Ogre/OgrePlatform.hpp>
|
#include <extern/shiny/Platforms/Ogre/OgrePlatform.hpp>
|
||||||
|
@ -331,7 +332,12 @@ void RenderingManager::update (float duration, bool paused)
|
||||||
mOcclusionQuery->update(duration);
|
mOcclusionQuery->update(duration);
|
||||||
|
|
||||||
if(paused)
|
if(paused)
|
||||||
|
{
|
||||||
|
Ogre::ControllerManager::getSingleton().setTimeFactor(0.f);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
Ogre::ControllerManager::getSingleton().setTimeFactor(
|
||||||
|
MWBase::Environment::get().getWorld()->getTimeScaleFactor()/30.f);
|
||||||
|
|
||||||
mPlayer->update(duration);
|
mPlayer->update(duration);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue