View Single Post
Bot Won't Join Team
Old
  (#1)
keldecow
Member
 
Status: Offline
Posts: 4
Join Date: May 2008
Default Bot Won't Join Team - 28-05-2008

I am trying to make a DOD bot. I am using the hpb_bot_mm. Everything compiles fine and the bot will join the game when I use AddBot. I have implemented an if clause in GiveFnptrsToDll to set the mod_id and the game_dll. I have added the correct VGUIMenu message handling code to pfnMessageBegin and added the function BotClient_DOD_VGUI. As well I've added the team and class choosing code to BotStartGame. Finally, I've laced all these functions with LOG_CONSOLE to see where the error happens.

The bot never executes BotClient_DOD_VGUI. And the log doesn't show the bot receiving any network messages. I am assuming that
Code:
index = UTIL_GetBotIndex(ed);

// is this message for a bot?
if (index != -1)
{

...

LOG_CONSOLE (PLID,"pfnRegUserMsg: pszName=%s msg=%d\n",GET_USER_MSG_NAME (PLID, msg_type, NULL), msg_type);
...
}
}
will catch bot messages?

I'm not sure what the problem is. I think I may have missed a step in initializing the bot. Can anybody suggest a place I might have missed?

Thanks alot, Kelden.

Update: I tried my bot in cstrike since I didn't touch any of the mod specific code. The same problem was happening there, the bot connects but stays there. I tried rebuilding from the original source (hpb_bot_mm from the filebase) and the same error occoured. I am using VC++ Express 2005. I had to resave all the files in /metamod/ in a Win32 file format, I turned off warnings and interpret warnings as errors. I'm going to try again with warnings enabled to see if anything pops up.

Last edited by keldecow; 28-05-2008 at 23:28.. Reason: update
  
Reply With Quote