diff --git a/src/p_maputl.c b/src/p_maputl.c
index 1be57399cba4ab3e7e12595adc8988975e08651a..bd17ecf4a482cfcded4b8a3590e0c6391796fec2 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;