View Single Post
Re: Bugs to be fixed
Old
  (#9)
evy
Guest
 
Status:
Posts: n/a
Default Re: Bugs to be fixed - 08-06-2004

In dll.cpp, there is a race condition. The bot.cfg is not executed when a new map is loaded within 5 seconds of the dedicated server start.

The bot_cfg_pause_time variable is reset to zero in Spawn() funtion and this is not needed (it works fine without it) and is bad (it works better without).

So, dll.cpp should be like
Code:
 
Spawn (edict_t * pent)
{
  if (gpGlobals->deathmatch)
	{
	  char *pClassname = (char *) STRING (pent->v.classname);
	  if (strcmp (pClassname, "worldspawn") == 0)
		  {
				  // do level initialization stuff here...
				  draw_nodes = false;
				  draw_nodepath = -1;
				  draw_connodes = false;
				  // FIX: Internet mode timing
				  internet_addbot = false;	  // Add a bot?
				  add_timer = gpGlobals->time;  // Timer for adding bots
				  m_spriteTexture = PRECACHE_MODEL ("sprites/lgtning.spr");
				  // sound
				  PRECACHE_SOUND("misc/imgood12.wav");
				  g_GameRules = TRUE;
//				bot_cfg_pause_time = 0.0;   evy: No need to reset it to zero... else it causes a race condition when new map are loaded just when server starts
				  respawn_time = 0.0;
				  spawn_time_reset = FALSE;
				  prev_num_bots = num_bots;
				  num_bots = 0;
Hope it helps

-eric
  
Reply With Quote