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

Method CreateHit

ogsr_engine/xrGame/CustomZone.cpp:1485–1501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1483}
1484
1485void CCustomZone::CreateHit(u16 id_to, u16 id_from, const Fvector& hit_dir, float hit_power, s16 bone_id, const Fvector& pos_in_bone, float hit_impulse, ALife::EHitType hit_type)
1486{
1487 {
1488 if (m_owner_id != u32(-1))
1489 id_from = (u16)m_owner_id;
1490
1491 NET_Packet l_P;
1492 Fvector hdir = hit_dir;
1493 SHit Hit = SHit(hit_power, hdir, this, bone_id, pos_in_bone, hit_impulse, hit_type);
1494 Hit.GenHeader(GE_HIT, id_to);
1495 Hit.whoID = id_from;
1496 Hit.weaponID = this->ID();
1497 Hit.Write_Packet(l_P);
1498
1499 u_EventSend(l_P);
1500 };
1501}
1502
1503void CCustomZone::net_Relcase(CObject* O)
1504{

Callers

nothing calls this directly

Calls 4

GenHeaderMethod · 0.80
Write_PacketMethod · 0.80
u32Enum · 0.70
SHitClass · 0.70

Tested by

no test coverage detected