mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Implement FOF types 220-222
This commit is contained in:
parent
9fc2b5b1b9
commit
f8c51ccde3
3 changed files with 76 additions and 16 deletions
|
@ -1611,6 +1611,38 @@ udmf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
220
|
||||||
|
{
|
||||||
|
title = "Intangible";
|
||||||
|
prefix = "(220)";
|
||||||
|
arg0
|
||||||
|
{
|
||||||
|
title = "Target sector tag";
|
||||||
|
type = 13;
|
||||||
|
}
|
||||||
|
arg1
|
||||||
|
{
|
||||||
|
title = "Visibility";
|
||||||
|
type = 12;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
1 = "Don't render planes";
|
||||||
|
2 = "Don't render sides";
|
||||||
|
4 = "Don't render insides";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arg2
|
||||||
|
{
|
||||||
|
title = "Appearance";
|
||||||
|
type = 12;
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
1 = "Translucent";
|
||||||
|
2 = "No shadow";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
223
|
223
|
||||||
{
|
{
|
||||||
title = "Intangible, Invisible";
|
title = "Intangible, Invisible";
|
||||||
|
|
|
@ -2931,6 +2931,31 @@ static void P_ConvertBinaryMap(void)
|
||||||
case 223: //FOF: Intangible, invisible
|
case 223: //FOF: Intangible, invisible
|
||||||
lines[i].args[0] = lines[i].tag;
|
lines[i].args[0] = lines[i].tag;
|
||||||
break;
|
break;
|
||||||
|
case 220: //FOF: Intangible, opaque
|
||||||
|
case 221: //FOF: Intangible, translucent
|
||||||
|
case 222: //FOF: Intangible, sides only
|
||||||
|
lines[i].args[0] = lines[i].tag;
|
||||||
|
|
||||||
|
//Visibility
|
||||||
|
if (lines[i].special == 222)
|
||||||
|
lines[i].args[1] |= 1; //Don't render planes
|
||||||
|
if (lines[i].special != 220)
|
||||||
|
lines[i].args[1] |= 4; //Don't render insides
|
||||||
|
|
||||||
|
//Appearance
|
||||||
|
if (lines[i].special == 221)
|
||||||
|
{
|
||||||
|
lines[i].args[2] |= 1; //Translucent
|
||||||
|
if (sides[lines[i].sidenum[0]].toptexture > 0)
|
||||||
|
lines[i].alpha = (sides[lines[i].sidenum[0]].toptexture << FRACBITS)/255;
|
||||||
|
else
|
||||||
|
lines[i].alpha = FRACUNIT/2;
|
||||||
|
}
|
||||||
|
if (lines[i].special != 220 && !(lines[i].flags & ML_NOCLIMB))
|
||||||
|
lines[i].args[2] |= 2; //Don't cast shadow
|
||||||
|
|
||||||
|
lines[i].special = 220;
|
||||||
|
break;
|
||||||
case 250: //FOF: Mario block
|
case 250: //FOF: Mario block
|
||||||
lines[i].args[0] = lines[i].tag;
|
lines[i].args[0] = lines[i].tag;
|
||||||
if (lines[i].flags & ML_NOCLIMB) //Brick block
|
if (lines[i].flags & ML_NOCLIMB) //Brick block
|
||||||
|
|
35
src/p_spec.c
35
src/p_spec.c
|
@ -6959,28 +6959,31 @@ void P_SpawnSpecials(boolean fromnetsave)
|
||||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 220: // Like opaque water, but not swimmable. (Good for snow effect on FOFs)
|
case 220: //Intangible
|
||||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_RENDERALL|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES, secthinkers);
|
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES;
|
||||||
break;
|
|
||||||
|
|
||||||
case 221: // FOF (intangible, translucent)
|
//Visibility settings
|
||||||
// If line has no-climb set, give it shadows, otherwise don't
|
if (lines[i].args[1] & 1) //Don't render planes
|
||||||
ffloorflags = FF_EXISTS|FF_RENDERALL|FF_TRANSLUCENT|FF_EXTRA|FF_CUTEXTRA|FF_CUTSPRITES;
|
ffloorflags &= ~FF_RENDERPLANES;
|
||||||
if (!(lines[i].flags & ML_NOCLIMB))
|
if (lines[i].args[1] & 2) //Don't render sides
|
||||||
|
ffloorflags &= ~FF_RENDERSIDES;
|
||||||
|
if (!(lines[i].args[1] & 4)) //Render insides
|
||||||
|
{
|
||||||
|
if (ffloorflags & FF_RENDERPLANES)
|
||||||
|
ffloorflags |= FF_BOTHPLANES;
|
||||||
|
if (ffloorflags & FF_RENDERSIDES)
|
||||||
|
ffloorflags |= FF_ALLSIDES;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Appearance settings
|
||||||
|
if ((lines[i].args[2] & 1) && (ffloorflags & FF_RENDERALL)) //Translucent
|
||||||
|
ffloorflags |= FF_TRANSLUCENT;
|
||||||
|
if (lines[i].args[2] & 2) //Don't cast shadow
|
||||||
ffloorflags |= FF_NOSHADE;
|
ffloorflags |= FF_NOSHADE;
|
||||||
|
|
||||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 222: // FOF with no floor/ceiling (good for GFZGRASS effect on FOFs)
|
|
||||||
// If line has no-climb set, give it shadows, otherwise don't
|
|
||||||
ffloorflags = FF_EXISTS|FF_RENDERSIDES|FF_ALLSIDES;
|
|
||||||
if (!(lines[i].flags & ML_NOCLIMB))
|
|
||||||
ffloorflags |= FF_NOSHADE|FF_CUTSPRITES;
|
|
||||||
|
|
||||||
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 223: // FOF (intangible, invisible) - for combining specials in a sector
|
case 223: // FOF (intangible, invisible) - for combining specials in a sector
|
||||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_NOSHADE, secthinkers);
|
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_NOSHADE, secthinkers);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue