diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 63ba6ec30..ef41faea2 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -6129,6 +6129,7 @@ enum DMSS DMSS_EXFILTER = 64, //Changes filter into a blacklisted class instead of whitelisted. DMSS_EXSPECIES = 128, // ^ but with species instead. DMSS_EITHER = 256, //Allow either type or species to be affected. + DMSS_INFLICTORDMGTYPE = 512, //Ignore the passed damagetype and use the inflictor's instead. }; static void DoDamage(AActor *dmgtarget, AActor *inflictor, AActor *source, int amount, FName DamageType, int flags, PClassActor *filter, FName species) @@ -6153,6 +6154,9 @@ static void DoDamage(AActor *dmgtarget, AActor *inflictor, AActor *source, int a if (amount > 0) { //Should wind up passing them through just fine. + if (flags & DMSS_INFLICTORDMGTYPE) + DamageType = inflictor->DamageType; + P_DamageMobj(dmgtarget, inflictor, source, amount, DamageType, dmgFlags); } else if (amount < 0) diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 05049e598..ba0d1399d 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -466,6 +466,7 @@ enum DMSS_EXFILTER = 0x00000040, DMSS_EXSPECIES = 0x00000080, DMSS_EITHER = 0x00000100, + DMSS_INFLICTORDMGTYPE = 0x00000200, }; // Flags for A_AlertMonsters