Added optimizations to the task system

Added optimizations to the forward system
Fixed some debugger errors
This commit is contained in:
David Anderson
2005-10-25 20:38:00 +00:00
parent 0be7540637
commit 10a64737b5
10 changed files with 310 additions and 136 deletions

View File

@ -453,6 +453,8 @@ int set_amxnatives(AMX* amx, char error[128])
int idx, err;
cell retval;
DisableDebugHandler(amx);
if (amx_FindPublic(amx, "plugin_natives", &idx) == AMX_ERR_NONE)
{
@ -463,6 +465,8 @@ int set_amxnatives(AMX* amx, char error[128])
}
}
EnableDebugHandler(amx);
amx->flags &= ~(AMX_FLAG_PRENIT);
return (amx->error = AMX_ERR_NONE);
@ -1689,6 +1693,22 @@ void *Module_ReqFnptr(const char *funcName)
return NULL;
}
void DisableDebugHandler(AMX *amx)
{
amx_SetDebugHook(amx, NULL);
}
void EnableDebugHandler(AMX *amx)
{
if (amx->flags & AMX_FLAG_DEBUG)
{
if (amx->userdata[UD_DEBUGGER] != NULL)
{
amx_SetDebugHook(amx, &Debugger::DebugHook);
}
}
}
#if !defined MEMORY_TEST && !defined WIN32
void * ::operator new(size_t size)
{