From f4de83c31a2f22c45dea50e9d43ed8a0b327ec42 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 26 Jun 2004 22:46:54 +0000 Subject: [PATCH] Fixed a bug where blocking a message would crash the server. --- dlls/engine/engine.cpp | 4 ++-- dlls/engine/messages.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/engine/engine.cpp b/dlls/engine/engine.cpp index ed4e00ac..2fbd4a29 100755 --- a/dlls/engine/engine.cpp +++ b/dlls/engine/engine.cpp @@ -1915,7 +1915,7 @@ static cell AMX_NATIVE_CALL dllfunc(AMX *amx,cell *params) cRet = MF_GetAmxAddr(amx,params[2]); index=cRet[0]; CHECK_ENTITY(index); - cRet = MF_GetAmxAddr(amx,params[2]); + cRet = MF_GetAmxAddr(amx,params[3]); indexb=cRet[0]; CHECK_ENTITY(indexb); gpGamedllFuncs->dllapi_table->pfnTouch(INDEXENT(index),INDEXENT(indexb)); @@ -1925,7 +1925,7 @@ static cell AMX_NATIVE_CALL dllfunc(AMX *amx,cell *params) cRet = MF_GetAmxAddr(amx,params[2]); index=cRet[0]; CHECK_ENTITY(index); - cRet = MF_GetAmxAddr(amx,params[2]); + cRet = MF_GetAmxAddr(amx,params[3]); indexb=cRet[0]; CHECK_ENTITY(indexb); gpGamedllFuncs->dllapi_table->pfnBlocked(INDEXENT(index),INDEXENT(indexb)); diff --git a/dlls/engine/messages.cpp b/dlls/engine/messages.cpp index eede649d..0a5a4e60 100755 --- a/dlls/engine/messages.cpp +++ b/dlls/engine/messages.cpp @@ -274,6 +274,7 @@ void MessageEnd(void) int mres = 0; unsigned int i = 0; if (inblock) { + inblock = false; if (msgBlocks[msgType] == BLOCK_ONCE) msgBlocks[msgType] = BLOCK_NOT; RETURN_META(MRES_SUPERCEDE);