Fix getBone not working (#2984)

This commit is contained in:
Denneisk 2024-01-28 19:57:15 -05:00 committed by GitHub
parent da33312808
commit f34152eb63
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -291,6 +291,8 @@ e2function entity entity:parent()
return this:GetParent()
end
local getBone = E2Lib.getBone
--- Returns the '''bone''' <this> is parented to.
e2function bone entity:parentBone()
if not IsValid(this) then return nil end

View File

@ -699,6 +699,8 @@ e2function vector entity:aimNormal()
return this:GetEyeTraceNoCursor().HitNormal
end
local getBone = E2Lib.getBone
--- Returns the bone the player is currently aiming at.
e2function bone entity:aimBone()
if not IsValid(this) then return self:throw("Invalid entity!", nil) end