Changed the way debugging hits works

This commit is contained in:
Dan
2019-11-09 18:20:22 +00:00
parent 722b3742a2
commit dda30b6ed6
2 changed files with 39 additions and 14 deletions

View File

@@ -402,8 +402,8 @@ function RADAR:Test()
-- Check the vehicle actually exists and that the player is in the driver's seat
if ( DoesEntityExist( plyVeh ) and GetPedInVehicleSeat( plyVeh, -1 ) ) then
local startPoint = GetOffsetFromEntityInWorldCoords( plyVeh, 0.0, 5.0, 0.0 )
local endPoint = GetOffsetFromEntityInWorldCoords( plyVeh, 0.0, 50.0, 1.0 )
local startPoint = GetOffsetFromEntityInWorldCoords( plyVeh, 0.0, -5.0, 0.0 )
local endPoint = GetOffsetFromEntityInWorldCoords( plyVeh, 0.0, -50.0, 1.0 )
DrawLine( startPoint, endPoint, 0, 255, 0, 255 )
--for veh in EnumerateVehicles() do
@@ -481,6 +481,9 @@ function RADAR:Test()
-- end
-- Fourth attempt
local offset = GetOffsetFromEntityGivenWorldCoords( veh, startPoint )
UTIL:DrawDebugText( 0.500, 0.550, 0.50, true, tostring( offset ) )
local radius = 10.0
local radiusSqr = radius * radius