mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- 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:
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user