mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Adapt setup of air bobbing FOFs
This commit is contained in:
parent
e00531ed9c
commit
607aeb3a52
4 changed files with 73 additions and 14 deletions
|
@ -1583,6 +1583,38 @@ udmf
|
|||
}
|
||||
}
|
||||
|
||||
150
|
||||
{
|
||||
title = "Air Bobbing";
|
||||
prefix = "(150)";
|
||||
arg0
|
||||
{
|
||||
title = "Target sector tag";
|
||||
type = 13;
|
||||
}
|
||||
arg1
|
||||
{
|
||||
title = "Bobbing distance";
|
||||
}
|
||||
arg2
|
||||
{
|
||||
title = "Flags";
|
||||
type = 12;
|
||||
enum
|
||||
{
|
||||
1 = "Raise";
|
||||
2 = "Require spindash";
|
||||
4 = "Dynamic";
|
||||
}
|
||||
}
|
||||
arg3
|
||||
{
|
||||
title = "Tangibility";
|
||||
type = 12;
|
||||
enum = "tangibility";
|
||||
}
|
||||
}
|
||||
|
||||
170
|
||||
{
|
||||
title = "Crumbling";
|
||||
|
|
|
@ -2931,6 +2931,20 @@ static void P_ConvertBinaryMap(void)
|
|||
|
||||
lines[i].special = 100;
|
||||
break;
|
||||
case 150: //FOF: Air bobbing
|
||||
case 151: //FOF: Air bobbing (adjustable)
|
||||
case 152: //FOF: Reverse air bobbing (adjustable)
|
||||
case 153: //FOF: Dynamically sinking platform
|
||||
lines[i].args[0] = lines[i].tag;
|
||||
lines[i].args[1] = (lines[i].special == 150) ? 16*FRACUNIT : P_AproxDistance(lines[i].dx, lines[i].dy);
|
||||
if (lines[i].special == 152)
|
||||
lines[i].args[2] |= TMFB_REVERSE;
|
||||
if (lines[i].flags & ML_NOCLIMB)
|
||||
lines[i].args[2] |= TMFB_SPINDASH;
|
||||
if (lines[i].special == 153)
|
||||
lines[i].args[3] |= TMFB_DYNAMIC;
|
||||
lines[i].special = 150;
|
||||
break;
|
||||
case 170: //FOF: Crumbling, respawn
|
||||
case 171: //FOF: Crumbling, no respawn
|
||||
case 172: //FOF: Crumbling, respawn, intangible from bottom
|
||||
|
|
34
src/p_spec.c
34
src/p_spec.c
|
@ -6735,20 +6735,26 @@ void P_SpawnSpecials(boolean fromnetsave)
|
|||
break;
|
||||
|
||||
case 150: // Air bobbing platform
|
||||
case 151: // Adjustable air bobbing platform
|
||||
{
|
||||
fixed_t dist = (lines[i].special == 150) ? 16*FRACUNIT : P_AproxDistance(lines[i].dx, lines[i].dy);
|
||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
|
||||
P_AddAirbob(lines[i].frontsector, lines + i, dist, false, !!(lines[i].flags & ML_NOCLIMB), false);
|
||||
break;
|
||||
}
|
||||
case 152: // Adjustable air bobbing platform in reverse
|
||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
|
||||
P_AddAirbob(lines[i].frontsector, lines + i, P_AproxDistance(lines[i].dx, lines[i].dy), true, !!(lines[i].flags & ML_NOCLIMB), false);
|
||||
break;
|
||||
case 153: // Dynamic Sinking Platform
|
||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
|
||||
P_AddAirbob(lines[i].frontsector, lines + i, P_AproxDistance(lines[i].dx, lines[i].dy), false, !!(lines[i].flags & ML_NOCLIMB), true);
|
||||
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL;
|
||||
|
||||
//Tangibility settings
|
||||
if (lines[i].args[3] & TMFT_INTANGIBLETOP)
|
||||
ffloorflags |= FF_REVERSEPLATFORM;
|
||||
if (lines[i].args[3] & TMFT_INTANGIBLEBOTTOM)
|
||||
ffloorflags |= FF_PLATFORM;
|
||||
if (lines[i].args[3] & TMFT_DONTBLOCKPLAYER)
|
||||
ffloorflags &= ~FF_BLOCKPLAYER;
|
||||
if (lines[i].args[3] & TMFT_DONTBLOCKOTHERS)
|
||||
ffloorflags &= ~FF_BLOCKOTHERS;
|
||||
|
||||
//If player can enter it, cut inner walls
|
||||
if (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)
|
||||
ffloorflags |= FF_CUTEXTRA|FF_EXTRA;
|
||||
else
|
||||
ffloorflags |= FF_CUTLEVEL;
|
||||
|
||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||
P_AddAirbob(lines[i].frontsector, lines + i, lines[i].args[1], !!(lines[i].args[2] & TMFB_REVERSE), !!(lines[i].args[2] & TMFB_SPINDASH), !!(lines[i].args[2] & TMFB_DYNAMIC));
|
||||
break;
|
||||
|
||||
case 160: // Float/bob platform
|
||||
|
|
|
@ -54,6 +54,13 @@ typedef enum
|
|||
TMFW_GOOWATER = 1<<5,
|
||||
} textmapfofwater_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFB_REVERSE = 1,
|
||||
TMFB_SPINDASH = 1<<1,
|
||||
TMFB_DYNAMIC = 1<<2,
|
||||
} textmapfofbobbing_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TMFC_TRANSLUCENT = 1,
|
||||
|
|
Loading…
Reference in a new issue