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

Method explode

ogsr_engine/xrGame/script_game_object2.cpp:42–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40#include "CharacterPhysicsSupport.h"
41
42void CScriptGameObject::explode(u32 level_time)
43{
44 CExplosive* explosive = smart_cast<CExplosive*>(&object());
45 if (object().H_Parent())
46 {
47 ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError, "CExplosive : cannot explode object wiht parent!");
48 return;
49 }
50
51 if (!explosive)
52 ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError, "CExplosive : cannot access class member explode!");
53 else
54 {
55 Fvector normal;
56 explosive->FindNormal(normal);
57 explosive->SetInitiator(explosive->Initiator()); // устанавливаем инициатор только если он неизвестен.
58 explosive->GenExplodeEvent(object().Position(), normal);
59 }
60}
61
62bool CScriptGameObject::active_zone_contact(u16 id)
63{

Callers

nothing calls this directly

Calls 7

script_logMethod · 0.80
FindNormalMethod · 0.80
SetInitiatorMethod · 0.80
GenExplodeEventMethod · 0.80
PositionMethod · 0.80
objectFunction · 0.50
InitiatorMethod · 0.45

Tested by

no test coverage detected