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; type = 13;
} }
arg1 arg1
{
title = "Alpha";
default = 128;
}
arg2
{ {
title = "Damage bosses?"; title = "Damage bosses?";
type = 11; type = 11;

View file

@ -3373,8 +3373,12 @@ 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;
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) if (lines[i].flags & ML_EFFECT1)
lines[i].args[1] = 1; lines[i].args[2] = 1;
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,8 @@ 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[1])); P_AddLaserThinker(lines[i].args[0], lines + i, !!(lines[i].args[2]));
P_AddFakeFloorsByLine(i, (lines[i].alpha * 0xff) >> FRACBITS, FF_EXISTS|FF_RENDERALL|FF_NOSHADE|FF_EXTRA|FF_CUTEXTRA|FF_TRANSLUCENT, secthinkers); P_AddFakeFloorsByLine(i, lines[i].args[1], FF_EXISTS|FF_RENDERALL|FF_NOSHADE|FF_EXTRA|FF_CUTEXTRA|FF_TRANSLUCENT, secthinkers);
break; break;
case 259: // Custom FOF case 259: // Custom FOF