mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Attempt to fix #1654
This commit is contained in:
parent
2c7761926e
commit
a89d32c850
1 changed files with 4 additions and 3 deletions
|
@ -5329,6 +5329,7 @@ void P_RailAttack(FRailParams *p)
|
|||
|
||||
int actorpuffflags = puffflags | PF_HITTHING;
|
||||
AActor *hitactor = rail_data.RailHits[i].HitActor;
|
||||
AActor *hitpuff = NULL;
|
||||
DVector3 &hitpos = rail_data.RailHits[i].HitPos;
|
||||
DAngle hitangle = rail_data.RailHits[i].HitAngle;
|
||||
|
||||
|
@ -5348,7 +5349,7 @@ void P_RailAttack(FRailParams *p)
|
|||
}
|
||||
if (spawnpuff)
|
||||
{
|
||||
P_SpawnPuff(source, puffclass, hitpos, hitangle, hitangle - 90, 1, actorpuffflags, hitactor);
|
||||
hitpuff = P_SpawnPuff(source, puffclass, hitpos, hitangle, hitangle - 90, 1, actorpuffflags, hitactor);
|
||||
}
|
||||
|
||||
int dmgFlagPass = DMG_INFLICTOR_IS_PUFF;
|
||||
|
@ -5356,13 +5357,13 @@ void P_RailAttack(FRailParams *p)
|
|||
{
|
||||
if (puffDefaults->PoisonDamage > 0 && puffDefaults->PoisonDuration != INT_MIN)
|
||||
{
|
||||
P_PoisonMobj(hitactor, thepuff ? thepuff : source, source, puffDefaults->PoisonDamage, puffDefaults->PoisonDuration, puffDefaults->PoisonPeriod, puffDefaults->PoisonDamageType);
|
||||
P_PoisonMobj(hitactor, hitpuff ? hitpuff : source, source, puffDefaults->PoisonDamage, puffDefaults->PoisonDuration, puffDefaults->PoisonPeriod, puffDefaults->PoisonDamageType);
|
||||
}
|
||||
if (puffDefaults->flags3 & MF3_FOILINVUL) dmgFlagPass |= DMG_FOILINVUL;
|
||||
if (puffDefaults->flags7 & MF7_FOILBUDDHA) dmgFlagPass |= DMG_FOILBUDDHA;
|
||||
}
|
||||
// [RK] If the attack source is a player, send the DMG_PLAYERATTACK flag.
|
||||
int newdam = P_DamageMobj(hitactor, thepuff ? thepuff : source, source, p->damage, damagetype, dmgFlagPass | DMG_USEANGLE | (source->player ? DMG_PLAYERATTACK : 0), hitangle);
|
||||
int newdam = P_DamageMobj(hitactor, hitpuff ? hitpuff : source, source, p->damage, damagetype, dmgFlagPass | DMG_USEANGLE | (source->player ? DMG_PLAYERATTACK : 0), hitangle);
|
||||
|
||||
if (bleed)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue