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

Method CreateSkeleton

ogsr_engine/xrGame/CharacterPhysicsSupport.cpp:562–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562void 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}
586void CCharacterPhysicsSupport::CreateSkeleton()
587{
588 if (m_pPhysicsShell)

Callers

nothing calls this directly

Calls 15

P_create_ShellFunction · 0.85
MsgFunction · 0.85
VisualMethod · 0.80
SmoothElementsInertiaMethod · 0.80
LL_UserDataMethod · 0.80
GetCharacterVelocityMethod · 0.80
GetDeathPositionMethod · 0.80
PositionMethod · 0.80
DestroyCharacterMethod · 0.80
build_FromKinematicsMethod · 0.80
set_JointResistanceMethod · 0.80

Tested by

no test coverage detected