Skip to content
Permalink
Browse files

- compatibility workaround for using Scroll_Texture_Model with a line…

… 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 583734861ed49d22ba7d147c1601070ccd8496a9
Showing with 11 additions and 4 deletions.
  1. +11 −4 src/maploader/specials.cpp
@@ -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;
}

0 comments on commit 5837348

Please sign in to comment.
You can’t perform that action at this time.