From 3ab314e95a396d7f206df69f46f4f2e0bcf38c5c Mon Sep 17 00:00:00 2001 From: "Richard C. Gobeille" Date: Tue, 12 May 2020 16:19:36 -0700 Subject: [PATCH] engine: make cliptestsector() (used by clipmove(), etc) TROR aware This is intended to help with issues where enemies get stuck in thin TROR layers. # Conflicts: # source/build/src/clip.cpp --- source/build/src/clip.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/build/src/clip.cpp b/source/build/src/clip.cpp index 0e34c3e87..076a9705c 100644 --- a/source/build/src/clip.cpp +++ b/source/build/src/clip.cpp @@ -847,7 +847,11 @@ static int cliptestsector(int const dasect, int const nextsect, int32_t const fl int32_t dacz2 = sec2->ceilingz; if ((sec2->floorstat|sec2->ceilingstat) & 2) +#ifdef YAX_ENABLE + yax_getzsofslope(nextsect, pos.x, pos.y, &dacz2, &daz2); +#else getcorrectzsofslope(nextsect, pos.x, pos.y, &dacz2, &daz2); +#endif if (daz2 <= dacz2) return 1; @@ -858,7 +862,11 @@ static int cliptestsector(int const dasect, int const nextsect, int32_t const fl int32_t dacz = sec->ceilingz; if ((sec->floorstat|sec->ceilingstat) & 2) +#ifdef YAX_ENABLE + yax_getzsofslope(dasect, pos.x, pos.y, &dacz, &daz); +#else getcorrectzsofslope(dasect, pos.x, pos.y, &dacz, &daz); +#endif int32_t const sec2height = klabs(daz2-dacz2);