diff --git a/src/maploader/specials.cpp b/src/maploader/specials.cpp index 6304c41d9..2799daded 100644 --- a/src/maploader/specials.cpp +++ b/src/maploader/specials.cpp @@ -1372,11 +1372,33 @@ void MapLoader::SpawnScrollers() } case Scroll_Texture_Offsets: + { // killough 3/2/98: scroll according to sidedef offsets - side = Level->lines[i].sidedef[0]; - Level->CreateThinker(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid), - side->GetTextureYOffset(side_t::mid), nullptr, nullptr, side, accel, SCROLLTYPE(l->args[0])); + side = l->sidedef[0]; + if (l->args[2] & 3) + { + // if 1, then displacement + // if 2, then accelerative (also if 3) + control = l->sidedef[0]->sector; + if (l->args[2] & 2) + accel = 1; + } + if (l->args[1] == 0) + { + Level->CreateThinker(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid), + side->GetTextureYOffset(side_t::mid), control, nullptr, side, accel, SCROLLTYPE(l->args[0])); + } + else + { + auto it = Level->GetLineIdIterator(l->args[1]); + while (int ln = it.Next()) + { + Level->CreateThinker(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid), + side->GetTextureYOffset(side_t::mid), control, nullptr, Level->lines[ln].sidedef[0], accel, SCROLLTYPE(l->args[0])); + } + } break; + } case Scroll_Texture_Left: l->special = special; // Restore the special, for compat_useblocking's benefit. diff --git a/src/playsim/actionspecials.h b/src/playsim/actionspecials.h index 78f2e87eb..780fb0b8c 100644 --- a/src/playsim/actionspecials.h +++ b/src/playsim/actionspecials.h @@ -212,7 +212,7 @@ DEFINE_SPECIAL(Scroll_Texture_Both, 221, 5, 5, 5) DEFINE_SPECIAL(Scroll_Texture_Model, 222, -1, -1, 2) DEFINE_SPECIAL(Scroll_Floor, 223, 4, 4, 5) DEFINE_SPECIAL(Scroll_Ceiling, 224, 4, 4, 5) -DEFINE_SPECIAL(Scroll_Texture_Offsets, 225, -1, -1, 1) +DEFINE_SPECIAL(Scroll_Texture_Offsets, 225, -1, -1, 3) DEFINE_SPECIAL(ACS_ExecuteAlways, 226, 1, 5, 5) DEFINE_SPECIAL(PointPush_SetForce, 227, -1, -1, 4) DEFINE_SPECIAL(Plat_RaiseAndStayTx0, 228, 2, 3, 3) diff --git a/wadsrc/static/xlat/base.txt b/wadsrc/static/xlat/base.txt index 0fc02739e..d86e3dc7e 100644 --- a/wadsrc/static/xlat/base.txt +++ b/wadsrc/static/xlat/base.txt @@ -375,6 +375,11 @@ include "xlat/defines.i" 438 = SHOOT, Floor_RaiseByValue (tag, F_SLOW, 2) 439 = SHOOT|REP, Floor_RaiseByValue (tag, F_SLOW, 2) +// MBF21 extensions +1024 = 0, Scroll_Texture_Offsets(0, tag, 0) +1025 = 0, Scroll_Texture_Offsets(0, tag, 1) +1026 = 0, Scroll_Texture_Offsets(0, tag, 2) + /****** BOOM generalized linetypes ****** * * The general structure for a BOOM generalized translator is