mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-05 06:40:09 +00:00
Merge remote branch 'scrawl/weather'
This commit is contained in:
commit
25f5bdf7aa
@ -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());
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user