forked from teamnwah/openmw-tes3coop
transition fix
This commit is contained in:
parent
8b0ef8f98c
commit
c9ceb74e5c
1 changed files with 5 additions and 2 deletions
|
@ -328,9 +328,12 @@ void WeatherManager::setWeather(const String& weather, bool instant)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if there's another transition that hasn't finished yet, just apply it immediately
|
|
||||||
if (mNextWeather != "")
|
if (mNextWeather != "")
|
||||||
mCurrentWeather = mNextWeather;
|
{
|
||||||
|
// transition more than 50% finished?
|
||||||
|
if (mRemainingTransitionTime/(mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60) <= 0.5)
|
||||||
|
mCurrentWeather = mNextWeather;
|
||||||
|
}
|
||||||
|
|
||||||
mNextWeather = weather;
|
mNextWeather = weather;
|
||||||
mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60;
|
mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta*24.f*60;
|
||||||
|
|
Loading…
Reference in a new issue