Handle splat flag for laser FOFs

This commit is contained in:
MascaraSnake 2020-06-12 10:17:52 +02:00
parent cadb03fd12
commit cc6820187c
4 changed files with 26 additions and 6 deletions

View file

@ -2152,9 +2152,13 @@ udmf
}
arg2
{
title = "Damage bosses?";
type = 11;
enum = "yesno";
title = "Flags";
type = 12;
enum
{
1 = "Don't damage bosses";
2 = "Cut cyan flat pixels";
}
}
}

View file

@ -3373,12 +3373,19 @@ static void P_ConvertBinaryMap(void)
break;
case 258: //FOF: Laser
lines[i].args[0] = lines[i].tag;
//Alpha
if (sides[lines[i].sidenum[0]].toptexture > 0)
lines[i].args[1] = sides[lines[i].sidenum[0]].toptexture;
else
lines[i].args[1] = 128;
//Flags
if (lines[i].flags & ML_EFFECT1)
lines[i].args[2] = 1;
lines[i].args[2] = TMFL_NOBOSSES;
if (lines[i].flags & ML_EFFECT6)
lines[i].args[2] = TMFL_SPLAT;
break;
case 259: //Custom FOF
if (lines[i].sidenum[1] == 0xffff)

View file

@ -6927,8 +6927,11 @@ void P_SpawnSpecials(boolean fromnetsave)
break;
case 258: // Laser block
P_AddLaserThinker(lines[i].args[0], lines + i, !!(lines[i].args[2]));
P_AddFakeFloorsByLine(i, lines[i].args[1], FF_EXISTS|FF_RENDERALL|FF_NOSHADE|FF_EXTRA|FF_CUTEXTRA|FF_TRANSLUCENT, secthinkers);
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_NOSHADE|FF_EXTRA|FF_CUTEXTRA|FF_TRANSLUCENT;
P_AddLaserThinker(lines[i].args[0], lines + i, !!(lines[i].args[2] & TMFL_NOBOSSES));
if (lines[i].args[2] & TMFL_SPLAT)
ffloorflags |= FF_SPLAT;
P_AddFakeFloorsByLine(i, lines[i].args[1], ffloorflags, secthinkers);
break;
case 259: // Custom FOF

View file

@ -97,6 +97,12 @@ typedef enum
TMFB_ONLYBOTTOM = 1<<2,
} textmapfofbustflags_t;
typedef enum
{
TMFL_NOBOSSES = 1,
TMFL_SPLAT = 1<<1,
} textmapfoflaserflags_t;
// GETSECSPECIAL (specialval, section)
//
// Pulls out the special # from a particular section.