works with post now
This commit is contained in:
parent
2ad9a320de
commit
07affb56f2
@ -503,14 +503,20 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVector<int>::iterator begin, end=Engine[func].end();
|
CVector<int> *peng = NULL;
|
||||||
|
if (post)
|
||||||
|
peng = &(Engine[func]);
|
||||||
|
else
|
||||||
|
peng = &(EnginePost[func]);
|
||||||
|
|
||||||
for (begin=Engine[func].begin(); begin!=end; begin++)
|
CVector<int>::iterator begin, end=peng->end();
|
||||||
|
|
||||||
|
for (begin=peng->begin(); begin!=end; begin++)
|
||||||
{
|
{
|
||||||
if ((*begin) == func_id)
|
if ((*begin) == func_id)
|
||||||
{
|
{
|
||||||
Engine[func].erase(begin);
|
peng->erase(begin);
|
||||||
if (!Engine[func].size())
|
if (!peng->size())
|
||||||
{
|
{
|
||||||
//:TODO: we should probably clear this here!
|
//:TODO: we should probably clear this here!
|
||||||
//but, we have no reverse lookup possible.
|
//but, we have no reverse lookup possible.
|
||||||
@ -522,7 +528,6 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
int func = params[1];
|
int func = params[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user