Fixed sector iteration with Floor_Stop and Ceiling_Stop action specials

https://forum.zdoom.org/viewtopic.php?t=56582
This commit is contained in:
alexey.lysiuk 2017-05-25 10:41:06 +03:00
parent 3da02764d5
commit d633e8afc1
2 changed files with 4 additions and 2 deletions

View file

@ -593,8 +593,9 @@ bool EV_CeilingCrushStop (int tag, bool remove)
bool EV_StopCeiling(int tag, line_t *line)
{
int sec;
FSectorTagIterator it(tag, line);
while (int sec = it.Next())
while ((sec = it.Next()) >= 0)
{
if (level.sectors[sec].ceilingdata)
{

View file

@ -570,8 +570,9 @@ bool EV_FloorCrushStop (int tag, line_t *line)
// same as above but stops any floor mover that was active on the given sector.
bool EV_StopFloor(int tag, line_t *line)
{
int sec;
FSectorTagIterator it(tag, line);
while (int sec = it.Next())
while ((sec = it.Next()) >= 0)
{
if (level.sectors[sec].floordata)
{