- Fixed: Rail attacks didn't properly respect FOILINVUL.

- Added: FOILBUDDHA support for rail attacks.
This commit is contained in:
MajorCooke 2014-11-05 23:16:01 -06:00
parent 95bd6bde9a
commit 71ce4bcf06

View file

@ -4111,7 +4111,7 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
z = shootz + FixedMul(hitdist, vz);
if ((hitactor->flags & MF_NOBLOOD) ||
(hitactor->flags2 & (MF2_DORMANT | MF2_INVULNERABLE)))
(hitactor->flags2 & MF2_DORMANT || ((hitactor->flags2 & MF2_INVULNERABLE) && !(puffDefaults->flags3 & MF3_FOILINVUL))))
{
spawnpuff = (puffclass != NULL);
}
@ -4132,7 +4132,10 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
{
P_PoisonMobj(hitactor, thepuff ? thepuff : source, source, puffDefaults->PoisonDamage, puffDefaults->PoisonDuration, puffDefaults->PoisonPeriod, puffDefaults->PoisonDamageType);
}
int newdam = P_DamageMobj(hitactor, thepuff ? thepuff : source, source, damage, damagetype, DMG_INFLICTOR_IS_PUFF);
int dmgFlagPass = DMG_INFLICTOR_IS_PUFF;
dmgFlagPass += (puffDefaults->flags3 & MF3_FOILINVUL) ? DMG_FOILINVUL : 0; //[MC]Because the original foilinvul check wasn't working.
dmgFlagPass += (puffDefaults->flags7 & MF7_FOILBUDDHA) ? DMG_FOILBUDDHA : 0;
int newdam = P_DamageMobj(hitactor, thepuff ? thepuff : source, source, damage, damagetype, dmgFlagPass);
if (bleed)
{
P_SpawnBlood(x, y, z, (source->angle + angleoffset) - ANG180, newdam > 0 ? newdam : damage, hitactor);