mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 07:12:36 +00:00
- fixed: MBF21' scrollers need to divide the offsets by 8.
This commit is contained in:
parent
9082ef7d49
commit
92a92b1303
3 changed files with 9 additions and 8 deletions
|
@ -1373,6 +1373,7 @@ void MapLoader::SpawnScrollers()
|
||||||
|
|
||||||
case Scroll_Texture_Offsets:
|
case Scroll_Texture_Offsets:
|
||||||
{
|
{
|
||||||
|
double divider = max(1, l->args[3]);
|
||||||
// killough 3/2/98: scroll according to sidedef offsets
|
// killough 3/2/98: scroll according to sidedef offsets
|
||||||
side = l->sidedef[0];
|
side = l->sidedef[0];
|
||||||
if (l->args[2] & 3)
|
if (l->args[2] & 3)
|
||||||
|
@ -1383,18 +1384,18 @@ void MapLoader::SpawnScrollers()
|
||||||
if (l->args[2] & 2)
|
if (l->args[2] & 2)
|
||||||
accel = 1;
|
accel = 1;
|
||||||
}
|
}
|
||||||
|
double dx = -side->GetTextureXOffset(side_t::mid) / divider;
|
||||||
|
double dy = side->GetTextureYOffset(side_t::mid) / divider;
|
||||||
if (l->args[1] == 0)
|
if (l->args[1] == 0)
|
||||||
{
|
{
|
||||||
Level->CreateThinker<DScroller>(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid),
|
Level->CreateThinker<DScroller>(EScroll::sc_side, dx, dy, control, nullptr, side, accel, SCROLLTYPE(l->args[0]));
|
||||||
side->GetTextureYOffset(side_t::mid), control, nullptr, side, accel, SCROLLTYPE(l->args[0]));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto it = Level->GetLineIdIterator(l->args[1]);
|
auto it = Level->GetLineIdIterator(l->args[1]);
|
||||||
while (int ln = it.Next())
|
while (int ln = it.Next())
|
||||||
{
|
{
|
||||||
Level->CreateThinker<DScroller>(EScroll::sc_side, -side->GetTextureXOffset(side_t::mid),
|
Level->CreateThinker<DScroller>(EScroll::sc_side, dx, dy, control, nullptr, Level->lines[ln].sidedef[0], accel, SCROLLTYPE(l->args[0]));
|
||||||
side->GetTextureYOffset(side_t::mid), control, nullptr, Level->lines[ln].sidedef[0], accel, SCROLLTYPE(l->args[0]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -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_Texture_Model, 222, -1, -1, 2)
|
||||||
DEFINE_SPECIAL(Scroll_Floor, 223, 4, 4, 5)
|
DEFINE_SPECIAL(Scroll_Floor, 223, 4, 4, 5)
|
||||||
DEFINE_SPECIAL(Scroll_Ceiling, 224, 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(ACS_ExecuteAlways, 226, 1, 5, 5)
|
||||||
DEFINE_SPECIAL(PointPush_SetForce, 227, -1, -1, 4)
|
DEFINE_SPECIAL(PointPush_SetForce, 227, -1, -1, 4)
|
||||||
DEFINE_SPECIAL(Plat_RaiseAndStayTx0, 228, 2, 3, 3)
|
DEFINE_SPECIAL(Plat_RaiseAndStayTx0, 228, 2, 3, 3)
|
||||||
|
|
|
@ -376,9 +376,9 @@ include "xlat/defines.i"
|
||||||
439 = SHOOT|REP, Floor_RaiseByValue (tag, F_SLOW, 2)
|
439 = SHOOT|REP, Floor_RaiseByValue (tag, F_SLOW, 2)
|
||||||
|
|
||||||
// MBF21 extensions
|
// MBF21 extensions
|
||||||
1024 = 0, Scroll_Texture_Offsets(0, tag, 0)
|
1024 = 0, Scroll_Texture_Offsets(0, tag, 0, 8)
|
||||||
1025 = 0, Scroll_Texture_Offsets(0, tag, 1)
|
1025 = 0, Scroll_Texture_Offsets(0, tag, 1, 8)
|
||||||
1026 = 0, Scroll_Texture_Offsets(0, tag, 2)
|
1026 = 0, Scroll_Texture_Offsets(0, tag, 2, 8)
|
||||||
|
|
||||||
/****** BOOM generalized linetypes ******
|
/****** BOOM generalized linetypes ******
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue