1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 06:15:32 +00:00

very minor performance improvement

This commit is contained in:
scrawl 2012-03-03 12:26:08 +01:00
parent 1e998545c7
commit d74b78a302

View file

@ -658,10 +658,16 @@ void SkyManager::setWeather(const MWWorld::WeatherResult& weather)
if (weather.mNight && mStarsOpacity != weather.mNightFade) if (weather.mNight && mStarsOpacity != weather.mNightFade)
{ {
if (weather.mNightFade == 0)
mAtmosphereNight->setVisible(false);
else
{
mAtmosphereNight->setVisible(true);
for (int i=0; i<7; ++i) for (int i=0; i<7; ++i)
mStarsMaterials[i]->getTechnique(0)->getPass(0)->setDiffuse(0.0, 0.0, 0.0, weather.mNightFade); mStarsMaterials[i]->getTechnique(0)->getPass(0)->setDiffuse(0.0, 0.0, 0.0, weather.mNightFade);
mStarsOpacity = weather.mNightFade; mStarsOpacity = weather.mNightFade;
} }
}
float strength; float strength;
float timeofday_angle = std::abs(mSunGlare->getPosition().z/mSunGlare->getPosition().length()); float timeofday_angle = std::abs(mSunGlare->getPosition().z/mSunGlare->getPosition().length());