Added create thread back in

Works better now as the system doesn't run every frame like it used to
This commit is contained in:
Dan
2019-11-08 16:07:38 +00:00
parent 635c7a7467
commit 2197056be5

View File

@@ -366,6 +366,7 @@ function RADAR:GetVehsHitByRay( ownVeh, vehs, s, e )
end
function RADAR:CreateRayThread( vehs, from, startX, endX, endY )
Citizen.CreateThread( function()
local startP = GetOffsetFromEntityInWorldCoords( from, startX, 0.0, 0.0 )
local endP = GetOffsetFromEntityInWorldCoords( from, endX, endY, 0.0 )
@@ -377,6 +378,7 @@ function RADAR:CreateRayThread( vehs, from, startX, endX, endY )
print( "Ray thread: increasing ray state from " .. tostring( self:GetRayTraceState() ) .. " to " .. tostring( self:GetRayTraceState() + 1 ) )
self:IncreaseRayTraceState()
end )
end
function RADAR:RunControlManager()