From 95c346497371395b401be2c9e4e37c8eaa3c8c60 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 3 Aug 2016 12:17:22 +0200 Subject: [PATCH] - properly handle 3D floors with inverted planes in the list sorter. --- src/p_3dfloors.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/p_3dfloors.cpp b/src/p_3dfloors.cpp index 5e2117b9b..d27ebe4d1 100644 --- a/src/p_3dfloors.cpp +++ b/src/p_3dfloors.cpp @@ -514,6 +514,17 @@ void P_Recalculate3DFloors(sector_t * sector) clipped_bottom = pick_bottom; } } + else if (pick_bottom > height) // do not allow inverted planes + { + F3DFloor * dyn = new F3DFloor; + *dyn = *pick; + pick->flags |= FF_CLIPPED; + pick->flags &= ~FF_EXISTS; + dyn->flags |= FF_DYNAMIC; + dyn->bottom.copyPlane(&pick->top); + ffloors.Push(pick); + ffloors.Push(dyn); + } else { clipped = pick;