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

Method ProcessDamage

ogsr_engine/xrGame/BreakableObject.cpp:265–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void CBreakableObject::ProcessDamage()
266{
267 NET_Packet P;
268 SHit HS;
269 HS.GenHeader(GE_HIT, ID());
270 HS.whoID = (ID());
271 HS.weaponID = (ID());
272 HS.dir = (m_contact_damage_dir);
273 HS.power = (m_max_frame_damage);
274 HS.boneID = (PKinematics(Visual())->LL_GetBoneRoot());
275 HS.p_in_bone_space = (m_contact_damage_pos);
276 HS.impulse = (0.f);
277 HS.hit_type = (ALife::eHitTypeStrike);
278 HS.Write_Packet(P);
279
280 u_EventSend(P);
281
282 m_max_frame_damage = 0.f;
283 b_resived_damage = false;
284}
285void CBreakableObject::CheckHitBreak(float power, ALife::EHitType hit_type)
286{
287 if (hit_type != ALife::eHitTypeStrike)

Callers

nothing calls this directly

Calls 6

IDFunction · 0.85
PKinematicsFunction · 0.85
VisualFunction · 0.85
GenHeaderMethod · 0.80
LL_GetBoneRootMethod · 0.80
Write_PacketMethod · 0.80

Tested by

no test coverage detected