mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Implement linedef type that adds a raise thinker to an FOF
This commit is contained in:
parent
f2011cc99b
commit
d7363ff87a
2 changed files with 46 additions and 0 deletions
|
@ -1916,6 +1916,31 @@ udmf
|
||||||
enum = "yesno";
|
enum = "yesno";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
260
|
||||||
|
{
|
||||||
|
title = "Add Raise Thinker";
|
||||||
|
prefix = "(260)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Control linedef tag";
|
||||||
|
type = 15;
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "Speed";
|
||||||
|
}
|
||||||
|
arg2
|
||||||
|
{
|
||||||
|
title = "Destination height";
|
||||||
|
}
|
||||||
|
arg3
|
||||||
|
{
|
||||||
|
title = "Require spindash?";
|
||||||
|
type = 11;
|
||||||
|
enum = "noyes";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
linedefexecmisc
|
linedefexecmisc
|
||||||
|
|
21
src/p_spec.c
21
src/p_spec.c
|
@ -6450,6 +6450,7 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
switch (lines[i].special)
|
switch (lines[i].special)
|
||||||
{
|
{
|
||||||
INT32 s;
|
INT32 s;
|
||||||
|
INT32 l;
|
||||||
size_t sec;
|
size_t sec;
|
||||||
ffloortype_e ffloorflags;
|
ffloortype_e ffloorflags;
|
||||||
|
|
||||||
|
@ -6968,6 +6969,26 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
I_Error("Custom FOF (tag %d) found without a linedef back side!", lines[i].tag);
|
I_Error("Custom FOF (tag %d) found without a linedef back side!", lines[i].tag);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 260: // Add raise thinker to FOF
|
||||||
|
if (udmf)
|
||||||
|
{
|
||||||
|
fixed_t destheight = lines[i].args[2] << FRACBITS;
|
||||||
|
fixed_t startheight, topheight, bottomheight;
|
||||||
|
|
||||||
|
for (l = -1; (l = P_FindLineFromTag(lines[i].args[0], l)) >= 0 ;)
|
||||||
|
{
|
||||||
|
if (lines[l].special < 100 || lines[l].special >= 300)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
startheight = lines[l].frontsector->ceilingheight;
|
||||||
|
topheight = max(startheight, destheight);
|
||||||
|
bottomheight = min(startheight, destheight);
|
||||||
|
|
||||||
|
P_AddRaiseThinker(lines[l].frontsector, lines[l].args[0], lines[i].args[1] << FRACBITS, topheight, bottomheight, (destheight < startheight), !!(lines[i].args[3]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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:
|
||||||
|
|
Loading…
Reference in a new issue