mirror of
https://github.com/edubart/otclient.git
synced 2025-12-18 14:47:11 +01:00
BEAWARE all game functionality is disabled with this commit for a while
* rework client modules * hide main window when loading * remake top menu functions * rework modules autoload * improve path resolving for otml and lua * move core_widgets to core_lib * fix tooltip issues * split some styles * add bit32 lua library * fix assert issues * fix compilation on linux 32 systems * rework gcc compile options * renable and fix some warnings * remove unused constants * speedup sprite cache * move UIGame to lua (not funcional yet) * fix a lot of issues in x11 window * fix crash handler * add some warnings do uiwidget and much more...
This commit is contained in:
@@ -40,17 +40,17 @@ void ModuleManager::discoverModules()
|
||||
if(boost::ends_with(moduleFile, ".otmod")) {
|
||||
ModulePtr module = discoverModule("/" + moduleDir + "/" + moduleFile);
|
||||
if(module && module->isAutoLoad())
|
||||
m_autoLoadModules.insert(make_pair(module->getAutoLoadAntecedence(), module));
|
||||
m_autoLoadModules.insert(make_pair(module->getAutoLoadPriority(), module));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ModuleManager::autoLoadModules(int maxAntecedence)
|
||||
void ModuleManager::autoLoadModules(int maxPriority)
|
||||
{
|
||||
for(auto& pair : m_autoLoadModules) {
|
||||
int priority = pair.first;
|
||||
if(priority > maxAntecedence)
|
||||
if(priority > maxPriority)
|
||||
break;
|
||||
ModulePtr module = pair.second;
|
||||
if(!module->isLoaded() && !module->load())
|
||||
|
||||
Reference in New Issue
Block a user