Set fog flag when switching items, otherwise they reappear fully visible.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7483 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
mbjornstk 2011-01-19 01:51:30 +00:00
parent a6b2fe443d
commit 43d9b4d961

View File

@ -78,6 +78,7 @@ void Item::switchTo(ItemType type, scene::IMesh *mesh)
m_original_type = m_type;
setType(type);
m_node->setMesh(mesh);
World::getWorld()->getTrack()->adjustForFog(m_node);
} // switchTo
//-----------------------------------------------------------------------------
@ -94,6 +95,7 @@ void Item::switchBack()
setType(m_original_type);
m_original_type = ITEM_NONE;
m_node->setMesh(m_original_mesh);
World::getWorld()->getTrack()->adjustForFog(m_node);
m_node->setRotation(m_original_hpr.toIrrHPR());
} // switchBack