| 44 | } |
| 45 | |
| 46 | CPhysicsShell* P_build_Shell(CGameObject* obj, bool not_active_state, BONE_P_MAP* bone_map, bool not_set_bone_callbacks) |
| 47 | { |
| 48 | IKinematics* pKinematics = smart_cast<IKinematics*>(obj->Visual()); |
| 49 | |
| 50 | CPhysicsShell* pPhysicsShell = P_create_Shell(); |
| 51 | #ifdef DEBUG |
| 52 | pPhysicsShell->dbg_obj = smart_cast<CPhysicsShellHolder*>(obj); |
| 53 | #endif |
| 54 | pPhysicsShell->build_FromKinematics(pKinematics, bone_map); |
| 55 | |
| 56 | pPhysicsShell->set_PhysicsRefObject(smart_cast<CPhysicsShellHolder*>(obj)); |
| 57 | pPhysicsShell->mXFORM.set(obj->XFORM()); |
| 58 | pPhysicsShell->Activate(not_active_state); //, |
| 59 | // m_pPhysicsShell->SmoothElementsInertia(0.3f); |
| 60 | pPhysicsShell->SetAirResistance(); // 0.0014f,1.5f |
| 61 | |
| 62 | return pPhysicsShell; |
| 63 | } |
| 64 | |
| 65 | void fix_bones(LPCSTR fixed_bones, CPhysicsShell* shell) |
| 66 | { |
no test coverage detected