| 40 | #include "CharacterPhysicsSupport.h" |
| 41 | |
| 42 | void 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 | |
| 62 | bool CScriptGameObject::active_zone_contact(u16 id) |
| 63 | { |
nothing calls this directly
no test coverage detected