mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-19 05:36:02 +00:00
#CTLD Allow hover extracting Troop objects
This commit is contained in:
@@ -1423,7 +1423,7 @@ CTLD.FixedWingTypes = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="1.3.40"
|
CTLD.version="1.3.41"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@@ -2611,7 +2611,7 @@ end
|
|||||||
self:T(self.lid .. " _ExtractTroops")
|
self:T(self.lid .. " _ExtractTroops")
|
||||||
-- landed or hovering over load zone?
|
-- landed or hovering over load zone?
|
||||||
local grounded = not self:IsUnitInAir(Unit)
|
local grounded = not self:IsUnitInAir(Unit)
|
||||||
local hoverload = self:CanHoverLoad(Unit)
|
local hoverload = self:IsCorrectHover(Unit) -- correct call now for extracting troops while hovering
|
||||||
local hassecondaries = false
|
local hassecondaries = false
|
||||||
|
|
||||||
if not grounded and not hoverload then
|
if not grounded and not hoverload then
|
||||||
@@ -7007,6 +7007,7 @@ end
|
|||||||
-- @return #boolean Outcome
|
-- @return #boolean Outcome
|
||||||
function CTLD:IsCorrectHover(Unit)
|
function CTLD:IsCorrectHover(Unit)
|
||||||
self:T(self.lid .. " IsCorrectHover")
|
self:T(self.lid .. " IsCorrectHover")
|
||||||
|
if self:IsFixedWing(Unit) then return false end -- FW cannot hover
|
||||||
local outcome = false
|
local outcome = false
|
||||||
-- see if we are in air and within parameters.
|
-- see if we are in air and within parameters.
|
||||||
if self:IsUnitInAir(Unit) then
|
if self:IsUnitInAir(Unit) then
|
||||||
|
|||||||
Reference in New Issue
Block a user