- 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

@ -1324,6 +1324,8 @@ void MapLoader::SpawnScrollers()
// killough 3/1/98: scroll wall according to linedef // killough 3/1/98: scroll wall according to linedef
// (same direction and speed as scrolling floors) // (same direction and speed as scrolling floors)
case Scroll_Texture_Model: case Scroll_Texture_Model:
{
if (l->args[0] != 0)
{ {
auto itr = Level->GetLineIdIterator(l->args[0]); auto itr = Level->GetLineIdIterator(l->args[0]);
while ((s = itr.Next()) >= 0) while ((s = itr.Next()) >= 0)
@ -1331,6 +1333,11 @@ void MapLoader::SpawnScrollers()
if (s != (int)i) if (s != (int)i)
Level->CreateThinker<DScroller>(dx, dy, &Level->lines[s], control, accel); Level->CreateThinker<DScroller>(dx, dy, &Level->lines[s], control, accel);
} }
}
else
{
Level->CreateThinker<DScroller>(dx, dy, l, control, accel);
}
break; break;
} }