From 394f3ffd8866cbb3aec8e3371efe97520bce6cb0 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Tue, 30 Dec 2025 09:26:07 +0100 Subject: [PATCH] #AIRBASE - Small fix for #ParkingSpots == 0 --- Moose Development/Moose/Wrapper/Airbase.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 89c90b5bb..3dadbf940 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -1664,7 +1664,9 @@ end self:E(string.format("ERROR: Cound not get position Vec2 of airbase %s", AirbaseName)) end - self:GetMinimumBoundingCircleFromParkingSpots( ) + if Nrunways>0 then + self:GetMinimumBoundingCircleFromParkingSpots() + end -- Debug info. self:T2(string.format("Registered airbase %s", tostring(self.AirbaseName))) @@ -2230,6 +2232,7 @@ function AIRBASE:GetMinimumBoundingCircleFromParkingSpots(mark) if self.isAirdrome then if not self.parkingCircle then local spots = self:GetParkingSpotsVec2s() + if #spots == 0 then return self.AirbaseZone end local center, radius = UTILS.GetMinimumBoundingCircle(spots) self.parkingCircle = ZONE_RADIUS:New(self.AirbaseName.." ParkingCircle",center,radius+50) if mark == true then