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

Method ActivateExplosionBox

ogsr_engine/xrGame/Explosive.cpp:731–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

729void CExplosive::GetExplosionBox(Fvector& size) { size.set(m_vExplodeSize); }
730void CExplosive::SetExplosionSize(const Fvector& new_size) { m_vExplodeSize.set(new_size); }
731void CExplosive::ActivateExplosionBox(const Fvector& size, Fvector& in_out_pos)
732{
733 CPhysicsShellHolder* self_obj = smart_cast<CPhysicsShellHolder*>(cast_game_object());
734 CPhysicsShell* self_shell = self_obj->PPhysicsShell();
735 if (self_shell && self_shell->isActive())
736 self_shell->DisableCollision();
737 CPHActivationShape activation_shape; // Fvector start_box;m_PhysicMovementControl.Box().getsize(start_box);
738 activation_shape.Create(in_out_pos, size, self_obj);
739 dBodySetGravityMode(activation_shape.ODEBody(), 0);
740 activation_shape.Activate(size, 1, 1.f, M_PI / 8.f);
741 in_out_pos.set(activation_shape.Position());
742 activation_shape.Size(m_vExplodeSize);
743 activation_shape.Destroy();
744 if (self_shell && self_shell->isActive())
745 self_shell->EnableCollision();
746}
747void CExplosive::net_Relcase(CObject* O)
748{
749 if (O->ID() == m_iCurrentParentID)

Callers

nothing calls this directly

Calls 12

dBodySetGravityModeFunction · 0.85
DisableCollisionMethod · 0.80
ODEBodyMethod · 0.80
PositionMethod · 0.80
EnableCollisionMethod · 0.80
cast_game_objectFunction · 0.70
isActiveMethod · 0.45
CreateMethod · 0.45
ActivateMethod · 0.45
setMethod · 0.45
SizeMethod · 0.45
DestroyMethod · 0.45

Tested by

no test coverage detected