From 66e5ef73e8c40b24994a37ceacd7576a9cb99314 Mon Sep 17 00:00:00 2001 From: Flugente Date: Sat, 16 Feb 2019 19:54:39 +0000 Subject: [PATCH] The duration and size of smoke clouds is reduced depending on weather git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8667 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/SmokeEffects.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/TileEngine/SmokeEffects.cpp b/TileEngine/SmokeEffects.cpp index c9ab8f38a..c82764e7f 100644 --- a/TileEngine/SmokeEffects.cpp +++ b/TileEngine/SmokeEffects.cpp @@ -25,6 +25,7 @@ #include "opplist.h" #include "Campaign Types.h" #include "Tactical Save.h" + #include "strategicmap.h" #endif #include "SaveLoadGame.h" @@ -299,6 +300,16 @@ INT32 NewSmokeEffect( INT32 sGridNo, UINT16 usItem, INT8 bLevel, UINT8 ubOwner, // Duration is increased by 2 turns...indoors pSmoke->ubDuration += 3; } + else + { + switch ( SectorInfo[SECTOR( gWorldSectorX, gWorldSectorY )].usWeather ) + { + case WEATHER_FORECAST_RAIN: pSmoke->ubDuration = max( 0, pSmoke->ubDuration - 2 ); break; + case WEATHER_FORECAST_THUNDERSHOWERS: pSmoke->ubDuration = max( 0, pSmoke->ubDuration - 3 ); break; + case WEATHER_FORECAST_SANDSTORM: pSmoke->ubDuration = max( 0, pSmoke->ubDuration - 1 ); break; + case WEATHER_FORECAST_SNOW: pSmoke->ubDuration = max( 0, pSmoke->ubDuration - 1 ); break; + } + } if ( bLevel ) {