mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-22 16:05:25 +00:00
AcceptZones Change
Added higher level variable to hold detection state across multiple AcceptZones.
This commit is contained in:
@@ -617,12 +617,16 @@ do -- DETECTION_BASE
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self.AcceptZones then
|
if self.AcceptZones then
|
||||||
|
local AnyZoneDetection = false
|
||||||
for AcceptZoneID, AcceptZone in pairs( self.AcceptZones ) do
|
for AcceptZoneID, AcceptZone in pairs( self.AcceptZones ) do
|
||||||
local AcceptZone = AcceptZone -- Core.Zone#ZONE_BASE
|
local AcceptZone = AcceptZone -- Core.Zone#ZONE_BASE
|
||||||
if AcceptZone:IsVec2InZone( DetectedObjectVec2 ) == false then
|
if AcceptZone:IsVec2InZone( DetectedObjectVec2 ) then
|
||||||
DetectionAccepted = false
|
AnyZoneDetection = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if not AnyZoneDetection then
|
||||||
|
DetectionAccepted = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.RejectZones then
|
if self.RejectZones then
|
||||||
|
|||||||
Reference in New Issue
Block a user