Implement linedef type 250

This commit is contained in:
MascaraSnake 2020-04-14 09:14:10 +02:00
parent fdb46e5d14
commit 916f831edb
3 changed files with 30 additions and 2 deletions

View file

@ -1623,6 +1623,27 @@ udmf
} }
} }
250
{
title = "Mario Block";
prefix = "(250);
arg0
{
title = "Target sector tag";
type = 13;
}
arg1
{
title = "Block type";
type = 12;
enum
{
1 = "Brick";
2 = "Invisible";
}
}
}
linedefexecmisc linedefexecmisc
{ {
title = "Linedef Executor (misc.)"; title = "Linedef Executor (misc.)";

View file

@ -2931,6 +2931,13 @@ 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 250: //FOF: Mario block
lines[i].args[0] = lines[i].tag;
if (lines[i].flags & ML_NOCLIMB) //Brick block
lines[i].args[1] |= 1;
if (lines[i].flags & ML_EFFECT1) //Invisible
lines[i].args[1] |= 2;
break;
case 443: //Call Lua function case 443: //Call Lua function
if (lines[i].text) if (lines[i].text)
{ {

View file

@ -6987,9 +6987,9 @@ void P_SpawnSpecials(boolean fromnetsave)
case 250: // Mario Block case 250: // Mario Block
ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL|FF_MARIO; ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL|FF_MARIO;
if (lines[i].flags & ML_NOCLIMB) if (lines[i].args[1] & 1) //Brick block
ffloorflags |= FF_SHATTERBOTTOM; ffloorflags |= FF_SHATTERBOTTOM;
if (lines[i].flags & ML_EFFECT1) if (lines[i].args[1] & 2) // Invisible
ffloorflags &= ~(FF_SOLID|FF_RENDERALL|FF_CUTLEVEL); ffloorflags &= ~(FF_SOLID|FF_RENDERALL|FF_CUTLEVEL);
P_AddFakeFloorsByLine(i, ffloorflags, secthinkers); P_AddFakeFloorsByLine(i, ffloorflags, secthinkers);