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:
parent
100263408d
commit
0e15df25c5
@ -99,12 +99,12 @@ void KartPropertiesManager::reLoadAllKarts()
|
|||||||
m_groups.clear();
|
m_groups.clear();
|
||||||
m_all_groups.clear();
|
m_all_groups.clear();
|
||||||
//m_kart_search_path.clear();
|
//m_kart_search_path.clear();
|
||||||
loadAllKarts();
|
loadAllKarts(false);
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
/** Loads all kart properties and models.
|
/** Loads all kart properties and models.
|
||||||
*/
|
*/
|
||||||
void KartPropertiesManager::loadAllKarts()
|
void KartPropertiesManager::loadAllKarts(bool loading_icon)
|
||||||
{
|
{
|
||||||
m_all_kart_dirs.clear();
|
m_all_kart_dirs.clear();
|
||||||
for(std::vector<std::string>::const_iterator dir=m_kart_search_path.begin();
|
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);
|
const bool loaded = loadKart(*dir+"/"+*subdir);
|
||||||
|
|
||||||
if (loaded)
|
if (loaded && loading_icon)
|
||||||
{
|
{
|
||||||
GUIEngine::addLoadingIcon(irr_driver->getTexture(
|
GUIEngine::addLoadingIcon(irr_driver->getTexture(
|
||||||
*dir + "/"+*subdir + "/" +
|
*dir + "/"+*subdir + "/" +
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
const int getKartId (const std::string &ident) const;
|
const int getKartId (const std::string &ident) const;
|
||||||
int getKartByGroup (const std::string& group, int i) const;
|
int getKartByGroup (const std::string& group, int i) const;
|
||||||
|
|
||||||
void loadAllKarts ();
|
void loadAllKarts (bool loading_icon = true);
|
||||||
void unloadAllKarts ();
|
void unloadAllKarts ();
|
||||||
void reLoadAllKarts ();
|
void reLoadAllKarts ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user