diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index 0847826d4..1ee245d08 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -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 { title = "Intangible, Invisible"; diff --git a/src/p_setup.c b/src/p_setup.c index 7c8a8c147..55eacc6e4 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2931,6 +2931,31 @@ static void P_ConvertBinaryMap(void) case 223: //FOF: Intangible, invisible lines[i].args[0] = lines[i].tag; 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 lines[i].args[0] = lines[i].tag; if (lines[i].flags & ML_NOCLIMB) //Brick block diff --git a/src/p_spec.c b/src/p_spec.c index 5288d2773..2bcd2a9e5 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6959,28 +6959,31 @@ void P_SpawnSpecials(boolean fromnetsave) P_AddFakeFloorsByLine(i, ffloorflags, secthinkers); break; - case 220: // Like opaque water, but not swimmable. (Good for snow effect on FOFs) - P_AddFakeFloorsByLine(i, FF_EXISTS|FF_RENDERALL|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES, secthinkers); - break; + case 220: //Intangible + ffloorflags = FF_EXISTS|FF_RENDERALL|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES; - case 221: // FOF (intangible, translucent) - // If line has no-climb set, give it shadows, otherwise don't - ffloorflags = FF_EXISTS|FF_RENDERALL|FF_TRANSLUCENT|FF_EXTRA|FF_CUTEXTRA|FF_CUTSPRITES; - if (!(lines[i].flags & ML_NOCLIMB)) + //Visibility settings + if (lines[i].args[1] & 1) //Don't render planes + ffloorflags &= ~FF_RENDERPLANES; + 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; P_AddFakeFloorsByLine(i, ffloorflags, secthinkers); 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 P_AddFakeFloorsByLine(i, FF_EXISTS|FF_NOSHADE, secthinkers); break;