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

Method CCharacterPhysicsSupport

ogsr_engine/xrGame/CharacterPhysicsSupport.cpp:75–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75CCharacterPhysicsSupport::CCharacterPhysicsSupport(EType atype, CEntityAlive* aentity)
76 : m_pPhysicsShell(aentity->PPhysicsShell()), m_EntityAlife(*aentity), mXFORM(aentity->XFORM()), m_ph_sound_player(aentity), m_interactive_motion(0)
77{
78 m_PhysicMovementControl = xr_new<CPHMovementControl>(aentity);
79 m_flags.assign(0);
80 m_eType = atype;
81 m_eState = esAlive;
82 // b_death_anim_on = false;
83 m_flags.set(fl_death_anim_on, FALSE);
84 m_pPhysicsShell = NULL;
85 // m_saved_impulse = 0.f;
86 m_physics_skeleton = NULL;
87 // b_skeleton_in_shell = false;
88 m_flags.set(fl_skeleton_in_shell, FALSE);
89 m_shot_up_factor = 0.f;
90 m_after_death_velocity_factor = 1.f;
91 m_ik_controller = NULL;
92 m_BonceDamageFactor = 1.f;
93 m_collision_hit_callback = NULL;
94 m_Pred_Time = 0.0;
95 m_was_wounded = false;
96 switch (atype)
97 {
98 case etActor:
99 m_PhysicMovementControl->AllocateCharacterObject(CPHMovementControl::actor);
100 m_PhysicMovementControl->SetRestrictionType(CPHCharacter::rtActor);
101 break;
102 case etStalker:
103 m_PhysicMovementControl->AllocateCharacterObject(CPHMovementControl::ai);
104 m_PhysicMovementControl->SetRestrictionType(CPHCharacter::rtStalker);
105 m_PhysicMovementControl->SetActorMovable(false);
106 break;
107 case etBitting: m_PhysicMovementControl->AllocateCharacterObject(CPHMovementControl::ai);
108 }
109};
110
111void CCharacterPhysicsSupport::SetRemoved()
112{

Callers

nothing calls this directly

Calls 5

assignMethod · 0.45
setMethod · 0.45
SetRestrictionTypeMethod · 0.45
SetActorMovableMethod · 0.45

Tested by

no test coverage detected