View Single Post
Why bots need this?
Old
  (#1)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Why bots need this? - 28-03-2005

Since I'm not a bot coder and I know almost nothing about C++ and HL SDK, I can't answer to T(+)rget what can be a reason to using some special management in code for bots.
A lot of times I saw some bots or players as ghosts on the server (also noticed by other people at this and other forums) when there is AMX or AMX MOD X. I've asked him why it's not working correctly (not resetted at player's respawn) some function set_user_rendering. T(+)rget told me it is resetted in FUN module and he was surprised a bit if it doesn't work correctly for bots. But he asked me about something I can't answer. Maybe someone of You guys can give more light to explain the problem.

Quote:
Originally Posted by T(+)rget
Code:
// Don't ask, bots need this for reinitialising :/
void ClientUserInfoChanged_Post(edict_t *pEntity, char *infobuffer) {
	CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity);
	if(pPlayer->IsBot()) {
  pPlayer->bot = true;
  pPlayer->PutInServer();
	}

	RETURN_META(MRES_IGNORED);
}
I had problems with VexdUM when I killed bots with my damage natives, if I didn't code the above then the round wouldn't end because the server didn't notice the bot die.

I don't understand the full reason behind this, might be better to ask 1 of the bot authors they should be able to elabrate upon it some more.

It sounds like a similar problem/bug which you've noticed.

If you have AMX 0.9.9b installed I can send you a test Fun version to try.

-Targ
  
Reply With Quote