From c8d1dd3be8558408cc82396e09ce35c0856d3936 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Wed, 7 Aug 2019 23:27:26 +0100 Subject: [PATCH] P_LineOpening: set int32 max/min as defaults for opentop, openbottom etc if a linedef you touched belongs to a polyobjetc. the only thing that really matters in this scenario is the polyobject itself after all! # Conflicts: # src/p_maputl.c --- src/p_maputl.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/p_maputl.c b/src/p_maputl.c index 1be57399c..bd17ecf4a 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -517,6 +517,20 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) I_Assert(front != NULL); I_Assert(back != NULL); +#ifdef POLYOBJECTS + if (linedef->polyobj) + { + // set these defaults so that polyobjects don't interfere with collision above or below them + opentop = INT32_MAX; + openbottom = INT32_MIN; + highceiling = INT32_MIN; + lowfloor = INT32_MAX; +#ifdef ESLOPE + opentopslope = openbottomslope = NULL; +#endif + } + else +#endif { // Set open and high/low values here fixed_t frontheight, backheight;