mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +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 )
|
||||
{
|
||||
|
||||
@@ -201,6 +201,9 @@ ROTTING_CORPSE *GetCorpseAtGridNo( INT32 sGridNo , INT8 bLevel );
|
||||
BOOLEAN IsValidDecapitationCorpse( ROTTING_CORPSE *pCorpse );
|
||||
BOOLEAN DecapitateCorpse( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel );
|
||||
|
||||
// Flugente: move all corpses on sGridNo level bLevel to level 1 - bLevel
|
||||
void ShiftCorpse( INT32 sGridNo, INT8 bLevel );
|
||||
|
||||
// Flugente: actions for the covert opts trait
|
||||
BOOLEAN IsValidGutCorpse( ROTTING_CORPSE *pCorpse );
|
||||
BOOLEAN GutCorpse( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel );
|
||||
|
||||
Reference in New Issue
Block a user