mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
DETECTION - corrected call for Vec2 in zone
This commit is contained in:
parent
c7bbb09195
commit
7bfa05f47d
@ -714,7 +714,7 @@ do -- DETECTION_BASE
|
|||||||
if self.RejectZones then
|
if self.RejectZones then
|
||||||
for RejectZoneID, RejectZone in pairs( self.RejectZones ) do
|
for RejectZoneID, RejectZone in pairs( self.RejectZones ) do
|
||||||
local RejectZone = RejectZone -- Core.Zone#ZONE_BASE
|
local RejectZone = RejectZone -- Core.Zone#ZONE_BASE
|
||||||
if RejectZone:IsPointVec2InZone( DetectedObjectVec2 ) == true then
|
if RejectZone:IsVec2InZone( DetectedObjectVec2 ) == true then
|
||||||
DetectionAccepted = false
|
DetectionAccepted = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -759,7 +759,7 @@ do -- DETECTION_BASE
|
|||||||
local ZoneProbability = ZoneData[2] -- #number
|
local ZoneProbability = ZoneData[2] -- #number
|
||||||
ZoneProbability = ZoneProbability * 30 / 300
|
ZoneProbability = ZoneProbability * 30 / 300
|
||||||
|
|
||||||
if ZoneObject:IsPointVec2InZone( DetectedObjectVec2 ) == true then
|
if ZoneObject:IsVec2InZone( DetectedObjectVec2 ) == true then
|
||||||
local Probability = math.random() -- Selects a number between 0 and 1
|
local Probability = math.random() -- Selects a number between 0 and 1
|
||||||
--self:T( { Probability, ZoneProbability } )
|
--self:T( { Probability, ZoneProbability } )
|
||||||
if Probability > ZoneProbability then
|
if Probability > ZoneProbability then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user