Jump to content
McKay Development

failure to kick bots in botmanager.sp

a dbx 166a

Recommended Posts

hi doctor,

I've noticed in some situations the botmanager doesn't remove all bots when players have vacated the server. occasionally, it will even kick the last bot with a purge message and then immediately add a new one in a freshly emptied server (with sm_bot_join_after_player==1).

this is quite bad if it leaves one bot in arena mode - since the bot will be stuck in spec, an additional bug that causes bots to spam the console with endless name changes while in spectator can leave a bot filling the server log indefinitely. I'm not sure, but this probably prevents (or indicates a lack of) server hibernation as well.

in my case I seem to have hacked around it by hooking OnClientPutInServer & OnClientDisconnect_Post, looping for real players, and doing something like 

tf_bot_quota = ( iTotal >= 1 ? cvarBotQuota : 0 );

(actual code is messier and split between the aforementioned hooks, but I figured a quick ternary would get the point across).

apologies if this is the wrong forum, it looks like your git issues are disabled on the sm repo.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...