mirror of
https://github.com/Winded/RagdollMover.git
synced 2025-03-04 03:13:36 -05:00
A small fix for an embarassing mistake so now it doesn't falsely label certain bones as root ones
This commit is contained in:
parent
c7ab4ba481
commit
7e467ac832
@ -213,7 +213,7 @@ function GetOffsetTable(tool,ent,rotate)
|
||||
for a = 0, ent:GetPhysicsObjectCount() - 1 do -- getting all "root" bones - so it'll work for ragdoll with detached stuffs
|
||||
local Bone = ent:TranslatePhysBoneToBone(a)
|
||||
local Parent = ent:GetBoneParent(Bone)
|
||||
if ent:TranslateBoneToPhysBone(Parent) == a or ent:TranslateBoneToPhysBone(Parent) == -1 or not GetPhysBoneParent(ent, a) then -- root physbones seem to be "parented" to 0 or the -1
|
||||
if ent:TranslateBoneToPhysBone(Parent) == -1 or not GetPhysBoneParent(ent, a) then -- root physbones seem to be "parented" to the -1. and the physboneparent function will not find the thing for it.
|
||||
RTable[a] = {}
|
||||
RTable[a].pos = ent:GetPhysicsObjectNum(a):GetPos()
|
||||
RTable[a].ang = ent:GetPhysicsObjectNum(a):GetAngles()
|
||||
|
Loading…
Reference in New Issue
Block a user