diff --git a/[core]/es_extended/client/compat.lua b/[core]/es_extended/client/compat.lua index feef08bf..a4b3cfce 100644 --- a/[core]/es_extended/client/compat.lua +++ b/[core]/es_extended/client/compat.lua @@ -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 diff --git a/[core]/esx_lib/imports/raycast/client.lua b/[core]/esx_lib/imports/raycast/client.lua index f0464be5..131fc79b 100644 --- a/[core]/esx_lib/imports/raycast/client.lua +++ b/[core]/esx_lib/imports/raycast/client.lua @@ -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