mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-22 10:52:23 +00:00
Implement linedef executor for changing linedef args
This commit is contained in:
parent
e7869039db
commit
c76d0e3326
2 changed files with 48 additions and 0 deletions
|
@ -4584,6 +4584,31 @@ udmf
|
|||
enum = "setadd";
|
||||
}
|
||||
}
|
||||
|
||||
468
|
||||
{
|
||||
title = "Change Linedef Argument";
|
||||
prefix = "(468)";
|
||||
arg0
|
||||
{
|
||||
title = "Linedef tag";
|
||||
type = 15;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Argument";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Value";
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Set/Add?";
|
||||
type = 11;
|
||||
enum = "setadd";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
linedefexecpoly
|
||||
|
|
23
src/p_spec.c
23
src/p_spec.c
|
@ -3778,6 +3778,29 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
|
|||
}
|
||||
break;
|
||||
|
||||
case 468: // Change linedef executor argument
|
||||
{
|
||||
INT32 linenum;
|
||||
|
||||
if (!udmf)
|
||||
break;
|
||||
|
||||
if (line->args[1] < 0 || line->args[1] >= NUMLINEARGS)
|
||||
{
|
||||
CONS_Debug(DBG_GAMELOGIC, "Linedef type 468: Invalid linedef arg %d\n", line->args[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
TAG_ITER_LINES(line->args[0], linenum)
|
||||
{
|
||||
if (line->args[3])
|
||||
lines[linenum].args[line->args[1]] += line->args[2];
|
||||
else
|
||||
lines[linenum].args[line->args[1]] = line->args[2];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 480: // Polyobj_DoorSlide
|
||||
case 481: // Polyobj_DoorSwing
|
||||
PolyDoor(line);
|
||||
|
|
Loading…
Reference in a new issue