AI/ZONE - Some fixes for units unreachable

This commit is contained in:
Applevangelist
2022-05-05 12:08:43 +02:00
parent ef4398a5f1
commit 7989267d51
7 changed files with 24 additions and 28 deletions

View File

@@ -1166,7 +1166,9 @@ end
-- @return #boolean true if the location is within the zone.
function ZONE_RADIUS:IsVec2InZone( Vec2 )
self:F2( Vec2 )
if not Vec2 then return false end
local ZoneVec2 = self:GetVec2()
if ZoneVec2 then
@@ -1184,7 +1186,7 @@ end
-- @return #boolean true if the point is within the zone.
function ZONE_RADIUS:IsVec3InZone( Vec3 )
self:F2( Vec3 )
if not Vec3 then return false end
local InZone = self:IsVec2InZone( { x = Vec3.x, y = Vec3.z } )
return InZone
@@ -1975,7 +1977,7 @@ end
-- @return #boolean true if the location is within the zone.
function ZONE_POLYGON_BASE:IsVec2InZone( Vec2 )
self:F2( Vec2 )
if not Vec2 then return false end
local Next
local Prev
local InPolygon = false