We can now use interactive actions to alter decals on walls, so it is possible to simulate taking off an object from the scenery and add it as an item.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=363513&#msg_363513

Requires GameDir >= r2601

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9141 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2021-07-13 19:50:49 +00:00
parent 174b870afe
commit 6cad680b02
17 changed files with 244 additions and 69 deletions
+27 -3
View File
@@ -2001,7 +2001,7 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
}
}
else if ( pExplosive->ubType == EXPLOSV_SMOKE || pExplosive->ubType == EXPLOSV_SMOKE_DEBRIS )//dnl ch40 200909
else if ( pExplosive->ubType == EXPLOSV_SMOKE || pExplosive->ubType == EXPLOSV_SMOKE_DEBRIS | pExplosive->ubType == EXPLOSV_SMOKE_FIRERETARDANT )//dnl ch40 200909
{
// robots are unaffected by smoke
if( AM_A_ROBOT(pSoldier) )
@@ -2108,6 +2108,7 @@ BOOLEAN DishOutGasDamage( SOLDIERTYPE * pSoldier, EXPLOSIVETYPE * pExplosive, IN
break;
case EXPLOSV_SMOKE://dnl ch40 200909
case EXPLOSV_SMOKE_DEBRIS:
case EXPLOSV_SMOKE_FIRERETARDANT:
pSoldier->flags.fHitByGasFlags |= HIT_BY_SMOKEGAS;
break;
default:
@@ -2262,6 +2263,12 @@ BOOLEAN ExpAffect( INT32 sBombGridNo, INT32 sGridNo, UINT32 uiDist, UINT16 usIte
bSmokeEffectType = DEBRIS_SMOKE_EFFECT;
fBlastEffect = FALSE;
break;
case EXPLOSV_SMOKE_FIRERETARDANT:
fSmokeEffect = TRUE;
bSmokeEffectType = FIRERETARDANT_SMOKE_EFFECT;
fBlastEffect = FALSE;
break;
}
}
@@ -2464,6 +2471,15 @@ BOOLEAN ExpAffect( INT32 sBombGridNo, INT32 sGridNo, UINT32 uiDist, UINT16 usIte
}
else if ( fSmokeEffect )
{
// Flugente: if adding fire retardant, remove fire
if ( pExplosive->ubType == EXPLOSV_SMOKE_FIRERETARDANT )
{
if ( gpWorldLevelData[sGridNo].ubExtFlags[bLevel] & MAPELEMENT_EXT_BURNABLEGAS )
{
RemoveSmokeEffectFromTile( sGridNo, bLevel );
}
}
// If tear gar, determine turns to spread.....
if ( sSubsequent == ERASE_SPREAD_EFFECT )
{
@@ -2945,7 +2961,15 @@ void SpreadEffect( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner,
gfMPDebugOutputRandoms = true;
#endif
}
// Flugente: if tile has a fire retardant effect, don't create new fire
if ( Explosive[Item[usItem].ubClassIndex].ubType == EXPLOSV_BURNABLEGAS )
{
if ( gpWorldLevelData[sGridNo].ubExtFlags[bLevel] & MAPELEMENT_EXT_FIRERETARDANT_SMOKE )
{
return;
}
}
INT32 uiNewSpot, uiTempSpot, uiBranchSpot, cnt, branchCnt;
INT32 uiTempRange, ubBranchRange;
@@ -2965,7 +2989,7 @@ void SpreadEffect( INT32 sGridNo, UINT8 ubRadius, UINT16 usItem, UINT8 ubOwner,
case EXPLOSV_CREATUREGAS:
case EXPLOSV_SIGNAL_SMOKE:
case EXPLOSV_SMOKE_DEBRIS:
case EXPLOSV_SMOKE_FIRERETARDANT:
fSmokeEffect = TRUE;
break;
}