Skip to content

Commit

Permalink
Fixed initialization of BlockThingsIterator objects
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Jan 1, 2018
1 parent 2c4eae7 commit be81474
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/p_maputl.cpp
Expand Up @@ -1275,28 +1275,29 @@ void FMultiBlockThingsIterator::Reset()
//
//===========================================================================

class DBlockThingsIterator : public DObject, public FMultiBlockThingsIterator
class DBlockThingsIterator : public DObject
{
DECLARE_ABSTRACT_CLASS(DBlockThingsIterator, DObject);
FPortalGroupArray check;
FMultiBlockThingsIterator iterator;
public:
FMultiBlockThingsIterator::CheckResult cres;

bool Next()
{
return FMultiBlockThingsIterator::Next(&cres);
return iterator.Next(&cres);
}

DBlockThingsIterator(AActor *origin, double checkradius = -1, bool ignorerestricted = false)
: FMultiBlockThingsIterator(check, origin, checkradius, ignorerestricted)
: iterator(check, origin, checkradius, ignorerestricted)
{
cres.thing = nullptr;
cres.Position.Zero();
cres.portalflags = 0;
}

DBlockThingsIterator(double checkx, double checky, double checkz, double checkh, double checkradius, bool ignorerestricted, sector_t *newsec)
: FMultiBlockThingsIterator(check, checkx, checky, checkz, checkh, checkradius, ignorerestricted, newsec)
: iterator(check, checkx, checky, checkz, checkh, checkradius, ignorerestricted, newsec)
{
cres.thing = nullptr;
cres.Position.Zero();
Expand Down

0 comments on commit be81474

Please sign in to comment.