From 8f71906fc3f1bb75530ac6f90f5a7499ab05d381 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 7 Mar 2016 01:02:48 +0100 Subject: [PATCH] - added portal support to P_RadiusAttack. This currently only works for linked portals. For other types some major refactoring may be necessary because it not only requires multiple passes of P_RadiusAttack but also an alteration of how sight checks work. --- src/p_map.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 3470de3944..1c8d9b466f 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -5245,6 +5245,10 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo double bombdistancefloat = 1.f / (double)(bombdistance - fulldamagedistance); double bombdamagefloat = (double)bombdamage; + FPortalGroupArray grouplist; + FMultiBlockThingsIterator it(grouplist, bombspot->X(), bombspot->Y(), bombspot->Z() - (bombdistance<height + (bombdistance*2)<X(), bombspot->Y(), bombdistance << FRACBITS)); AActor *thing; @@ -5253,8 +5257,9 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo bombsource = bombspot; } - while ((thing = it.Next())) + while ((it.Next(&cres))) { + AActor *thing = cres.thing; // Vulnerable actors can be damaged by radius attacks even if not shootable // Used to emulate MBF's vulnerability of non-missile bouncers to explosions. if (!((thing->flags & MF_SHOOTABLE) || (thing->flags6 & MF6_VULNERABLE)))