mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
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:
@@ -1660,6 +1660,7 @@ void LoadGameExternalOptions()
|
|||||||
|
|
||||||
//################# Tactical Fortification Settings ##################
|
//################# Tactical Fortification Settings ##################
|
||||||
gGameExternalOptions.fFortificationAllowInHostileSector = iniReader.ReadBoolean("Tactical Fortification Settings", "FORTIFICATION_ALLOW_IN_HOSTILE_SECTOR", FALSE);
|
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 ##################
|
//################# Tactical Food Settings ##################
|
||||||
gGameExternalOptions.usFoodDigestionHourlyBaseFood = iniReader.ReadInteger("Tactical Food Settings", "FOOD_DIGESTION_HOURLY_BASE_FOOD", 20, 0, 250);
|
gGameExternalOptions.usFoodDigestionHourlyBaseFood = iniReader.ReadInteger("Tactical Food Settings", "FOOD_DIGESTION_HOURLY_BASE_FOOD", 20, 0, 250);
|
||||||
|
|||||||
@@ -390,6 +390,9 @@ typedef struct
|
|||||||
// Flugente: fortification settings
|
// Flugente: fortification settings
|
||||||
BOOLEAN fFortificationAllowInHostileSector;
|
BOOLEAN fFortificationAllowInHostileSector;
|
||||||
|
|
||||||
|
// Flugente: can roofs collapse?
|
||||||
|
BOOLEAN fRoofCollapse;
|
||||||
|
|
||||||
// Flugente: food settings
|
// Flugente: food settings
|
||||||
UINT16 usFoodDigestionHourlyBaseFood;
|
UINT16 usFoodDigestionHourlyBaseFood;
|
||||||
UINT16 usFoodDigestionHourlyBaseDrink;
|
UINT16 usFoodDigestionHourlyBaseDrink;
|
||||||
|
|||||||
@@ -6012,7 +6012,7 @@ BOOLEAN DamageRoof( INT32 sGridNo, INT16 sDamage )
|
|||||||
void HandleRoofDestruction( INT32 sGridNo, INT16 sDamage )
|
void HandleRoofDestruction( INT32 sGridNo, INT16 sDamage )
|
||||||
{
|
{
|
||||||
// only if there is significant damage done
|
// only if there is significant damage done
|
||||||
if ( sDamage < 1 || TileIsOutOfBounds( sGridNo ) || !IsRoofPresentAtGridNo( sGridNo ) )
|
if ( sDamage < 1 || !gGameExternalOptions.fRoofCollapse || TileIsOutOfBounds( sGridNo ) || !IsRoofPresentAtGridNo( sGridNo ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ApplyMapChangesToMapTempFile( TRUE );
|
ApplyMapChangesToMapTempFile( TRUE );
|
||||||
|
|||||||
Reference in New Issue
Block a user