- replaced P_FindSectorFromTag with an FSectorTagIterator class.
This is done to encapsulate the gory details of tag search in one place so that the implementation of multiple tags per sector remains contained to a few isolated spots in the code. This also moves the special 'tag == 0 -> activate backsector' handling into the iterator class.
This commit is contained in:
parent
7b4f950330
commit
425e5b9ffc
18 changed files with 354 additions and 329 deletions
|
|
@ -484,8 +484,8 @@ bool EV_DoDoor (DDoor::EVlDoor type, line_t *line, AActor *thing,
|
|||
else
|
||||
{ // [RH] Remote door
|
||||
|
||||
secnum = -1;
|
||||
while ((secnum = P_FindSectorFromTag (tag,secnum)) >= 0)
|
||||
FSectorTagIterator it(tag);
|
||||
while ((secnum = it.Next()) >= 0)
|
||||
{
|
||||
sec = §ors[secnum];
|
||||
// if the ceiling is already moving, don't start the door action
|
||||
|
|
@ -812,7 +812,8 @@ bool EV_SlidingDoor (line_t *line, AActor *actor, int tag, int speed, int delay)
|
|||
return false;
|
||||
}
|
||||
|
||||
while ((secnum = P_FindSectorFromTag (tag, secnum)) >= 0)
|
||||
FSectorTagIterator it(tag);
|
||||
while ((secnum = it.Next()) >= 0)
|
||||
{
|
||||
sec = §ors[secnum];
|
||||
if (sec->ceilingdata != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue