View Single Post
Re: Hi I'm new and have some question !
Old
  (#16)
Terran
Member
 
Terran's Avatar
 
Status: Offline
Posts: 431
Join Date: Jan 2004
Default Re: Hi I'm new and have some question ! - 11-03-2004

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...
  
Reply With Quote