AIRBOSS v1.0.4

One stack per flight group in CASE II/III
This commit is contained in:
Frank 2019-07-12 09:41:13 +02:00
parent c46028ff2d
commit 03042c8282
2 changed files with 7 additions and 6 deletions

View File

@ -476,7 +476,7 @@ end
--- Set missile-player distance when BIG missiles are destroyed.
-- @param #FOX self
-- @param #number distance Distance in meters. Default 400 m.
-- @param #number explosivemass Explosive mass of missile in kg TNT. Default 50 kg.
-- @param #number explosivemass Explosive mass of missile threshold in kg TNT. Default 50 kg.
-- @return #FOX self
function FOX:SetExplosionDistanceBigMissiles(distance, explosivemass)

View File

@ -1681,12 +1681,13 @@ AIRBOSS.MenuF10Root=nil
--- Airboss class version.
-- @field #string version
AIRBOSS.version="1.0.3"
AIRBOSS.version="1.0.4"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Handle tanker and AWACS. Put them into pattern.
-- TODO: Handle cases where AI crashes on carrier deck ==> Clean up deck.
-- TODO: Player eject and crash debrief "gradings".
-- TODO: PWO during case 2/3.
@ -6862,8 +6863,8 @@ function AIRBOSS:_GetFreeStack(ai, case, empty)
local n=flight.flag
if n>0 then
if flight.ai then
stack[n]=0 -- AI get one stack on their own.
if flight.ai or flight.case>1 then
stack[n]=0 -- AI get one stack on their own. Also CASE II/III get one stack each.
else
stack[n]=stack[n]-1
end
@ -6878,7 +6879,7 @@ function AIRBOSS:_GetFreeStack(ai, case, empty)
local nfree=nil
for i=1,nmaxstacks do
self:T2(self.lid..string.format("FF Stack[%d]=%d", i, stack[i]))
if ai or empty then
if ai or empty or case>1 then
-- AI need the whole stack.
if stack[i]==self.NmaxStack then
nfree=i