Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Applevangelist
2023-12-06 08:44:15 +01:00
3 changed files with 38 additions and 13 deletions
+11 -9
View File
@@ -480,12 +480,14 @@ function ZONE_BASE:UndrawZone(Delay)
if Delay and Delay>0 then
self:ScheduleOnce(Delay, ZONE_BASE.UndrawZone, self)
else
if self.DrawID and type(self.DrawID) ~= "table" then
UTILS.RemoveMark(self.DrawID)
else -- DrawID is a table with a collections of mark ids, as used in ZONE_POLYGON
if self.DrawID then
if type(self.DrawID) ~= "table" then
UTILS.RemoveMark(self.DrawID)
else -- DrawID is a table with a collections of mark ids, as used in ZONE_POLYGON
for _, mark_id in pairs(self.DrawID) do
UTILS.RemoveMark(mark_id)
UTILS.RemoveMark(mark_id)
end
end
end
end
return self
@@ -2378,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