From 78b4cbdf6c4c7150a1689a78aa25dd4a39a5efc5 Mon Sep 17 00:00:00 2001
From: Edoardo Prezioso <edo88@email.it>
Date: Mon, 26 Jan 2015 02:20:54 +0100
Subject: [PATCH] - Fixed a very old issue with rotating polydoors.

This happened when the polydoor was open. If a mobj blocked the poly door, such that the door could not move from its open position, the poly door could rotate a little bit more than needed, making the door partially closing when the door managed to close later.
---
 src/po_man.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/po_man.cpp b/src/po_man.cpp
index c6e273a0f8..bb9b3ca46a 100644
--- a/src/po_man.cpp
+++ b/src/po_man.cpp
@@ -676,7 +676,7 @@ void DPolyDoor::Tick ()
 		break;
 
 	case PODOOR_SWING:
-		if (poly->RotatePolyobj (m_Speed))
+		if (m_Dist <= 0 || poly->RotatePolyobj (m_Speed))
 		{
 			absSpeed = abs (m_Speed);
 			if (m_Dist == -1)