Fixed eliminating karts in three strikes mode looking ugly
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8073 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
41b9f6b8f7
commit
7bc9cfb3ff
@ -38,12 +38,15 @@ LODNode::~LODNode()
|
||||
|
||||
void LODNode::render()
|
||||
{
|
||||
ISceneNode::OnRegisterSceneNode();
|
||||
if (isVisible())
|
||||
ISceneNode::OnRegisterSceneNode();
|
||||
//ISceneNode::render();
|
||||
}
|
||||
|
||||
void LODNode::OnRegisterSceneNode()
|
||||
{
|
||||
if (!isVisible()) return;
|
||||
|
||||
// TODO: optimize this, there is no need to check every frame
|
||||
scene::ICameraSceneNode* curr_cam = irr_driver->getSceneManager()->getActiveCamera();
|
||||
|
||||
|
@ -88,7 +88,8 @@ void EmergencyAnimation::eliminate()
|
||||
World::getWorld()->getPhysics()->removeKart(m_kart);
|
||||
}
|
||||
m_eliminated = true;
|
||||
|
||||
m_kart_mode = EA_NONE;
|
||||
|
||||
m_kart->getNode()->setVisible(false);
|
||||
} // eliminate
|
||||
|
||||
|
@ -719,6 +719,12 @@ bool Kart::isNearGround() const
|
||||
*/
|
||||
void Kart::update(float dt)
|
||||
{
|
||||
if (m_eliminated)
|
||||
{
|
||||
getNode()->setVisible(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update the position and other data taken from the physics
|
||||
Moveable::update(dt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user