Check if a track really has easter egg mode.
Eggs, but more colorful ;) git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14342 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
c187351efe
commit
658b67d4ad
@ -387,7 +387,21 @@ void Track::loadTrackInfo()
|
||||
|
||||
std::string dir = StringUtils::getPath(m_filename);
|
||||
std::string easter_name = dir+"/easter_eggs.xml";
|
||||
m_has_easter_eggs = file_manager->fileExists(easter_name);
|
||||
|
||||
XMLNode *easter = file_manager->createXMLTree(easter_name);
|
||||
|
||||
if(easter)
|
||||
{
|
||||
for(unsigned int i=0; i<easter->getNumNodes(); i++)
|
||||
{
|
||||
const XMLNode *eggs = easter->getNode(i);
|
||||
if(eggs->getNumNodes() > 0)
|
||||
{
|
||||
m_has_easter_eggs = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // loadTrackInfo
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user