View Single Post
Re: YaPB Developer Preview 1.1
Old
  (#29)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: YaPB Developer Preview 1.1 - 02-04-2004

Quote:
Originally Posted by Terran
Bug report (yapb 1.2):

I set my server to
Code:
  yapb_maxbots 2 
  yapb_minbots 2
and wait till the bots have joined. Than I set those values to 0.
Now I cannot remove those bots! Well, I can remove them but they keep coming back, no matter what I tried (yapb removebots, kicked manually...). For a few seconds it seams as if the bots are gone but then they reappear.
Ah ! I'm stupid:
Code:
    static float flCvarUpdateTime = 0.0;
 
    // if a new map has started then (MUST BE FIRST IN StartFrame)...
    if (gpGlobals->time + 0.1 < g_flTimePrevThink)
    {
 	  int count = 0;
 
 	  // mark the bots as needing to be respawned...
 	  for (index = 0; index < gpGlobals->maxClients; index++)
 	  {
 		 if (count >= g_iPrevNumBots)
 		 {
 			bot_respawn[index].bIsUsed = FALSE;
 			bot_respawn[index].iRespawnState = 0;
 			bot_respawn[index].flKickTime = 0.0;
 		 }
 
 		 if (bot_respawn[index].bIsUsed)  // is this slot used?
 		 {
 			bot_respawn[index].iRespawnState = RESPAWN_NEED_TO_RESPAWN;
 			count++;
 		 }
 
 		 // check for any bots that were very recently kicked...
 		 if (bot_respawn[index].flKickTime + 5.0 > g_flTimePrevThink)
 		 {
 			bot_respawn[index].iRespawnState = RESPAWN_NEED_TO_RESPAWN;
 			count++;
 		 }
 		 else
 		    bot_respawn[index].flKickTime = 0.0;  // reset to prevent false spawns later
 	  }
 
 	  // set the respawn time
 	  g_flRespawnTime = gpGlobals->time + 15.0;
 	  g_flBotCheckTime = gpGlobals->time + 20.0;
 
 	  flCvarUpdateTime = 0.0; // I FORGOT THIS ONE !
    }
 
    if (flCvarUpdateTime < gpGlobals->time)
    {
 	  g_iMinBots = (int)CVAR_GET_FLOAT(g_cvarMinBots.name);
About the freeze thing:
They are waiting for buying weapons
  
Reply With Quote