From 0ecfc682058e6aba55ef7683a16c36b799f1d066 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 16 Feb 2016 22:56:36 +0100 Subject: [PATCH] - fixed conditions for PortalBlocksView. Created a new function PortalBlocksSight that's relevant for playsim-related sight checks. --- src/portal.h | 7 +++++++ src/r_defs.h | 1 + 2 files changed, 8 insertions(+) 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);