From 3e10f9f4513ccc819167c42783df815b2134760e Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 24 Sep 2021 18:38:58 +0200 Subject: [PATCH] bugfix --- Moose Development/Moose/Wrapper/Airbase.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 0d8387985..8c6b7bfeb 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -1134,7 +1134,9 @@ end -- @param #table parkingdata (Optional) Parking spots data table. If not given it is automatically derived from the GetParkingSpotsTable() function. -- @return #table Table of coordinates and terminal IDs of free parking spots. Each table entry has the elements .Coordinate and .TerminalID. function AIRBASE:FindFreeParkingSpotForAircraft(group, terminaltype, scanradius, scanunits, scanstatics, scanscenery, verysafe, nspots, parkingdata) - + + if group and group:IsAlive() then + -- Init default scanradius=scanradius or 50 if scanunits==nil then @@ -1307,6 +1309,10 @@ function AIRBASE:FindFreeParkingSpotForAircraft(group, terminaltype, scanradius, -- Retrun spots we found, even if there were not enough. return validspots + + else + return {} + end end --- Check black and white lists.