- fixed: UpdateRenderSectorList did some bad calculations for checking portal plane order.

This commit is contained in:
Christoph Oelckers 2016-05-24 13:53:29 +02:00
parent d058820c65
commit 49234b1fc3

View file

@ -6497,7 +6497,7 @@ void AActor::UpdateRenderSectorList()
while (!sec->PortalBlocksMovement(sector_t::ceiling))
{
double planeh = sec->GetPortalPlaneZ(sector_t::ceiling);
if (planeh < lasth) break; // broken setup.
if (planeh <= lasth) break; // broken setup.
if (Top() + SPRITE_SPACE < planeh) break;
lasth = planeh;
DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::ceiling);
@ -6508,7 +6508,7 @@ void AActor::UpdateRenderSectorList()
while (!sec->PortalBlocksMovement(sector_t::floor))
{
double planeh = sec->GetPortalPlaneZ(sector_t::floor);
if (planeh > lasth) break; // broken setup.
if (planeh >= lasth) break; // broken setup.
if (Z() - SPRITE_SPACE > planeh) break;
lasth = planeh;
DVector2 newpos = Pos() + sec->GetPortalDisplacement(sector_t::floor);