Fixed regression (introduced by revision 2242 aka Phase 0) where 'sm plugins list' displayed all plugins as having an id of 1

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402253
This commit is contained in:
Scott Ehlert 2008-06-11 08:28:34 +00:00
parent ac68a441ee
commit 4a32aff158

View File

@ -2011,11 +2011,10 @@ CPlugin *CPluginManager::GetPluginByOrder(int num)
CPlugin *pl;
int id = 1;
IPluginIterator *iter = GetPluginIterator();
for (; iter->MorePlugins() && id<num; iter->NextPlugin(), id++) {}
SourceHook::List<CPlugin *>::iterator iter;
for (iter = m_plugins.begin(); iter != m_plugins.end() && id < num; iter++, id++) {}
pl = (CPlugin *)(iter->GetPlugin());
iter->Release();
pl = *iter;
return pl;
}
@ -2068,7 +2067,7 @@ void CPluginManager::OnRootConsoleCommand(const char *cmdname, const CCommand &c
SourceHook::List<CPlugin *>::iterator iter;
SourceHook::List<CPlugin *> m_FailList;
for (iter = m_plugins.begin(); iter != m_plugins.end(); iter++)
for (iter = m_plugins.begin(); iter != m_plugins.end(); iter++, id++)
{
pl = (*iter);
assert(pl->GetStatus() != Plugin_Created);