- 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 93b3982c62
commit 8d53f6176e
2 changed files with 8 additions and 0 deletions

View file

@ -210,6 +210,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

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