mirror of
https://github.com/weyne85/DML.git
synced 2025-10-29 16:57:49 +00:00
1.2.8
PlayerScore 2.0 Owned Zones refactor (started)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user