Skip to content

Commit

Permalink
refactor(client): increase distance for bone checks
Browse files Browse the repository at this point in the history
Should be enough for every case, though makes smaller vehicle
bone checks less precise.

"Resolves" #54 (still need other improvements).
  • Loading branch information
thelindat committed Feb 22, 2023
1 parent 7efd2b3 commit d044a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ local function enableTargeting()
if _type == 'string' then
local boneId = GetEntityBoneIndexByName(entityHit, bone)

if boneId ~= -1 and #(endCoords - GetWorldPositionOfEntityBone(entityHit, boneId)) <= 1 then
if boneId ~= -1 and #(endCoords - GetEntityBonePosition_2(entityHit, boneId)) <= 2 then
bone = boneId
else
hide = true
Expand Down

0 comments on commit d044a15

Please sign in to comment.