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

Method destroy_object

ogsr_engine/xrGame/TeleWhirlwind.cpp:138–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138bool CTeleWhirlwindObject::destroy_object(const Fvector dir, float val)
139{
140 if (object->story_id() != INVALID_STORY_ID)
141 return false;
142
143 CPHDestroyable* D = object->ph_destroyable();
144 if (D)
145 {
146 D->PhysicallyRemoveSelf();
147 D->Destroy(m_telekinesis->OwnerObject()->ID());
148
149 m_telekinesis->add_impact(dir, val * 10.f);
150
151 CParticlesPlayer* PP = smart_cast<CParticlesPlayer*>(object);
152 if (PP)
153 {
154 u16 root = (smart_cast<IKinematics*>(object->Visual()))->LL_GetBoneRoot();
155 PP->StartParticles(m_telekinesis->destroing_particles(), root, Fvector().set(0, 1, 0), m_telekinesis->OwnerObject()->ID());
156 }
157 return true;
158 }
159
160 return false;
161}
162
163void CTeleWhirlwindObject::raise(float step)
164{

Callers

nothing calls this directly

Calls 9

PhysicallyRemoveSelfMethod · 0.80
OwnerObjectMethod · 0.80
add_impactMethod · 0.80
LL_GetBoneRootMethod · 0.80
VisualMethod · 0.80
ph_destroyableMethod · 0.45
DestroyMethod · 0.45
StartParticlesMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected