mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
BUGZILLA #537: Robot can now move through fire/gas tiles without stopping each tile. No need to stop each tile for the robot, because the robot does not get hurt by fire/gas.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4513 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+26
-36
@@ -2277,21 +2277,11 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
INT8 bPosOfMask;
|
||||
|
||||
bPosOfMask = FindGasMask (pSoldier);
|
||||
|
||||
if(!DoesSoldierWearGasMask(pSoldier))//dnl ch40 200909
|
||||
bPosOfMask = NO_SLOT;
|
||||
//if ( pSoldier->inv[ HEAD1POS ].usItem == GASMASK && pSoldier->inv[ HEAD1POS ][0]->data.objectStatus >= GASMASK_MIN_STATUS )
|
||||
//{
|
||||
// bPosOfMask = HEAD1POS;
|
||||
//}
|
||||
//else if ( pSoldier->inv[ HEAD2POS ].usItem == GASMASK && pSoldier->inv[ HEAD2POS ][0]->data.objectStatus >= GASMASK_MIN_STATUS )
|
||||
//{
|
||||
// bPosOfMask = HEAD2POS;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// bPosOfMask = NO_SLOT;
|
||||
//}
|
||||
|
||||
// WANNE: Only apply the following code for soldiers and not the ROBOT!!
|
||||
// TODO: Madd: This next section is pretty lame because it can't figure out which explosive was used to actually cause a gas effect
|
||||
// so for now, the first explosive to use a gas effect decides the health and breath damage for all of the gasses of that type
|
||||
// (this was hard coded before by the developers - i guess they figured they didn't need to look for the actual explosion item,
|
||||
@@ -2326,39 +2316,39 @@ BOOLEAN HandleGotoNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving, BOOLE
|
||||
pExplosive = &(Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_MUSTGAS) ].ubClassIndex ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->pathing.bLevel] & MAPELEMENT_EXT_CREATUREGAS )
|
||||
{
|
||||
if ( !(pSoldier->flags.fHitByGasFlags & HIT_BY_CREATUREGAS) ) // gas mask doesn't help vs creaturegas
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->pathing.bLevel] & MAPELEMENT_EXT_CREATUREGAS )
|
||||
{
|
||||
pExplosive = &(Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_CREATUREGAS) ].ubClassIndex ]);
|
||||
if ( !(pSoldier->flags.fHitByGasFlags & HIT_BY_CREATUREGAS) ) // gas mask doesn't help vs creaturegas
|
||||
{
|
||||
pExplosive = &(Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_CREATUREGAS) ].ubClassIndex ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->pathing.bLevel] & MAPELEMENT_EXT_BURNABLEGAS )
|
||||
{
|
||||
if ( !(pSoldier->flags.fHitByGasFlags & HIT_BY_BURNABLEGAS) )
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
if ( gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->pathing.bLevel] & MAPELEMENT_EXT_BURNABLEGAS )
|
||||
{
|
||||
pExplosive = &(Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_BURNABLEGAS) ].ubClassIndex ]);
|
||||
if ( !(pSoldier->flags.fHitByGasFlags & HIT_BY_BURNABLEGAS) )
|
||||
{
|
||||
pExplosive = &(Explosive[ Item[ GetFirstExplosiveOfType(EXPLOSV_BURNABLEGAS) ].ubClassIndex ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pSoldier->flags.fHitByGasFlags: %d", pSoldier->flags.fHitByGasFlags );
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pSoldier->flags.fHitByGasFlags: %d", pSoldier->flags.fHitByGasFlags );
|
||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Overhead pExplosive: %d", pExplosive->ubType );
|
||||
|
||||
if ( !(gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->pathing.bLevel] & MAPELEMENT_EXT_SMOKE ))
|
||||
{
|
||||
if ( pExplosive )
|
||||
if ( !(gpWorldLevelData[ pSoldier->sGridNo ].ubExtFlags[pSoldier->pathing.bLevel] & MAPELEMENT_EXT_SMOKE ))
|
||||
{
|
||||
pSoldier->EVENT_StopMerc( pSoldier->sGridNo, pSoldier->ubDirection );
|
||||
fDontContinue = TRUE;
|
||||
if ( pExplosive )
|
||||
{
|
||||
pSoldier->EVENT_StopMerc( pSoldier->sGridNo, pSoldier->ubDirection );
|
||||
fDontContinue = TRUE;
|
||||
|
||||
DishOutGasDamage( pSoldier, pExplosive, TRUE, FALSE,
|
||||
(INT16) (pExplosive->ubDamage + (UINT8)PreRandom( pExplosive->ubDamage ) ),
|
||||
(INT16) (100 * ( pExplosive->ubStunDamage + (INT16)PreRandom( ( pExplosive->ubStunDamage / 2 ) ) ) ), NOBODY );
|
||||
DishOutGasDamage( pSoldier, pExplosive, TRUE, FALSE,
|
||||
(INT16) (pExplosive->ubDamage + (UINT8)PreRandom( pExplosive->ubDamage ) ),
|
||||
(INT16) (100 * ( pExplosive->ubStunDamage + (INT16)PreRandom( ( pExplosive->ubStunDamage / 2 ) ) ) ), NOBODY );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user