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

Method SpawnInitPhysics

ogsr_engine/xrGame/CharacterPhysicsSupport.cpp:231–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229 m_PhysicMovementControl->SetPosition(m_EntityAlife.Position());
230}
231void CCharacterPhysicsSupport::SpawnInitPhysics(CSE_Abstract* e)
232{
233 // if(!m_physics_skeleton)CreateSkeleton(m_physics_skeleton);
234
235 if (m_EntityAlife.g_Alive())
236 {
237#ifdef DEBUG
238 if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && _stricmp(PH_DBG_ObjectTrack(), *m_EntityAlife.cName()) == 0)
239 {
240 Msg("CCharacterPhysicsSupport::SpawnInitPhysics obj %s before collision correction %f,%f,%f", PH_DBG_ObjectTrack(), m_EntityAlife.Position().x,
241 m_EntityAlife.Position().y, m_EntityAlife.Position().z);
242 }
243#endif
244#ifdef USE_IK
245 if (etStalker == m_eType || etActor == m_eType ||
246 (m_EntityAlife.Visual()->dcast_PKinematics()->LL_UserData() && m_EntityAlife.Visual()->dcast_PKinematics()->LL_UserData()->section_exist("ik")))
247 CreateIKController();
248#endif
249 if (!m_EntityAlife.animation_movement_controlled())
250 CreateCharacter();
251#ifdef DEBUG
252 if (ph_dbg_draw_mask1.test(ph_m1_DbgTrackObject) && _stricmp(PH_DBG_ObjectTrack(), *m_EntityAlife.cName()) == 0)
253 {
254 Msg("CCharacterPhysicsSupport::SpawnInitPhysics obj %s after collision correction %f,%f,%f", PH_DBG_ObjectTrack(), m_EntityAlife.Position().x,
255 m_EntityAlife.Position().y, m_EntityAlife.Position().z);
256 }
257#endif
258 // m_PhysicMovementControl.SetMaterial( )
259 }
260 else
261 {
262 ActivateShell(NULL);
263 }
264}
265void CCharacterPhysicsSupport::in_NetDestroy()
266{
267 m_PhysicMovementControl->DestroyCharacter();

Callers

nothing calls this directly

Calls 11

PH_DBG_ObjectTrackFunction · 0.85
MsgFunction · 0.85
g_AliveMethod · 0.80
PositionMethod · 0.80
LL_UserDataMethod · 0.80
VisualMethod · 0.80
section_existMethod · 0.80
testMethod · 0.45
cNameMethod · 0.45
dcast_PKinematicsMethod · 0.45

Tested by

no test coverage detected