diff --git a/GameSettings.cpp b/GameSettings.cpp index 0bae2bd2..3fbc21d3 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -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); diff --git a/GameSettings.h b/GameSettings.h index 1f9396ac..1ceaf20d 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -390,6 +390,9 @@ typedef struct // Flugente: fortification settings BOOLEAN fFortificationAllowInHostileSector; + // Flugente: can roofs collapse? + BOOLEAN fRoofCollapse; + // Flugente: food settings UINT16 usFoodDigestionHourlyBaseFood; UINT16 usFoodDigestionHourlyBaseDrink; diff --git a/TileEngine/Explosion Control.cpp b/TileEngine/Explosion Control.cpp index b846b3b9..aaf05728 100644 --- a/TileEngine/Explosion Control.cpp +++ b/TileEngine/Explosion Control.cpp @@ -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 );