diff --git a/src/g_doom/a_doomweaps.cpp b/src/g_doom/a_doomweaps.cpp index 5c5bb7eba..9dd055711 100644 --- a/src/g_doom/a_doomweaps.cpp +++ b/src/g_doom/a_doomweaps.cpp @@ -589,7 +589,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_BFGSpray) damage += (pr_bfgspray() & 7) + 1; thingToHit = linetarget; - int newdam = P_DamageMobj (thingToHit, self->target, self->target, damage, spray != NULL? FName(spray->DamageType) : FName(NAME_BFGSplash)); + int newdam = P_DamageMobj (thingToHit, self->target, self->target, damage, spray != NULL? FName(spray->DamageType) : FName(NAME_BFGSplash), + spray != NULL && (spray->flags3 & MF3_FOILINVUL)? DMG_FOILINVUL : 0); P_TraceBleed (newdam > 0 ? newdam : damage, thingToHit, self->target); } } diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 43499d353..919bd8654 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -965,7 +965,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, { // actor is invulnerable if (target->player == NULL) { - if (inflictor == NULL || !(inflictor->flags3 & MF3_FOILINVUL)) + if (inflictor == NULL || (!(inflictor->flags3 & MF3_FOILINVUL) && !(flags & DMG_FOILINVUL))) { return -1; } diff --git a/src/p_local.h b/src/p_local.h index a4da0a04b..e7fb2cb7d 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -554,6 +554,7 @@ enum EDmgFlags DMG_FORCED = 8, DMG_NO_FACTOR = 16, DMG_PLAYERATTACK = 32, + DMG_FOILINVUL = 64, };