UDMF: Add back #900 and #901 additive, subtractive special alpha values for FOFs

Fix fourth digit blend mode being off by one.

see ebe38ff518
This commit is contained in:
James R 2022-10-16 18:06:02 -07:00
parent 8a8126567b
commit 42f9443de1
2 changed files with 16 additions and 4 deletions

View file

@ -3838,10 +3838,21 @@ static void P_SetBinaryFOFAlpha(line_t *line)
if (sides[line->sidenum[0]].toptexture > 0)
{
line->args[1] = sides[line->sidenum[0]].toptexture;
if (sides[line->sidenum[0]].toptexture >= 1001)
if (line->args[1] == 901) // additive special
{
line->args[1] = 0xff;
line->args[2] = TMB_ADD;
}
else if (line->args[1] == 902) // subtractive special
{
line->args[1] = 0xff;
line->args[2] = TMB_SUBTRACT;
}
else if (line->args[1] >= 1001) // fourth digit
{
line->args[2] = (sides[line->sidenum[0]].toptexture/1000);
line->args[1] %= 1000;
line->args[2] = (sides[line->sidenum[0]].toptexture/1000) + 1; // becomes an AST
}
}
else

View file

@ -5102,8 +5102,9 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I
else th = th->next;
}
fflr->alpha = max(0, min(0xff, alpha));
if (fflr->alpha < 0xff || flags & FOF_SPLAT)
//fflr->alpha = max(0, min(0xff, alpha));
fflr->alpha = alpha;
if (blendmode != TMB_TRANSLUCENT || fflr->alpha != 0xff || flags & FOF_SPLAT)
{
fflr->fofflags |= FOF_TRANSLUCENT;
fflr->spawnflags = fflr->fofflags;