Revamp alpha setup for bobbing FOFs

This commit is contained in:
MascaraSnake 2020-06-12 10:53:27 +02:00
parent 3317827151
commit 6521496d8a
3 changed files with 75 additions and 43 deletions

View file

@ -1825,9 +1825,20 @@ udmf
}
arg1
{
title = "Bobbing distance";
title = "Alpha";
default = 255;
}
arg2
{
title = "Cut cyan flat pixels?";
type = 11;
enum = "noyes";
}
arg3
{
title = "Bobbing distance";
}
arg4
{
title = "Flags";
type = 12;
@ -1838,7 +1849,7 @@ udmf
4 = "Dynamic";
}
}
arg3
arg5
{
title = "Tangibility";
type = 12;
@ -1856,6 +1867,17 @@ udmf
type = 13;
}
arg1
{
title = "Alpha";
default = 255;
}
arg2
{
title = "Cut cyan flat pixels?";
type = 11;
enum = "noyes";
}
arg3
{
title = "Tangibility";
type = 12;

View file

@ -3140,15 +3140,30 @@ static void P_ConvertBinaryMap(void)
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 : (P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS);
lines[i].args[1] = 255;
lines[i].args[2] = !!(lines[i].flags & ML_EFFECT6);
lines[i].args[3] = (lines[i].special == 150) ? 16 : (P_AproxDistance(lines[i].dx, lines[i].dy) >> FRACBITS);
//Flags
if (lines[i].special == 152)
lines[i].args[2] |= TMFB_REVERSE;
lines[i].args[4] |= TMFB_REVERSE;
if (lines[i].flags & ML_NOCLIMB)
lines[i].args[2] |= TMFB_SPINDASH;
lines[i].args[4] |= TMFB_SPINDASH;
if (lines[i].special == 153)
lines[i].args[2] |= TMFB_DYNAMIC;
lines[i].args[4] |= TMFB_DYNAMIC;
//Tangibility
if (lines[i].flags & ML_EFFECT1)
lines[i].args[5] |= TMFT_DONTBLOCKOTHERS;
if (lines[i].flags & ML_EFFECT2)
lines[i].args[5] |= TMFT_DONTBLOCKPLAYER;
lines[i].special = 150;
break;
case 160: //FOF: Water bobbing
lines[i].args[0] = lines[i].tag;
lines[i].args[1] = 255;
lines[i].args[2] = !!(lines[i].flags & ML_EFFECT6);
//Tangibility
if (lines[i].flags & ML_EFFECT1)
@ -3156,17 +3171,6 @@ static void P_ConvertBinaryMap(void)
if (lines[i].flags & ML_EFFECT2)
lines[i].args[3] |= TMFT_DONTBLOCKPLAYER;
lines[i].special = 150;
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 171: //FOF: Crumbling, no respawn

View file

@ -6664,6 +6664,35 @@ void P_SpawnSpecials(boolean fromnetsave)
case 150: // FOF (Air bobbing)
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL;
if (lines[i].args[2])
ffloorflags |= FF_SPLAT;
//Tangibility settings
if (lines[i].args[5] & TMFT_INTANGIBLETOP)
ffloorflags |= FF_REVERSEPLATFORM;
if (lines[i].args[5] & TMFT_INTANGIBLEBOTTOM)
ffloorflags |= FF_PLATFORM;
if (lines[i].args[5] & TMFT_DONTBLOCKPLAYER)
ffloorflags &= ~FF_BLOCKPLAYER;
if (lines[i].args[5] & TMFT_DONTBLOCKOTHERS)
ffloorflags &= ~FF_BLOCKOTHERS;
//If player can enter it, cut inner walls
if (lines[i].args[5] & TMFT_VISIBLEFROMINSIDE)
ffloorflags |= FF_CUTEXTRA|FF_EXTRA;
else
ffloorflags |= FF_CUTLEVEL;
P_AddFakeFloorsByLine(i, lines[i].args[1], ffloorflags, secthinkers);
P_AddAirbob(lines[i].frontsector, lines[i].args[0], lines[i].args[3] << FRACBITS, !!(lines[i].args[4] & TMFB_REVERSE), !!(lines[i].args[4] & TMFB_SPINDASH), !!(lines[i].args[4] & TMFB_DYNAMIC));
break;
case 160: // FOF (Water bobbing)
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_FLOATBOB;
if (lines[i].args[2])
ffloorflags |= FF_SPLAT;
//Tangibility settings
if (lines[i].args[3] & TMFT_INTANGIBLETOP)
ffloorflags |= FF_REVERSEPLATFORM;
@ -6674,31 +6703,8 @@ void P_SpawnSpecials(boolean fromnetsave)
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, 0xff, ffloorflags, secthinkers);
P_AddAirbob(lines[i].frontsector, lines[i].args[0], lines[i].args[1] << FRACBITS, !!(lines[i].args[2] & TMFB_REVERSE), !!(lines[i].args[2] & TMFB_SPINDASH), !!(lines[i].args[2] & TMFB_DYNAMIC));
break;
case 160: // FOF (Water bobbing)
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 (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)
{
if (ffloorflags & FF_RENDERPLANES)
ffloorflags |= FF_BOTHPLANES;
@ -6706,7 +6712,7 @@ void P_SpawnSpecials(boolean fromnetsave)
ffloorflags |= FF_ALLSIDES;
}
P_AddFakeFloorsByLine(i, 0xff, ffloorflags, secthinkers);
P_AddFakeFloorsByLine(i, lines[i].args[1], ffloorflags, secthinkers);
break;
case 170: // FOF (Crumbling)
@ -6927,7 +6933,7 @@ void P_SpawnSpecials(boolean fromnetsave)
break;
case 258: // Laser block
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_NOSHADE|FF_EXTRA|FF_CUTEXTRA|FF_TRANSLUCENT;
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_NOSHADE|FF_EXTRA|FF_CUTEXTRA;
P_AddLaserThinker(lines[i].args[0], lines + i, !!(lines[i].args[2] & TMFL_NOBOSSES));
if (lines[i].args[2] & TMFL_SPLAT)
ffloorflags |= FF_SPLAT;