mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-12-01 05:24:47 +00:00
fix(zones): don't trigger onEnter on grid change
This commit is contained in:
1 file changed
+6
@@ -131,9 +131,15 @@ CreateThread(function()
|
||||
for i = 1, #nearbyZones do
|
||||
local zone = nearbyZones[i]
|
||||
|
||||
if zone.insideZone then
|
||||
local contains = zone.thickness and glm_polygon_contains(zone.polygon, coords, zone.thickness / 4) or #(zone.coords - coords) < zone.radius
|
||||
|
||||
if not contains then
|
||||
zone.insideZone = false
|
||||
insideZones[zone.id] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
nearbyZones = zones
|
||||
cache.lastCellX = cellX
|
||||
|
||||
Reference in new issue
Block a user