.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > YaPB
YaPB Yet another POD-Bot flavor by Whistler and Jeefo Counter-Strike

Reply
 
Thread Tools
Modest Suggestion
Old
  (#1)
lewcamino
Guest
 
Status:
Posts: n/a
Default Modest Suggestion - 24-11-2004

First i want to say that i dont know anything about writing or even modifying bots. So take what you can from this post.

I noticed that when using reserved slots in admin-mod there is a bug in the code that calculates when to vacate a slot based on quota and maxplayers. Here is the section of code I think is causing the bug.

Code:
if (g_bBotAutoVacate)
{
if (botcount < g_iBotQuota && count < gpGlobals->maxClients - 1)
BotCreate(NULL, NULL, NULL, NULL, NULL, NULL);

if (count >= gpGlobals->maxClients)
UserKickRandomBot();
}
else
{
if (botcount < g_iBotQuota && count < gpGlobals->maxClients)
BotCreate(NULL, NULL, NULL, NULL, NULL, NULL);
}
The problem occures in a situation simalar to the following;
I have an 9 player server with 1 reserved slot. Thus 8 public slots. If quota is set to 6 and 2 humans connect,
count (now is still less than maxplayers (technically 9.) Ergo the server is full of 6 bots and 2 humans and will remain full until 1 human disconnects.
I dont know exactly how to write this but here is an example;

Code:
   
 if (g_bBotAutoVacate)
{
if (botcount < g_iBotQuota && count < gpGlobals->maxClients - (1 + admin_reserved_slots))
BotCreate(NULL, NULL, NULL, NULL, NULL, NULL);

if (count >= gpGlobals->maxClients - admin_reserved_slots)
UserKickRandomBot();
}
else
{
if (botcount < g_iBotQuota && count < gpGlobals->maxClients - admin_reserved_slots)
BotCreate(NULL, NULL, NULL, NULL, NULL, NULL);
}
I hope that helps, please let me know if that was helpful or if i just dont know enough to help.
Later; Lew
  
Reply With Quote
Re: Modest Suggestion
Old
  (#2)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Modest Suggestion - 25-11-2004

well, I think you may create a separate CVAR for the "admin_reserved_slot"
or if the Admin Mod handles the "admin_reserved_slot" as a CVAR you can just use CVAR_GET_FLOAT() function.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com