1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge remote branch 'scrawl/weather'

This commit is contained in:
Marc Zinnschlag 2012-03-05 22:45:52 +01:00
commit 25f5bdf7aa
2 changed files with 11 additions and 5 deletions

View File

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

View File

@ -758,7 +758,7 @@ unsigned int WeatherManager::getWeatherID() const
return 3; return 3;
else if (mCurrentWeather == "rain") else if (mCurrentWeather == "rain")
return 4; return 4;
else if (mCurrentWeather == "thunder") else if (mCurrentWeather == "thunderstorm")
return 5; return 5;
else if (mCurrentWeather == "ashstorm") else if (mCurrentWeather == "ashstorm")
return 6; return 6;
@ -787,7 +787,7 @@ void WeatherManager::changeWeather(const std::string& region, const unsigned int
else if (id==4) else if (id==4)
weather = "rain"; weather = "rain";
else if (id==5) else if (id==5)
weather = "thunder"; weather = "thunderstorm";
else if (id==6) else if (id==6)
weather = "ashstorm"; weather = "ashstorm";
else if (id==7) else if (id==7)