Convert culling planes and fake floors.

This commit is contained in:
Nev3r 2019-12-16 13:13:22 +01:00
parent 67702a8995
commit 96cd14eeac
3 changed files with 11 additions and 4 deletions

View file

@ -4038,7 +4038,7 @@ static boolean HWR_DoCulling(line_t *cullheight, line_t *viewcullheight, float v
return false;
cullplane = FIXED_TO_FLOAT(cullheight->frontsector->floorheight);
if (cullheight->flags & ML_NOCLIMB) // Group culling
if (cullheight->args[1]) // Group culling
{
if (!viewcullheight)
return false;

View file

@ -6405,6 +6405,10 @@ void P_ConvertBinaryLinedefs(void)
{
switch (lines[i].special)
{
case 10: //Culling plane
lines[i].args[0] = lines[i].tag;
lines[i].args[1] = (lines[i].flags & ML_NOCLIMB);
break;
case 11: //Rope hang parameters
lines[i].args[0] = lines[i].tag;
lines[i].args[1] = abs(sides[lines[i].sidenum[0]].textureoffset) >> FRACBITS;
@ -6413,6 +6417,9 @@ void P_ConvertBinaryLinedefs(void)
if (lines[i].flags & ML_NOCLIMB) //Static
lines[i].args[1] = 0;
break;
case 63: //Fake floor/ceiling planes
lines[i].args[0] = lines[i].tag;
break;
case 700: //Slope front sector floor
case 701: //Slope front sector ceiling
case 702: //Slope front sector floor and ceiling
@ -6804,7 +6811,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
case 10: // Vertical culling plane for sprites and FOFs
sec = sides[*lines[i].sidenum].sector - sectors;
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0], s)) >= 0 ;)
sectors[s].cullheight = &lines[i]; // This allows it to change in realtime!
break;
@ -6865,7 +6872,7 @@ void P_SpawnSpecials(INT32 fromnetsave)
case 63: // support for drawn heights coming from different sector
sec = sides[*lines[i].sidenum].sector-sectors;
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0], s)) >= 0 ;)
sectors[s].heightsec = (INT32)sec;
break;

View file

@ -402,7 +402,7 @@ boolean R_DoCulling(line_t *cullheight, line_t *viewcullheight, fixed_t vz, fixe
return false;
cullplane = cullheight->frontsector->floorheight;
if (cullheight->flags & ML_NOCLIMB) // Group culling
if (cullheight->args[1]) // Group culling
{
if (!viewcullheight)
return false;