Whether a gun shoots fire or fire retardant is now set on the ammo with the <ammoflag>-tag, not the gun.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9144 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2021-07-15 18:22:53 +00:00
parent 320328a441
commit e6ea95eb8b
14 changed files with 99 additions and 41 deletions
+4 -2
View File
@@ -5959,8 +5959,10 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1
{
ubReason = TAKE_DAMAGE_VEHICLE_TRAUMA;
}
// Flugente: it would be more reasonable to check for the ammo or gun details, but that's what is used in other locations
else if ( usWeaponIndex == FLAMETHROWER )
// Flugente: check the ammo
else if ( ubAttackerID != NOBODY
&& MercPtrs[ubAttackerID]->inv[HANDPOS].exists()
&& AmmoTypes[*&( MercPtrs[ubAttackerID]->inv[HANDPOS] )[0]->data.gun.ubGunAmmoType].ammoflag & AMMO_TRAIL_FIRE )
{
ubReason = TAKE_DAMAGE_GAS_FIRE;