void GiveFnptrsToDll(enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals);
As well as the following new functions:
int Meta_Query(char *interfaceVersion, plugin_info_t **pinfo); int Meta_Attach(PLUG_LOADTIME now, META_FUNCTIONS *pFunctionTable, meta_globals_t *pMGlobals); int Meta_Detach(PLUG_LOADTIME now, PL_UNLOAD_REASON reason);
Also, it must provide at least one function returning a standard HL function table, from either the following standard HLSDK functions:
int GetEntityAPI( DLL_FUNCTIONS *pFunctionTable, int interfaceVersion ); int GetEntityAPI2( DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ); int GetNewDLLFunctions( NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion );
or from the following new functions:
int GetEntityAPI_Post(DLL_FUNCTIONS *pFunctionTable, int interfaceVersion); int GetEntityAPI2_Post(DLL_FUNCTIONS *pFunctionTable, int *interfaceVersion ; int GetNewDLLFunctions_Post(NEW_DLL_FUNCTIONS *pNewFunctionTable, int *interfaceVersion); int GetEngineFunctions(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion); int GetEngineFunctions_Post(enginefuncs_t *pengfuncsFromEngine, int *interfaceVersion);
Thus, it needs to have (at least):
GiveFnptrsToDll Meta_Query Meta_Attach Meta_Detach <one or more Get function>
See the "stub_plugin" for an example of bare minimum code. See "trace_plugin" for an example of more complete functionality.
Also, if the plugin needs to use LINK_ENTITY_TO_CLASS, support for the particular entity(ies) has to be added explicitly to metamod (linkfunc.cpp), just as it does for entities in game DLLs.
GetEntityAPI GetEntityAPI2 GetNewDLLFunctions GetEntityAPI_Post GetEntityAPI2_Post GetNewDLLFunctions_Post GetEngineFunctions GetEngineFunctions_Post