| 560 | } |
| 561 | |
| 562 | void CCharacterPhysicsSupport::CreateSkeleton(CPhysicsShell*& pShell) |
| 563 | { |
| 564 | R_ASSERT2(!pShell, "pShell already initialized!!"); |
| 565 | if (!m_EntityAlife.Visual()) |
| 566 | return; |
| 567 | #ifdef DEBUG |
| 568 | CTimer t; |
| 569 | t.Start(); |
| 570 | #endif |
| 571 | pShell = P_create_Shell(); |
| 572 | pShell->preBuild_FromKinematics(smart_cast<IKinematics*>(m_EntityAlife.Visual())); |
| 573 | pShell->mXFORM.set(mXFORM); |
| 574 | pShell->SetAirResistance(skel_airr_lin_factor, skel_airr_ang_factor); |
| 575 | pShell->SmoothElementsInertia(0.3f); |
| 576 | pShell->set_PhysicsRefObject(&m_EntityAlife); |
| 577 | SAllDDOParams disable_params; |
| 578 | disable_params.Load(smart_cast<IKinematics*>(m_EntityAlife.Visual())->LL_UserData()); |
| 579 | pShell->set_DisableParams(disable_params); |
| 580 | |
| 581 | pShell->Build(); |
| 582 | #ifdef DEBUG |
| 583 | Msg("shell for %s[%d] created in %f ms", *m_EntityAlife.cName(), m_EntityAlife.ID(), t.GetElapsed_sec() * 1000.f); |
| 584 | #endif |
| 585 | } |
| 586 | void CCharacterPhysicsSupport::CreateSkeleton() |
| 587 | { |
| 588 | if (m_pPhysicsShell) |
nothing calls this directly
no test coverage detected