From 04c6f23a2b44abead632e0cd9d9e13ae60d67862 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 19 Mar 2012 22:54:04 +0100 Subject: [PATCH] disabled solstheim weather (we can't travel there anyway) also, there was a bug that could cause this weather to show up on morrowind, which is fixed now --- apps/openmw/mwworld/weather.cpp | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/apps/openmw/mwworld/weather.cpp b/apps/openmw/mwworld/weather.cpp index 044d6e83a..9a918c2fb 100644 --- a/apps/openmw/mwworld/weather.cpp +++ b/apps/openmw/mwworld/weather.cpp @@ -271,7 +271,8 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering, Environmen blight.mGlareView = 0; blight.mAmbientLoopSoundID = "blight"; mWeatherSettings["blight"] = blight; - + + /* Weather snow; snow.mCloudTexture = "tx_bm_sky_snow.dds"; snow.mCloudsMaximumPercent = 1.0; @@ -328,6 +329,7 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering, Environmen blizzard.mGlareView = 0; blizzard.mAmbientLoopSoundID = "BM Blizzard"; mWeatherSettings["blizzard"] = blizzard; + */ } void WeatherManager::setWeather(const String& weather, bool instant) @@ -509,32 +511,32 @@ void WeatherManager::update(float duration) float thunder = region->data.thunder/255.f; float ash = region->data.ash/255.f; float blight = region->data.blight/255.f; - float snow = region->data.a/255.f; - float blizzard = region->data.b/255.f; + //float snow = region->data.a/255.f; + //float blizzard = region->data.b/255.f; // re-scale to 100 percent - const float total = clear+cloudy+foggy+overcast+rain+thunder+ash+blight+snow+blizzard; + const float total = clear+cloudy+foggy+overcast+rain+thunder+ash+blight;//+snow+blizzard; srand(time(NULL)); float random = ((rand()%100)/100.f) * total; - if (random >= snow+blight+ash+thunder+rain+overcast+foggy+cloudy+clear) - weather = "blizzard"; - else if (random >= blight+ash+thunder+rain+overcast+foggy+cloudy+clear) - weather = "snow"; - else if (random >= ash+thunder+rain+overcast+foggy+cloudy+clear) + //if (random > snow+blight+ash+thunder+rain+overcast+foggy+cloudy+clear) + // weather = "blizzard"; + //else if (random > blight+ash+thunder+rain+overcast+foggy+cloudy+clear) + // weather = "snow"; + /*else*/ if (random > ash+thunder+rain+overcast+foggy+cloudy+clear) weather = "blight"; - else if (random >= thunder+rain+overcast+foggy+cloudy+clear) + else if (random > thunder+rain+overcast+foggy+cloudy+clear) weather = "ashstorm"; - else if (random >= rain+overcast+foggy+cloudy+clear) + else if (random > rain+overcast+foggy+cloudy+clear) weather = "thunderstorm"; - else if (random >= overcast+foggy+cloudy+clear) + else if (random > overcast+foggy+cloudy+clear) weather = "rain"; - else if (random >= foggy+cloudy+clear) + else if (random > foggy+cloudy+clear) weather = "overcast"; - else if (random >= cloudy+clear) + else if (random > cloudy+clear) weather = "foggy"; - else if (random >= clear) + else if (random > clear) weather = "cloudy"; else weather = "clear";