mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 20:39:40 +00:00
use global variable timescale instead of fixed factor
This commit is contained in:
parent
cf7150e585
commit
c8a18b7d70
3 changed files with 10 additions and 2 deletions
|
@ -51,8 +51,9 @@ bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt)
|
||||||
// global scripts
|
// global scripts
|
||||||
mEnvironment.mGlobalScripts->run (mEnvironment);
|
mEnvironment.mGlobalScripts->run (mEnvironment);
|
||||||
|
|
||||||
// passing of time (30 times as fast as RL time)
|
// passing of time
|
||||||
mEnvironment.mWorld->advanceTime ((mEnvironment.mFrameDuration*30)/3600);
|
mEnvironment.mWorld->advanceTime (
|
||||||
|
mEnvironment.mFrameDuration*mEnvironment.mWorld->getTimeScaleFactor()/3600);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,4 +358,9 @@ namespace MWWorld
|
||||||
{
|
{
|
||||||
mSkyManager->setMoonColour (red);
|
mSkyManager->setMoonColour (red);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float World::getTimeScaleFactor() const
|
||||||
|
{
|
||||||
|
return mGlobalVariables->getInt ("timescale");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,6 +103,8 @@ namespace MWWorld
|
||||||
int getSecundaPhase() const;
|
int getSecundaPhase() const;
|
||||||
|
|
||||||
void setMoonColour (bool red);
|
void setMoonColour (bool red);
|
||||||
|
|
||||||
|
float getTimeScaleFactor() const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue