From 07affb56f22714d27875992a721b1c56a3f2c372 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 3 Feb 2006 03:28:43 +0000 Subject: [PATCH] works with post now --- dlls/fakemeta/forward.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/fakemeta/forward.cpp b/dlls/fakemeta/forward.cpp index 28fb952f..12910214 100755 --- a/dlls/fakemeta/forward.cpp +++ b/dlls/fakemeta/forward.cpp @@ -503,14 +503,20 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params) return 0; } - CVector::iterator begin, end=Engine[func].end(); + CVector *peng = NULL; + if (post) + peng = &(Engine[func]); + else + peng = &(EnginePost[func]); - for (begin=Engine[func].begin(); begin!=end; begin++) + CVector::iterator begin, end=peng->end(); + + for (begin=peng->begin(); begin!=end; begin++) { if ((*begin) == func_id) { - Engine[func].erase(begin); - if (!Engine[func].size()) + peng->erase(begin); + if (!peng->size()) { //:TODO: we should probably clear this here! //but, we have no reverse lookup possible. @@ -522,7 +528,6 @@ static cell AMX_NATIVE_CALL unregister_forward(AMX *amx, cell *params) return 0; } - static cell AMX_NATIVE_CALL register_forward(AMX *amx, cell *params) { int func = params[1];