Implement "set linedef executor delay" linedef type

This commit is contained in:
MascaraSnake 2020-05-03 21:03:15 +02:00
parent f26648e6f2
commit a881662ca9
3 changed files with 47 additions and 0 deletions

View file

@ -1693,6 +1693,31 @@ udmf
type = 13;
}
}
465
{
title = "Set Linedef Executor Delay";
prefix = "(465)";
arg0
{
title = "Linedef tag";
type = 15;
}
arg1
{
title = "Value";
}
arg2
{
title = "Set/add?";
type = 11;
enum
{
0 = "Set";
1 = "Add";
}
}
}
}
light

View file

@ -242,6 +242,11 @@ universalfields
type = 2;
default = "";
}
executordelay
{
type = 0;
default = 0;
}
}
sidedef

View file

@ -4036,6 +4036,23 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
break;
case 465: // Set linedef executor delay
{
INT32 linenum;
if (!udmf)
break;
for (linenum = -1; (linenum = P_FindLineFromTag(line->args[0], linenum)) >= 0 ;)
{
if (line->args[2])
lines[linenum].executordelay += line->args[1];
else
lines[linenum].executordelay = line->args[1];
}
}
break;
#ifdef POLYOBJECTS
case 480: // Polyobj_DoorSlide
case 481: // Polyobj_DoorSwing