who would have thought that iterators change?!

This commit is contained in:
David Anderson 2006-11-22 07:33:54 +00:00
parent 299f1b5f62
commit 4eaea443e1

View File

@ -901,10 +901,10 @@ void C_ClientCommand(edict_t *pEntity)
pPlayer->menu = 0;
MenuMngr::iterator a = g_menucmds.begin();
MenuMngr::iterator old = g_menucmds.SetWatchIter(a);
while (a)
{
g_menucmds.SetWatchIter(a);
if ((*a).matchCommand(menuid, bit_key) && (*a).getPlugin()->isExecutable((*a).getFunction()))
{
if (pPlayer->newmenu != -1)
@ -948,8 +948,6 @@ void C_ClientCommand(edict_t *pEntity)
++a;
}
}
g_menucmds.SetWatchIter(old);
}
}