From 54f9238ec00e62f4c83260c3431af4da5584e45f Mon Sep 17 00:00:00 2001 From: Flugente Date: Thu, 10 Aug 2017 21:44:49 +0000 Subject: [PATCH] Fix: weather occured underground git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8445 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/environment.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TileEngine/environment.cpp b/TileEngine/environment.cpp index 930afb30..0d282dd9 100644 --- a/TileEngine/environment.cpp +++ b/TileEngine/environment.cpp @@ -913,6 +913,10 @@ void ChangeWeather( UINT8 aSector, UINT8 aType ) UINT8 GetWeatherInCurrentSector() { + // no weather underground! + if ( gbWorldSectorZ ) + return WEATHER_FORECAST_NORMAL; + return SectorInfo[SECTOR( gWorldSectorX, gWorldSectorY )].usWeather; }