Update FlightGroup.lua

- Fixed flight of airwing is going to tanker even if fuellowrefuel switch is false
This commit is contained in:
Frank 2021-07-06 21:56:15 +02:00
parent 65bd7909e1
commit 97668e5413

View File

@ -2757,8 +2757,9 @@ function FLIGHTGROUP:onafterFuelLow(From, Event, To)
-- Get closest tanker from airwing that can refuel this flight.
local tanker=self.airwing:GetTankerForFlight(self)
if tanker then
if tanker and self.fuellowrefuel then
-- Debug message.
self:I(self.lid..string.format("Send to refuel at tanker %s", tanker.flightgroup:GetName()))
-- Get a coordinate towards the tanker.