diff --git a/src/playsim/p_local.h b/src/playsim/p_local.h index 6575ad3e5..f45aae071 100644 --- a/src/playsim/p_local.h +++ b/src/playsim/p_local.h @@ -456,6 +456,7 @@ enum EDmgFlags DMG_NO_PAIN = 1024, DMG_EXPLOSION = 2048, DMG_NO_ENHANCE = 4096, + DMG_RAILGUN = 8192, }; diff --git a/src/playsim/p_map.cpp b/src/playsim/p_map.cpp index 5b427e0f7..9cc66b98d 100644 --- a/src/playsim/p_map.cpp +++ b/src/playsim/p_map.cpp @@ -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) { diff --git a/wadsrc/static/zscript/constants.zs b/wadsrc/static/zscript/constants.zs index cf1140a10..8bb1af77f 100644 --- a/wadsrc/static/zscript/constants.zs +++ b/wadsrc/static/zscript/constants.zs @@ -977,6 +977,7 @@ enum EDmgFlags DMG_NO_PAIN = 1024, DMG_EXPLOSION = 2048, DMG_NO_ENHANCE = 4096, + DMG_RAILGUN = 8192, } enum EReplace