mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-21 11:09:43 +00:00
Fixes #417: Apply weather instantly when teleporting
Change speed of weather transition from blight to other (twice fast as normal) and from other to blight (four times faster than normal). Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
16b3927f17
commit
100edda8c0
1 changed files with 16 additions and 1 deletions
|
@ -195,7 +195,22 @@ void WeatherManager::setWeather(const String& weather, bool instant)
|
|||
}
|
||||
|
||||
mNextWeather = weather;
|
||||
mRemainingTransitionTime = mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600;
|
||||
|
||||
/**
|
||||
* Issue #417:
|
||||
*
|
||||
* Change speed of weather transition from blight to other (twice fast as normal)
|
||||
* and from other to blight (four times faster than normal)
|
||||
*/
|
||||
mRemainingTransitionTime = (mWeatherSettings[mCurrentWeather].mTransitionDelta * 24.f * 3600.f);
|
||||
if (mCurrentWeather == "blight" && mNextWeather != "")
|
||||
{
|
||||
mRemainingTransitionTime *= 0.25f;
|
||||
}
|
||||
else if (mNextWeather == "blight")
|
||||
{
|
||||
mRemainingTransitionTime *= 0.5f;
|
||||
}
|
||||
}
|
||||
mFirstUpdate = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue