Implement "add thwomp thinker to FOF" linedef type

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

View file

@ -1967,6 +1967,30 @@ udmf
} }
} }
} }
262
{
title = "Thwomp Block";
prefix = "(262)";
arg0
{
title = "Target sector tag";
type = 13;
}
arg1
{
title = "Falling speed";
}
arg2
{
title = "Rising speed";
}
stringarg0
{
title = "Crushing sound";
type = 2;
}
}
} }
linedefexecmisc linedefexecmisc

View file

@ -7002,6 +7002,21 @@ void P_SpawnSpecials(boolean fromnetsave)
} }
break; break;
case 262: // Add thwomp thinker to FOF
if (udmf)
{
UINT16 sound = (lines[i].stringargs[0]) ? get_number(lines[i].stringargs[0]) : sfx_thwomp;
for (l = -1; (l = P_FindLineFromTag(lines[i].args[0], l)) >= 0 ;)
{
if (lines[l].special < 100 || lines[l].special >= 300)
continue;
P_AddThwompThinker(lines[l].frontsector, lines[l].args[0], &lines[l], lines[i].args[1] << FRACBITS, lines[i].args[2] << FRACBITS, sound);
}
}
break;
case 300: // Linedef executor (combines with sector special 974/975) and commands case 300: // Linedef executor (combines with sector special 974/975) and commands
case 302: case 302:
case 303: case 303: