mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-12 16:57:50 +00:00
#AIRBASE - Small fix for #ParkingSpots == 0
This commit is contained in:
@@ -1664,7 +1664,9 @@ end
|
|||||||
self:E(string.format("ERROR: Cound not get position Vec2 of airbase %s", AirbaseName))
|
self:E(string.format("ERROR: Cound not get position Vec2 of airbase %s", AirbaseName))
|
||||||
end
|
end
|
||||||
|
|
||||||
self:GetMinimumBoundingCircleFromParkingSpots( )
|
if Nrunways>0 then
|
||||||
|
self:GetMinimumBoundingCircleFromParkingSpots()
|
||||||
|
end
|
||||||
|
|
||||||
-- Debug info.
|
-- Debug info.
|
||||||
self:T2(string.format("Registered airbase %s", tostring(self.AirbaseName)))
|
self:T2(string.format("Registered airbase %s", tostring(self.AirbaseName)))
|
||||||
@@ -2230,6 +2232,7 @@ function AIRBASE:GetMinimumBoundingCircleFromParkingSpots(mark)
|
|||||||
if self.isAirdrome then
|
if self.isAirdrome then
|
||||||
if not self.parkingCircle then
|
if not self.parkingCircle then
|
||||||
local spots = self:GetParkingSpotsVec2s()
|
local spots = self:GetParkingSpotsVec2s()
|
||||||
|
if #spots == 0 then return self.AirbaseZone end
|
||||||
local center, radius = UTILS.GetMinimumBoundingCircle(spots)
|
local center, radius = UTILS.GetMinimumBoundingCircle(spots)
|
||||||
self.parkingCircle = ZONE_RADIUS:New(self.AirbaseName.." ParkingCircle",center,radius+50)
|
self.parkingCircle = ZONE_RADIUS:New(self.AirbaseName.." ParkingCircle",center,radius+50)
|
||||||
if mark == true then
|
if mark == true then
|
||||||
|
|||||||
Reference in New Issue
Block a user