Skip to content

Commit

Permalink
- compatibility workaround for using Scroll_Texture_Model with a line…
Browse files Browse the repository at this point in the history
… id of 0.

This would do very bad things if not being checked for.
  • Loading branch information
coelckers committed Jan 12, 2020
1 parent e3eae62 commit 5837348
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/maploader/specials.cpp
Expand Up @@ -1325,11 +1325,18 @@ void MapLoader::SpawnScrollers()
// (same direction and speed as scrolling floors)
case Scroll_Texture_Model:
{
auto itr = Level->GetLineIdIterator(l->args[0]);
while ((s = itr.Next()) >= 0)
if (l->args[0] != 0)
{
auto itr = Level->GetLineIdIterator(l->args[0]);
while ((s = itr.Next()) >= 0)
{
if (s != (int)i)
Level->CreateThinker<DScroller>(dx, dy, &Level->lines[s], control, accel);
}
}
else
{
if (s != (int)i)
Level->CreateThinker<DScroller>(dx, dy, &Level->lines[s], control, accel);
Level->CreateThinker<DScroller>(dx, dy, l, control, accel);
}
break;
}
Expand Down

0 comments on commit 5837348

Please sign in to comment.