mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Add linedef actions 507 & 508, allow using offsets for actions 502-504.
This commit is contained in:
parent
6f854f2de3
commit
934b28989f
2 changed files with 56 additions and 4 deletions
|
@ -2611,31 +2611,49 @@ linedeftypes
|
|||
{
|
||||
title = "Scroll Wall According to Linedef";
|
||||
prefix = "(502)";
|
||||
flags128text = "[7] Use texture offsets";
|
||||
flags256text = "[8] Scroll back side";
|
||||
}
|
||||
|
||||
503
|
||||
{
|
||||
title = "Scroll Wall According to Linedef (Accelerative)";
|
||||
prefix = "(503)";
|
||||
flags128text = "[7] Use texture offsets";
|
||||
flags256text = "[8] Scroll back side";
|
||||
}
|
||||
|
||||
504
|
||||
{
|
||||
title = "Scroll Wall According to Linedef (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
|
||||
|
|
36
src/p_spec.c
36
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)
|
||||
{
|
||||
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