mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +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
|
170
|
||||||
{
|
{
|
||||||
title = "Crumbling";
|
title = "Crumbling";
|
||||||
|
|
|
@ -2931,6 +2931,20 @@ static void P_ConvertBinaryMap(void)
|
||||||
|
|
||||||
lines[i].special = 100;
|
lines[i].special = 100;
|
||||||
break;
|
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 170: //FOF: Crumbling, respawn
|
||||||
case 171: //FOF: Crumbling, no respawn
|
case 171: //FOF: Crumbling, no respawn
|
||||||
case 172: //FOF: Crumbling, respawn, intangible from bottom
|
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;
|
break;
|
||||||
|
|
||||||
case 150: // Air bobbing platform
|
case 150: // Air bobbing platform
|
||||||
case 151: // Adjustable air bobbing platform
|
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL;
|
||||||
{
|
|
||||||
fixed_t dist = (lines[i].special == 150) ? 16*FRACUNIT : P_AproxDistance(lines[i].dx, lines[i].dy);
|
//Tangibility settings
|
||||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
|
if (lines[i].args[3] & TMFT_INTANGIBLETOP)
|
||||||
P_AddAirbob(lines[i].frontsector, lines + i, dist, false, !!(lines[i].flags & ML_NOCLIMB), false);
|
ffloorflags |= FF_REVERSEPLATFORM;
|
||||||
break;
|
if (lines[i].args[3] & TMFT_INTANGIBLEBOTTOM)
|
||||||
}
|
ffloorflags |= FF_PLATFORM;
|
||||||
case 152: // Adjustable air bobbing platform in reverse
|
if (lines[i].args[3] & TMFT_DONTBLOCKPLAYER)
|
||||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
|
ffloorflags &= ~FF_BLOCKPLAYER;
|
||||||
P_AddAirbob(lines[i].frontsector, lines + i, P_AproxDistance(lines[i].dx, lines[i].dy), true, !!(lines[i].flags & ML_NOCLIMB), false);
|
if (lines[i].args[3] & TMFT_DONTBLOCKOTHERS)
|
||||||
break;
|
ffloorflags &= ~FF_BLOCKOTHERS;
|
||||||
case 153: // Dynamic Sinking Platform
|
|
||||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);
|
//If player can enter it, cut inner walls
|
||||||
P_AddAirbob(lines[i].frontsector, lines + i, P_AproxDistance(lines[i].dx, lines[i].dy), false, !!(lines[i].flags & ML_NOCLIMB), true);
|
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;
|
break;
|
||||||
|
|
||||||
case 160: // Float/bob platform
|
case 160: // Float/bob platform
|
||||||
|
|
|
@ -54,6 +54,13 @@ typedef enum
|
||||||
TMFW_GOOWATER = 1<<5,
|
TMFW_GOOWATER = 1<<5,
|
||||||
} textmapfofwater_t;
|
} textmapfofwater_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
TMFB_REVERSE = 1,
|
||||||
|
TMFB_SPINDASH = 1<<1,
|
||||||
|
TMFB_DYNAMIC = 1<<2,
|
||||||
|
} textmapfofbobbing_t;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TMFC_TRANSLUCENT = 1,
|
TMFC_TRANSLUCENT = 1,
|
||||||
|
|
Loading…
Reference in a new issue