mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 21:41:03 +00:00
- 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.
This commit is contained in:
parent
7d7112f427
commit
8f71906fc3
1 changed files with 6 additions and 1 deletions
|
@ -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<<FRACBITS), bombspot->height + (bombdistance*2)<<FRACBITS, bombdistance);
|
||||
FMultiBlockThingsIterator::CheckResult cres;
|
||||
|
||||
FBlockThingsIterator it(FBoundingBox(bombspot->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)))
|
||||
|
|
Loading…
Reference in a new issue