Adapt linedef type 8 to UDMF

This commit is contained in:
MascaraSnake 2021-12-30 14:26:51 +01:00
parent 2fd6eafbcf
commit 2a1f96aa3c
3 changed files with 38 additions and 22 deletions

View file

@ -1721,6 +1721,12 @@ udmf
}
}
8
{
title = "Set Camera Collision Planes";
prefix = "(8)";
}
11
{
title = "Rope Hang Parameters";

View file

@ -3245,6 +3245,34 @@ static void P_ConvertBinaryMap(void)
lines[i].special = 0;
}
break;
case 8: //Special sector properties
{
INT32 s;
TAG_ITER_SECTORS(tag, s)
{
if (lines[i].flags & ML_NOCLIMB)
{
sectors[s].flags &= ~MSF_FLIPSPECIAL_FLOOR;
sectors[s].flags |= MSF_FLIPSPECIAL_CEILING;
}
else if (lines[i].flags & ML_EFFECT4)
sectors[s].flags |= MSF_FLIPSPECIAL_BOTH;
if (lines[i].flags & ML_EFFECT3)
sectors[s].flags |= MSF_TRIGGERSPECIAL_TOUCH;
if (lines[i].flags & ML_EFFECT2)
sectors[s].flags |= MSF_TRIGGERSPECIAL_HEADBUMP;
if (lines[i].flags & ML_EFFECT1)
sectors[s].flags |= MSF_INVERTPRECIP;
}
if (GETSECSPECIAL(lines[i].frontsector->special, 4) != 12)
lines[i].special = 0;
break;
}
case 10: //Culling plane
lines[i].args[0] = tag;
lines[i].args[1] = !!(lines[i].flags & ML_NOCLIMB);

View file

@ -6143,28 +6143,10 @@ void P_SpawnSpecials(boolean fromnetsave)
break;
}
case 8: // Sector Parameters
TAG_ITER_SECTORS(tag, s)
{
if (lines[i].flags & ML_NOCLIMB)
{
sectors[s].flags &= ~MSF_FLIPSPECIAL_FLOOR;
sectors[s].flags |= MSF_FLIPSPECIAL_CEILING;
}
else if (lines[i].flags & ML_EFFECT4)
sectors[s].flags |= MSF_FLIPSPECIAL_BOTH;
if (lines[i].flags & ML_EFFECT3)
sectors[s].flags |= MSF_TRIGGERSPECIAL_TOUCH;
if (lines[i].flags & ML_EFFECT2)
sectors[s].flags |= MSF_TRIGGERSPECIAL_HEADBUMP;
if (lines[i].flags & ML_EFFECT1)
sectors[s].flags |= MSF_INVERTPRECIP;
if (lines[i].frontsector && GETSECSPECIAL(lines[i].frontsector->special, 4) == 12)
sectors[s].camsec = sides[*lines[i].sidenum].sector-sectors;
}
case 8: // Set camera collision planes
if (lines[i].frontsector)
TAG_ITER_SECTORS(tag, s)
sectors[s].camsec = lines[i].frontsector-sectors;
break;
case 10: // Vertical culling plane for sprites and FOFs