mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 08:26:27 +02:00
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:
16
cl_radar.lua
16
cl_radar.lua
@@ -366,17 +366,19 @@ function RADAR:GetVehsHitByRay( ownVeh, vehs, s, e )
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RADAR:CreateRayThread( vehs, from, startX, endX, endY )
|
function RADAR:CreateRayThread( vehs, from, startX, endX, endY )
|
||||||
local startP = GetOffsetFromEntityInWorldCoords( from, startX, 0.0, 0.0 )
|
Citizen.CreateThread( function()
|
||||||
local endP = GetOffsetFromEntityInWorldCoords( from, endX, endY, 0.0 )
|
local startP = GetOffsetFromEntityInWorldCoords( from, startX, 0.0, 0.0 )
|
||||||
|
local endP = GetOffsetFromEntityInWorldCoords( from, endX, endY, 0.0 )
|
||||||
|
|
||||||
UTIL:DrawDebugLine( startP, endP )
|
UTIL:DrawDebugLine( startP, endP )
|
||||||
|
|
||||||
local hitVehs = self:GetVehsHitByRay( from, vehs, startP, endP )
|
local hitVehs = self:GetVehsHitByRay( from, vehs, startP, endP )
|
||||||
|
|
||||||
self:InsertCapturedVehicleData( hitVehs )
|
self:InsertCapturedVehicleData( hitVehs )
|
||||||
|
|
||||||
print( "Ray thread: increasing ray state from " .. tostring( self:GetRayTraceState() ) .. " to " .. tostring( self:GetRayTraceState() + 1 ) )
|
print( "Ray thread: increasing ray state from " .. tostring( self:GetRayTraceState() ) .. " to " .. tostring( self:GetRayTraceState() + 1 ) )
|
||||||
self:IncreaseRayTraceState()
|
self:IncreaseRayTraceState()
|
||||||
|
end )
|
||||||
end
|
end
|
||||||
|
|
||||||
function RADAR:RunControlManager()
|
function RADAR:RunControlManager()
|
||||||
|
|||||||
Reference in New Issue
Block a user