Implement linedef executor for changing linedef args

This commit is contained in:
MascaraSnake 2021-12-29 10:42:20 +01:00
parent e7869039db
commit c76d0e3326
2 changed files with 48 additions and 0 deletions

View file

@ -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

View file

@ -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);