diff --git a/src/r_bsp.c b/src/r_bsp.c index f71dea646..aee79736c 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -449,7 +449,7 @@ static void R_AddLine(seg_t *line) static sector_t tempsec; boolean bothceilingssky = false, bothfloorssky = false; - portalline = false; + g_portal = NULL; if (line->polyseg && !(line->polyseg->flags & POF_RENDERSIDES)) return; diff --git a/src/r_bsp.h b/src/r_bsp.h index 051253a5e..66d1ff9cc 100644 --- a/src/r_bsp.h +++ b/src/r_bsp.h @@ -14,6 +14,8 @@ #ifndef __R_BSP__ #define __R_BSP__ +#include "typedef.h" + #ifdef __cplusplus extern "C" { #endif @@ -27,7 +29,7 @@ extern side_t *sidedef; extern line_t *linedef; extern sector_t *frontsector; extern sector_t *backsector; -extern boolean portalline; // is curline a portal seg? +extern portal_t *g_portal; // is curline a portal seg? // drawsegs are allocated on the fly... see r_segs.c diff --git a/src/r_portal.c b/src/r_portal.c index aa0164eb6..c7950f10b 100644 --- a/src/r_portal.c +++ b/src/r_portal.c @@ -30,7 +30,7 @@ line_t *portalclipline; sector_t *portalcullsector; INT32 portalclipstart, portalclipend; -boolean portalline; // is curline a portal seg? +portal_t *g_portal; // is curline a portal seg? void Portal_InitList (void) { @@ -189,7 +189,7 @@ void Portal_Add2Lines (const INT32 line1, const INT32 line2, const INT32 x1, con Portal_ClipRange(portal); - portalline = true; // this tells R_StoreWallRange that curline is a portal seg + g_portal = portal; // this tells R_StoreWallRange that curline is a portal seg } /** Store the clipping window for a portal using a visplane. diff --git a/src/r_segs.c b/src/r_segs.c index 3d657657e..0524c18d0 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -2973,7 +2973,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) R_RenderSegLoop(); R_SetColumnFunc(BASEDRAWFUNC, false); - if (portalline) // if curline is a portal, set portalrender for drawseg + if (g_portal) // if curline is a portal, set portalrender for drawseg ds_p->portalpass = portalrender+1; else ds_p->portalpass = 0;