mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-08 02:48:34 +00:00
Load core.phrases before calling OnLibraryAdded
This commit is contained in:
parent
676ac95111
commit
37a16dbba2
@ -1420,6 +1420,9 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng
|
|||||||
OnLibraryAction((*s_iter).c_str(), LibraryAction_Added);
|
OnLibraryAction((*s_iter).c_str(), LibraryAction_Added);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* :TODO: optimize? does this even matter? */
|
||||||
|
pPlugin->GetPhrases()->AddPhraseFile("core.phrases");
|
||||||
|
|
||||||
/* Go through all other already loaded plugins and tell this plugin, that their libraries are loaded */
|
/* Go through all other already loaded plugins and tell this plugin, that their libraries are loaded */
|
||||||
List<CPlugin *>::iterator pl_iter;
|
List<CPlugin *>::iterator pl_iter;
|
||||||
CPlugin *pl;
|
CPlugin *pl;
|
||||||
@ -1427,7 +1430,7 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng
|
|||||||
{
|
{
|
||||||
pl = (*pl_iter);
|
pl = (*pl_iter);
|
||||||
/* Don't call our own libraries again and only care for already loaded plugins */
|
/* Don't call our own libraries again and only care for already loaded plugins */
|
||||||
if(pl == pPlugin || pl->GetStatus() != Plugin_Running)
|
if (pl == pPlugin || pl->GetStatus() != Plugin_Running)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (s_iter=pl->m_Libraries.begin(); s_iter!=pl->m_Libraries.end(); s_iter++)
|
for (s_iter=pl->m_Libraries.begin(); s_iter!=pl->m_Libraries.end(); s_iter++)
|
||||||
@ -1436,9 +1439,6 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* :TODO: optimize? does this even matter? */
|
|
||||||
pPlugin->GetPhrases()->AddPhraseFile("core.phrases");
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user