Skip to content

Commit

Permalink
fix: PolyZone has vec2 centre, not vec3. Correct for distance check.
Browse files Browse the repository at this point in the history
  • Loading branch information
citRaTTV committed May 31, 2024
1 parent 6e8a356 commit 20a2b97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ local function EnableTarget()
closestZone = zone
end
if Config.DrawSprite then
if #(coords - zone.center) < (zone.targetoptions.drawDistance or Config.DrawDistance) then
local testCentre = type(zone.center) == 'vector2' and vector3(zone.center.x, zone.center.y, zone.maxZ) or zone.center
if #(coords - testCentre) < (zone.targetoptions.drawDistance or Config.DrawDistance) then
listSprite[k] = zone
else
listSprite[k] = nil
Expand Down

0 comments on commit 20a2b97

Please sign in to comment.