From 7404142edff99f89ff86c7d25165c0a6a2d710eb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 8 Apr 2016 12:51:00 +0200 Subject: [PATCH] - fixed incorrect center point calculation. --- src/p_setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index b88e3e2a0..148dcbea8 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3205,8 +3205,8 @@ static void P_GroupLines (bool buildmap) } // set the center to the middle of the bounding box - sector->centerspot.X = (bbox.Right() + bbox.Left()/2); - sector->centerspot.Y = (bbox.Top() + bbox.Bottom()/2); + sector->centerspot.X = (bbox.Right() + bbox.Left()) / 2; + sector->centerspot.Y = (bbox.Top() + bbox.Bottom()) / 2; // For triangular sectors the above does not calculate good points unless the longest of the triangle's lines is perfectly horizontal and vertical if (sector->linecount == 3)