mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-23 10:41:51 +00:00
Convert culling planes and fake floors.
This commit is contained in:
parent
67702a8995
commit
96cd14eeac
3 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
|
|
11
src/p_spec.c
11
src/p_spec.c
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue