From 6ae266c76eb191f5a607b721cccc7a1b3567f1a0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 23 Nov 2016 14:27:08 +0100 Subject: [PATCH] - 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. --- src/p_map.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 5cc9bdf72..d102307bc 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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 // 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) { - open.bottom = open.frontfloorplane.ZatPoint(cres.Position); + auto newopen = open.frontfloorplane.ZatPoint(cres.Position); + if (newopen < open.bottom) open.bottom = newopen; } if (rail &&