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

Method explode_initiator

ogsr_engine/xrGame/script_game_object2.cpp:525–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523}
524
525void CScriptGameObject::explode_initiator(u16 who_id)
526{
527 ASSERT_FMT(!object().H_Parent(), "[%s]: cannot explode %s with parent", __FUNCTION__, cName().c_str());
528 CExplosive* explosive = smart_cast<CExplosive*>(&object());
529 ASSERT_FMT(explosive, "[%s]: %s not a CExplosive", __FUNCTION__, cName().c_str());
530 Fvector normal;
531 explosive->FindNormal(normal);
532 explosive->SetInitiator(who_id);
533 explosive->GenExplodeEvent(object().Position(), normal);
534}
535
536bool CScriptGameObject::is_exploded()
537{

Callers

nothing calls this directly

Calls 6

FindNormalMethod · 0.80
SetInitiatorMethod · 0.80
GenExplodeEventMethod · 0.80
PositionMethod · 0.80
objectFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected