Implement "add airbob thinker to FOF" linedef type

This commit is contained in:
MascaraSnake 2020-05-01 19:29:19 +02:00
parent d7363ff87a
commit cada0d2928
2 changed files with 39 additions and 0 deletions

View file

@ -1941,6 +1941,32 @@ udmf
enum = "noyes";
}
}
261
{
title = "Add Air Bobbing Thinker";
prefix = "(261)";
arg0
{
title = "Control linedef tag";
type = 15;
}
arg1
{
title = "Bobbing distance";
}
arg2
{
title = "Flags";
type = 12;
enum
{
1 = "Raise";
2 = "Require spindash";
4 = "Dynamic";
}
}
}
}
linedefexecmisc

View file

@ -6989,6 +6989,19 @@ void P_SpawnSpecials(boolean fromnetsave)
}
break;
case 261: // Add air bob thinker to FOF
if (udmf)
{
for (l = -1; (l = P_FindLineFromTag(lines[i].args[0], l)) >= 0 ;)
{
if (lines[l].special < 100 || lines[l].special >= 300)
continue;
P_AddAirbob(lines[l].frontsector, lines[l].args[0], lines[i].args[1] << FRACBITS, !!(lines[i].args[2] & TMFB_REVERSE), !!(lines[i].args[2] & TMFB_SPINDASH), !!(lines[i].args[2] & TMFB_DYNAMIC));
}
}
break;
case 300: // Linedef executor (combines with sector special 974/975) and commands
case 302:
case 303: