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
This commit is contained in:
Flugente
2019-02-16 19:54:39 +00:00
parent e54c8498e2
commit 66e5ef73e8
+11
View File
@@ -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 )
{