Skip to content

Commit 5ba6bd2

Browse files
dileepvrRicardoLuis0
authored andcommitted
Small correction to OoB viewpoint stacked-sector portal visibility. OoB is not the same as Ortho.
1 parent 6015779 commit 5ba6bd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rendering/hwrenderer/scene/hw_sky.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ void HWWall::SkyPlane(HWWallDispatcher *di, sector_t *sector, int plane, bool al
157157
if (di->di && di->di->Viewpoint.IsAllowedOoB())
158158
{
159159
secplane_t myplane = plane ? sector->ceilingplane : sector->floorplane;
160-
if (di->di->Viewpoint.ViewVector3D.dot(myplane.Normal()) > 0.0) return;
160+
if (di->di->Viewpoint.IsOrtho() && di->di->Viewpoint.ViewVector3D.dot(myplane.Normal()) > 0.0) return;
161+
else if (plane==1 && di->di->Viewpoint.Pos.Z >= myplane.ZatPoint(di->di->Viewpoint.Pos)) return;
162+
else if (plane==0 && di->di->Viewpoint.Pos.Z <= myplane.ZatPoint(di->di->Viewpoint.Pos)) return;
161163
}
162164
auto glport = sector->GetPortalGroup(plane);
163165
if (glport != NULL)

0 commit comments

Comments
 (0)