From 4e538d14c8f592dc572d6f51ef183c2a7664c8fa Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Tue, 4 Aug 2015 09:48:39 -0400 Subject: [PATCH] Fix snow so it ends correctly. Packet is different from the all zeros sent to end rain. End packets need to have the type that is ending. --- zone/zone.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zone/zone.cpp b/zone/zone.cpp index e5e30f01a..63730d0aa 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1346,7 +1346,6 @@ void Zone::ChangeWeather() weathertimer = (duration*60)*1000; Weather_Timer->Start(weathertimer); - zone->zone_weather = 0; zone->weather_intensity = 0; } else if(tmpOldWeather == 2) @@ -1358,7 +1357,6 @@ void Zone::ChangeWeather() weathertimer = (duration*60)*1000; Weather_Timer->Start(weathertimer); - zone->zone_weather = 0; zone->weather_intensity = 0; } } @@ -1377,6 +1375,10 @@ void Zone::ChangeWeather() { Log.Out(Logs::General, Logs::None, "The weather for zone: %s has changed. Old weather was = %i. New weather is = %i The next check will be in %i seconds. Rain chance: %i, Rain duration: %i, Snow chance %i, Snow duration: %i", zone->GetShortName(), tmpOldWeather, zone_weather,Weather_Timer->GetRemainingTime()/1000,rainchance,rainduration,snowchance,snowduration); this->weatherSend(); + if (zone->weather_intensity == 0) + { + zone->zone_weather = 0; + } } }