mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-13 09:16:15 +00:00
Merge pull request #2498 from FlightControl-Master/master
Merge from master
This commit is contained in:
@@ -638,7 +638,7 @@ CTLD_ENGINEERING = {
|
||||
local crate = ctable[1] -- Ops.CTLD#CTLD_CARGO
|
||||
local static = crate:GetPositionable() -- Wrapper.Static#STATIC
|
||||
local crate_pos = static:GetCoordinate() -- Core.Point#COORDINATE
|
||||
local gpos = group:GetCoordinate() -- Core.Point#COORDINATE
|
||||
local gpos = group:GetCoord() -- Core.Point#COORDINATE
|
||||
-- see how far we are from the crate
|
||||
local distance = self:_GetDistance(gpos,crate_pos)
|
||||
self:T(string.format("%s Distance to crate: %d", self.lid, distance))
|
||||
@@ -667,7 +667,7 @@ CTLD_ENGINEERING = {
|
||||
--local COps = self.C_Ops -- Ops.CTLD#CTLD
|
||||
local group = self.Group -- Wrapper.Group#GROUP
|
||||
local tgtpos = self.currwpt -- Core.Point#COORDINATE
|
||||
local gpos = group:GetCoordinate() -- Core.Point#COORDINATE
|
||||
local gpos = group:GetCoord() -- Core.Point#COORDINATE
|
||||
-- see how far we are from the crate
|
||||
local distance = self:_GetDistance(gpos,tgtpos)
|
||||
self:T(string.format("%s Distance remaining: %d", self.lid, distance))
|
||||
|
||||
@@ -1175,7 +1175,7 @@ function INTEL:_CreateContact(Positionable, RecceName)
|
||||
item.category=3 --static:GetCategory()
|
||||
item.categoryname=static:GetCategoryName() or "Unknown"
|
||||
item.threatlevel=static:GetThreatLevel() or 0
|
||||
item.position=static:GetCoordinate()
|
||||
item.position=static:GetCoord()
|
||||
item.velocity=static:GetVelocityVec3()
|
||||
item.speed=0
|
||||
item.recce=RecceName
|
||||
@@ -1282,15 +1282,15 @@ function INTEL:GetDetectedUnits(Unit, DetectedUnits, RecceDetecting, DetectVisua
|
||||
local DetectionAccepted = true
|
||||
|
||||
if self.RadarAcceptRange then
|
||||
local reccecoord = Unit:GetCoordinate()
|
||||
local coord = unit:GetCoordinate()
|
||||
local reccecoord = Unit:GetCoord()
|
||||
local coord = unit:GetCoord()
|
||||
local dist = math.floor(coord:Get2DDistance(reccecoord)/1000) -- km
|
||||
if dist > self.RadarAcceptRangeKilometers then DetectionAccepted = false end
|
||||
end
|
||||
|
||||
if self.RadarBlur then
|
||||
local reccecoord = Unit:GetCoordinate()
|
||||
local coord = unit:GetCoordinate()
|
||||
local reccecoord = Unit:GetCoord()
|
||||
local coord = unit:GetCoord()
|
||||
local dist = math.floor(coord:Get2DDistance(reccecoord)/1000) -- km
|
||||
local AGL = unit:GetAltitude(true)
|
||||
local minheight = self.RadarBlurMinHeight or 250 -- meters
|
||||
|
||||
Reference in New Issue
Block a user