|
|
|
@ -240,6 +240,7 @@ namespace MWRender
|
|
|
|
|
, mIsStorm(false)
|
|
|
|
|
, mDay(0)
|
|
|
|
|
, mMonth(0)
|
|
|
|
|
, mTimescaleClouds(Fallback::Map::getBool("Weather_Timescale_Clouds"))
|
|
|
|
|
, mCloudAnimationTimer(0.f)
|
|
|
|
|
, mRainTimer(0.f)
|
|
|
|
|
, mStormParticleDirection(MWWorld::Weather::defaultDirection())
|
|
|
|
@ -557,8 +558,17 @@ namespace MWRender
|
|
|
|
|
mParticleNode->setAttitude(quat);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const float timeScale = MWBase::Environment::get().getWorld()->getTimeManager()->getGameTimeScale();
|
|
|
|
|
|
|
|
|
|
// UV Scroll the clouds
|
|
|
|
|
mCloudAnimationTimer += duration * mCloudSpeed * 0.003;
|
|
|
|
|
float cloudDelta = duration * mCloudSpeed / 400.f;
|
|
|
|
|
if (mTimescaleClouds)
|
|
|
|
|
cloudDelta *= timeScale / 60.f;
|
|
|
|
|
|
|
|
|
|
mCloudAnimationTimer += cloudDelta;
|
|
|
|
|
if (mCloudAnimationTimer >= 4.f)
|
|
|
|
|
mCloudAnimationTimer -= 4.f;
|
|
|
|
|
|
|
|
|
|
mNextCloudUpdater->setTextureCoord(mCloudAnimationTimer);
|
|
|
|
|
mCloudUpdater->setTextureCoord(mCloudAnimationTimer);
|
|
|
|
|
|
|
|
|
@ -574,8 +584,7 @@ namespace MWRender
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// rotate the stars by 360 degrees every 4 days
|
|
|
|
|
mAtmosphereNightRoll += MWBase::Environment::get().getWorld()->getTimeManager()->getGameTimeScale() * duration
|
|
|
|
|
* osg::DegreesToRadians(360.f) / (3600 * 96.f);
|
|
|
|
|
mAtmosphereNightRoll += timeScale * duration * osg::DegreesToRadians(360.f) / (3600 * 96.f);
|
|
|
|
|
if (mAtmosphereNightNode->getNodeMask() != 0)
|
|
|
|
|
mAtmosphereNightNode->setAttitude(osg::Quat(mAtmosphereNightRoll, osg::Vec3f(0, 0, 1)));
|
|
|
|
|
mPrecipitationOccluder->update();
|
|
|
|
|