From 34aeb428a1cd8be2558b532fc85136928e7bac20 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 1 Apr 2015 10:01:48 +0200 Subject: [PATCH] - Removed the check for this flag from P_RadiusAttack because MF7_CAUSEPAIN cannot be used for radius attacks. Their logic is too different from regular attacks. --- src/p_interaction.cpp | 2 ++ src/p_map.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index a309360c4d..74bfc56f4d 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -950,6 +950,8 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage, int fakeDamage = 0; int holdDamage = 0; + if (damage < 0) damage = 0; + if (target == NULL || !((target->flags & MF_SHOOTABLE) || (target->flags6 & MF6_VULNERABLE))) { // Shouldn't happen return -1; diff --git a/src/p_map.cpp b/src/p_map.cpp index f858b8a4a6..2362fbd124 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4790,7 +4790,7 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo points *= thing->GetClass()->Meta.GetMetaFixed(AMETA_RDFactor, FRACUNIT) / (double)FRACUNIT; // points and bombdamage should be the same sign - if (((bombspot->flags7 & MF7_CAUSEPAIN) || (points * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)) + if (((points * bombdamage) > 0) && P_CheckSight(thing, bombspot, SF_IGNOREVISIBILITY | SF_IGNOREWATERBOUNDARY)) { // OK to damage; target is in direct path double velz; double thrust;