- if a a roof collapses, any structures built on it (fans, sandbags) are destroyed

- if a a roof collapses, any corpses on it are moved to the floor

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7623 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2014-10-31 22:13:32 +00:00
parent faf345ac18
commit 8857e0772b
9 changed files with 304 additions and 17 deletions
+24
View File
@@ -1935,6 +1935,30 @@ BOOLEAN DecapitateCorpse( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel )
return FALSE;
}
void ShiftCorpse( INT32 sGridNo, INT8 bLevel )
{
for ( INT32 cnt = 0; cnt < giNumRottingCorpse; ++cnt )
{
ROTTING_CORPSE* pCorpse = &(gRottingCorpse[cnt]);
if ( pCorpse && pCorpse->fActivated && pCorpse->def.ubType != 0 && pCorpse->def.sGridNo == sGridNo && pCorpse->def.bLevel == 1 )
{
ROTTING_CORPSE_DEFINITION CorpseDef;
// Copy corpse definition...
memcpy( &CorpseDef, &(pCorpse->def), sizeof(ROTTING_CORPSE_DEFINITION) );
// Remove old one...
RemoveCorpse( pCorpse->iID );
// move corpse to the other level
CorpseDef.bLevel = 1 - bLevel;
AddRottingCorpse( &CorpseDef );
}
}
}
// Flugente: can this corpse be gutted?
BOOLEAN IsValidGutCorpse( ROTTING_CORPSE *pCorpse )
{