Implement linedef type 100-146

This commit is contained in:
MascaraSnake 2020-03-20 16:08:48 +01:00
parent a9866f84ad
commit 1e306dc7b4
2 changed files with 39 additions and 84 deletions

View file

@ -2839,6 +2839,45 @@ static void P_ConvertBinaryMap(void)
if (lines[i].special != 100 && (lines[i].special != 104 || !(lines[i].flags & ML_NOCLIMB)))
lines[i].args[4] = 1;
lines[i].special = 100;
break;
case 140: //FOF: intangible from bottom, opaque
case 141: //FOF: intangible from bottom, translucent
case 142: //FOF: intangible from bottom, translucent, no sides
case 143: //FOF: intangible from top, opaque
case 144: //FOF: intangible from top, translucent
case 145: //FOF: intangible from top, translucent, no sides
case 146: //FOF: only tangible from sides
lines[i].args[0] = lines[i].tag;
//Visibility
if (lines[i].special == 142 || lines[i].special == 145)
lines[i].args[1] = 2;
else if (lines[i].special == 146)
lines[i].args[1] = 1;
//Translucency
if (lines[i].special == 141 || lines[i].special == 142 || lines[i].special == 144 || lines[i].special == 145)
{
lines[i].args[2] = (lines[i].flags & ML_EFFECT2) ? 2 : 1;
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;
}
//Tangibility
if (lines[i].special <= 142)
lines[i].args[3] |= 2;
else if (lines[i].special <= 145)
lines[i].args[3] |= 1;
else
lines[i].args[3] |= 3;
//Shadow?
if (lines[i].special != 146 && (lines[i].flags & ML_NOCLIMB))
lines[i].args[4] = 1;
lines[i].special = 100;
break;
case 443: //Call Lua function

View file

@ -6873,90 +6873,6 @@ void P_SpawnSpecials(boolean fromnetsave)
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break;
case 140: // 'Platform' - You can jump up through it
// If line has no-climb set, don't give it shadows, otherwise do
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_PLATFORM|FF_BOTHPLANES|FF_ALLSIDES;
if (lines[i].flags & ML_NOCLIMB)
ffloorflags |= FF_NOSHADE;
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break;
case 141: // Translucent "platform"
// If line has no-climb set, don't give it shadows, otherwise do
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_PLATFORM|FF_TRANSLUCENT|FF_EXTRA|FF_CUTEXTRA;
if (lines[i].flags & ML_NOCLIMB)
ffloorflags |= FF_NOSHADE;
// Draw the 'insides' of the block too
if (lines[i].flags & ML_EFFECT2)
{
ffloorflags |= FF_CUTLEVEL|FF_BOTHPLANES|FF_ALLSIDES;
ffloorflags &= ~(FF_EXTRA|FF_CUTEXTRA);
}
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break;
case 142: // Translucent "platform" with no sides
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERPLANES|FF_TRANSLUCENT|FF_PLATFORM|FF_EXTRA|FF_CUTEXTRA;
if (lines[i].flags & ML_NOCLIMB) // shade it unless no-climb
ffloorflags |= FF_NOSHADE;
// Draw the 'insides' of the block too
if (lines[i].flags & ML_EFFECT2)
{
ffloorflags |= FF_CUTLEVEL|FF_BOTHPLANES|FF_ALLSIDES;
ffloorflags &= ~(FF_EXTRA|FF_CUTEXTRA);
}
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break;
case 143: // 'Reverse platform' - You fall through it
// If line has no-climb set, don't give it shadows, otherwise do
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_REVERSEPLATFORM|FF_BOTHPLANES|FF_ALLSIDES;
if (lines[i].flags & ML_NOCLIMB)
ffloorflags |= FF_NOSHADE;
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break;
case 144: // Translucent "reverse platform"
// If line has no-climb set, don't give it shadows, otherwise do
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_REVERSEPLATFORM|FF_TRANSLUCENT|FF_EXTRA|FF_CUTEXTRA;
if (lines[i].flags & ML_NOCLIMB)
ffloorflags |= FF_NOSHADE;
// Draw the 'insides' of the block too
if (lines[i].flags & ML_EFFECT2)
{
ffloorflags |= FF_CUTLEVEL|FF_BOTHPLANES|FF_ALLSIDES;
ffloorflags &= ~(FF_EXTRA|FF_CUTEXTRA);
}
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break;
case 145: // Translucent "reverse platform" with no sides
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERPLANES|FF_TRANSLUCENT|FF_REVERSEPLATFORM|FF_EXTRA|FF_CUTEXTRA;
if (lines[i].flags & ML_NOCLIMB) // shade it unless no-climb
ffloorflags |= FF_NOSHADE;
// Draw the 'insides' of the block too
if (lines[i].flags & ML_EFFECT2)
{
ffloorflags |= FF_CUTLEVEL|FF_BOTHPLANES|FF_ALLSIDES;
ffloorflags &= ~(FF_EXTRA|FF_CUTEXTRA);
}
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);
break;
case 146: // Intangible floor/ceiling with solid sides (fences/hoops maybe?)
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERSIDES|FF_ALLSIDES|FF_INTANGIBLEFLATS, secthinkers);
break;
case 150: // Air bobbing platform
case 151: // Adjustable air bobbing platform
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers);