[FIXED] AIRWING operational regardless of airbase coalition

This commit is contained in:
smiki
2025-07-16 23:39:04 +02:00
parent 21c2bd1103
commit 2d96ba0f56
2 changed files with 18 additions and 9 deletions

View File

@@ -1671,7 +1671,10 @@ function COMMANDER:_GetCohorts(Legions, Cohorts, Operation)
local legion=_legion --Ops.Legion#LEGION
-- Check that runway is operational.
local Runway=legion:IsAirwing() and legion:IsRunwayOperational() or true
local Runway=true
if legion:IsAirwing() then
Runway=legion:IsRunwayOperational() and legion.airbase and legion.airbase:GetCoalition() == legion:GetCoalition()
end
-- Legion has to be running.
if legion:IsRunning() and Runway then
@@ -1704,7 +1707,10 @@ function COMMANDER:_GetCohorts(Legions, Cohorts, Operation)
local legion=_legion --Ops.Legion#LEGION
-- Check that runway is operational.
local Runway=legion:IsAirwing() and legion:IsRunwayOperational() or true
local Runway=true
if legion:IsAirwing() then
Runway=legion:IsRunwayOperational() and legion.airbase and legion.airbase:GetCoalition() == legion:GetCoalition()
end
-- Legion has to be running.
if legion:IsRunning() and Runway then

View File

@@ -2514,7 +2514,10 @@ function LEGION._GetCohorts(Legions, Cohorts, Operation, OpsQueue)
local legion=_legion --Ops.Legion#LEGION
-- Check that runway is operational.
local Runway=(legion:IsAirwing() and legion:IsRunwayOperational() and legion.airbase and legion.airbase:GetCoalition() == legion:GetCoalition())or true
local Runway=true
if legion:IsAirwing() then
Runway=legion:IsRunwayOperational() and legion.airbase and legion.airbase:GetCoalition() == legion:GetCoalition()
end
-- Legion has to be running.
if legion:IsRunning() and Runway then