Fixed 3-strikes wheels not reappearing when restarting race
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9705 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
03178d9e75
commit
a87d0c5f2b
@ -309,6 +309,29 @@ void ThreeStrikesBattle::restartRace()
|
||||
|
||||
// no positions in this mode
|
||||
m_karts[n]->setPosition(-1);
|
||||
|
||||
scene::ISceneNode* kart_node = m_karts[n]->getNode();
|
||||
|
||||
// FIXME: sorry for this ugly const_cast, irrlicht doesn't seem to allow getting a writable list of children, wtf??
|
||||
core::list<scene::ISceneNode*>& children = const_cast<core::list<scene::ISceneNode*>&>(kart_node->getChildren());
|
||||
for (core::list<scene::ISceneNode*>::Iterator it = children.begin(); it != children.end(); it++)
|
||||
{
|
||||
scene::ISceneNode* curr = *it;
|
||||
|
||||
if (core::stringc(curr->getName()) == "tire1")
|
||||
{
|
||||
curr->setVisible(true);
|
||||
}
|
||||
else if (core::stringc(curr->getName()) == "tire2")
|
||||
{
|
||||
curr->setVisible(true);
|
||||
}
|
||||
else if (core::stringc(curr->getName()) == "tire3")
|
||||
{
|
||||
curr->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
}// next kart
|
||||
|
||||
// remove old battle events
|
||||
|
Loading…
Reference in New Issue
Block a user