parent
a9279a05d0
commit
a39007d48e
@ -517,6 +517,8 @@ public:
|
||||
virtual bool isJumping() const = 0;
|
||||
// ------------------------------------------------------------------------
|
||||
virtual void playSound(SFXBuffer* buffer) = 0;
|
||||
// ------------------------------------------------------------------------
|
||||
virtual bool isVisible() = 0;
|
||||
}; // AbstractKart
|
||||
|
||||
|
||||
|
@ -3157,4 +3157,10 @@ const video::SColor& Kart::getColor() const
|
||||
return m_kart_properties->getColor();
|
||||
} // getColor
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool Kart::isVisible()
|
||||
{
|
||||
return m_node && m_node->isVisible();
|
||||
} // isVisible
|
||||
|
||||
/* EOF */
|
||||
|
@ -544,6 +544,8 @@ public:
|
||||
SFXBase* getNextEmitter();
|
||||
// ------------------------------------------------------------------------
|
||||
virtual void playSound(SFXBuffer* buffer) OVERRIDE;
|
||||
// ------------------------------------------------------------------------
|
||||
virtual bool isVisible() OVERRIDE;
|
||||
}; // Kart
|
||||
|
||||
|
||||
|
@ -981,10 +981,12 @@ void World::updateGraphics(float dt)
|
||||
const int kart_amount = (int)m_karts.size();
|
||||
for (int i = 0; i < kart_amount; ++i)
|
||||
{
|
||||
// Update all karts that are not eliminated
|
||||
if (!m_karts[i]->isEliminated() )
|
||||
// Update all karts that are visible
|
||||
if (m_karts[i]->isVisible())
|
||||
{
|
||||
m_karts[i]->updateGraphics(dt);
|
||||
}
|
||||
}
|
||||
|
||||
projectile_manager->updateGraphics(dt);
|
||||
Track::getCurrentTrack()->updateGraphics(dt);
|
||||
|
Loading…
Reference in New Issue
Block a user