mirror of
https://github.com/Michatec/wk_wars2x.git
synced 2026-04-01 00:16:27 +02:00
Removed ray vectors, updated speed convert, removed thread creation for ray traces
This commit is contained in:
@@ -78,14 +78,11 @@ RADAR.rayTraces = {
|
||||
{ startVec = { x = 0.0, y = 5.0 }, endVec = { x = 0.0, y = 150.0 } },
|
||||
{ startVec = { x = -5.0, y = 15.0 }, endVec = { x = -5.0, y = 150.0 } },
|
||||
{ startVec = { x = 5.0, y = 15.0 }, endVec = { x = 5.0, y = 150.0 } }
|
||||
--{ startVec = { x = -12.0, y = 25.0 }, endVec = { x = -12.0, y = 150.0 } },
|
||||
--{ startVec = { x = 12.0, y = 25.0 }, endVec = { x = 12.0, y = 150.0 } }
|
||||
}
|
||||
|
||||
RADAR.sorting = {
|
||||
[1] = { name = "CLOSEST", func = function( a, b ) return a.dist < b.dist end },
|
||||
[2] = { name = "FASTEST", func = function( a, b ) return a.speed > b.speed end },
|
||||
--[3] = { name = "FASTEST & CLOSEST", func = function( a, b ) return math.ceil( a.speed ) > math.ceil( b.speed ) and a.dist < b.dist end },
|
||||
[3] = { name = "LARGEST", func = function( a, b ) return a.size > b.size end }
|
||||
}
|
||||
|
||||
@@ -163,10 +160,9 @@ end
|
||||
------------------------------------------------------------------------]]--
|
||||
function RADAR:GetVehSpeedFormatted( speed )
|
||||
if ( self.vars.speedType == "mph" ) then
|
||||
-- return GetEntitySpeed( veh ) * 2.236936
|
||||
return math.ceil( speed * 2.236936 )
|
||||
else
|
||||
return GetEntitySpeed( veh ) * 3.6
|
||||
return math.ceil( speed * 3.6 )
|
||||
end
|
||||
end
|
||||
|
||||
@@ -331,7 +327,6 @@ 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 )
|
||||
|
||||
@@ -343,7 +338,6 @@ 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()
|
||||
|
||||
Reference in New Issue
Block a user