Deconstructing the walls of a house will eventually cause it's roof to collapse.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7615 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-10-26 00:20:29 +00:00
parent 2e9c6965b0
commit eb15473d37
+9
View File
@@ -6972,6 +6972,15 @@ BOOLEAN RemoveFortification( INT32 sGridNo, SOLDIERTYPE *pSoldier, OBJECTTYPE *p
// Remove old graphic
ApplyMapChangesToMapTempFile( TRUE );
// if this is a wall, check wether the roof will collapse.
// Yes, the player can damage himself by collapsing the roof of the house he is currently in. Such stupidity has to be punished.
if ( pStruct->fFlags & STRUCTURE_WALL )
{
// this isn't an explosion, so the structural damage is moderate
HandleRoofDestruction( sGridNo, 50 );
HandleRoofDestruction( pSoldier->sGridNo, 50 );
}
RemoveStruct( sGridNo, pNode->usIndex );
if ( !GridNoIndoors( sGridNo ) && gTileDatabase[ usIndex ].uiFlags & HAS_SHADOW_BUDDY && gTileDatabase[ usIndex ].sBuddyNum != -1 )