From 2e58f6c4d9728569b8e66ac04444fc225fe4ec3a Mon Sep 17 00:00:00 2001
From: Monster Iestyn <iestynjealous@ntlworld.com>
Date: Sat, 23 Jan 2016 19:58:57 +0000
Subject: [PATCH] Fixed that odd bug where PolyObjects sometimes leave a vertex
 or two in their control sectors

Turns out the seg-searching code falsely assumed it'd find frontfacing segs first, who knew?
---
 src/p_polyobj.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/p_polyobj.c b/src/p_polyobj.c
index f790fa7685..23e7092be1 100644
--- a/src/p_polyobj.c
+++ b/src/p_polyobj.c
@@ -427,6 +427,8 @@ newseg:
 	// seg's ending vertex.
 	for (i = 0; i < numsegs; ++i)
 	{
+		if (segs[i].side != 0) // needs to be frontfacing
+			continue;
 		if (segs[i].v1->x == seg->v2->x && segs[i].v1->y == seg->v2->y)
 		{
 			// Make sure you didn't already add this seg...
@@ -593,6 +595,9 @@ static void Polyobj_spawnPolyObj(INT32 num, mobj_t *spawnSpot, INT32 id)
 		seg_t *seg = &segs[i];
 		INT32 polyID, parentID;
 
+		if (seg->side != 0) // needs to be frontfacing
+			continue;
+
 		if (seg->linedef->special != POLYOBJ_START_LINE)
 			continue;
 
-- 
GitLab