use global variable timescale instead of fixed factor

actorid
Marc Zinnschlag 15 years ago
parent cf7150e585
commit c8a18b7d70

@ -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…
Cancel
Save