Revamp alpha setup for laser FOFs

This commit is contained in:
MascaraSnake 2020-06-12 10:03:27 +02:00
parent d6a104f8a5
commit cadb03fd12
3 changed files with 12 additions and 3 deletions

View file

@ -2146,6 +2146,11 @@ udmf
type = 13;
}
arg1
{
title = "Alpha";
default = 128;
}
arg2
{
title = "Damage bosses?";
type = 11;

View file

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

View file

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