Adapt setup of water bobbing FOF

This commit is contained in:
MascaraSnake 2020-04-27 11:05:27 +02:00
parent f6b67d8253
commit 7198cc46fd
3 changed files with 53 additions and 5 deletions

View file

@ -397,7 +397,7 @@ doom
} }
160 160
{ {
title = "Floating, Bobbing"; title = "Water Bobbing";
prefix = "(160)"; prefix = "(160)";
} }
190 190
@ -1615,6 +1615,23 @@ udmf
} }
} }
160
{
title = "Water Bobbing";
prefix = "(160)";
arg0
{
title = "Target sector tag";
type = 13;
}
arg1
{
title = "Tangibility";
type = 12;
enum = "tangibility";
}
}
170 170
{ {
title = "Crumbling"; title = "Crumbling";

View file

@ -2954,6 +2954,16 @@ static void P_ConvertBinaryMap(void)
lines[i].special = 150; lines[i].special = 150;
break; break;
case 160: //FOF: Water bobbing
lines[i].args[0] = lines[i].tag;
//Tangibility
if (lines[i].flags & ML_EFFECT1)
lines[i].args[1] |= TMFT_DONTBLOCKOTHERS;
if (lines[i].flags & ML_EFFECT2)
lines[i].args[1] |= TMFT_DONTBLOCKPLAYER;
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

View file

@ -6734,7 +6734,7 @@ void P_SpawnSpecials(boolean fromnetsave)
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers); P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break; break;
case 150: // Air bobbing platform case 150: // FOF (Air bobbing)
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL; ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL;
//Tangibility settings //Tangibility settings
@ -6757,11 +6757,32 @@ void P_SpawnSpecials(boolean fromnetsave)
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)); 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: // FOF (Water bobbing)
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL|FF_FLOATBOB, secthinkers); ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_FLOATBOB;
//Tangibility settings
if (lines[i].args[1] & TMFT_INTANGIBLETOP)
ffloorflags |= FF_REVERSEPLATFORM;
if (lines[i].args[1] & TMFT_INTANGIBLEBOTTOM)
ffloorflags |= FF_PLATFORM;
if (lines[i].args[1] & TMFT_DONTBLOCKPLAYER)
ffloorflags &= ~FF_BLOCKPLAYER;
if (lines[i].args[1] & TMFT_DONTBLOCKOTHERS)
ffloorflags &= ~FF_BLOCKOTHERS;
//If player can enter it, render insides
if (lines[i].args[1] & TMFT_VISIBLEFROMINSIDE)
{
if (ffloorflags & FF_RENDERPLANES)
ffloorflags |= FF_BOTHPLANES;
if (ffloorflags & FF_RENDERSIDES)
ffloorflags |= FF_ALLSIDES;
}
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break; break;
case 170: // Crumbling platform case 170: // FOF (Crumbling)
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CRUMBLE; ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CRUMBLE;
//Tangibility settings //Tangibility settings