- compatibility workaround for using Scroll_Texture_Model with a line id of 0.

This would do very bad things if not being checked for.
This commit is contained in:
Christoph Oelckers 2020-01-12 13:21:15 +01:00
parent e3eae62af2
commit 583734861e

View file

@ -1325,11 +1325,18 @@ void MapLoader::SpawnScrollers()
// (same direction and speed as scrolling floors) // (same direction and speed as scrolling floors)
case Scroll_Texture_Model: case Scroll_Texture_Model:
{ {
auto itr = Level->GetLineIdIterator(l->args[0]); if (l->args[0] != 0)
while ((s = itr.Next()) >= 0)
{ {
if (s != (int)i) auto itr = Level->GetLineIdIterator(l->args[0]);
Level->CreateThinker<DScroller>(dx, dy, &Level->lines[s], control, accel); while ((s = itr.Next()) >= 0)
{
if (s != (int)i)
Level->CreateThinker<DScroller>(dx, dy, &Level->lines[s], control, accel);
}
}
else
{
Level->CreateThinker<DScroller>(dx, dy, l, control, accel);
} }
break; break;
} }