mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 04:01:31 +00:00
- fixed BlockThingsIterator to not reset its list of processed actors when traversing portals.
This commit is contained in:
parent
39513cf7ae
commit
61739b4086
2 changed files with 5 additions and 4 deletions
|
@ -910,13 +910,13 @@ FBlockThingsIterator::FBlockThingsIterator(FLevelLocals *l, int _minx, int _miny
|
|||
Reset();
|
||||
}
|
||||
|
||||
void FBlockThingsIterator::init(const FBoundingBox &box)
|
||||
void FBlockThingsIterator::init(const FBoundingBox &box, bool clearhash)
|
||||
{
|
||||
maxy = Level->blockmap.GetBlockY(box.Top());
|
||||
miny = Level->blockmap.GetBlockY(box.Bottom());
|
||||
maxx = Level->blockmap.GetBlockX(box.Right());
|
||||
minx = Level->blockmap.GetBlockX(box.Left());
|
||||
ClearHash();
|
||||
if (clearhash) ClearHash();
|
||||
Reset();
|
||||
}
|
||||
|
||||
|
@ -1139,7 +1139,7 @@ void FMultiBlockThingsIterator::startIteratorForGroup(int group)
|
|||
offset.X += checkpoint.X;
|
||||
offset.Y += checkpoint.Y;
|
||||
bbox.setBox(offset.X, offset.Y, checkpoint.Z);
|
||||
blockIterator.init(bbox);
|
||||
blockIterator.init(bbox, false);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -1153,6 +1153,7 @@ void FMultiBlockThingsIterator::Reset()
|
|||
index = -1;
|
||||
portalflags = 0;
|
||||
startIteratorForGroup(basegroup);
|
||||
blockIterator.ClearHash();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
@ -319,7 +319,7 @@ public:
|
|||
Level = l;
|
||||
init(box);
|
||||
}
|
||||
void init(const FBoundingBox &box);
|
||||
void init(const FBoundingBox &box, bool clearhash = true);
|
||||
AActor *Next(bool centeronly = false);
|
||||
void Reset() { StartBlock(minx, miny); }
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue