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

Method Hit

ogsr_engine/xrGame/BreakableObject.cpp:78–94  ·  view source on GitHub ↗

void CBreakableObject::Hit(float P,Fvector &dir, CObject* who,s16 element, Fvector p_in_object_space, float impulse, ALife::EHitType hit_type)

Source from the content-addressed store, hash-verified

76// void CBreakableObject::Hit(float P,Fvector &dir, CObject* who,s16 element,
77// Fvector p_in_object_space, float impulse, ALife::EHitType hit_type)
78void CBreakableObject::Hit(SHit* pHDS)
79{
80 CheckHitBreak(pHDS->damage(), pHDS->hit_type);
81 if (m_pPhysicsShell)
82 {
83 if (pHDS->hit_type == ALife::eHitTypeExplosion)
84 {
85 ApplyExplosion(pHDS->dir, pHDS->impulse);
86 }
87 else
88 {
89 //. hack: slipch ???
90 if ((pHDS->impulse > EPS) && (BI_NONE != pHDS->bone()))
91 m_pPhysicsShell->applyImpulseTrace(pHDS->p_in_bone_space, pHDS->dir, pHDS->impulse, pHDS->bone());
92 }
93 }
94}
95
96void CBreakableObject::net_Export(CSE_Abstract* E) { VERIFY(Local()); }
97

Callers

nothing calls this directly

Calls 3

damageMethod · 0.80
boneMethod · 0.80
applyImpulseTraceMethod · 0.45

Tested by

no test coverage detected