small fixes

This commit is contained in:
SNAILX
2025-11-11 03:31:19 +01:00
parent d908418637
commit 109a5c6038
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -3,17 +3,20 @@
ESX.Game.GetShapeTestResultSync = xLib.Raycast.GetShapeTestResult
ESX.Game.RaycastScreen = xLib.Raycast.FromScreen
ESX.Game.StartRaycasting = xLib.Raycast.Start
---@param raycast table The raycast object returned from ESX.Game.StartRaycasting
ESX.Game.StopRaycasting = function(raycast)
if raycast and raycast.active then
raycast:Stop()
end
end
---@param raycast table The raycast object returned from ESX.Game.StartRaycasting
ESX.Game.IsRaycastActive = function(raycast)
if raycast and raycast.active then
return raycast:IsActive()
end
return false
end
---@param raycast table The raycast object returned from ESX.Game.StartRaycasting
ESX.Game.GetRaycastResult = function(raycast)
if raycast and raycast.active then
return raycast.result
+1 -1
View File
@@ -60,7 +60,7 @@ end
-- Stop raycasting
function xLib.Raycast:Stop()
if not self and not self.active then print('already stopped') return end
if not self and not self.active then return end
self.active = false
if self._thread then
self._thread = nil