Quote:
Originally Posted by Pierre-Marie Baty
This is not for metamod, right ? The code you posted can't work properly as a metamod plugin. You need to use the CALL_GAME_ENTITY() macro instead of the player() class function.
|
Well, joebot is actually a metamod plugin. The player function is redefined in bot.cpp:
Code:
//extern "C"
//{
// this is the LINK_ENTITY_TO_CLASS function that creates a player (bot)
//void player(entvars_t *pev);
//}
void player( entvars_t *pev )
{
static LINK_ENTITY_FUNC otherClassName = NULL;
if (otherClassName == NULL)
otherClassName = (LINK_ENTITY_FUNC)GetProcAddress(h_Library, "player");
if (otherClassName != NULL){
(*otherClassName)(pev);
}
}
Note: this isn't my code, I've got this from the CVS at sourceforge...