- added portal awareness to several functions.

* Arch-Vile resurrection
 * Boom point pushers (due to complete lack of z-handling only for line portals.)
 * A_RadiusGive

These also require a more thorough collection of portal groups than simple position checks.
This commit is contained in:
Christoph Oelckers 2016-02-28 23:08:32 +01:00
commit d4f87203bd
6 changed files with 184 additions and 88 deletions

View file

@ -2249,11 +2249,14 @@ void DPusher::Tick ()
// Seek out all pushable things within the force radius of this
// point pusher. Crosses sectors, so use blockmap.
FBlockThingsIterator it(FBoundingBox(m_X, m_Y, m_Radius));
AActor *thing;
FPortalGroupArray check(FPortalGroupArray::PGA_NoSectorPortals); // no sector portals because this thing is utterly z-unaware.
FMultiBlockThingsIterator it(check, m_X, m_Y, 0, 0, m_Radius);
FMultiBlockThingsIterator::CheckResult cres;
while ((thing = it.Next()))
while (it.Next(&cres))
{
AActor *thing = cres.thing;
// Normal ZDoom is based only on the WINDTHRUST flag, with the noclip cheat as an exemption.
bool pusharound = ((thing->flags2 & MF2_WINDTHRUST) && !(thing->flags & MF_NOCLIP));