Correct base cloud speed, support Timescale Clouds fallback setting (#7792)

ini_importer_tests
Alexei Kotov 4 months ago
parent ad64c71753
commit 2ea4013382

@ -173,6 +173,7 @@
Feature #7652: Sort inactive post processing shaders list properly
Feature #7698: Implement sAbsorb, sDamage, sDrain, sFortify and sRestore
Feature #7709: Improve resolution selection in Launcher
Feature #7792: Support Timescale Clouds
Task #5896: Do not use deprecated MyGUI properties
Task #6624: Drop support for saves made prior to 0.45
Task #7113: Move from std::atoi to std::from_char

@ -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();

@ -165,6 +165,7 @@ namespace MWRender
int mDay;
int mMonth;
bool mTimescaleClouds;
float mCloudAnimationTimer;
float mRainTimer;

Loading…
Cancel
Save