ROOF_COLLAPSE controls whether roofs can be destroyed.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7647 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-11-04 20:37:42 +00:00
parent 94ded57962
commit 291985c022
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -1660,6 +1660,7 @@ void LoadGameExternalOptions()
//################# Tactical Fortification Settings ##################
gGameExternalOptions.fFortificationAllowInHostileSector = iniReader.ReadBoolean("Tactical Fortification Settings", "FORTIFICATION_ALLOW_IN_HOSTILE_SECTOR", FALSE);
gGameExternalOptions.fRoofCollapse = iniReader.ReadBoolean( "Tactical Fortification Settings", "ROOF_COLLAPSE", TRUE );
//################# Tactical Food Settings ##################
gGameExternalOptions.usFoodDigestionHourlyBaseFood = iniReader.ReadInteger("Tactical Food Settings", "FOOD_DIGESTION_HOURLY_BASE_FOOD", 20, 0, 250);
+3
View File
@@ -390,6 +390,9 @@ typedef struct
// Flugente: fortification settings
BOOLEAN fFortificationAllowInHostileSector;
// Flugente: can roofs collapse?
BOOLEAN fRoofCollapse;
// Flugente: food settings
UINT16 usFoodDigestionHourlyBaseFood;
UINT16 usFoodDigestionHourlyBaseDrink;
+1 -1
View File
@@ -6012,7 +6012,7 @@ BOOLEAN DamageRoof( INT32 sGridNo, INT16 sDamage )
void HandleRoofDestruction( INT32 sGridNo, INT16 sDamage )
{
// only if there is significant damage done
if ( sDamage < 1 || TileIsOutOfBounds( sGridNo ) || !IsRoofPresentAtGridNo( sGridNo ) )
if ( sDamage < 1 || !gGameExternalOptions.fRoofCollapse || TileIsOutOfBounds( sGridNo ) || !IsRoofPresentAtGridNo( sGridNo ) )
return;
ApplyMapChangesToMapTempFile( TRUE );