From 81882aa1a3aab625a7c7d0e9075f04efaf0e88f6 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 7 Aug 2019 22:43:38 +0000 Subject: [PATCH] Fix issue clipping against sloped ceilings git-svn-id: https://svn.eduke32.com/eduke32@7903 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/clip.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index fc266b88b..163b048f5 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -792,7 +792,7 @@ static bool cliptestsector(int const dasect, int const nextsect, int32_t const f int32_t daz2 = sec2->floorz; int32_t dacz2 = sec2->ceilingz; - if (sec2->floorstat & 2) + if ((sec2->floorstat|sec2->ceilingstat) & 2) getcorrectzsofslope(nextsect, pos.x, pos.y, &dacz2, &daz2); if (daz2 <= dacz2) @@ -802,7 +802,7 @@ static bool cliptestsector(int const dasect, int const nextsect, int32_t const f int32_t daz = sec->floorz; int32_t dacz = sec->ceilingz; - if (sec->floorstat & 2) + if ((sec->floorstat|sec->ceilingstat) & 2) getcorrectzsofslope(dasect, pos.x, pos.y, &dacz, &daz); int32_t const sec2height = daz2-dacz2;