| 63 | } |
| 64 | |
| 65 | void 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 | } |
| 83 | CPhysicsShell* P_build_Shell(CGameObject* obj, bool not_active_state, BONE_P_MAP* p_bone_map, LPCSTR fixed_bones) |
| 84 | { |
| 85 | CPhysicsShell* pPhysicsShell; |
no test coverage detected