mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-25 09:22:33 +00:00
Remove R_DoorClosed
This function has caused me, so much unexpected pain because of just how out of the way it is, and NOTHING else uses it
This commit is contained in:
parent
fc865f9aad
commit
a68615e2f9
1 changed files with 13 additions and 21 deletions
|
|
@ -246,26 +246,6 @@ void R_PortalClearClipSegs(INT32 start, INT32 end)
|
|||
newend = solidsegs + 2;
|
||||
}
|
||||
|
||||
// R_DoorClosed
|
||||
//
|
||||
// This function is used to fix the automap bug which
|
||||
// showed lines behind closed doors simply because the door had a dropoff.
|
||||
//
|
||||
// It assumes that Doom has already ruled out a door being closed because
|
||||
// of front-back closure (e.g. front floor is taller than back ceiling).
|
||||
static INT32 R_DoorClosed(void)
|
||||
{
|
||||
return
|
||||
|
||||
// if door is closed because back is shut:
|
||||
backsector->ceilingheight <= backsector->floorheight
|
||||
|
||||
// preserve a kind of transparent door/lift special effect:
|
||||
&& (backsector->ceilingheight >= frontsector->ceilingheight || curline->sidedef->toptexture)
|
||||
|
||||
&& (backsector->floorheight <= frontsector->floorheight || curline->sidedef->bottomtexture);
|
||||
}
|
||||
|
||||
//
|
||||
// If player's view height is underneath fake floor, lower the
|
||||
// drawn ceiling to be just under the floor height, and replace
|
||||
|
|
@ -625,7 +605,19 @@ static void R_AddLine(seg_t *line)
|
|||
}
|
||||
|
||||
// Check for automap fix. Store in doorclosed for r_segs.c
|
||||
doorclosed = R_DoorClosed();
|
||||
//
|
||||
// This is used to fix the automap bug which
|
||||
// showed lines behind closed doors simply because the door had a dropoff.
|
||||
//
|
||||
// It assumes that Doom has already ruled out a door being closed because
|
||||
// of front-back closure (e.g. front floor is taller than back ceiling).
|
||||
//
|
||||
// if door is closed because back is shut:
|
||||
doorclosed = backsector->ceilingheight <= backsector->floorheight
|
||||
// preserve a kind of transparent door/lift special effect:
|
||||
&& (backsector->ceilingheight >= frontsector->ceilingheight || curline->sidedef->toptexture)
|
||||
&& (backsector->floorheight <= frontsector->floorheight || curline->sidedef->bottomtexture);
|
||||
|
||||
if (doorclosed)
|
||||
goto clipsolid;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue