From 92a92b13038b0ff12953340dcfebab34a9738a75 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Jul 2021 11:33:34 +0200 Subject: [PATCH] - fixed: MBF21' scrollers need to divide the offsets by 8. --- src/maploader/specials.cpp | 9 +++++---- src/playsim/actionspecials.h | 2 +- wadsrc/static/xlat/base.txt | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/maploader/specials.cpp b/src/maploader/specials.cpp index 2799daded3..2024954f77 100644 --- a/src/maploader/specials.cpp +++ b/src/maploader/specials.cpp @@ -1373,6 +1373,7 @@ void MapLoader::SpawnScrollers() case Scroll_Texture_Offsets: { + double divider = max(1, l->args[3]); // killough 3/2/98: scroll according to sidedef offsets side = l->sidedef[0]; if (l->args[2] & 3) @@ -1383,18 +1384,18 @@ void MapLoader::SpawnScrollers() if (l->args[2] & 2) accel = 1; } + double dx = -side->GetTextureXOffset(side_t::mid) / divider; + double dy = side->GetTextureYOffset(side_t::mid) / divider; 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])); + Level->CreateThinker(EScroll::sc_side, dx, dy, 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])); + Level->CreateThinker(EScroll::sc_side, dx, dy, control, nullptr, Level->lines[ln].sidedef[0], accel, SCROLLTYPE(l->args[0])); } } break; diff --git a/src/playsim/actionspecials.h b/src/playsim/actionspecials.h index 780fb0b8ce..2e5e95b724 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, 3) +DEFINE_SPECIAL(Scroll_Texture_Offsets, 225, -1, -1, 4) 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 d86e3dc7e8..99e5ec7324 100644 --- a/wadsrc/static/xlat/base.txt +++ b/wadsrc/static/xlat/base.txt @@ -376,9 +376,9 @@ include "xlat/defines.i" 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) +1024 = 0, Scroll_Texture_Offsets(0, tag, 0, 8) +1025 = 0, Scroll_Texture_Offsets(0, tag, 1, 8) +1026 = 0, Scroll_Texture_Offsets(0, tag, 2, 8) /****** BOOM generalized linetypes ****** *