1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 17:15:35 +00:00

transition fix

This commit is contained in:
scrawl 2012-02-27 12:21:00 +01:00
parent 8b0ef8f98c
commit c9ceb74e5c

View file

@ -328,9 +328,12 @@ void WeatherManager::setWeather(const String& weather, bool instant)
}
else
{
// if there's another transition that hasn't finished yet, just apply it immediately
if (mNextWeather != "")
mCurrentWeather = mNextWeather;
{
// transition more than 50% finished?
if (mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60) <= 0.5)
mCurrentWeather = mNextWeather;
}
mNextWeather = weather;
mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60;