- fixed conditions for PortalBlocksView. Created a new function PortalBlocksSight that's relevant for playsim-related sight checks.

This commit is contained in:
Christoph Oelckers 2016-02-16 22:56:36 +01:00
parent 7da9a0463b
commit 0ecfc68205
2 changed files with 8 additions and 0 deletions

View File

@ -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));

View File

@ -793,6 +793,7 @@ struct sector_t
}
bool PortalBlocksView(int plane);
bool PortalBlocksSight(int plane);
bool PortalBlocksMovement(int plane);
bool PortalBlocksSound(int plane);