forked from mirror/openmw-tes3mp
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
|
||||
mEnvironment.mGlobalScripts->run (mEnvironment);
|
||||
|
||||
// passing of time (30 times as fast as RL time)
|
||||
mEnvironment.mWorld->advanceTime ((mEnvironment.mFrameDuration*30)/3600);
|
||||
// passing of time
|
||||
mEnvironment.mWorld->advanceTime (
|
||||
mEnvironment.mFrameDuration*mEnvironment.mWorld->getTimeScaleFactor()/3600);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -358,4 +358,9 @@ namespace MWWorld
|
|||
{
|
||||
mSkyManager->setMoonColour (red);
|
||||
}
|
||||
|
||||
float World::getTimeScaleFactor() const
|
||||
{
|
||||
return mGlobalVariables->getInt ("timescale");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,8 @@ namespace MWWorld
|
|||
int getSecundaPhase() const;
|
||||
|
||||
void setMoonColour (bool red);
|
||||
|
||||
float getTimeScaleFactor() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue