Version 1.1.7

autoCSAR
williePete
ssbClient 3.0.0
This commit is contained in:
Christian Franz
2022-10-12 12:33:35 +02:00
parent 4c0b0e8bed
commit 5ec26aaaf1
13 changed files with 369 additions and 137 deletions

View File

@@ -1,5 +1,5 @@
dcsCommon = {}
dcsCommon.version = "2.7.5"
dcsCommon.version = "2.7.6"
--[[-- VERSION HISTORY
2.2.6 - compassPositionOfARelativeToB
- clockPositionOfARelativeToB
@@ -104,6 +104,7 @@ dcsCommon.version = "2.7.5"
2.7.5 - new bitAND32()
- new LSR()
- new num2bin()
2.7.6 - new getObjectsForCatAtPointWithRadius()
--]]--
@@ -2693,6 +2694,25 @@ function dcsCommon.objectHandler(theObject, theCollector)
return true
end
function dcsCommon.getObjectsForCatAtPointWithRadius(aCat, thePoint, theRadius)
if not aCat then aCat = Object.Category.UNIT end
local p = {x=thePoint.x, y=thePoint.y, z=thePoint.z}
local collector = {}
-- now build the search argument
local args = {
id = world.VolumeType.SPHERE,
params = {
point = p,
radius = theRadius
}
}
-- now call search
world.searchObjects(aCat, args, dcsCommon.objectHandler, collector)
return collector
end
function dcsCommon.getSceneryObjectsInZone(theZone) -- DCS ZONE!!!
local aCat = 5 -- scenery
-- WARNING: WE ARE USING DCS ZONES, NOT CFX!!!