diff --git a/src/portal.h b/src/portal.h index 40c4a30fc..b37ee3b7b 100644 --- a/src/portal.h +++ b/src/portal.h @@ -205,6 +205,13 @@ inline int line_t::getPortalAlignment() const } inline bool sector_t::PortalBlocksView(int plane) +{ + if (SkyBoxes[plane] == NULL) return true; + if (SkyBoxes[plane]->special1 != SKYBOX_LINKEDPORTAL) return false; + return !!(planes[plane].Flags & (PLANEF_NORENDER | PLANEF_DISABLED | PLANEF_OBSTRUCTED)); +} + +inline bool sector_t::PortalBlocksSight(int plane) { if (SkyBoxes[plane] == NULL || SkyBoxes[plane]->special1 != SKYBOX_LINKEDPORTAL) return true; return !!(planes[plane].Flags & (PLANEF_NORENDER | PLANEF_DISABLED | PLANEF_OBSTRUCTED)); diff --git a/src/r_defs.h b/src/r_defs.h index 920c1f3f8..13a20cade 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -793,6 +793,7 @@ struct sector_t } bool PortalBlocksView(int plane); + bool PortalBlocksSight(int plane); bool PortalBlocksMovement(int plane); bool PortalBlocksSound(int plane);