MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / fix_bones

Function fix_bones

ogsr_engine/xrGame/PhysicsShell.cpp:65–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void fix_bones(LPCSTR fixed_bones, CPhysicsShell* shell)
66{
67 VERIFY(fixed_bones);
68 VERIFY(shell);
69 IKinematics* pKinematics = shell->PKinematics();
70 VERIFY(pKinematics);
71 int count = _GetItemCount(fixed_bones);
72 for (int i = 0; i < count; ++i)
73 {
74 string64 fixed_bone;
75 _GetItem(fixed_bones, i, fixed_bone);
76 u16 fixed_bone_id = pKinematics->LL_BoneID(fixed_bone);
77 R_ASSERT2(BI_NONE != fixed_bone_id, make_string("wrong fixed bone [%s] for object with visual [%s]", fixed_bone, pKinematics->getDebugName().c_str()));
78 CPhysicsElement* E = shell->get_Element(fixed_bone_id);
79 if (E)
80 E->Fix();
81 }
82}
83CPhysicsShell* P_build_Shell(CGameObject* obj, bool not_active_state, BONE_P_MAP* p_bone_map, LPCSTR fixed_bones)
84{
85 CPhysicsShell* pPhysicsShell;

Callers 1

Calls 8

_GetItemCountFunction · 0.85
_GetItemFunction · 0.85
make_stringFunction · 0.85
LL_BoneIDMethod · 0.80
getDebugNameMethod · 0.80
get_ElementMethod · 0.80
FixMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected