I don't see the difference with metamod ... ? ???
Code:
C_DLLEXPORT int GetEntityAPI2 (DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion)
{
// This exported function declares to metamod which functions from the game DLL interface our
// DLL will use, by linking each used slot in the gFunctionTable structure to the address
// of our actual functions. This way, when metamod will bind any function in any slot of
// gFunctionTable, it will land directly in our functions here, just by following the pointer.
// These functions will be called by metamod BEFORE calling the actual game DLL function.
static DLL_FUNCTIONS gFunctionTable;
// keep track of pointers to the functions we use in the game DLL API
gFunctionTable.pfnSpawn = Spawn;
gFunctionTable.pfnStartFrame = StartFrame;
gFunctionTable.pfnPlayerPreThink = PlayerPreThink; // for "botcontrol" debug (can be removed)
// copy the whole table for metamod to know which functions we are using here
memcpy (pFunctionTable, &gFunctionTable, sizeof (DLL_FUNCTIONS));
return (TRUE); // alright
}