From 583734861ed49d22ba7d147c1601070ccd8496a9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 12 Jan 2020 13:21:15 +0100 Subject: [PATCH] - compatibility workaround for using Scroll_Texture_Model with a line id of 0. This would do very bad things if not being checked for. --- src/maploader/specials.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/maploader/specials.cpp b/src/maploader/specials.cpp index b30baba49..64f3ea7b8 100644 --- a/src/maploader/specials.cpp +++ b/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) { - if (s != (int)i) - Level->CreateThinker(dx, dy, &Level->lines[s], control, accel); + auto itr = Level->GetLineIdIterator(l->args[0]); + while ((s = itr.Next()) >= 0) + { + if (s != (int)i) + Level->CreateThinker(dx, dy, &Level->lines[s], control, accel); + } + } + else + { + Level->CreateThinker(dx, dy, l, control, accel); } break; }