If a container is destroyed by gunfire or vehicle collision, don't destroy the contents, reveal them instead.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9087 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2021-06-18 18:43:24 +00:00
parent a288b2e60c
commit 7a866c5f29
4 changed files with 37 additions and 7 deletions
+6
View File
@@ -1917,6 +1917,9 @@ INT8 DamageStructure( STRUCTURE * pStructure, UINT8 ubDamage, UINT8 ubReason, IN
}
RecompileLocalMovementCostsFromRadius( tmpgridno, 2 );
// if we've destroyed a structure, reveal the things inside, as destroying a structure doesn't necessarily destroy the contents inside
RevealAllUnburiedItems( tmpgridno, 0 );
}
}
@@ -1957,6 +1960,9 @@ INT8 DamageStructure( STRUCTURE * pStructure, UINT8 ubDamage, UINT8 ubReason, IN
}
RecompileLocalMovementCostsFromRadius( tmpgridno, 2 );
// if we've destroyed a structure, reveal the things inside, as destroying a structure doesn't necessarily destroy the contents inside
RevealAllUnburiedItems( tmpgridno, 0 );
}
}