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 arg2
{ {
title = "Damage bosses?"; title = "Flags";
type = 11; type = 12;
enum = "yesno"; enum
{
1 = "Don't damage bosses";
2 = "Cut cyan flat pixels";
}
} }
} }

View file

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

View file

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

View file

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