Added a few more calls (+macros)
Added support for game dll func hooking Fixed table pointer...
This commit is contained in:
@ -39,10 +39,18 @@
|
||||
#include <stdio.h>
|
||||
#include "amxxmodule.h"
|
||||
|
||||
DLL_FUNCTIONS *g_pFunctionTable;
|
||||
DLL_FUNCTIONS *g_pFunctionTable_Post;
|
||||
enginefuncs_t *g_pengfuncsTable;
|
||||
enginefuncs_t *g_pengfuncsTable_Post;
|
||||
|
||||
|
||||
/************* METAMOD SUPPORT *************/
|
||||
#ifdef USE_METAMOD
|
||||
|
||||
enginefuncs_t g_engfuncs;
|
||||
DLL_FUNCTIONS *gameDLLFunc;
|
||||
|
||||
globalvars_t *gpGlobals;
|
||||
|
||||
// GetEntityAPI2 functions
|
||||
@ -2114,6 +2122,8 @@ C_DLLEXPORT int GetEntityAPI2(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersi
|
||||
return(FALSE);
|
||||
}
|
||||
memcpy(pFunctionTable, &g_EntityAPI_Table, sizeof(DLL_FUNCTIONS));
|
||||
// Mark down the pointer to this mod's function tables...
|
||||
g_pFunctionTable=pFunctionTable;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
@ -2131,7 +2141,8 @@ C_DLLEXPORT int GetEntityAPI2_Post(DLL_FUNCTIONS *pFunctionTable, int *interface
|
||||
return(FALSE);
|
||||
}
|
||||
memcpy( pFunctionTable, &g_EntityAPI_Post_Table, sizeof( DLL_FUNCTIONS ) );
|
||||
|
||||
// Mark down the pointer to this mod's function tables...
|
||||
g_pFunctionTable_Post=pFunctionTable;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
@ -2154,6 +2165,8 @@ C_DLLEXPORT int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *inte
|
||||
return(FALSE);
|
||||
}
|
||||
memcpy(pengfuncsFromEngine, &g_EngineFuncs_Table, sizeof(enginefuncs_t));
|
||||
// Mark down the pointer to this mod's function tables...
|
||||
g_pengfuncsTable=pengfuncsFromEngine;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2171,6 +2184,8 @@ C_DLLEXPORT int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int
|
||||
return(FALSE);
|
||||
}
|
||||
memcpy(pengfuncsFromEngine, &g_EngineFuncs_Post_Table, sizeof(enginefuncs_t));
|
||||
// Mark down the pointer to this mod's function tables...
|
||||
g_pengfuncsTable_Post=pengfuncsFromEngine;
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user