Thread: Oops!
View Single Post
Re: Oops!
Old
  (#3)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Oops! - 16-07-2004

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
}



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote