PlayerScore 2.0
Owned Zones refactor (started)
This commit is contained in:
Christian Franz
2023-04-27 07:33:57 +02:00
parent aeafc854ac
commit 97d3c10540
14 changed files with 3361 additions and 1145 deletions

View File

@@ -1,5 +1,5 @@
cfxZones = {}
cfxZones.version = "3.0.6"
cfxZones.version = "3.0.8"
-- cf/x zone management module
-- reads dcs zones and makes them accessible and mutable
@@ -125,6 +125,8 @@ cfxZones.version = "3.0.6"
- 3.0.6 - new createSimplePolyZone()
- new createSimpleQuadZone()
- 3.0.7 - getPoint() can also get land y when passing true as second param
- 3.0.8 - new cfxZones.pointInOneOfZones(thePoint, zoneArray, useOrig)
--]]--
cfxZones.verbose = false
cfxZones.caseSensitiveProperties = false -- set to true to make property names case sensitive
@@ -1141,6 +1143,15 @@ function cfxZones.markZoneWithSmokePolarRandom(theZone, radius, smokeColor)
cfxZones.markZoneWithSmokePolar(theZone, radius, degrees, smokeColor)
end
function cfxZones.pointInOneOfZones(thePoint, zoneArray, useOrig)
if not zoneArray then zoneArray = cfxZones.zones end
for idx, theZone in pairs(zoneArray) do
local isIn, percent, dist = cfxZones.pointInZone(thePoint, theZone, useOrig)
if isIn then return isIn, percent, dist, theZone end
end
return false, 0, 0, nil
end
-- unitInZone returns true if theUnit is inside the zone
-- the second value returned is the percentage of distance