mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fixed a bug where blocking a message would crash the server.
This commit is contained in:
parent
8477d8834a
commit
f4de83c31a
@ -1915,7 +1915,7 @@ static cell AMX_NATIVE_CALL dllfunc(AMX *amx,cell *params)
|
|||||||
cRet = MF_GetAmxAddr(amx,params[2]);
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
index=cRet[0];
|
index=cRet[0];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY(index);
|
||||||
cRet = MF_GetAmxAddr(amx,params[2]);
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
indexb=cRet[0];
|
indexb=cRet[0];
|
||||||
CHECK_ENTITY(indexb);
|
CHECK_ENTITY(indexb);
|
||||||
gpGamedllFuncs->dllapi_table->pfnTouch(INDEXENT(index),INDEXENT(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]);
|
cRet = MF_GetAmxAddr(amx,params[2]);
|
||||||
index=cRet[0];
|
index=cRet[0];
|
||||||
CHECK_ENTITY(index);
|
CHECK_ENTITY(index);
|
||||||
cRet = MF_GetAmxAddr(amx,params[2]);
|
cRet = MF_GetAmxAddr(amx,params[3]);
|
||||||
indexb=cRet[0];
|
indexb=cRet[0];
|
||||||
CHECK_ENTITY(indexb);
|
CHECK_ENTITY(indexb);
|
||||||
gpGamedllFuncs->dllapi_table->pfnBlocked(INDEXENT(index),INDEXENT(indexb));
|
gpGamedllFuncs->dllapi_table->pfnBlocked(INDEXENT(index),INDEXENT(indexb));
|
||||||
|
@ -274,6 +274,7 @@ void MessageEnd(void)
|
|||||||
int mres = 0;
|
int mres = 0;
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
if (inblock) {
|
if (inblock) {
|
||||||
|
inblock = false;
|
||||||
if (msgBlocks[msgType] == BLOCK_ONCE)
|
if (msgBlocks[msgType] == BLOCK_ONCE)
|
||||||
msgBlocks[msgType] = BLOCK_NOT;
|
msgBlocks[msgType] = BLOCK_NOT;
|
||||||
RETURN_META(MRES_SUPERCEDE);
|
RETURN_META(MRES_SUPERCEDE);
|
||||||
|
Loading…
Reference in New Issue
Block a user