Skip to content

Commit

Permalink
resolved missing-param issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremoiii committed Apr 11, 2024
1 parent 377107f commit 92aff14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Graphics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function Graphics.ScreenToWorld(distance, flags)
local mouse = vector2(GetControlNormal(2, 239), GetControlNormal(2, 240))
local cam3DPos, forwardDir = Graphics.ScreenRelToWorld(camPos, camRot, mouse)
local direction = camPos + forwardDir * distance
---@diagnostic disable-next-line: missing-parameter
local rayHandle = StartExpensiveSynchronousShapeTestLosProbe(cam3DPos, direction, flags, 0, 0)
local _, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(rayHandle)
return (hit == 1 and true or false), endCoords, surfaceNormal, entityHit, (entityHit >= 1 and GetEntityType(entityHit) or 0), direction, mouse
Expand Down Expand Up @@ -160,4 +161,4 @@ end
function Graphics.World3DToScreen2D(pos)
local _, sX, sY = GetScreenCoordFromWorldCoord(pos.x, pos.y, pos.z)
return vector2(sX, sY)
end
end

0 comments on commit 92aff14

Please sign in to comment.