mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
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:
@@ -6972,6 +6972,15 @@ BOOLEAN RemoveFortification( INT32 sGridNo, SOLDIERTYPE *pSoldier, OBJECTTYPE *p
|
|||||||
// Remove old graphic
|
// Remove old graphic
|
||||||
ApplyMapChangesToMapTempFile( TRUE );
|
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 );
|
RemoveStruct( sGridNo, pNode->usIndex );
|
||||||
|
|
||||||
if ( !GridNoIndoors( sGridNo ) && gTileDatabase[ usIndex ].uiFlags & HAS_SHADOW_BUDDY && gTileDatabase[ usIndex ].sBuddyNum != -1 )
|
if ( !GridNoIndoors( sGridNo ) && gTileDatabase[ usIndex ].uiFlags & HAS_SHADOW_BUDDY && gTileDatabase[ usIndex ].sBuddyNum != -1 )
|
||||||
|
|||||||
Reference in New Issue
Block a user