mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 00:01:20 +00:00
small fixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user