mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 23:01:26 +00:00
Merge pull request #1845 from seltonmt012/fix/points-loop-once
fix(esx_lib/points): start the points loop only once
This commit is contained in:
@@ -4,6 +4,7 @@ xLib.points = {}
|
|||||||
local points = {}
|
local points = {}
|
||||||
local insidePoints = {}
|
local insidePoints = {}
|
||||||
local handleCount = 0
|
local handleCount = 0
|
||||||
|
local loopStarted = false
|
||||||
|
|
||||||
---@param coords vector3
|
---@param coords vector3
|
||||||
---@param distance number
|
---@param distance number
|
||||||
@@ -44,6 +45,12 @@ function xLib.points.hide(handle, hidden)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function xLib.points.startLoop()
|
function xLib.points.startLoop()
|
||||||
|
if loopStarted then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
loopStarted = true
|
||||||
|
|
||||||
CreateThread(function()
|
CreateThread(function()
|
||||||
local lastScan = 0
|
local lastScan = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user