Update Zone.lua

- Fixed ZONE_POLYGON:New called without initial points
This commit is contained in:
Frank 2023-12-05 17:48:34 +01:00
parent bc3a5271dc
commit f789fbac70

View File

@ -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