/* =============== G_InitBots =============== */ void G_InitBots( qboolean restart ) { G_LoadBots(); G_LoadArenas(); trap_Cvar_Register( &bot_minplayers, "bot_minplayers", "0", CVAR_SERVERINFO ); //rww - new bot route stuff LoadPath_ThisLevel(); //end rww }
/* =============== G_InitBots =============== */ void G_InitBots(qboolean restart) { int fragLimit; int timeLimit; const char *arenainfo; char *strValue; int basedelay; char map[MAX_QPATH]; char serverinfo[MAX_INFO_STRING]; G_LoadBots(); G_LoadArenas(); trap_Cvar_Register(&bot_minplayers, "bot_minplayers", "0", CVAR_SERVERINFO); if (g_gametype.integer == GT_SINGLE_PLAYER) { trap_GetServerinfo(serverinfo, sizeof(serverinfo)); Q_strncpyz(map, Info_ValueForKey(serverinfo, "mapname"), sizeof(map)); arenainfo = G_GetArenaInfoByMap(map); if (!arenainfo) { return; } strValue = Info_ValueForKey(arenainfo, "fraglimit"); fragLimit = atoi(strValue); if (fragLimit) { trap_Cvar_Set("fraglimit", strValue); } else { trap_Cvar_Set("fraglimit", "0"); } strValue = Info_ValueForKey(arenainfo, "timelimit"); timeLimit = atoi(strValue); if (timeLimit) { trap_Cvar_Set("timelimit", strValue); } else { trap_Cvar_Set("timelimit", "0"); } if (!fragLimit && !timeLimit) { trap_Cvar_Set("fraglimit", "10"); trap_Cvar_Set("timelimit", "0"); } basedelay = BOT_BEGIN_DELAY_BASE; strValue = Info_ValueForKey(arenainfo, "special"); if (Q_stricmp(strValue, "training") == 0) { basedelay += 10000; } if (!restart) { G_SpawnBots(Info_ValueForKey(arenainfo, "bots"), basedelay); } } }
/* =============== G_InitGameinfo =============== */ void G_InitGameinfo( void ) { G_LoadArenas(); }