From ae2f7dd8922fb065a46877b989e0a8a14d5d63b9 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 26 Oct 2019 18:43:06 +0300 Subject: [PATCH] - fixed radius attack that may inflict damage twice https://forum.zdoom.org/viewtopic.php?t=66191 --- src/playsim/p_map.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/playsim/p_map.cpp b/src/playsim/p_map.cpp index a60b40b1a2..94f9879047 100644 --- a/src/playsim/p_map.cpp +++ b/src/playsim/p_map.cpp @@ -5855,6 +5855,7 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom P_GeometryRadiusAttack(bombspot, bombsource, bombdamage, bombdistance, bombmod, fulldamagedistance); + TArray targets; int count = 0; while ((it.Next(&cres))) { @@ -5885,6 +5886,11 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom ) ) continue; + targets.Push(thing); + } + + for (AActor *thing : targets) + { // Barrels always use the original code, since this makes // them far too "active." BossBrains also use the old code // because some user levels require they have a height of 16,