mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 10:23:51 +00:00
very minor performance improvement
This commit is contained in:
parent
1e998545c7
commit
d74b78a302
1 changed files with 9 additions and 3 deletions
|
@ -658,9 +658,15 @@ void SkyManager::setWeather(const MWWorld::WeatherResult& weather)
|
||||||
|
|
||||||
if (weather.mNight && mStarsOpacity != weather.mNightFade)
|
if (weather.mNight && mStarsOpacity != weather.mNightFade)
|
||||||
{
|
{
|
||||||
for (int i=0; i<7; ++i)
|
if (weather.mNightFade == 0)
|
||||||
mStarsMaterials[i]->getTechnique(0)->getPass(0)->setDiffuse(0.0, 0.0, 0.0, weather.mNightFade);
|
mAtmosphereNight->setVisible(false);
|
||||||
mStarsOpacity = weather.mNightFade;
|
else
|
||||||
|
{
|
||||||
|
mAtmosphereNight->setVisible(true);
|
||||||
|
for (int i=0; i<7; ++i)
|
||||||
|
mStarsMaterials[i]->getTechnique(0)->getPass(0)->setDiffuse(0.0, 0.0, 0.0, weather.mNightFade);
|
||||||
|
mStarsOpacity = weather.mNightFade;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float strength;
|
float strength;
|
||||||
|
|
Loading…
Reference in a new issue