mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 15:32:33 +00:00
Restore portal culling code that went gone by pure accident
This commit is contained in:
parent
2d68eac528
commit
dedd5527da
4 changed files with 12 additions and 0 deletions
|
@ -1378,5 +1378,13 @@ void R_RenderBSPNode(INT32 bspnum)
|
|||
bspnum = bsp->children[side^1];
|
||||
}
|
||||
|
||||
// PORTAL CULLING
|
||||
if (portalcullsector) {
|
||||
sector_t *sect = subsectors[bspnum & ~NF_SUBSECTOR].sector;
|
||||
if (sect != portalcullsector)
|
||||
return;
|
||||
portalcullsector = NULL;
|
||||
}
|
||||
|
||||
R_Subsector(bspnum == -1 ? 0 : bspnum & ~NF_SUBSECTOR);
|
||||
}
|
||||
|
|
|
@ -1008,11 +1008,13 @@ static void R_PortalFrame(portal_t *portal)
|
|||
if (portal->clipline != -1)
|
||||
{
|
||||
portalclipline = &lines[portal->clipline];
|
||||
portalcullsector = portalclipline->frontsector;
|
||||
viewsector = portalclipline->frontsector;
|
||||
}
|
||||
else
|
||||
{
|
||||
portalclipline = NULL;
|
||||
portalcullsector = NULL;
|
||||
viewsector = R_PointInSubsector(viewx, viewy)->sector;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ UINT8 portalrender; /**< When rendering a portal, it establishes the depth of
|
|||
portal_t *portal_base, *portal_cap;
|
||||
|
||||
line_t *portalclipline;
|
||||
sector_t *portalcullsector;
|
||||
INT32 portalclipstart, portalclipend;
|
||||
|
||||
boolean portalline; // is curline a portal seg?
|
||||
|
|
|
@ -45,6 +45,7 @@ extern portal_t* portal_cap;
|
|||
extern UINT8 portalrender;
|
||||
|
||||
extern line_t *portalclipline;
|
||||
extern sector_t *portalcullsector;
|
||||
extern INT32 portalclipstart, portalclipend;
|
||||
|
||||
void Portal_InitList (void);
|
||||
|
|
Loading…
Reference in a new issue