mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'scroller-tweaks' into 'next'
Add back side wall scrollers & allow using offsets for tagged wall scrollers. See merge request STJr/SRB2!955
This commit is contained in:
commit
07da7f7d29
2 changed files with 61 additions and 9 deletions
|
@ -2597,45 +2597,63 @@ linedeftypes
|
|||
|
||||
500
|
||||
{
|
||||
title = "Scroll Wall Front Side Left";
|
||||
title = "Scroll Front Wall Left";
|
||||
prefix = "(500)";
|
||||
}
|
||||
|
||||
501
|
||||
{
|
||||
title = "Scroll Wall Front Side Right";
|
||||
title = "Scroll Front Wall Right";
|
||||
prefix = "(501)";
|
||||
}
|
||||
|
||||
502
|
||||
{
|
||||
title = "Scroll Wall According to Linedef";
|
||||
title = "Scroll Tagged Wall";
|
||||
prefix = "(502)";
|
||||
flags128text = "[7] Use texture offsets";
|
||||
flags256text = "[8] Scroll back side";
|
||||
}
|
||||
|
||||
503
|
||||
{
|
||||
title = "Scroll Wall According to Linedef (Accelerative)";
|
||||
title = "Scroll Tagged Wall (Accelerative)";
|
||||
prefix = "(503)";
|
||||
flags128text = "[7] Use texture offsets";
|
||||
flags256text = "[8] Scroll back side";
|
||||
}
|
||||
|
||||
504
|
||||
{
|
||||
title = "Scroll Wall According to Linedef (Displacement)";
|
||||
title = "Scroll Tagged Wall (Displacement)";
|
||||
prefix = "(504)";
|
||||
flags128text = "[7] Use texture offsets";
|
||||
flags256text = "[8] Scroll back side";
|
||||
}
|
||||
|
||||
505
|
||||
{
|
||||
title = "Scroll Texture by Front Side Offsets";
|
||||
title = "Scroll Front Wall by Front Side Offsets";
|
||||
prefix = "(505)";
|
||||
}
|
||||
|
||||
506
|
||||
{
|
||||
title = "Scroll Texture by Back Side Offsets";
|
||||
title = "Scroll Front Wall by Back Side Offsets";
|
||||
prefix = "(506)";
|
||||
}
|
||||
|
||||
507
|
||||
{
|
||||
title = "Scroll Back Wall by Front Side Offsets";
|
||||
prefix = "(507)";
|
||||
}
|
||||
|
||||
508
|
||||
{
|
||||
title = "Scroll Back Wall by Back Side Offsets";
|
||||
prefix = "(508)";
|
||||
}
|
||||
}
|
||||
|
||||
planescroll
|
||||
|
|
38
src/p_spec.c
38
src/p_spec.c
|
@ -7065,6 +7065,9 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
// 503 is used for a scroller
|
||||
// 504 is used for a scroller
|
||||
// 505 is used for a scroller
|
||||
// 506 is used for a scroller
|
||||
// 507 is used for a scroller
|
||||
// 508 is used for a scroller
|
||||
// 510 is used for a scroller
|
||||
// 511 is used for a scroller
|
||||
// 512 is used for a scroller
|
||||
|
@ -7581,7 +7584,20 @@ static void P_SpawnScrollers(void)
|
|||
case 502:
|
||||
for (s = -1; (s = P_FindLineFromTag(l->tag, s)) >= 0 ;)
|
||||
if (s != (INT32)i)
|
||||
Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[0], accel, 0);
|
||||
{
|
||||
if (l->flags & ML_EFFECT2) // use texture offsets instead
|
||||
{
|
||||
dx = sides[l->sidenum[0]].textureoffset;
|
||||
dy = sides[l->sidenum[0]].rowoffset;
|
||||
}
|
||||
if (l->flags & ML_EFFECT3)
|
||||
{
|
||||
if (lines[s].sidenum[1] != 0xffff)
|
||||
Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[1], accel, 0);
|
||||
}
|
||||
else
|
||||
Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[0], accel, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case 505:
|
||||
|
@ -7595,7 +7611,25 @@ static void P_SpawnScrollers(void)
|
|||
if (s != 0xffff)
|
||||
Add_Scroller(sc_side, -sides[s].textureoffset, sides[s].rowoffset, -1, lines[i].sidenum[0], accel, 0);
|
||||
else
|
||||
CONS_Debug(DBG_GAMELOGIC, "Line special 506 (line #%s) missing 2nd side!\n", sizeu1(i));
|
||||
CONS_Debug(DBG_GAMELOGIC, "Line special 506 (line #%s) missing back side!\n", sizeu1(i));
|
||||
break;
|
||||
|
||||
case 507:
|
||||
s = lines[i].sidenum[0];
|
||||
|
||||
if (lines[i].sidenum[1] != 0xffff)
|
||||
Add_Scroller(sc_side, -sides[s].textureoffset, sides[s].rowoffset, -1, lines[i].sidenum[1], accel, 0);
|
||||
else
|
||||
CONS_Debug(DBG_GAMELOGIC, "Line special 507 (line #%s) missing back side!\n", sizeu1(i));
|
||||
break;
|
||||
|
||||
case 508:
|
||||
s = lines[i].sidenum[1];
|
||||
|
||||
if (s != 0xffff)
|
||||
Add_Scroller(sc_side, -sides[s].textureoffset, sides[s].rowoffset, -1, s, accel, 0);
|
||||
else
|
||||
CONS_Debug(DBG_GAMELOGIC, "Line special 508 (line #%s) missing back side!\n", sizeu1(i));
|
||||
break;
|
||||
|
||||
case 500: // scroll first side
|
||||
|
|
Loading…
Reference in a new issue