- fixed: The check for identical floor planes on an opening should never allow it to be narrowed down.

This can cause problems in rare situations where a sloped plane is checked outside its sector boundaries.
This commit is contained in:
Christoph Oelckers 2016-11-23 14:27:08 +01:00
parent 0489b6e7c5
commit 6ae266c76e

View file

@ -839,9 +839,11 @@ bool PIT_CheckLine(FMultiBlockLinesIterator &mit, FMultiBlockLinesIterator::Chec
// If the floor planes on both sides match we should recalculate open.bottom at the actual position we are checking // If the floor planes on both sides match we should recalculate open.bottom at the actual position we are checking
// This is to avoid bumpy movement when crossing a linedef with the same slope on both sides. // This is to avoid bumpy movement when crossing a linedef with the same slope on both sides.
// This should never narrow down the opening, though, only widen it.
if (open.frontfloorplane == open.backfloorplane && open.bottom > LINEOPEN_MIN) if (open.frontfloorplane == open.backfloorplane && open.bottom > LINEOPEN_MIN)
{ {
open.bottom = open.frontfloorplane.ZatPoint(cres.Position); auto newopen = open.frontfloorplane.ZatPoint(cres.Position);
if (newopen < open.bottom) open.bottom = newopen;
} }
if (rail && if (rail &&