Updated file tagging, moved function

This commit is contained in:
Dan
2019-11-18 21:16:21 +00:00
parent f98fd71904
commit 8ff0662aa3
4 changed files with 13 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
--[[-----------------------------------------------------------------------
Wraith Radar System - v2.0.0
Wraith ARS 2X - v1.0.0
Created by WolfKnight
-----------------------------------------------------------------------]]--
@@ -11,13 +11,9 @@ function UTIL:Round( num, numDecimalPlaces )
return tonumber( string.format( "%." .. ( numDecimalPlaces or 0 ) .. "f", num ) )
end
function UTIL:OppositeAngle( ang )
return ( ang + 180 ) % 360
end
function UTIL:FormatSpeed( speed )
return string.format( "%03d", speed )
end
-- function UTIL:FormatSpeed( speed )
-- return string.format( "%03d", speed )
-- end
function UTIL:Clamp( val, min, max )
if ( val < min ) then
@@ -46,7 +42,6 @@ function UTIL:Values( xs )
return xs[i]
end
end
function UTIL:GetVehicleInDirection( entFrom, coordFrom, coordTo )
local rayHandle = StartShapeTestCapsule( coordFrom.x, coordFrom.y, coordFrom.z, coordTo.x, coordTo.y, coordTo.z, 20.0, 10, entFrom, 7 )
@@ -54,6 +49,10 @@ function UTIL:GetVehicleInDirection( entFrom, coordFrom, coordTo )
return vehicle
end
function UTIL:OppositeAngle( ang )
return ( ang + 180 ) % 360
end
function UTIL:IsEntityInMyHeading( myAng, tarAng, angToCheck )
local rangeStartFront = myAng - ( angToCheck / 2 )
local rangeEndFront = myAng + ( angToCheck / 2 )