diff --git a/amxmodx/amxmodx.h b/amxmodx/amxmodx.h index 689c44a4..b77d4921 100755 --- a/amxmodx/amxmodx.h +++ b/amxmodx/amxmodx.h @@ -55,7 +55,7 @@ #include "CCmd.h" #include "CMenu.h" #include "CEvent.h" -#include "FakeMeta.h" +#include "fakemeta.h" #define AMX_VERSION "0.2" @@ -281,7 +281,7 @@ extern int FF_PluginPrecache; extern int FF_PluginLog; extern int FF_PluginEnd; extern int FF_InconsistentFile; -extern int FF_ClientAuthorized; +extern int FF_ClientAuthorized; extern CFakeMeta g_FakeMeta; #endif // AMXMODX_H diff --git a/amxmodx/modules.cpp b/amxmodx/modules.cpp index 9c033334..f623db33 100755 --- a/amxmodx/modules.cpp +++ b/amxmodx/modules.cpp @@ -134,8 +134,8 @@ int load_amxscript(AMX *amx, void **program, const char *filename, char error[64 #ifdef JIT - void *np = new unsigned char[ amx->code_size ]; - void *rt = new unsigned char[ amx->reloc_size ]; + void *np = new char[ amx->code_size ]; + void *rt = new char[ amx->reloc_size ]; if ( !np || (!rt && amx->reloc_size > 0) ) { delete[] np; @@ -147,7 +147,7 @@ int load_amxscript(AMX *amx, void **program, const char *filename, char error[64 if (amx_InitJIT(amx, rt, np) == AMX_ERR_NONE) { //amx->base = (unsigned char FAR *)realloc( np, amx->code_size ); - amx->base = new unsigned char FAR[ amx->code_size ]; + amx->base = new unsigned char[ amx->code_size ]; if ( amx->base ) memcpy( amx->base , np , amx->code_size ); delete[] np; @@ -758,6 +758,11 @@ float MNF_GetPlayerHealth(int id) return (GET_PLAYER_POINTER_I(id)->pEdict->v.health); } +void MNF_HiddenStuff() +{ + // :TODO: +} + // Fnptr Request function for the new interface const char *g_LastRequestedFunc = NULL; #define REGISTER_FUNC(name, func) { name, (void*)func }, @@ -792,6 +797,12 @@ void *Module_ReqFnptr(const char *funcName) REGISTER_FUNC("CopyAmxMemory", MNF_CopyAmxMemory) REGISTER_FUNC("GetAmxAddr", get_amxaddr) + // other amx stuff + REGISTER_FUNC("amx_Exec", amx_Exec) + REGISTER_FUNC("amx_Execv", amx_Execv) + REGISTER_FUNC("amx_Allot", amx_Allot) + REGISTER_FUNC("amx_FindPublic", amx_FindPublic) + // Natives / Forwards REGISTER_FUNC("AddNatives", MNF_AddNatives) REGISTER_FUNC("RaiseAmxError", amx_RaiseError) @@ -826,6 +837,8 @@ void *Module_ReqFnptr(const char *funcName) REGISTER_FUNC("Deallocator", m_deallocator) REGISTER_FUNC("Reallocator", m_reallocator) #endif // MEMORY_TEST + + REGISTER_FUNC("Haha_HiddenStuff", MNF_HiddenStuff) }; // code