From 100edda8c086f72599884bafd591d1bb260de76f Mon Sep 17 00:00:00 2001 From: Lukasz Gromanowski Date: Sat, 28 Dec 2013 16:15:34 +0100 Subject: [PATCH] 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 --- apps/openmw/mwworld/weather.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp index 8b05d2256..5641d3493 100644 --- a/apps/openmw/mwworld/weather.cpp +++ b/apps/openmw/mwworld/weather.cpp @@ -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; }