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

Method CreateSkeleton

ogsr_engine/xrGame/Car.cpp:840–864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

838}
839
840void 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
866void CCar::Init()
867{

Callers

nothing calls this directly

Calls 15

VisualFunction · 0.85
P_create_ShellFunction · 0.85
XFORMFunction · 0.85
PlayCycleMethod · 0.80
build_FromKinematicsMethod · 0.80
spawn_iniMethod · 0.80
LL_UserDataMethod · 0.80
CalculateBonesMethod · 0.45
dcast_PKinematicsMethod · 0.45
set_PhysicsRefObjectMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected