mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #1987 from ttrebuchon/tt/misc-bug-fixes
Misc Bug Fixes
This commit is contained in:
commit
dbd78f35a4
@ -4101,9 +4101,9 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
|
|||||||
-- Get the size of an object.
|
-- Get the size of an object.
|
||||||
local function _GetObjectSize(DCSdesc)
|
local function _GetObjectSize(DCSdesc)
|
||||||
if DCSdesc.box then
|
if DCSdesc.box then
|
||||||
local x=DCSdesc.box.max.x+math.abs(DCSdesc.box.min.x) --length
|
local x=DCSdesc.box.max.x-DCSdesc.box.min.x --length
|
||||||
local y=DCSdesc.box.max.y+math.abs(DCSdesc.box.min.y) --height
|
local y=DCSdesc.box.max.y-DCSdesc.box.min.y --height
|
||||||
local z=DCSdesc.box.max.z+math.abs(DCSdesc.box.min.z) --width
|
local z=DCSdesc.box.max.z-DCSdesc.box.min.z --width
|
||||||
return math.max(x,z), x , y, z
|
return math.max(x,z), x , y, z
|
||||||
end
|
end
|
||||||
return 0,0,0,0
|
return 0,0,0,0
|
||||||
|
|||||||
@ -5776,10 +5776,12 @@ function AUFTRAG:UpdateMarker()
|
|||||||
-- Get target coordinates. Can be nil!
|
-- Get target coordinates. Can be nil!
|
||||||
local targetcoord=self:GetTargetCoordinate()
|
local targetcoord=self:GetTargetCoordinate()
|
||||||
|
|
||||||
if self.markerCoaliton and self.markerCoaliton>=0 then
|
if targetcoord then
|
||||||
self.marker=MARKER:New(targetcoord, text):ReadOnly():ToCoalition(self.markerCoaliton)
|
if self.markerCoaliton and self.markerCoaliton>=0 then
|
||||||
else
|
self.marker=MARKER:New(targetcoord, text):ReadOnly():ToCoalition(self.markerCoaliton)
|
||||||
self.marker=MARKER:New(targetcoord, text):ReadOnly():ToAll()
|
else
|
||||||
|
self.marker=MARKER:New(targetcoord, text):ReadOnly():ToAll()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1807,7 +1807,7 @@ function COMMANDER:RecruitAssetsForEscort(Mission, Assets)
|
|||||||
local Cohorts=self:_GetCohorts(Mission.escortLegions, Mission.escortCohorts, Mission.operation)
|
local Cohorts=self:_GetCohorts(Mission.escortLegions, Mission.escortCohorts, Mission.operation)
|
||||||
|
|
||||||
-- Call LEGION function but provide COMMANDER as self.
|
-- Call LEGION function but provide COMMANDER as self.
|
||||||
local assigned=LEGION.AssignAssetsForEscort(self, Cohorts, Assets, Mission.NescortMin, Mission.NescortMax, Mission.escortTargetTypes, Mission.escortEngageRange)
|
local assigned=LEGION.AssignAssetsForEscort(self, Cohorts, Assets, Mission.NescortMin, Mission.NescortMax, Mission.escortMissionType, Mission.escortTargetTypes, Mission.escortEngageRange)
|
||||||
|
|
||||||
return assigned
|
return assigned
|
||||||
end
|
end
|
||||||
|
|||||||
@ -3013,7 +3013,7 @@ function OPSGROUP:MarkWaypoints(Duration)
|
|||||||
local waypoint=_waypoint --#OPSGROUP.Waypoint
|
local waypoint=_waypoint --#OPSGROUP.Waypoint
|
||||||
|
|
||||||
local text=string.format("Waypoint ID=%d of %s", waypoint.uid, self.groupname)
|
local text=string.format("Waypoint ID=%d of %s", waypoint.uid, self.groupname)
|
||||||
text=text..string.format("\nSpeed=%.1f kts, Alt=%d ft (%s)", UTILS.MpsToKnots(waypoint.speed), UTILS.MetersToFeet(waypoint.alt), "BARO")
|
text=text..string.format("\nSpeed=%.1f kts, Alt=%d ft (%s)", UTILS.MpsToKnots(waypoint.speed), UTILS.MetersToFeet(waypoint.alt or 0), "BARO")
|
||||||
|
|
||||||
if waypoint.marker then
|
if waypoint.marker then
|
||||||
if waypoint.marker.text~=text then
|
if waypoint.marker.text~=text then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user