| 838 | } |
| 839 | |
| 840 | void CCar::CreateSkeleton(CSE_Abstract* po) |
| 841 | { |
| 842 | if (!Visual()) |
| 843 | return; |
| 844 | IKinematicsAnimated* K = smart_cast<IKinematicsAnimated*>(Visual()); |
| 845 | if (K) |
| 846 | { |
| 847 | K->PlayCycle("idle"); |
| 848 | K->dcast_PKinematics()->CalculateBones(); |
| 849 | } |
| 850 | |
| 851 | #pragma todo(" replace below by P_build_Shell or call inherited") |
| 852 | m_pPhysicsShell = P_create_Shell(); |
| 853 | m_pPhysicsShell->build_FromKinematics(smart_cast<IKinematics*>(Visual()), &bone_map); |
| 854 | m_pPhysicsShell->set_PhysicsRefObject(this); |
| 855 | m_pPhysicsShell->mXFORM.set(XFORM()); |
| 856 | m_pPhysicsShell->Activate(true); |
| 857 | m_pPhysicsShell->SetAirResistance(0.f, 0.f); |
| 858 | m_pPhysicsShell->SetPrefereExactIntegration(); |
| 859 | |
| 860 | m_pPhysicsShell->Enable(); //Чтобы машины не висели в воздухе после спавна. |
| 861 | |
| 862 | ApplySpawnIniToPhysicShell(&po->spawn_ini(), m_pPhysicsShell, false); |
| 863 | ApplySpawnIniToPhysicShell(smart_cast<IKinematics*>(Visual())->LL_UserData(), m_pPhysicsShell, false); |
| 864 | } |
| 865 | |
| 866 | void CCar::Init() |
| 867 | { |
nothing calls this directly
no test coverage detected