mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
daa5caa125
@ -1412,7 +1412,7 @@ CTLD.FixedWingTypes = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="1.1.32"
|
CTLD.version="1.2.33"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -2059,6 +2059,12 @@ function CTLD:_EventHandler(EventData)
|
|||||||
self.Loaded_Cargo[unitname] = nil
|
self.Loaded_Cargo[unitname] = nil
|
||||||
self:_RefreshF10Menus()
|
self:_RefreshF10Menus()
|
||||||
end
|
end
|
||||||
|
-- CA support
|
||||||
|
if _unit:IsGround() and self.allowCATransport then
|
||||||
|
local unitname = event.IniUnitName or "none"
|
||||||
|
self.Loaded_Cargo[unitname] = nil
|
||||||
|
self:_RefreshF10Menus()
|
||||||
|
end
|
||||||
return
|
return
|
||||||
elseif event.id == EVENTS.Land or event.id == EVENTS.Takeoff then
|
elseif event.id == EVENTS.Land or event.id == EVENTS.Takeoff then
|
||||||
local unitname = event.IniUnitName
|
local unitname = event.IniUnitName
|
||||||
@ -4141,6 +4147,7 @@ function CTLD:_MoveGroupToZone(Group)
|
|||||||
local groupcoord = Group:GetCoordinate()
|
local groupcoord = Group:GetCoordinate()
|
||||||
-- Get closest zone of type
|
-- Get closest zone of type
|
||||||
local outcome, name, zone, distance = self:IsUnitInZone(Group,CTLD.CargoZoneType.MOVE)
|
local outcome, name, zone, distance = self:IsUnitInZone(Group,CTLD.CargoZoneType.MOVE)
|
||||||
|
self:T({canmove=outcome, name=name, zone=zone, dist=distance,max=self.movetroopsdistance})
|
||||||
if (distance <= self.movetroopsdistance) and outcome == true and zone~= nil then
|
if (distance <= self.movetroopsdistance) and outcome == true and zone~= nil then
|
||||||
-- yes, we can ;)
|
-- yes, we can ;)
|
||||||
local groupname = Group:GetName()
|
local groupname = Group:GetName()
|
||||||
@ -5240,6 +5247,8 @@ function CTLD:ActivateZone(Name,ZoneType,NewState)
|
|||||||
table = self.dropOffZones
|
table = self.dropOffZones
|
||||||
elseif ZoneType == CTLD.CargoZoneType.SHIP then
|
elseif ZoneType == CTLD.CargoZoneType.SHIP then
|
||||||
table = self.shipZones
|
table = self.shipZones
|
||||||
|
elseif ZoneType == CTLD.CargoZoneType.BEACON then
|
||||||
|
table = self.droppedBeacons
|
||||||
else
|
else
|
||||||
table = self.wpZones
|
table = self.wpZones
|
||||||
end
|
end
|
||||||
@ -5672,7 +5681,8 @@ function CTLD:IsUnitInZone(Unit,Zonetype)
|
|||||||
end
|
end
|
||||||
local distance = self:_GetDistance(zonecoord,unitcoord)
|
local distance = self:_GetDistance(zonecoord,unitcoord)
|
||||||
self:T("Distance Zone: "..distance)
|
self:T("Distance Zone: "..distance)
|
||||||
if (zone:IsVec2InZone(unitVec2) or Zonetype == CTLD.CargoZoneType.MOVE) and active == true and maxdist > distance then
|
self:T("Zone Active: "..tostring(active))
|
||||||
|
if (zone:IsVec2InZone(unitVec2) or Zonetype == CTLD.CargoZoneType.MOVE) and active == true and distance < maxdist then
|
||||||
outcome = true
|
outcome = true
|
||||||
maxdist = distance
|
maxdist = distance
|
||||||
zoneret = zone
|
zoneret = zone
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user