- fixed radius attack that may inflict damage twice

https://forum.zdoom.org/viewtopic.php?t=66191
This commit is contained in:
alexey.lysiuk 2019-10-26 18:43:06 +03:00 committed by drfrag
parent 46ebeeb7d5
commit 015eb3404a

View file

@ -5866,6 +5866,7 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bom
P_GeometryRadiusAttack(bombspot, bombsource, bombdamage, bombdistance, bombmod, fulldamagedistance);
TArray<AActor*> targets;
int count = 0;
while ((it.Next(&cres)))
{
@ -5896,6 +5897,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,