WorldRailgunFired flags are now passed properly
There's also a new DamageMobj flag to indicate railgun attacks without having to rely on damagetypes.
This commit is contained in:
parent
94e73cbe15
commit
028256f06f
3 changed files with 4 additions and 2 deletions
|
|
@ -456,6 +456,7 @@ enum EDmgFlags
|
|||
DMG_NO_PAIN = 1024,
|
||||
DMG_EXPLOSION = 2048,
|
||||
DMG_NO_ENHANCE = 4096,
|
||||
DMG_RAILGUN = 8192,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5587,7 +5587,7 @@ void P_RailAttack(FRailParams *p)
|
|||
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, hitpuff ? hitpuff : 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) | DMG_RAILGUN, hitangle);
|
||||
|
||||
if (bleed)
|
||||
{
|
||||
|
|
@ -5630,7 +5630,7 @@ void P_RailAttack(FRailParams *p)
|
|||
}
|
||||
}
|
||||
|
||||
source->Level->localEventManager->WorldRailgunFired(source, start, trace.HitPos, thepuff, flags);
|
||||
source->Level->localEventManager->WorldRailgunFired(source, start, trace.HitPos, thepuff, p->flags);
|
||||
|
||||
if (thepuff != NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -977,6 +977,7 @@ enum EDmgFlags
|
|||
DMG_NO_PAIN = 1024,
|
||||
DMG_EXPLOSION = 2048,
|
||||
DMG_NO_ENHANCE = 4096,
|
||||
DMG_RAILGUN = 8192,
|
||||
}
|
||||
|
||||
enum EReplace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue