This commit is contained in:
ViktorLjung
2014-06-05 06:56:42 +02:00
parent ce2e0b192c
commit d3dca03f47
2 changed files with 12 additions and 1 deletions
+11 -1
View File
@@ -908,7 +908,17 @@ bool Systems::PhysicsSystem::OnDead( const Events::Dead &e )
m_RigidBodyEntities.erase(m_RigidBodies[e.Entity]);
m_RigidBodies.erase(e.Entity);*/
m_World->RemoveComponent<Components::TankSteering>(e.Entity);
auto jeep = m_World->GetComponent<Components::JeepSteering>(e.Entity);
if(jeep)
{
m_World->RemoveComponent<Components::JeepSteering>(e.Entity);
}
auto tank = m_World->GetComponent<Components::TankSteering>(e.Entity);
if(tank)
{
m_World->RemoveComponent<Components::TankSteering>(e.Entity);
}
}
return true;