From f789fbac709d5127e068ac09b8f52433f062c57a Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 5 Dec 2023 17:48:34 +0100 Subject: [PATCH] Update Zone.lua - Fixed ZONE_POLYGON:New called without initial points --- Moose Development/Moose/Core/Zone.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index 229356455..26a164c83 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -2380,13 +2380,13 @@ function ZONE_POLYGON_BASE:New( ZoneName, PointsArray ) self._.Polygon[i].y = PointsArray[i].y end + -- triangulate the polygon so we can work with it + self._Triangles = self:_Triangulate() + -- set the polygon's surface area + self.SurfaceArea = self:_CalculateSurfaceArea() + end - -- triangulate the polygon so we can work with it - self._Triangles = self:_Triangulate() - -- set the polygon's surface area - self.SurfaceArea = self:_CalculateSurfaceArea() - return self end