Fix a bug when reloading the karts after installing an addons

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6061 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
xapantu 2010-09-19 15:17:09 +00:00
parent 100263408d
commit 0e15df25c5
2 changed files with 4 additions and 4 deletions

View File

@ -99,12 +99,12 @@ void KartPropertiesManager::reLoadAllKarts()
m_groups.clear();
m_all_groups.clear();
//m_kart_search_path.clear();
loadAllKarts();
loadAllKarts(false);
}
//-----------------------------------------------------------------------------
/** Loads all kart properties and models.
*/
void KartPropertiesManager::loadAllKarts()
void KartPropertiesManager::loadAllKarts(bool loading_icon)
{
m_all_kart_dirs.clear();
for(std::vector<std::string>::const_iterator dir=m_kart_search_path.begin();
@ -123,7 +123,7 @@ void KartPropertiesManager::loadAllKarts()
{
const bool loaded = loadKart(*dir+"/"+*subdir);
if (loaded)
if (loaded && loading_icon)
{
GUIEngine::addLoadingIcon(irr_driver->getTexture(
*dir + "/"+*subdir + "/" +

View File

@ -66,7 +66,7 @@ public:
const int getKartId (const std::string &ident) const;
int getKartByGroup (const std::string& group, int i) const;
void loadAllKarts ();
void loadAllKarts (bool loading_icon = true);
void unloadAllKarts ();
void reLoadAllKarts ();