ai_chat.c:	score = bs->cur_ps.persistant[PERS_SCORE];
ai_chat.c:	score = bs->cur_ps.persistant[PERS_SCORE];
ai_chat.c:		if (i == bs->client) continue;
ai_chat.c:		if (i == bs->client) continue;
ai_chat.c:		if (EntityIsDead(&entinfo) || entinfo.number == bs->entitynum) continue;
ai_chat.c:		vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, i);
ai_chat.c:	if (bs->inventory[INVENTORY_QUAD] ||
ai_chat.c:		bs->inventory[INVENTORY_HASTE] ||
ai_chat.c:		bs->inventory[INVENTORY_INVISIBILITY] ||
ai_chat.c:		bs->inventory[INVENTORY_REGEN] ||
ai_chat.c:		bs->inventory[INVENTORY_FLIGHT]) return qfalse;
ai_chat.c:	//if (bs->cur_ps.groundEntityNum != ENTITYNUM_NONE) return qfalse;
ai_chat.c:	VectorCopy(bs->origin, point);
ai_chat.c:	if (trap_PointContents(point,bs->entitynum) & (CONTENTS_LAVA|CONTENTS_SLIME)) return qfalse;
ai_chat.c:	VectorCopy(bs->origin, point);
ai_chat.c:	if (trap_PointContents(point,bs->entitynum) & MASK_WATER) return qfalse;
ai_chat.c:	VectorCopy(bs->origin, start);
ai_chat.c:	VectorCopy(bs->origin, end);
ai_chat.c:	BotAI_Trace(&trace, start, mins, maxs, end, bs->client, MASK_SOLID);
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_ENTEREXITGAME, 0, 1);
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_ENTEREXITGAME, 0, 1);
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	    trap_EA_Command(bs->client, "vtaunt");
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_STARTENDLEVEL, 0, 1);
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:			trap_EA_Command(bs->client, "vtaunt");
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_STARTENDLEVEL, 0, 1);
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_DEATH, 0, 1);
ai_chat.c:	if (bs->lastkilledby >= 0 && bs->lastkilledby < MAX_CLIENTS)
ai_chat.c:		EasyClientName(bs->lastkilledby, name, 32);
ai_chat.c:	if (TeamPlayIsOn() && BotSameTeam(bs, bs->lastkilledby)) {
ai_chat.c:		if (bs->lastkilledby == bs->client) return qfalse;
ai_chat.c:		bs->chatto = CHAT_TEAM;
ai_chat.c:			trap_EA_Command(bs->client, "vtaunt");
ai_chat.c:		if (bs->botdeathtype == MOD_WATER)
ai_chat.c:		else if (bs->botdeathtype == MOD_SLIME)
ai_chat.c:		else if (bs->botdeathtype == MOD_LAVA)
ai_chat.c:		else if (bs->botdeathtype == MOD_FALLING)
ai_chat.c:		else if (bs->botsuicide || //all other suicides by own weapon
ai_chat.c:				bs->botdeathtype == MOD_CRUSH ||
ai_chat.c:				bs->botdeathtype == MOD_SUICIDE ||
ai_chat.c:				bs->botdeathtype == MOD_TARGET_LASER ||
ai_chat.c:				bs->botdeathtype == MOD_TRIGGER_HURT ||
ai_chat.c:				bs->botdeathtype == MOD_UNKNOWN)
ai_chat.c:		else if (bs->botdeathtype == MOD_TELEFRAG)
ai_chat.c:		else if (bs->botdeathtype == MOD_KAMIKAZE && trap_BotNumInitialChats(bs->cs, "death_kamikaze"))
ai_chat.c:			if ((bs->botdeathtype == MOD_GAUNTLET ||
ai_chat.c:				bs->botdeathtype == MOD_RAILGUN ||
ai_chat.c:				bs->botdeathtype == MOD_BFG ||
ai_chat.c:				bs->botdeathtype == MOD_BFG_SPLASH) && random() < 0.5) {
ai_chat.c:				if (bs->botdeathtype == MOD_GAUNTLET)
ai_chat.c:							BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:				else if (bs->botdeathtype == MOD_RAILGUN)
ai_chat.c:							BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:							BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:			else if (random() < trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_INSULT, 0, 1)) {
ai_chat.c:							BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:							BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:		bs->chatto = CHAT_ALL;
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_KILL, 0, 1);
ai_chat.c:	if (bs->lastkilledplayer == bs->client) return qfalse;
ai_chat.c:	EasyClientName(bs->lastkilledplayer, name, 32);
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (TeamPlayIsOn() && BotSameTeam(bs, bs->lastkilledplayer)) {
ai_chat.c:		bs->chatto = CHAT_TEAM;
ai_chat.c:			trap_EA_Command(bs->client, "vtaunt");
ai_chat.c:		if (bs->enemydeathtype == MOD_GAUNTLET) {
ai_chat.c:		else if (bs->enemydeathtype == MOD_RAILGUN) {
ai_chat.c:		else if (bs->enemydeathtype == MOD_TELEFRAG) {
ai_chat.c:		else if (bs->botdeathtype == MOD_KAMIKAZE && trap_BotNumInitialChats(bs->cs, "kill_kamikaze"))
ai_chat.c:		else if (random() < trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_INSULT, 0, 1)) {
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_KILL, 0, 1);
ai_chat.c:	if (bs->enemy >= 0) EasyClientName(bs->enemy, name, 32);
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	lasthurt_client = g_entities[bs->client].client->lasthurt_client;
ai_chat.c:	if (lasthurt_client == bs->client) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_HITTALKING, 0, 1);
ai_chat.c:	ClientName(g_entities[bs->client].client->lasthurt_client, name, sizeof(name));
ai_chat.c:	weap = BotWeaponNameForMeansOfDeath(g_entities[bs->client].client->lasthurt_client);
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	lasthurt_client = g_entities[bs->client].client->lasthurt_client;
ai_chat.c:	if (lasthurt_client == bs->client) return qfalse;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_HITNODEATH, 0, 1);
ai_chat.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_chat.c:	weap = BotWeaponNameForMeansOfDeath(g_entities[bs->client].client->lasthurt_mod);
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_HITNOKILL, 0, 1);
ai_chat.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_chat.c:	ClientName(bs->enemy, name, sizeof(name));
ai_chat.c:	weap = BotWeaponNameForMeansOfDeath(g_entities[bs->enemy].client->lasthurt_mod);
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	if (bs->lastchat_time > FloatTime() - TIME_BETWEENCHATTING) return qfalse;
ai_chat.c:	if (bs->ltgtype == LTG_TEAMHELP ||
ai_chat.c:		bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_chat.c:		bs->ltgtype == LTG_RUSHBASE) return qfalse;
ai_chat.c:	rnd = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_RANDOM, 0, 1);
ai_chat.c:	if (random() > bs->thinktime * 0.1) return qfalse;
ai_chat.c:	if (bs->lastkilledplayer == bs->client) {
ai_chat.c:		EasyClientName(bs->lastkilledplayer, name, sizeof(name));
ai_chat.c:		trap_EA_Command(bs->client, "vtaunt");
ai_chat.c:	if (random() < trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_MISC, 0, 1)) {
ai_chat.c:	bs->lastchat_time = FloatTime();
ai_chat.c:	bs->chatto = CHAT_ALL;
ai_chat.c:	cpm = trap_Characteristic_BInteger(bs->character, CHARACTERISTIC_CHAT_CPM, 1, 4000);
ai_chat.c:	return 2.0;	//(float) trap_BotChatLength(bs->cs) * 30 / cpm;
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "game_enter");
ai_chat.c:					EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "game_exit");
ai_chat.c:					EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "level_start");
ai_chat.c:					EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "level_end_victory");
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "level_end_lose");
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "level_end");
ai_chat.c:				EasyClientName(bs->client, name, 32),	// 0
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	EasyClientName(bs->lastkilledby, name, sizeof(name));
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_drown");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_slime");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_lava");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_cratered");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_suicide");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_telefrag");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_gauntlet");
ai_chat.c:				BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_rail");
ai_chat.c:				BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_bfg");
ai_chat.c:				BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_insult");
ai_chat.c:					BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "death_praise");
ai_chat.c:					BotWeaponNameForMeansOfDeath(bs->botdeathtype),		// 1
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	EasyClientName(bs->lastkilledplayer, name, 32);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "kill_gauntlet");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "kill_rail");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "kill_telefrag");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "kill_insult");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "kill_praise");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "enemy_suicide");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	ClientName(g_entities[bs->client].client->lasthurt_client, name, sizeof(name));
ai_chat.c:	weap = BotWeaponNameForMeansOfDeath(g_entities[bs->client].client->lasthurt_client);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "hit_talking");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "hit_nodeath");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "hit_nokill");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	if (bs->lastkilledplayer == bs->client) {
ai_chat.c:		EasyClientName(bs->lastkilledplayer, name, sizeof(name));
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "random_misc");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_chat.c:	num = trap_BotNumInitialChats(bs->cs, "random_insult");
ai_chat.c:		trap_BotEnterChat(bs->cs, 0, CHAT_ALL);
ai_cmd.c:	ClientName(bs->client, netname, sizeof(netname));
ai_cmd.c:	t = bs->teamgoal_time - FloatTime();
ai_cmd.c:	switch(bs->ltgtype) {
ai_cmd.c:			if (bs->ctfroam_time > FloatTime()) {
ai_cmd.c:				t = bs->ctfroam_time - FloatTime();
ai_cmd.c:	cp = BotFindWayPoint(bs->checkpoints, goalname);
ai_cmd.c:			trap_EA_SayTeam(bs->client, "what do you say?");
ai_cmd.c:			bs->patrolpoints = NULL;
ai_cmd.c:			//trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_cmd.c:			bs->patrolpoints = NULL;
ai_cmd.c:		trap_EA_SayTeam(bs->client, "I need more key points to patrol\n");
ai_cmd.c:	BotFreeWaypoints(bs->patrolpoints);
ai_cmd.c:	bs->patrolpoints = newpatrolpoints;
ai_cmd.c:	bs->curpatrolpoint = bs->patrolpoints;
ai_cmd.c:	bs->patrolflags = patrolflags;
ai_cmd.c:		ClientName(bs->client, botname, 128);
ai_cmd.c:					if (stristr(bs->subteam, name)) return qtrue;
ai_cmd.c:					if (stristr(bs->subteam, name)) return qtrue;
ai_cmd.c:		//trap_EA_Say(bs->client, buf);
ai_cmd.c:		if (client == bs->client) {
ai_cmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	if (client == bs->client) {
ai_cmd.c:	bs->teamgoal.entitynum = -1;
ai_cmd.c:			bs->teamgoal.entitynum = client;
ai_cmd.c:			bs->teamgoal.areanum = areanum;
ai_cmd.c:			VectorCopy(entinfo.origin, bs->teamgoal.origin);
ai_cmd.c:			VectorSet(bs->teamgoal.mins, -8, -8, -8);
ai_cmd.c:			VectorSet(bs->teamgoal.maxs, 8, 8, 8);
ai_cmd.c:	if (bs->teamgoal.entitynum < 0) {
ai_cmd.c:			if (!BotGetMessageTeamGoal(bs, itemname, &bs->teamgoal)) {
ai_cmd.c:				//trap_BotEnterChat(bs->cs, bs->client, CHAT_TEAM);
ai_cmd.c:	if (bs->teamgoal.entitynum < 0) {
ai_cmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TEAM);
ai_cmd.c:	bs->teammate = client;
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammatevisible_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->teamgoal_time = BotGetTime(match);
ai_cmd.c:		bs->ltgtype = LTG_TEAMHELP;
ai_cmd.c:		if (!bs->teamgoal_time) bs->teamgoal_time = FloatTime() + TEAM_HELP_TIME;
ai_cmd.c:		bs->ltgtype = LTG_TEAMACCOMPANY;
ai_cmd.c:		if (!bs->teamgoal_time) bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
ai_cmd.c:		bs->formation_dist = 3.5 * 32;		//3.5 meter
ai_cmd.c:		bs->arrive_time = 0;
ai_cmd.c:	if (!BotGetMessageTeamGoal(bs, itemname, &bs->teamgoal)) {
ai_cmd.c:		//trap_BotEnterChat(bs->cs, bs->client, CHAT_TEAM);
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_DEFENDKEYAREA;
ai_cmd.c:	bs->teamgoal_time = BotGetTime(match);
ai_cmd.c:	if (!bs->teamgoal_time) bs->teamgoal_time = FloatTime() + TEAM_DEFENDKEYAREA_TIME;
ai_cmd.c:	bs->defendaway_time = 0;
ai_cmd.c:	if (!BotGetMessageTeamGoal(bs, itemname, &bs->teamgoal)) {
ai_cmd.c:		//trap_BotEnterChat(bs->cs, bs->client, CHAT_TEAM);
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_GETITEM;
ai_cmd.c:	bs->teamgoal_time = FloatTime() + TEAM_GETITEM_TIME;
ai_cmd.c:		trap_BotEnterChat(bs->cs, bs->client, CHAT_TEAM);
ai_cmd.c:		bs->teamgoal.entitynum = bs->entitynum;
ai_cmd.c:		bs->teamgoal.areanum = bs->areanum;
ai_cmd.c:		VectorCopy(bs->origin, bs->teamgoal.origin);
ai_cmd.c:		VectorSet(bs->teamgoal.mins, -8, -8, -8);
ai_cmd.c:		VectorSet(bs->teamgoal.maxs, 8, 8, 8);
ai_cmd.c:		if (client == bs->client) return;
ai_cmd.c:		bs->teamgoal.entitynum = -1;
ai_cmd.c:				//if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, client)) {
ai_cmd.c:					bs->teamgoal.entitynum = client;
ai_cmd.c:					bs->teamgoal.areanum = areanum;
ai_cmd.c:					VectorCopy(entinfo.origin, bs->teamgoal.origin);
ai_cmd.c:					VectorSet(bs->teamgoal.mins, -8, -8, -8);
ai_cmd.c:					VectorSet(bs->teamgoal.maxs, 8, 8, 8);
ai_cmd.c:		if (bs->teamgoal.entitynum < 0) {
ai_cmd.c:			trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	else if (!BotGetMessageTeamGoal(bs, itemname, &bs->teamgoal)) {
ai_cmd.c:		//trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_CAMPORDER;
ai_cmd.c:	bs->teamgoal_time = BotGetTime(match);
ai_cmd.c:	if (!bs->teamgoal_time) bs->teamgoal_time = FloatTime() + TEAM_CAMP_TIME;
ai_cmd.c:	bs->arrive_time = 0;
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_PATROL;
ai_cmd.c:	bs->teamgoal_time = BotGetTime(match);
ai_cmd.c:	if (!bs->teamgoal_time) bs->teamgoal_time = FloatTime() + TEAM_PATROL_TIME;
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_GETFLAG;
ai_cmd.c:	bs->teamgoal_time = FloatTime() + CTF_GETFLAG_TIME;
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_ATTACKENEMYBASE;
ai_cmd.c:	bs->teamgoal_time = FloatTime() + TEAM_ATTACKENEMYBASE_TIME;
ai_cmd.c:	bs->attackaway_time = 0;
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_HARVEST;
ai_cmd.c:	bs->teamgoal_time = FloatTime() + TEAM_HARVEST_TIME;
ai_cmd.c:	bs->harvestaway_time = 0;
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_RUSHBASE;
ai_cmd.c:	bs->teamgoal_time = FloatTime() + CTF_RUSHBASE_TIME;
ai_cmd.c:	bs->rushbaseaway_time = 0;
ai_cmd.c:	ClientName(bs->client, netname, sizeof(netname));
ai_cmd.c:	if (Q_stricmp(netname, bs->teamleader) != 0) return;
ai_cmd.c:	trap_BotEnterChat(bs->cs, teammate, CHAT_TELL);
ai_cmd.c:	trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ordered = qtrue;
ai_cmd.c:	bs->order_time = FloatTime();
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_RETURNFLAG;
ai_cmd.c:	bs->teamgoal_time = FloatTime() + CTF_RETURNFLAG_TIME;
ai_cmd.c:	bs->rushbaseaway_time = 0;
ai_cmd.c:	strncpy(bs->subteam, teammate, 32);
ai_cmd.c:	bs->subteam[31] = '\0';
ai_cmd.c:	trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	if (strlen(bs->subteam))
ai_cmd.c:		BotAI_BotInitialChat(bs, "leftteam", bs->subteam, NULL);
ai_cmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	strcpy(bs->subteam, "");
ai_cmd.c:	if (strlen(bs->subteam)) {
ai_cmd.c:		BotAI_BotInitialChat(bs, "inteam", bs->subteam, NULL);
ai_cmd.c:	trap_BotEnterChat(bs->cs, bs->client, CHAT_TEAM);
ai_cmd.c:			trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	cp = BotFindWayPoint(bs->checkpoints, buf);
ai_cmd.c:		else bs->checkpoints = cp->next;
ai_cmd.c:	cp->next = bs->checkpoints;
ai_cmd.c:	if (bs->checkpoints) bs->checkpoints->prev = cp;
ai_cmd.c:	bs->checkpoints = cp;
ai_cmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	bs->formation_dist = space;
ai_cmd.c:	bs->decisionmaker = client;
ai_cmd.c:	bs->ltgtype = 0;
ai_cmd.c:	bs->lead_time = 0;
ai_cmd.c:	bs->lastgoal_ltgtype = 0;
ai_cmd.c:	trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	trap_EA_Command(bs->client, "kill");
ai_cmd.c:	trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_cmd.c:		strncpy(bs->teamleader, teammate, sizeof(bs->teamleader));
ai_cmd.c:		bs->teamleader[sizeof(bs->teamleader)] = '\0';
ai_cmd.c:		if (client >= 0) ClientName(client, bs->teamleader, sizeof(bs->teamleader));
ai_cmd.c:		if (!Q_stricmp(bs->teamleader, ClientName(client, netname, sizeof(netname)))) {
ai_cmd.c:			bs->teamleader[0] = '\0';
ai_cmd.c:	ClientName(bs->client, netname, sizeof(netname));
ai_cmd.c:	if (!Q_stricmp(netname, bs->teamleader)) {
ai_cmd.c:		trap_EA_SayTeam(bs->client, "I'm the team leader\n");
ai_cmd.c:	switch(bs->ltgtype) {
ai_cmd.c:			EasyClientName(bs->teammate, netname, sizeof(netname));
ai_cmd.c:			EasyClientName(bs->teammate, netname, sizeof(netname));
ai_cmd.c:			trap_BotGoalName(bs->teamgoal.number, goalname, sizeof(goalname));
ai_cmd.c:			trap_BotGoalName(bs->teamgoal.number, goalname, sizeof(goalname));
ai_cmd.c:			ClientName(bs->teamgoal.entitynum, netname, sizeof(netname));
ai_cmd.c:	trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	ClientName(bs->client, netname, sizeof(netname));
ai_cmd.c:	if (Q_stricmp(netname, bs->teamleader) != 0) return;
ai_cmd.c:	bs->forceorders = qtrue;
ai_cmd.c:		VectorSubtract(tmpgoal.origin, bs->origin, dir);
ai_cmd.c:			BotAI_Trace(&trace, bs->eye, NULL, NULL, tmpgoal.origin, bs->client, CONTENTS_SOLID|CONTENTS_PLAYERCLIP);
ai_cmd.c:			redtt = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, ctf_redflag.areanum, TFL_DEFAULT);
ai_cmd.c:			bluett = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, ctf_blueflag.areanum, TFL_DEFAULT);
ai_cmd.c:			redtt = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, redobelisk.areanum, TFL_DEFAULT);
ai_cmd.c:			bluett = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, blueobelisk.areanum, TFL_DEFAULT);
ai_cmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:		if (client == bs->client) {
ai_cmd.c:		trap_BotEnterChat(bs->cs, bs->client, CHAT_TEAM);
ai_cmd.c:	bs->lead_teamgoal.entitynum = -1;
ai_cmd.c:			bs->lead_teamgoal.entitynum = client;
ai_cmd.c:			bs->lead_teamgoal.areanum = areanum;
ai_cmd.c:			VectorCopy(entinfo.origin, bs->lead_teamgoal.origin);
ai_cmd.c:			VectorSet(bs->lead_teamgoal.mins, -8, -8, -8);
ai_cmd.c:			VectorSet(bs->lead_teamgoal.maxs, 8, 8, 8);
ai_cmd.c:	if (bs->teamgoal.entitynum < 0) {
ai_cmd.c:		trap_BotEnterChat(bs->cs, bs->client, CHAT_TEAM);
ai_cmd.c:	bs->lead_teammate = client;
ai_cmd.c:	bs->lead_time = FloatTime() + TEAM_LEAD_TIME;
ai_cmd.c:	bs->leadvisible_time = 0;
ai_cmd.c:	bs->leadmessage_time = -(FloatTime() + 2 * random());
ai_cmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_cmd.c:	bs->teamgoal.entitynum = client;
ai_cmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_cmd.c:	bs->ltgtype = LTG_KILL;
ai_cmd.c:	bs->teamgoal_time = FloatTime() + TEAM_KILL_SOMEONE;
ai_cmd.c:				bs->redflagstatus = 1;
ai_cmd.c:					bs->flagcarrier = ClientFromName(netname);
ai_cmd.c:				bs->blueflagstatus = 1;
ai_cmd.c:					bs->flagcarrier = ClientFromName(netname);
ai_cmd.c:			bs->flagstatuschanged = 1;
ai_cmd.c:			bs->lastflagcapture_time = FloatTime();
ai_cmd.c:			bs->redflagstatus = 0;
ai_cmd.c:			bs->blueflagstatus = 0;
ai_cmd.c:			bs->flagcarrier = 0;
ai_cmd.c:			bs->flagstatuschanged = 1;
ai_cmd.c:			if (!Q_stricmp(flag, "red")) bs->redflagstatus = 0;
ai_cmd.c:			else bs->blueflagstatus = 0;
ai_cmd.c:			bs->flagstatuschanged = 1;
ai_cmd.c:			bs->flagcarrier = ClientFromName(netname);
ai_cmd.c:	//EA_Say(bs->client, buf);
ai_cmd.c:	Q_strncpyz(bs->teamleader, netname, sizeof(bs->teamleader));
ai_cmd.c:			trap_EA_SayTeam(bs->client, "the part of my brain to create formations has been damaged");
ai_cmd.c:			trap_EA_SayTeam(bs->client, "the part of my brain to create formations has been damaged");
ai_dmnet.c:	ClientName(bs->client, netname, sizeof(netname));
ai_dmnet.c:	ClientName(bs->client, netname, sizeof(netname));
ai_dmnet.c:	VectorCopy(bs->origin, end);
ai_dmnet.c:	BotAI_Trace(&bsptrace, bs->origin, mins, maxs, end, bs->entitynum, CONTENTS_SOLID|CONTENTS_PLAYERCLIP);
ai_dmnet.c:	BotAI_Trace(&bsptrace, end, mins, maxs, bs->origin, bs->entitynum, CONTENTS_WATER|CONTENTS_SLIME|CONTENTS_LAVA);
ai_dmnet.c:	if (bs->lastair_time < FloatTime() - 6) {
ai_dmnet.c:			trap_BotPushGoal(bs->gs, &goal);
ai_dmnet.c:			while(trap_BotChooseNBGItem(bs->gs, bs->origin, bs->inventory, tfl, ltg, range)) {
ai_dmnet.c:				trap_BotGetTopGoal(bs->gs, &goal);
ai_dmnet.c:				trap_BotPopGoal(bs->gs);
ai_dmnet.c:			trap_BotResetAvoidGoals(bs->gs);
ai_dmnet.c:		if (trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin,
ai_dmnet.c:				bs->teamgoal.areanum, TFL_DEFAULT) < 300) {
ai_dmnet.c:	ret = trap_BotChooseNBGItem(bs->gs, bs->origin, bs->inventory, tfl, ltg, range);
ai_dmnet.c:		trap_BotGetTopGoal(bs->gs, &goal);
ai_dmnet.c:		if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				trap_BotSetAvoidGoalTime(bs->gs, goal->number, -1);
ai_dmnet.c:		if (trap_BotItemGoalInVisButNotVisible(bs->entitynum, bs->eye, bs->viewangles, goal)) {
ai_dmnet.c:			avoidtime = trap_BotAvoidGoalTime(bs->gs, goal->number);
ai_dmnet.c:				t = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, goal->areanum, bs->tfl);
ai_dmnet.c:		if (bs->areanum == goal->areanum) {
ai_dmnet.c:			if (bs->origin[0] > goal->origin[0] + goal->mins[0] && bs->origin[0] < goal->origin[0] + goal->maxs[0]) {
ai_dmnet.c:				if (bs->origin[1] > goal->origin[1] + goal->mins[1] && bs->origin[1] < goal->origin[1] + goal->maxs[1]) {
ai_dmnet.c:					if (!trap_AAS_Swimming(bs->origin)) {
ai_dmnet.c:		if (trap_BotTouchingGoal(bs->origin, goal)) return qtrue;
ai_dmnet.c:		if (bs->lastair_time > FloatTime() - 1) return qtrue;
ai_dmnet.c:		if (trap_BotTouchingGoal(bs->origin, goal)) return qtrue;
ai_dmnet.c:	if (!trap_BotGetTopGoal(bs->gs, goal)) {
ai_dmnet.c:		bs->ltg_time = 0;
ai_dmnet.c:		bs->ltg_time = 0;
ai_dmnet.c:	if (bs->ltg_time < FloatTime()) {
ai_dmnet.c:		trap_BotPopGoal(bs->gs);
ai_dmnet.c:		//BotAI_Print(PRT_MESSAGE, "%s: choosing new ltg\n", ClientName(bs->client, netname, sizeof(netname)));
ai_dmnet.c:		//BotAI_Print(PRT_MESSAGE, "%6.1f client %d: BotChooseLTGItem\n", FloatTime(), bs->client);
ai_dmnet.c:		if (trap_BotChooseLTGItem(bs->gs, bs->origin, bs->inventory, tfl)) {
ai_dmnet.c:			trap_BotGetTopGoal(bs->gs, goal);
ai_dmnet.c:			bs->ltg_time = FloatTime() + 20;
ai_dmnet.c:			BotAI_Print(PRT_MESSAGE, "%s: no valid ltg (probably stuck)\n", ClientName(bs->client, netname, sizeof(netname)));
ai_dmnet.c:			//trap_BotDumpAvoidGoals(bs->gs);
ai_dmnet.c:			trap_BotResetAvoidGoals(bs->gs);
ai_dmnet.c:			trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		return trap_BotGetTopGoal(bs->gs, goal);
ai_dmnet.c:	if (bs->ltgtype == LTG_TEAMHELP && !retreat) {
ai_dmnet.c:		if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:			BotAI_BotInitialChat(bs, "help_start", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
ai_dmnet.c:			trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_dmnet.c:			bs->teammessage_time = 0;
ai_dmnet.c:		if (bs->teamgoal_time < FloatTime())
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		if (bs->teammatevisible_time < FloatTime() - 10) bs->ltgtype = 0;
ai_dmnet.c:		BotEntityInfo(bs->teammate, &entinfo);
ai_dmnet.c:		if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->teammate)) {
ai_dmnet.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmnet.c:				trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:			bs->teammatevisible_time = FloatTime();
ai_dmnet.c:				bs->teamgoal.entitynum = bs->teammate;
ai_dmnet.c:				bs->teamgoal.areanum = areanum;
ai_dmnet.c:				VectorCopy(entinfo.origin, bs->teamgoal.origin);
ai_dmnet.c:				VectorSet(bs->teamgoal.mins, -8, -8, -8);
ai_dmnet.c:				VectorSet(bs->teamgoal.maxs, 8, 8, 8);
ai_dmnet.c:		memcpy(goal, &bs->teamgoal, sizeof(bot_goal_t));
ai_dmnet.c:	if (bs->ltgtype == LTG_TEAMACCOMPANY && !retreat) {
ai_dmnet.c:		if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:			BotAI_BotInitialChat(bs, "accompany_start", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
ai_dmnet.c:			trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_dmnet.c:			bs->teammessage_time = 0;
ai_dmnet.c:		if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:			BotAI_BotInitialChat(bs, "accompany_stop", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->teammate, CHAT_TELL);
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		BotEntityInfo(bs->teammate, &entinfo);
ai_dmnet.c:		if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->teammate)) {
ai_dmnet.c:			bs->teammatevisible_time = FloatTime();
ai_dmnet.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmnet.c:			if (VectorLengthSquared(dir) < Square(bs->formation_dist)) {
ai_dmnet.c:				BotEntityInfo(bs->entitynum, &botinfo);
ai_dmnet.c:								VectorSubtract(bs->origin, entinfo.origin, dir2);
ai_dmnet.c:									trap_BotMoveInDirection(bs->ms, dir2, 400, MOVE_WALK);
ai_dmnet.c:				if (bs->attackcrouch_time < FloatTime() - 5) {
ai_dmnet.c:					croucher = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CROUCHER, 0, 1);
ai_dmnet.c:					if (random() < bs->thinktime * croucher) {
ai_dmnet.c:						bs->attackcrouch_time = FloatTime() + 5 + croucher * 15;
ai_dmnet.c:				if (trap_AAS_Swimming(bs->origin)) bs->attackcrouch_time = FloatTime() - 1;
ai_dmnet.c:				if (bs->arrive_time < FloatTime() - 2) {
ai_dmnet.c:					if (!bs->arrive_time) {
ai_dmnet.c:						trap_EA_Gesture(bs->client);
ai_dmnet.c:						BotAI_BotInitialChat(bs, "accompany_arrive", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
ai_dmnet.c:						trap_BotEnterChat(bs->cs, bs->teammate, CHAT_TELL);
ai_dmnet.c:						bs->arrive_time = FloatTime();
ai_dmnet.c:					else if (bs->attackcrouch_time > FloatTime()) {
ai_dmnet.c:						trap_EA_Crouch(bs->client);
ai_dmnet.c:					else if (random() < bs->thinktime * 0.05) {
ai_dmnet.c:						trap_EA_Gesture(bs->client);
ai_dmnet.c:				if (bs->arrive_time > FloatTime() - 2) {
ai_dmnet.c:					VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmnet.c:					vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:					bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:				else if (random() < bs->thinktime * 0.8) {
ai_dmnet.c:					VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:					vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:					bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:				if (BotGoForAir(bs, bs->tfl, &bs->teamgoal, 400)) {
ai_dmnet.c:					trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:					//trap_BotGetTopGoal(bs->gs, &tmpgoal);
ai_dmnet.c:					bs->nbg_time = FloatTime() + 8;
ai_dmnet.c:				trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:				bs->teamgoal.entitynum = bs->teammate;
ai_dmnet.c:				bs->teamgoal.areanum = areanum;
ai_dmnet.c:				VectorCopy(entinfo.origin, bs->teamgoal.origin);
ai_dmnet.c:				VectorSet(bs->teamgoal.mins, -8, -8, -8);
ai_dmnet.c:				VectorSet(bs->teamgoal.maxs, 8, 8, 8);
ai_dmnet.c:		memcpy(goal, &bs->teamgoal, sizeof(bot_goal_t));
ai_dmnet.c:		if (bs->teammatevisible_time < FloatTime() - 60) {
ai_dmnet.c:			BotAI_BotInitialChat(bs, "accompany_cannotfind", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->teammate, CHAT_TELL);
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:			bs->teammatevisible_time = FloatTime();
ai_dmnet.c:	if (bs->ltgtype == LTG_DEFENDKEYAREA) {
ai_dmnet.c:		if (trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin,
ai_dmnet.c:				bs->teamgoal.areanum, TFL_DEFAULT) > bs->defendaway_range) {
ai_dmnet.c:			bs->defendaway_time = 0;
ai_dmnet.c:	if (bs->ltgtype == LTG_DEFENDKEYAREA && !retreat &&
ai_dmnet.c:				bs->defendaway_time < FloatTime()) {
ai_dmnet.c:		if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:			trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
ai_dmnet.c:			trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:			bs->teammessage_time = 0;
ai_dmnet.c:		memcpy(goal, &bs->teamgoal, sizeof(bot_goal_t));
ai_dmnet.c:		if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:			trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
ai_dmnet.c:			trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		VectorSubtract(goal->origin, bs->origin, dir);
ai_dmnet.c:			trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:			bs->defendaway_time = FloatTime() + 3 + 3 * random();
ai_dmnet.c:				bs->defendaway_range = 100;
ai_dmnet.c:				bs->defendaway_range = 350;
ai_dmnet.c:	if (bs->ltgtype == LTG_KILL && !retreat) {
ai_dmnet.c:		if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:			EasyClientName(bs->teamgoal.entitynum, buf, sizeof(buf));
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			bs->teammessage_time = 0;
ai_dmnet.c:		if (bs->lastkilledplayer == bs->teamgoal.entitynum) {
ai_dmnet.c:			EasyClientName(bs->teamgoal.entitynum, buf, sizeof(buf));
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			bs->lastkilledplayer = -1;
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:	if (bs->ltgtype == LTG_GETITEM && !retreat) {
ai_dmnet.c:		if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:			trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
ai_dmnet.c:			trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_dmnet.c:			bs->teammessage_time = 0;
ai_dmnet.c:		memcpy(goal, &bs->teamgoal, sizeof(bot_goal_t));
ai_dmnet.c:		if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		if (trap_BotItemGoalInVisButNotVisible(bs->entitynum, bs->eye, bs->viewangles, goal)) {
ai_dmnet.c:			trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:			trap_BotGoalName(bs->teamgoal.number, buf, sizeof(buf));
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:	if ((bs->ltgtype == LTG_CAMP || bs->ltgtype == LTG_CAMPORDER) && !retreat) {
ai_dmnet.c:		if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:			if (bs->ltgtype == LTG_CAMPORDER) {
ai_dmnet.c:				BotAI_BotInitialChat(bs, "camp_start", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
ai_dmnet.c:				trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:				BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
ai_dmnet.c:				trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_dmnet.c:			bs->teammessage_time = 0;
ai_dmnet.c:		memcpy(goal, &bs->teamgoal, sizeof(bot_goal_t));
ai_dmnet.c:		if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:			if (bs->ltgtype == LTG_CAMPORDER) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		VectorSubtract(goal->origin, bs->origin, dir);
ai_dmnet.c:			if (!bs->arrive_time) {
ai_dmnet.c:				if (bs->ltgtype == LTG_CAMPORDER) {
ai_dmnet.c:					BotAI_BotInitialChat(bs, "camp_arrive", EasyClientName(bs->teammate, netname, sizeof(netname)), NULL);
ai_dmnet.c:					trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:					BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_INPOSITION);
ai_dmnet.c:				bs->arrive_time = FloatTime();
ai_dmnet.c:			if (random() < bs->thinktime * 0.8) {
ai_dmnet.c:				VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:				vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:				bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:			if (bs->attackcrouch_time < FloatTime() - 5) {
ai_dmnet.c:				croucher = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CROUCHER, 0, 1);
ai_dmnet.c:				if (random() < bs->thinktime * croucher) {
ai_dmnet.c:					bs->attackcrouch_time = FloatTime() + 5 + croucher * 15;
ai_dmnet.c:			if (bs->attackcrouch_time > FloatTime()) {
ai_dmnet.c:				trap_EA_Crouch(bs->client);
ai_dmnet.c:			if (trap_AAS_Swimming(bs->origin)) bs->attackcrouch_time = FloatTime() - 1;
ai_dmnet.c:			if (trap_PointContents(bs->eye,bs->entitynum) & (CONTENTS_WATER|CONTENTS_SLIME|CONTENTS_LAVA)) {
ai_dmnet.c:				if (bs->ltgtype == LTG_CAMPORDER) {
ai_dmnet.c:					trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:					if (bs->lastgoal_ltgtype == LTG_CAMPORDER) {
ai_dmnet.c:						bs->lastgoal_ltgtype = 0;
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (bs->camp_range > 0) {
ai_dmnet.c:			trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:	if (bs->ltgtype == LTG_PATROL && !retreat) {
ai_dmnet.c:		if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:			for (wp = bs->patrolpoints; wp; wp = wp->next) {
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			BotVoiceChatOnly(bs, bs->decisionmaker, VOICECHAT_YES);
ai_dmnet.c:			trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_dmnet.c:			bs->teammessage_time = 0;
ai_dmnet.c:		if (!bs->curpatrolpoint) {
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		if (trap_BotTouchingGoal(bs->origin, &bs->curpatrolpoint->goal)) {
ai_dmnet.c:			if (bs->patrolflags & PATROL_BACK) {
ai_dmnet.c:				if (bs->curpatrolpoint->prev) {
ai_dmnet.c:					bs->curpatrolpoint = bs->curpatrolpoint->prev;
ai_dmnet.c:					bs->curpatrolpoint = bs->curpatrolpoint->next;
ai_dmnet.c:					bs->patrolflags &= ~PATROL_BACK;
ai_dmnet.c:				if (bs->curpatrolpoint->next) {
ai_dmnet.c:					bs->curpatrolpoint = bs->curpatrolpoint->next;
ai_dmnet.c:					bs->curpatrolpoint = bs->curpatrolpoint->prev;
ai_dmnet.c:					bs->patrolflags |= PATROL_BACK;
ai_dmnet.c:		if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->decisionmaker, CHAT_TELL);
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		if (!bs->curpatrolpoint) {
ai_dmnet.c:			bs->ltgtype = 0;
ai_dmnet.c:		memcpy(goal, &bs->curpatrolpoint->goal, sizeof(bot_goal_t));
ai_dmnet.c:		if (bs->ltgtype == LTG_GETFLAG) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:				default: bs->ltgtype = 0; return qfalse;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:					case TEAM_RED: bs->blueflagstatus = 1; break;
ai_dmnet.c:					case TEAM_BLUE: bs->redflagstatus = 1; break;
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:		if (bs->ltgtype == LTG_RUSHBASE && bs->rushbaseaway_time < FloatTime()) {
ai_dmnet.c:				default: bs->ltgtype = 0; return qfalse;
ai_dmnet.c:			if (!BotCTFCarryingFlag(bs)) bs->ltgtype = 0;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) bs->ltgtype = 0;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:					trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:					bs->rushbaseaway_time = FloatTime() + 5 + 10 * random();
ai_dmnet.c:					bs->ltgtype = 0;
ai_dmnet.c:		if (bs->ltgtype == LTG_RETURNFLAG) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:				default: bs->ltgtype = 0; return qfalse;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) bs->ltgtype = 0;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:		if (bs->ltgtype == LTG_GETFLAG) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:		if (bs->ltgtype == LTG_RUSHBASE) {
ai_dmnet.c:				default: bs->ltgtype = 0; return qfalse;
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:		if (bs->ltgtype == LTG_ATTACKENEMYBASE &&
ai_dmnet.c:				bs->attackaway_time < FloatTime()) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:				default: bs->ltgtype = 0; return qfalse;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				bs->attackaway_time = FloatTime() + 2 + 5 * random();
ai_dmnet.c:		if (bs->ltgtype == LTG_RETURNFLAG) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:		if (bs->ltgtype == LTG_ATTACKENEMYBASE &&
ai_dmnet.c:				bs->attackaway_time < FloatTime()) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:				default: bs->ltgtype = 0; return qfalse;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				bs->attackaway_time = FloatTime() + 3 + 5 * random();
ai_dmnet.c:			VectorSubtract(bs->origin, goal->origin, dir);
ai_dmnet.c:				bs->attackaway_time = FloatTime() + 3 + 5 * random();
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:		if (bs->ltgtype == LTG_RUSHBASE) {
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:		if (bs->ltgtype == LTG_ATTACKENEMYBASE &&
ai_dmnet.c:				bs->attackaway_time < FloatTime()) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:				default: bs->ltgtype = 0; return qfalse;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				bs->attackaway_time = FloatTime() + 2 + 5 * random();
ai_dmnet.c:		if (bs->ltgtype == LTG_HARVEST &&
ai_dmnet.c:			bs->harvestaway_time < FloatTime()) {
ai_dmnet.c:			if (bs->teammessage_time && bs->teammessage_time < FloatTime()) {
ai_dmnet.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_dmnet.c:				bs->teammessage_time = 0;
ai_dmnet.c:			if (bs->teamgoal_time < FloatTime()) {
ai_dmnet.c:				bs->ltgtype = 0;
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				bs->harvestaway_time = FloatTime() + 4 + 3 * random();
ai_dmnet.c:	if (bs->lead_time > 0 && !retreat) {
ai_dmnet.c:		if (bs->lead_time < FloatTime()) {
ai_dmnet.c:			BotAI_BotInitialChat(bs, "lead_stop", EasyClientName(bs->lead_teammate, teammate, sizeof(teammate)), NULL);
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->teammate, CHAT_TELL);
ai_dmnet.c:			bs->lead_time = 0;
ai_dmnet.c:		if (bs->leadmessage_time < 0 && -bs->leadmessage_time < FloatTime()) {
ai_dmnet.c:			BotAI_BotInitialChat(bs, "followme", EasyClientName(bs->lead_teammate, teammate, sizeof(teammate)), NULL);
ai_dmnet.c:			trap_BotEnterChat(bs->cs, bs->teammate, CHAT_TELL);
ai_dmnet.c:			bs->leadmessage_time = FloatTime();
ai_dmnet.c:		BotEntityInfo(bs->lead_teammate, &entinfo);
ai_dmnet.c:				bs->lead_teamgoal.entitynum = bs->lead_teammate;
ai_dmnet.c:				bs->lead_teamgoal.areanum = areanum;
ai_dmnet.c:				VectorCopy(entinfo.origin, bs->lead_teamgoal.origin);
ai_dmnet.c:				VectorSet(bs->lead_teamgoal.mins, -8, -8, -8);
ai_dmnet.c:				VectorSet(bs->lead_teamgoal.maxs, 8, 8, 8);
ai_dmnet.c:		if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->lead_teammate)) {
ai_dmnet.c:			bs->leadvisible_time = FloatTime();
ai_dmnet.c:		if (bs->leadvisible_time < FloatTime() - 1) {
ai_dmnet.c:			bs->leadbackup_time = FloatTime() + 2;
ai_dmnet.c:		VectorSubtract(bs->origin, bs->lead_teamgoal.origin, dir);
ai_dmnet.c:		if (bs->leadbackup_time > FloatTime()) {
ai_dmnet.c:			if (bs->leadmessage_time < FloatTime() - 20) {
ai_dmnet.c:				BotAI_BotInitialChat(bs, "followme", EasyClientName(bs->lead_teammate, teammate, sizeof(teammate)), NULL);
ai_dmnet.c:				trap_BotEnterChat(bs->cs, bs->teammate, CHAT_TELL);
ai_dmnet.c:				bs->leadmessage_time = FloatTime();
ai_dmnet.c:				bs->leadbackup_time = 0;
ai_dmnet.c:			memcpy(goal, &bs->lead_teamgoal, sizeof(bot_goal_t));
ai_dmnet.c:				if (bs->leadmessage_time < FloatTime() - 20) {
ai_dmnet.c:					BotAI_BotInitialChat(bs, "followme", EasyClientName(bs->lead_teammate, teammate, sizeof(teammate)), NULL);
ai_dmnet.c:					trap_BotEnterChat(bs->cs, bs->teammate, CHAT_TELL);
ai_dmnet.c:					bs->leadmessage_time = FloatTime();
ai_dmnet.c:				VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmnet.c:				vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:				bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:		trap_BotEnterChat(bs->cs, 0, bs->chatto);
ai_dmnet.c:	bs->ainode = AINode_Intermission;
ai_dmnet.c:			bs->stand_time = FloatTime() + BotChatTime(bs);
ai_dmnet.c:			bs->stand_time = FloatTime() + 2;
ai_dmnet.c:	bs->ainode = AINode_Observer;
ai_dmnet.c:	bs->standfindenemy_time = FloatTime() + 1;
ai_dmnet.c:	bs->ainode = AINode_Stand;
ai_dmnet.c:	if (bs->lastframe_health > bs->inventory[INVENTORY_HEALTH]) {
ai_dmnet.c:			bs->standfindenemy_time = FloatTime() + BotChatTime(bs) + 0.1;
ai_dmnet.c:			bs->stand_time = FloatTime() + BotChatTime(bs) + 0.1;
ai_dmnet.c:	if (bs->standfindenemy_time < FloatTime()) {
ai_dmnet.c:		bs->standfindenemy_time = FloatTime() + 1;
ai_dmnet.c:	trap_EA_Talk(bs->client);
ai_dmnet.c:	if (bs->stand_time < FloatTime()) {
ai_dmnet.c:		trap_BotEnterChat(bs->cs, 0, bs->chatto);
ai_dmnet.c:	trap_BotResetMoveState(bs->ms);
ai_dmnet.c:	trap_BotResetGoalState(bs->gs);
ai_dmnet.c:	trap_BotResetAvoidGoals(bs->gs);
ai_dmnet.c:	trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		bs->respawn_time = FloatTime() + BotChatTime(bs);
ai_dmnet.c:		bs->respawnchat_time = FloatTime();
ai_dmnet.c:		bs->respawn_time = FloatTime() + 1 + random();
ai_dmnet.c:		bs->respawnchat_time = 0;
ai_dmnet.c:	bs->respawn_wait = qfalse;
ai_dmnet.c:	bs->ainode = AINode_Respawn;
ai_dmnet.c:	if (bs->respawn_wait) {
ai_dmnet.c:			trap_EA_Respawn(bs->client);
ai_dmnet.c:	else if (bs->respawn_time < FloatTime()) {
ai_dmnet.c:		bs->respawn_wait = qtrue;
ai_dmnet.c:		trap_EA_Respawn(bs->client);
ai_dmnet.c:		if (bs->respawnchat_time) {
ai_dmnet.c:			trap_BotEnterChat(bs->cs, 0, bs->chatto);
ai_dmnet.c:			bs->enemy = -1;
ai_dmnet.c:	if (bs->respawnchat_time && bs->respawnchat_time < FloatTime() - 0.5) {
ai_dmnet.c:		trap_EA_Talk(bs->client);
ai_dmnet.c:	if (bs->inventory[INVENTORY_MACHINEGUN] > 0 && bs->inventory[INVENTORY_BULLETS] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_SHOTGUN] > 0 && bs->inventory[INVENTORY_SHELLS] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_PLASMAGUN] > 0 && bs->inventory[INVENTORY_CELLS] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_LIGHTNING] > 0 && bs->inventory[INVENTORY_LIGHTNINGAMMO] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_CHAINGUN] > 0 && bs->inventory[INVENTORY_BELT] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_NAILGUN] > 0 && bs->inventory[INVENTORY_NAILS] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_RAILGUN] > 0 && bs->inventory[INVENTORY_SLUGS] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_ROCKETLAUNCHER] > 0 && bs->inventory[INVENTORY_ROCKETS] > 0)
ai_dmnet.c:	else if (bs->inventory[INVENTORY_BFG10K] > 0 && bs->inventory[INVENTORY_BFGAMMO] > 0)
ai_dmnet.c:	if (bs->kamikazebody) {
ai_dmnet.c:			BotAI_GetEntityState(bs->kamikazebody, &state);
ai_dmnet.c:			VectorSubtract(target, bs->eye, dir);
ai_dmnet.c:				if (bs->cur_ps.weapon == moveresult->weapon) {
ai_dmnet.c:					if (InFieldOfVision(bs->viewangles, 20, moveresult->ideal_viewangles)) {
ai_dmnet.c:						BotAI_Trace(&bsptrace, bs->eye, NULL, NULL, target, bs->entitynum, MASK_SHOT);
ai_dmnet.c:							trap_EA_Attack(bs->client);
ai_dmnet.c:		bs->blockedbyavoidspot_time = FloatTime() + 5;
ai_dmnet.c:	if (bs->blockedbyavoidspot_time > FloatTime() &&
ai_dmnet.c:		for (i = 0; i < bs->numproxmines; i++) {
ai_dmnet.c:			BotAI_GetEntityState(bs->proxmines[i], &state);
ai_dmnet.c:			VectorSubtract(state.pos.trBase, bs->origin, dir);
ai_dmnet.c:			BotAI_GetEntityState(bs->proxmines[bestmine], &state);
ai_dmnet.c:			VectorSubtract(target, bs->eye, dir);
ai_dmnet.c:			if (bs->inventory[INVENTORY_PLASMAGUN] > 0 && bs->inventory[INVENTORY_CELLS] > 0)
ai_dmnet.c:			else if (bs->inventory[INVENTORY_ROCKETLAUNCHER] > 0 && bs->inventory[INVENTORY_ROCKETS] > 0)
ai_dmnet.c:			else if (bs->inventory[INVENTORY_BFG10K] > 0 && bs->inventory[INVENTORY_BFGAMMO] > 0)
ai_dmnet.c:				if (bs->cur_ps.weapon == moveresult->weapon) {
ai_dmnet.c:					if (InFieldOfVision(bs->viewangles, 20, moveresult->ideal_viewangles)) {
ai_dmnet.c:						BotAI_Trace(&bsptrace, bs->eye, NULL, NULL, target, bs->entitynum, MASK_SHOT);
ai_dmnet.c:							trap_EA_Attack(bs->client);
ai_dmnet.c:	bs->ainode = AINode_Seek_ActivateEntity;
ai_dmnet.c:	bs->tfl = TFL_DEFAULT;
ai_dmnet.c:	if (bot_grapple.integer) bs->tfl |= TFL_GRAPPLEHOOK;
ai_dmnet.c:	if (BotInLavaOrSlime(bs)) bs->tfl |= TFL_LAVA|TFL_SLIME;
ai_dmnet.c:	bs->enemy = -1;
ai_dmnet.c:	if (!bs->activatestack) {
ai_dmnet.c:	goal = &bs->activatestack->goal;
ai_dmnet.c:	if (bs->activatestack->shoot) {
ai_dmnet.c:		BotAI_Trace(&bsptrace, bs->eye, NULL, NULL, bs->activatestack->target, bs->entitynum, MASK_SHOT);
ai_dmnet.c:			if (bs->cur_ps.weapon == bs->activatestack->weapon) {
ai_dmnet.c:				VectorSubtract(bs->activatestack->target, bs->eye, dir);
ai_dmnet.c:				if (InFieldOfVision(bs->viewangles, 20, ideal_viewangles)) {
ai_dmnet.c:					trap_EA_Attack(bs->client);
ai_dmnet.c:		if (!VectorCompare(bs->activatestack->origin, entinfo.origin)) {
ai_dmnet.c:			bs->activatestack->time = 0;
ai_dmnet.c:		if (bs->activatestack->time < FloatTime()) {
ai_dmnet.c:			if (bs->activatestack) {
ai_dmnet.c:				bs->activatestack->time = FloatTime() + 10;
ai_dmnet.c:			bs->activatestack->time = 0;
ai_dmnet.c:		else if (!bs->activatestack->shoot) {
ai_dmnet.c:			if (trap_BotTouchingGoal(bs->origin, goal)) {
ai_dmnet.c:				bs->activatestack->time = 0;
ai_dmnet.c:		if (bs->activatestack->time < FloatTime()) {
ai_dmnet.c:			if (bs->activatestack) {
ai_dmnet.c:				bs->activatestack->time = FloatTime() + 10;
ai_dmnet.c:		trap_BotMoveToGoal(&moveresult, bs->ms, goal, bs->tfl);
ai_dmnet.c:			trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:			bs->activatestack->time = 0;
ai_dmnet.c:	if (bs->activatestack->shoot) {
ai_dmnet.c:			VectorSubtract(bs->activatestack->target, bs->eye, dir);
ai_dmnet.c:			bs->activatestack->weapon = BotSelectActivateWeapon(bs);
ai_dmnet.c:			if (bs->activatestack->weapon == -1) {
ai_dmnet.c:				bs->activatestack->weapon = 0;
ai_dmnet.c:			moveresult.weapon = bs->activatestack->weapon;
ai_dmnet.c:		VectorCopy(moveresult.ideal_viewangles, bs->ideal_viewangles);
ai_dmnet.c:		if (random() < bs->thinktime * 0.8) {
ai_dmnet.c:			VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:			bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	else if (!(bs->flags & BFL_IDEALVIEWSET)) {
ai_dmnet.c:		if (trap_BotMovementViewTarget(bs->ms, goal, bs->tfl, 300, target)) {
ai_dmnet.c:			VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:			vectoangles(moveresult.movedir, bs->ideal_viewangles);
ai_dmnet.c:		bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:		bs->weaponnum = moveresult.weapon;
ai_dmnet.c:			trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:			trap_BotEmptyGoalStack(bs->gs);
ai_dmnet.c:	if (trap_BotGetTopGoal(bs->gs, &goal)) {
ai_dmnet.c:	bs->ainode = AINode_Seek_NBG;
ai_dmnet.c:	bs->tfl = TFL_DEFAULT;
ai_dmnet.c:	if (bot_grapple.integer) bs->tfl |= TFL_GRAPPLEHOOK;
ai_dmnet.c:	if (BotInLavaOrSlime(bs)) bs->tfl |= TFL_LAVA|TFL_SLIME;
ai_dmnet.c:		bs->tfl |= TFL_ROCKETJUMP;
ai_dmnet.c:	bs->enemy = -1;
ai_dmnet.c:	if (!trap_BotGetTopGoal(bs->gs, &goal)) bs->nbg_time = 0;
ai_dmnet.c:		bs->nbg_time = 0;
ai_dmnet.c:	if (bs->nbg_time < FloatTime()) {
ai_dmnet.c:		trap_BotPopGoal(bs->gs);
ai_dmnet.c:		bs->check_time = FloatTime() + 0.05;
ai_dmnet.c:	trap_BotMoveToGoal(&moveresult, bs->ms, &goal, bs->tfl);
ai_dmnet.c:		trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		bs->nbg_time = 0;
ai_dmnet.c:		VectorCopy(moveresult.ideal_viewangles, bs->ideal_viewangles);
ai_dmnet.c:		if (random() < bs->thinktime * 0.8) {
ai_dmnet.c:			VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:			bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	else if (!(bs->flags & BFL_IDEALVIEWSET)) {
ai_dmnet.c:		if (!trap_BotGetSecondGoal(bs->gs, &goal)) trap_BotGetTopGoal(bs->gs, &goal);
ai_dmnet.c:		if (trap_BotMovementViewTarget(bs->ms, &goal, bs->tfl, 300, target)) {
ai_dmnet.c:			VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:		else vectoangles(moveresult.movedir, bs->ideal_viewangles);
ai_dmnet.c:		bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	if (moveresult.flags & MOVERESULT_MOVEMENTWEAPON) bs->weaponnum = moveresult.weapon;
ai_dmnet.c:			trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:			trap_BotEmptyGoalStack(bs->gs);
ai_dmnet.c:	if (trap_BotGetTopGoal(bs->gs, &goal)) {
ai_dmnet.c:	bs->ainode = AINode_Seek_LTG;
ai_dmnet.c:		bs->stand_time = FloatTime() + BotChatTime(bs);
ai_dmnet.c:	bs->tfl = TFL_DEFAULT;
ai_dmnet.c:	if (bot_grapple.integer) bs->tfl |= TFL_GRAPPLEHOOK;
ai_dmnet.c:	if (BotInLavaOrSlime(bs)) bs->tfl |= TFL_LAVA|TFL_SLIME;
ai_dmnet.c:		bs->tfl |= TFL_ROCKETJUMP;
ai_dmnet.c:	bs->enemy = -1;
ai_dmnet.c:	if (bs->killedenemy_time > FloatTime() - 2) {
ai_dmnet.c:		if (random() < bs->thinktime * 1) {
ai_dmnet.c:			trap_EA_Gesture(bs->client);
ai_dmnet.c:			trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:			trap_BotEmptyGoalStack(bs->gs);
ai_dmnet.c:	if (!BotLongTermGoal(bs, bs->tfl, qfalse, &goal)) {
ai_dmnet.c:	if (bs->check_time < FloatTime()) {
ai_dmnet.c:		bs->check_time = FloatTime() + 0.5;
ai_dmnet.c:		if (bs->ltgtype == LTG_DEFENDKEYAREA) range = 400;
ai_dmnet.c:		if (BotNearbyGoal(bs, bs->tfl, &goal, range)) {
ai_dmnet.c:			trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:			//trap_BotGetTopGoal(bs->gs, &tmpgoal);
ai_dmnet.c:			bs->nbg_time = FloatTime() + 4 + range * 0.01;
ai_dmnet.c:	trap_BotMoveToGoal(&moveresult, bs->ms, &goal, bs->tfl);
ai_dmnet.c:		trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		bs->ltg_time = 0;
ai_dmnet.c:		VectorCopy(moveresult.ideal_viewangles, bs->ideal_viewangles);
ai_dmnet.c:		if (random() < bs->thinktime * 0.8) {
ai_dmnet.c:			VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:			bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	else if (!(bs->flags & BFL_IDEALVIEWSET)) {
ai_dmnet.c:		if (trap_BotMovementViewTarget(bs->ms, &goal, bs->tfl, 300, target)) {
ai_dmnet.c:			VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:			vectoangles(moveresult.movedir, bs->ideal_viewangles);
ai_dmnet.c:		else if (random() < bs->thinktime * 0.8) {
ai_dmnet.c:			VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:			bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:		bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	if (moveresult.flags & MOVERESULT_MOVEMENTWEAPON) bs->weaponnum = moveresult.weapon;
ai_dmnet.c:	trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:	bs->ainode = AINode_Battle_Fight;
ai_dmnet.c:	trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:	bs->ainode = AINode_Battle_Fight;
ai_dmnet.c:	bs->flags |= BFL_FIGHTSUICIDAL;
ai_dmnet.c:	if (BotFindEnemy(bs, bs->enemy)) {
ai_dmnet.c:	if (bs->enemy < 0) {
ai_dmnet.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_dmnet.c:	if (bs->enemydeath_time) {
ai_dmnet.c:		if (bs->enemydeath_time < FloatTime() - 1.0) {
ai_dmnet.c:			bs->enemydeath_time = 0;
ai_dmnet.c:			if (bs->enemysuicide) {
ai_dmnet.c:			if (bs->lastkilledplayer == bs->enemy && BotChat_Kill(bs)) {
ai_dmnet.c:				bs->stand_time = FloatTime() + BotChatTime(bs);
ai_dmnet.c:				bs->ltg_time = 0;
ai_dmnet.c:			bs->enemydeath_time = FloatTime();
ai_dmnet.c:	if (bs->enemy >= MAX_CLIENTS) {
ai_dmnet.c:		if ( bs->enemy == redobelisk.entitynum ||
ai_dmnet.c:			bs->enemy == blueobelisk.entitynum ) {
ai_dmnet.c:		VectorCopy(target, bs->lastenemyorigin);
ai_dmnet.c:		bs->lastenemyareanum = areanum;
ai_dmnet.c:	BotUpdateBattleInventory(bs, bs->enemy);
ai_dmnet.c:	if (bs->lastframe_health > bs->inventory[INVENTORY_HEALTH]) {
ai_dmnet.c:			bs->stand_time = FloatTime() + BotChatTime(bs);
ai_dmnet.c:	if (bs->cur_ps.persistant[PERS_HITS] > bs->lasthitcount) {
ai_dmnet.c:			bs->stand_time = FloatTime() + BotChatTime(bs);
ai_dmnet.c:	if (!BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy)) {
ai_dmnet.c:	bs->tfl = TFL_DEFAULT;
ai_dmnet.c:	if (bot_grapple.integer) bs->tfl |= TFL_GRAPPLEHOOK;
ai_dmnet.c:	if (BotInLavaOrSlime(bs)) bs->tfl |= TFL_LAVA|TFL_SLIME;
ai_dmnet.c:		bs->tfl |= TFL_ROCKETJUMP;
ai_dmnet.c:	moveresult = BotAttackMove(bs, bs->tfl);
ai_dmnet.c:		trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		bs->ltg_time = 0;
ai_dmnet.c:	if (!(bs->flags & BFL_FIGHTSUICIDAL)) {
ai_dmnet.c:	bs->chase_time = FloatTime();
ai_dmnet.c:	bs->ainode = AINode_Battle_Chase;
ai_dmnet.c:	if (bs->enemy < 0) {
ai_dmnet.c:	if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy)) {
ai_dmnet.c:	if (!bs->lastenemyareanum) {
ai_dmnet.c:	bs->tfl = TFL_DEFAULT;
ai_dmnet.c:	if (bot_grapple.integer) bs->tfl |= TFL_GRAPPLEHOOK;
ai_dmnet.c:	if (BotInLavaOrSlime(bs)) bs->tfl |= TFL_LAVA|TFL_SLIME;
ai_dmnet.c:		bs->tfl |= TFL_ROCKETJUMP;
ai_dmnet.c:	goal.entitynum = bs->enemy;
ai_dmnet.c:	goal.areanum = bs->lastenemyareanum;
ai_dmnet.c:	VectorCopy(bs->lastenemyorigin, goal.origin);
ai_dmnet.c:	if (trap_BotTouchingGoal(bs->origin, &goal)) bs->chase_time = 0;
ai_dmnet.c:	if (!bs->chase_time || bs->chase_time < FloatTime() - 10) {
ai_dmnet.c:	if (bs->check_time < FloatTime()) {
ai_dmnet.c:		bs->check_time = FloatTime() + 1;
ai_dmnet.c:		if (BotNearbyGoal(bs, bs->tfl, &goal, range)) {
ai_dmnet.c:			bs->nbg_time = FloatTime() + 0.1 * range + 1;
ai_dmnet.c:			trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:	BotUpdateBattleInventory(bs, bs->enemy);
ai_dmnet.c:	trap_BotMoveToGoal(&moveresult, bs->ms, &goal, bs->tfl);
ai_dmnet.c:		trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		bs->ltg_time = 0;
ai_dmnet.c:		VectorCopy(moveresult.ideal_viewangles, bs->ideal_viewangles);
ai_dmnet.c:	else if (!(bs->flags & BFL_IDEALVIEWSET)) {
ai_dmnet.c:		if (bs->chase_time > FloatTime() - 2) {
ai_dmnet.c:			if (trap_BotMovementViewTarget(bs->ms, &goal, bs->tfl, 300, target)) {
ai_dmnet.c:				VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:				vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:				vectoangles(moveresult.movedir, bs->ideal_viewangles);
ai_dmnet.c:		bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	if (moveresult.flags & MOVERESULT_MOVEMENTWEAPON) bs->weaponnum = moveresult.weapon;
ai_dmnet.c:	if (bs->areanum == bs->lastenemyareanum) bs->chase_time = 0;
ai_dmnet.c:	bs->ainode = AINode_Battle_Retreat;
ai_dmnet.c:	if (bs->enemy < 0) {
ai_dmnet.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_dmnet.c:	if (BotFindEnemy(bs, bs->enemy)) {
ai_dmnet.c:	bs->tfl = TFL_DEFAULT;
ai_dmnet.c:	if (bot_grapple.integer) bs->tfl |= TFL_GRAPPLEHOOK;
ai_dmnet.c:	if (BotInLavaOrSlime(bs)) bs->tfl |= TFL_LAVA|TFL_SLIME;
ai_dmnet.c:	BotUpdateBattleInventory(bs, bs->enemy);
ai_dmnet.c:		trap_BotEmptyGoalStack(bs->gs);
ai_dmnet.c:	if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy)) {
ai_dmnet.c:		bs->enemyvisible_time = FloatTime();
ai_dmnet.c:		if (bs->enemy >= MAX_CLIENTS) {
ai_dmnet.c:			if ( bs->enemy == redobelisk.entitynum ||
ai_dmnet.c:				bs->enemy == blueobelisk.entitynum ) {
ai_dmnet.c:			VectorCopy(target, bs->lastenemyorigin);
ai_dmnet.c:			bs->lastenemyareanum = areanum;
ai_dmnet.c:	if (bs->enemyvisible_time < FloatTime() - 4) {
ai_dmnet.c:	else if (bs->enemyvisible_time < FloatTime()) {
ai_dmnet.c:	if (!BotLongTermGoal(bs, bs->tfl, qtrue, &goal)) {
ai_dmnet.c:	if (bs->check_time < FloatTime()) {
ai_dmnet.c:		bs->check_time = FloatTime() + 1;
ai_dmnet.c:		if (BotNearbyGoal(bs, bs->tfl, &goal, range)) {
ai_dmnet.c:			trap_BotResetLastAvoidReach(bs->ms);
ai_dmnet.c:			bs->nbg_time = FloatTime() + range / 100 + 1;
ai_dmnet.c:	trap_BotMoveToGoal(&moveresult, bs->ms, &goal, bs->tfl);
ai_dmnet.c:		trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		bs->ltg_time = 0;
ai_dmnet.c:		VectorCopy(moveresult.ideal_viewangles, bs->ideal_viewangles);
ai_dmnet.c:				&& !(bs->flags & BFL_IDEALVIEWSET) ) {
ai_dmnet.c:		attack_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_ATTACK_SKILL, 0, 1);
ai_dmnet.c:			if (trap_BotMovementViewTarget(bs->ms, &goal, bs->tfl, 300, target)) {
ai_dmnet.c:				VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:				vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:				vectoangles(moveresult.movedir, bs->ideal_viewangles);
ai_dmnet.c:			bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	if (moveresult.flags & MOVERESULT_MOVEMENTWEAPON) bs->weaponnum = moveresult.weapon;
ai_dmnet.c:	bs->ainode = AINode_Battle_NBG;
ai_dmnet.c:	if (bs->enemy < 0) {
ai_dmnet.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_dmnet.c:	bs->tfl = TFL_DEFAULT;
ai_dmnet.c:	if (bot_grapple.integer) bs->tfl |= TFL_GRAPPLEHOOK;
ai_dmnet.c:	if (BotInLavaOrSlime(bs)) bs->tfl |= TFL_LAVA|TFL_SLIME;
ai_dmnet.c:		bs->tfl |= TFL_ROCKETJUMP;
ai_dmnet.c:	if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy)) {
ai_dmnet.c:		bs->enemyvisible_time = FloatTime();
ai_dmnet.c:		if (bs->enemy >= MAX_CLIENTS) {
ai_dmnet.c:			if ( bs->enemy == redobelisk.entitynum ||
ai_dmnet.c:				bs->enemy == blueobelisk.entitynum ) {
ai_dmnet.c:			VectorCopy(target, bs->lastenemyorigin);
ai_dmnet.c:			bs->lastenemyareanum = areanum;
ai_dmnet.c:	if (!trap_BotGetTopGoal(bs->gs, &goal)) {
ai_dmnet.c:		bs->nbg_time = 0;
ai_dmnet.c:		bs->nbg_time = 0;
ai_dmnet.c:	if (bs->nbg_time < FloatTime()) {
ai_dmnet.c:		trap_BotPopGoal(bs->gs);
ai_dmnet.c:		if (trap_BotGetTopGoal(bs->gs, &goal))
ai_dmnet.c:	trap_BotMoveToGoal(&moveresult, bs->ms, &goal, bs->tfl);
ai_dmnet.c:		trap_BotResetAvoidReach(bs->ms);
ai_dmnet.c:		bs->nbg_time = 0;
ai_dmnet.c:	BotUpdateBattleInventory(bs, bs->enemy);
ai_dmnet.c:		VectorCopy(moveresult.ideal_viewangles, bs->ideal_viewangles);
ai_dmnet.c:				&& !(bs->flags & BFL_IDEALVIEWSET)) {
ai_dmnet.c:		attack_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_ATTACK_SKILL, 0, 1);
ai_dmnet.c:			//&& BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy)
ai_dmnet.c:			if (trap_BotMovementViewTarget(bs->ms, &goal, bs->tfl, 300, target)) {
ai_dmnet.c:				VectorSubtract(target, bs->origin, dir);
ai_dmnet.c:				vectoangles(dir, bs->ideal_viewangles);
ai_dmnet.c:				vectoangles(moveresult.movedir, bs->ideal_viewangles);
ai_dmnet.c:			bs->ideal_viewangles[2] *= 0.5;
ai_dmnet.c:	if (moveresult.flags & MOVERESULT_MOVEMENTWEAPON) bs->weaponnum = moveresult.weapon;
ai_dmq3.c:	trap_GetUserinfo(bs->client, userinfo, sizeof(userinfo));
ai_dmq3.c:	trap_SetUserinfo(bs->client, userinfo);
ai_dmq3.c:	ClientUserinfoChanged( bs->client );
ai_dmq3.c:	if (bs->inventory[INVENTORY_REDFLAG] > 0) return CTF_FLAG_RED;
ai_dmq3.c:	else if (bs->inventory[INVENTORY_BLUEFLAG] > 0) return CTF_FLAG_BLUE;
ai_dmq3.c:	if (bs->client < 0 || bs->client >= MAX_CLIENTS) {
ai_dmq3.c:	trap_GetConfigstring(CS_PLAYERS+bs->client, info, sizeof(info));
ai_dmq3.c:	if (bs->inventory[INVENTORY_NEUTRALFLAG] > 0) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_REDCUBE] > 0) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_BLUECUBE] > 0) return qtrue;
ai_dmq3.c:	if (!bs->ordered) {
ai_dmq3.c:	bs->lastgoal_decisionmaker = bs->decisionmaker;
ai_dmq3.c:	bs->lastgoal_ltgtype = bs->ltgtype;
ai_dmq3.c:	memcpy(&bs->lastgoal_teamgoal, &bs->teamgoal, sizeof(bot_goal_t));
ai_dmq3.c:	bs->lastgoal_teammate = bs->teammate;
ai_dmq3.c:	switch(bs->ltgtype) {
ai_dmq3.c:			BotEntityInfo(bs->teammate, &entinfo);
ai_dmq3.c:		if ( bs->lastgoal_ltgtype == LTG_RETURNFLAG ) {
ai_dmq3.c:				if ( bs->redflagstatus == 0 ) {
ai_dmq3.c:					bs->lastgoal_ltgtype = 0;
ai_dmq3.c:				if ( bs->blueflagstatus == 0 ) {
ai_dmq3.c:					bs->lastgoal_ltgtype = 0;
ai_dmq3.c:	if ( bs->lastgoal_ltgtype ) {
ai_dmq3.c:		bs->decisionmaker = bs->lastgoal_decisionmaker;
ai_dmq3.c:		bs->ordered = qtrue;
ai_dmq3.c:		bs->ltgtype = bs->lastgoal_ltgtype;
ai_dmq3.c:		memcpy(&bs->teamgoal, &bs->lastgoal_teamgoal, sizeof(bot_goal_t));
ai_dmq3.c:		bs->teammate = bs->lastgoal_teammate;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + 300;
ai_dmq3.c:			if ( bs->ltgtype == LTG_GETFLAG ) {
ai_dmq3.c:				tt = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, tb->areanum, TFL_DEFAULT);
ai_dmq3.c:				et = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, eb->areanum, TFL_DEFAULT);
ai_dmq3.c:	if (!bs->ordered)
ai_dmq3.c:	if ( bs->order_time && bs->order_time > FloatTime() - 10 ) {
ai_dmq3.c:		trap_EA_Action(bs->client, ACTION_NEGATIVE);
ai_dmq3.c:		BotVoiceChat(bs, bs->decisionmaker, VOICECHAT_NO);
ai_dmq3.c:		bs->order_time = 0;
ai_dmq3.c:		if (bs->ltgtype != LTG_RUSHBASE) {
ai_dmq3.c:			bs->ltgtype = LTG_RUSHBASE;
ai_dmq3.c:			bs->teamgoal_time = FloatTime() + CTF_RUSHBASE_TIME;
ai_dmq3.c:			bs->rushbaseaway_time = 0;
ai_dmq3.c:			bs->decisionmaker = bs->client;
ai_dmq3.c:			bs->ordered = qfalse;
ai_dmq3.c:				case TEAM_RED: VectorSubtract(bs->origin, ctf_blueflag.origin, dir); break;
ai_dmq3.c:				case TEAM_BLUE: VectorSubtract(bs->origin, ctf_redflag.origin, dir); break;
ai_dmq3.c:				bs->altroutegoal.areanum = 0;
ai_dmq3.c:		else if (bs->rushbaseaway_time > FloatTime()) {
ai_dmq3.c:			if (BotTeam(bs) == TEAM_RED) flagstatus = bs->redflagstatus;
ai_dmq3.c:			else flagstatus = bs->blueflagstatus;
ai_dmq3.c:				bs->rushbaseaway_time = 0;
ai_dmq3.c:	if ( bs->ltgtype == LTG_TEAMACCOMPANY && !bs->ordered ) {
ai_dmq3.c:		BotEntityInfo(bs->teammate, &entinfo);
ai_dmq3.c:			bs->ltgtype = 0;
ai_dmq3.c:	if (BotTeam(bs) == TEAM_RED) flagstatus = bs->redflagstatus * 2 + bs->blueflagstatus;
ai_dmq3.c:	else flagstatus = bs->blueflagstatus * 2 + bs->redflagstatus;
ai_dmq3.c:		if (bs->owndecision_time < FloatTime()) {
ai_dmq3.c:			if (!(bs->ltgtype == LTG_DEFENDKEYAREA &&
ai_dmq3.c:					(bs->teamgoal.number == ctf_redflag.number ||
ai_dmq3.c:					bs->teamgoal.number == ctf_blueflag.number))) {
ai_dmq3.c:						(bs->ltgtype != LTG_TEAMACCOMPANY || bs->teammate != c)) {
ai_dmq3.c:					bs->decisionmaker = bs->client;
ai_dmq3.c:					bs->ordered = qfalse;
ai_dmq3.c:					bs->teammate = c;
ai_dmq3.c:					bs->teammatevisible_time = FloatTime();
ai_dmq3.c:					bs->teammessage_time = 0;
ai_dmq3.c:					bs->arrive_time = 1;
ai_dmq3.c:					BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
ai_dmq3.c:					bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
ai_dmq3.c:					bs->ltgtype = LTG_TEAMACCOMPANY;
ai_dmq3.c:					bs->formation_dist = 3.5 * 32;		//3.5 meter
ai_dmq3.c:					bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:		if (bs->owndecision_time < FloatTime()) {
ai_dmq3.c:			if (bs->ltgtype != LTG_GETFLAG &&
ai_dmq3.c:				bs->ltgtype != LTG_RETURNFLAG &&
ai_dmq3.c:				bs->ltgtype != LTG_TEAMHELP &&
ai_dmq3.c:				bs->ltgtype != LTG_TEAMACCOMPANY &&
ai_dmq3.c:				bs->ltgtype != LTG_CAMPORDER &&
ai_dmq3.c:				bs->ltgtype != LTG_PATROL &&
ai_dmq3.c:				bs->ltgtype != LTG_GETITEM) {
ai_dmq3.c:				bs->decisionmaker = bs->client;
ai_dmq3.c:				bs->ordered = qfalse;
ai_dmq3.c:					bs->ltgtype = LTG_GETFLAG;
ai_dmq3.c:					bs->ltgtype = LTG_RETURNFLAG;
ai_dmq3.c:				bs->teammessage_time = 0;
ai_dmq3.c:				bs->teamgoal_time = FloatTime() + CTF_GETFLAG_TIME;
ai_dmq3.c:				bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:		if (bs->owndecision_time < FloatTime()) {
ai_dmq3.c:			if ( bs->ltgtype != LTG_RETURNFLAG && bs->ltgtype != LTG_TEAMACCOMPANY ) {
ai_dmq3.c:					bs->decisionmaker = bs->client;
ai_dmq3.c:					bs->ordered = qfalse;
ai_dmq3.c:					bs->teammate = c;
ai_dmq3.c:					bs->teammatevisible_time = FloatTime();
ai_dmq3.c:					bs->teammessage_time = 0;
ai_dmq3.c:					bs->arrive_time = 1;
ai_dmq3.c:					BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
ai_dmq3.c:					bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
ai_dmq3.c:					bs->ltgtype = LTG_TEAMACCOMPANY;
ai_dmq3.c:					bs->formation_dist = 3.5 * 32;		//3.5 meter
ai_dmq3.c:					bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:					bs->decisionmaker = bs->client;
ai_dmq3.c:					bs->ordered = qfalse;
ai_dmq3.c:					bs->teammessage_time = FloatTime() + 2 * random();
ai_dmq3.c:					bs->ltgtype = LTG_RETURNFLAG;
ai_dmq3.c:					bs->teamgoal_time = FloatTime() + CTF_RETURNFLAG_TIME;
ai_dmq3.c:					bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:	if ( bs->lastgoal_ltgtype ) {
ai_dmq3.c:		bs->teamgoal_time += 60;
ai_dmq3.c:	if ( !bs->ordered && bs->lastgoal_ltgtype ) {
ai_dmq3.c:		bs->ltgtype = 0;
ai_dmq3.c:	if (bs->ltgtype == LTG_TEAMHELP ||
ai_dmq3.c:			bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_dmq3.c:			bs->ltgtype == LTG_DEFENDKEYAREA ||
ai_dmq3.c:			bs->ltgtype == LTG_GETFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_RUSHBASE ||
ai_dmq3.c:			bs->ltgtype == LTG_RETURNFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_CAMPORDER ||
ai_dmq3.c:			bs->ltgtype == LTG_PATROL ||
ai_dmq3.c:			bs->ltgtype == LTG_GETITEM ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_UNDER ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_ONTOP) {
ai_dmq3.c:	if (bs->owndecision_time > FloatTime())
ai_dmq3.c:	if (bs->ctfroam_time > FloatTime())
ai_dmq3.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_dmq3.c:	if (bs->teamtaskpreference & (TEAMTP_ATTACKER|TEAMTP_DEFENDER)) {
ai_dmq3.c:		if (bs->teamtaskpreference & TEAMTP_ATTACKER) {
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		bs->ltgtype = LTG_GETFLAG;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + CTF_GETFLAG_TIME;
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &ctf_redflag, sizeof(bot_goal_t));
ai_dmq3.c:		else memcpy(&bs->teamgoal, &ctf_blueflag, sizeof(bot_goal_t));
ai_dmq3.c:		bs->ltgtype = LTG_DEFENDKEYAREA;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + TEAM_DEFENDKEYAREA_TIME;
ai_dmq3.c:		bs->defendaway_time = 0;
ai_dmq3.c:		bs->ltgtype = 0;
ai_dmq3.c:		bs->ctfroam_time = FloatTime() + CTF_ROAM_TIME;
ai_dmq3.c:	bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:		if (bs->ltgtype != LTG_RUSHBASE) {
ai_dmq3.c:			bs->ltgtype = LTG_RUSHBASE;
ai_dmq3.c:			bs->teamgoal_time = FloatTime() + CTF_RUSHBASE_TIME;
ai_dmq3.c:			bs->rushbaseaway_time = 0;
ai_dmq3.c:			bs->decisionmaker = bs->client;
ai_dmq3.c:			bs->ordered = qfalse;
ai_dmq3.c:		if (bs->ltgtype != LTG_RUSHBASE) {
ai_dmq3.c:			bs->ltgtype = LTG_RUSHBASE;
ai_dmq3.c:			bs->teamgoal_time = FloatTime() + CTF_RUSHBASE_TIME;
ai_dmq3.c:			bs->rushbaseaway_time = 0;
ai_dmq3.c:			bs->decisionmaker = bs->client;
ai_dmq3.c:			bs->ordered = qfalse;
ai_dmq3.c:	if ( bs->ltgtype == LTG_TEAMACCOMPANY && !bs->ordered ) {
ai_dmq3.c:		BotEntityInfo(bs->teammate, &entinfo);
ai_dmq3.c:			bs->ltgtype = 0;
ai_dmq3.c:	if (bs->neutralflagstatus == 1) {
ai_dmq3.c:		if (bs->owndecision_time < FloatTime()) {
ai_dmq3.c:			if (bs->ltgtype != LTG_TEAMACCOMPANY) {
ai_dmq3.c:					bs->decisionmaker = bs->client;
ai_dmq3.c:					bs->ordered = qfalse;
ai_dmq3.c:					bs->teammate = c;
ai_dmq3.c:					bs->teammatevisible_time = FloatTime();
ai_dmq3.c:					bs->teammessage_time = 0;
ai_dmq3.c:					bs->arrive_time = 1;
ai_dmq3.c:					BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
ai_dmq3.c:					bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
ai_dmq3.c:					bs->ltgtype = LTG_TEAMACCOMPANY;
ai_dmq3.c:					bs->formation_dist = 3.5 * 32;		//3.5 meter
ai_dmq3.c:					bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:			if (bs->ltgtype == LTG_TEAMHELP ||
ai_dmq3.c:					bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_dmq3.c:					bs->ltgtype == LTG_DEFENDKEYAREA ||
ai_dmq3.c:					bs->ltgtype == LTG_GETFLAG ||
ai_dmq3.c:					bs->ltgtype == LTG_RUSHBASE ||
ai_dmq3.c:					bs->ltgtype == LTG_CAMPORDER ||
ai_dmq3.c:					bs->ltgtype == LTG_PATROL ||
ai_dmq3.c:					bs->ltgtype == LTG_ATTACKENEMYBASE ||
ai_dmq3.c:					bs->ltgtype == LTG_GETITEM ||
ai_dmq3.c:					bs->ltgtype == LTG_MAKELOVE_UNDER ||
ai_dmq3.c:					bs->ltgtype == LTG_MAKELOVE_ONTOP) {
ai_dmq3.c:			if (bs->ltgtype != LTG_ATTACKENEMYBASE) {
ai_dmq3.c:				bs->decisionmaker = bs->client;
ai_dmq3.c:				bs->ordered = qfalse;
ai_dmq3.c:				if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &ctf_blueflag, sizeof(bot_goal_t));
ai_dmq3.c:				else memcpy(&bs->teamgoal, &ctf_redflag, sizeof(bot_goal_t));
ai_dmq3.c:				bs->ltgtype = LTG_ATTACKENEMYBASE;
ai_dmq3.c:				bs->teamgoal_time = FloatTime() + TEAM_ATTACKENEMYBASE_TIME;
ai_dmq3.c:				bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:	else if (bs->neutralflagstatus == 2) {
ai_dmq3.c:		if (bs->owndecision_time < FloatTime()) {
ai_dmq3.c:			if (bs->ltgtype == LTG_TEAMHELP ||
ai_dmq3.c:					bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_dmq3.c:					bs->ltgtype == LTG_CAMPORDER ||
ai_dmq3.c:					bs->ltgtype == LTG_PATROL ||
ai_dmq3.c:					bs->ltgtype == LTG_GETITEM) {
ai_dmq3.c:			if (bs->ltgtype != LTG_DEFENDKEYAREA) {
ai_dmq3.c:				bs->decisionmaker = bs->client;
ai_dmq3.c:				bs->ordered = qfalse;
ai_dmq3.c:				if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &ctf_redflag, sizeof(bot_goal_t));
ai_dmq3.c:				else memcpy(&bs->teamgoal, &ctf_blueflag, sizeof(bot_goal_t));
ai_dmq3.c:				bs->ltgtype = LTG_DEFENDKEYAREA;
ai_dmq3.c:				bs->teamgoal_time = FloatTime() + TEAM_DEFENDKEYAREA_TIME;
ai_dmq3.c:				bs->defendaway_time = 0;
ai_dmq3.c:				bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:	if ( bs->lastgoal_ltgtype ) {
ai_dmq3.c:		bs->teamgoal_time += 60;
ai_dmq3.c:	if ( !bs->ordered && bs->lastgoal_ltgtype ) {
ai_dmq3.c:		bs->ltgtype = 0;
ai_dmq3.c:	if (bs->ltgtype == LTG_TEAMHELP ||
ai_dmq3.c:			bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_dmq3.c:			bs->ltgtype == LTG_DEFENDKEYAREA ||
ai_dmq3.c:			bs->ltgtype == LTG_GETFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_RUSHBASE ||
ai_dmq3.c:			bs->ltgtype == LTG_RETURNFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_CAMPORDER ||
ai_dmq3.c:			bs->ltgtype == LTG_PATROL ||
ai_dmq3.c:			bs->ltgtype == LTG_ATTACKENEMYBASE ||
ai_dmq3.c:			bs->ltgtype == LTG_GETITEM ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_UNDER ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_ONTOP) {
ai_dmq3.c:	if (bs->owndecision_time > FloatTime())
ai_dmq3.c:	if (bs->ctfroam_time > FloatTime())
ai_dmq3.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_dmq3.c:	if (bs->teamtaskpreference & (TEAMTP_ATTACKER|TEAMTP_DEFENDER)) {
ai_dmq3.c:		if (bs->teamtaskpreference & TEAMTP_ATTACKER) {
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		bs->ltgtype = LTG_GETFLAG;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + CTF_GETFLAG_TIME;
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &ctf_redflag, sizeof(bot_goal_t));
ai_dmq3.c:		else memcpy(&bs->teamgoal, &ctf_blueflag, sizeof(bot_goal_t));
ai_dmq3.c:		bs->ltgtype = LTG_DEFENDKEYAREA;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + TEAM_DEFENDKEYAREA_TIME;
ai_dmq3.c:		bs->defendaway_time = 0;
ai_dmq3.c:		bs->ltgtype = 0;
ai_dmq3.c:		bs->ctfroam_time = FloatTime() + CTF_ROAM_TIME;
ai_dmq3.c:	bs->owndecision_time = FloatTime() + 5;
ai_dmq3.c:		if (bs->ltgtype != LTG_RUSHBASE) {
ai_dmq3.c:			bs->ltgtype = LTG_RUSHBASE;
ai_dmq3.c:			bs->teamgoal_time = FloatTime() + CTF_RUSHBASE_TIME;
ai_dmq3.c:			bs->rushbaseaway_time = 0;
ai_dmq3.c:			bs->decisionmaker = bs->client;
ai_dmq3.c:			bs->ordered = qfalse;
ai_dmq3.c:	if ( bs->lastgoal_ltgtype ) {
ai_dmq3.c:		bs->teamgoal_time += 60;
ai_dmq3.c:	if (bs->ltgtype == LTG_TEAMHELP ||
ai_dmq3.c:			bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_dmq3.c:			bs->ltgtype == LTG_DEFENDKEYAREA ||
ai_dmq3.c:			bs->ltgtype == LTG_GETFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_RUSHBASE ||
ai_dmq3.c:			bs->ltgtype == LTG_RETURNFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_CAMPORDER ||
ai_dmq3.c:			bs->ltgtype == LTG_PATROL ||
ai_dmq3.c:			bs->ltgtype == LTG_ATTACKENEMYBASE ||
ai_dmq3.c:			bs->ltgtype == LTG_GETITEM ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_UNDER ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_ONTOP) {
ai_dmq3.c:	if (bs->ctfroam_time > FloatTime())
ai_dmq3.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_dmq3.c:	if (bs->teamtaskpreference & (TEAMTP_ATTACKER|TEAMTP_DEFENDER)) {
ai_dmq3.c:		if (bs->teamtaskpreference & TEAMTP_ATTACKER) {
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &blueobelisk, sizeof(bot_goal_t));
ai_dmq3.c:		else memcpy(&bs->teamgoal, &redobelisk, sizeof(bot_goal_t));
ai_dmq3.c:		bs->ltgtype = LTG_ATTACKENEMYBASE;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + TEAM_ATTACKENEMYBASE_TIME;
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &redobelisk, sizeof(bot_goal_t));
ai_dmq3.c:		else memcpy(&bs->teamgoal, &blueobelisk, sizeof(bot_goal_t));
ai_dmq3.c:		bs->ltgtype = LTG_DEFENDKEYAREA;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + TEAM_DEFENDKEYAREA_TIME;
ai_dmq3.c:		bs->defendaway_time = 0;
ai_dmq3.c:		bs->ltgtype = 0;
ai_dmq3.c:		bs->ctfroam_time = FloatTime() + CTF_ROAM_TIME;
ai_dmq3.c:	if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &blueobelisk, sizeof(bot_goal_t));
ai_dmq3.c:	else memcpy(&bs->teamgoal, &redobelisk, sizeof(bot_goal_t));
ai_dmq3.c:	bs->ltgtype = LTG_HARVEST;
ai_dmq3.c:	bs->teamgoal_time = FloatTime() + TEAM_HARVEST_TIME;
ai_dmq3.c:	bs->harvestaway_time = 0;
ai_dmq3.c:		if (bs->ltgtype != LTG_RUSHBASE) {
ai_dmq3.c:			bs->ltgtype = LTG_RUSHBASE;
ai_dmq3.c:			bs->teamgoal_time = FloatTime() + CTF_RUSHBASE_TIME;
ai_dmq3.c:			bs->rushbaseaway_time = 0;
ai_dmq3.c:			bs->decisionmaker = bs->client;
ai_dmq3.c:			bs->ordered = qfalse;
ai_dmq3.c:	if ( bs->ltgtype == LTG_TEAMACCOMPANY && !bs->ordered ) {
ai_dmq3.c:		BotEntityInfo(bs->teammate, &entinfo);
ai_dmq3.c:			bs->ltgtype = 0;
ai_dmq3.c:	if ( bs->lastgoal_ltgtype ) {
ai_dmq3.c:		bs->teamgoal_time += 60;
ai_dmq3.c:	if (bs->ltgtype == LTG_TEAMHELP ||
ai_dmq3.c:			bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_dmq3.c:			bs->ltgtype == LTG_DEFENDKEYAREA ||
ai_dmq3.c:			bs->ltgtype == LTG_GETFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_CAMPORDER ||
ai_dmq3.c:			bs->ltgtype == LTG_PATROL ||
ai_dmq3.c:			bs->ltgtype == LTG_ATTACKENEMYBASE ||
ai_dmq3.c:			bs->ltgtype == LTG_HARVEST ||
ai_dmq3.c:			bs->ltgtype == LTG_GETITEM ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_UNDER ||
ai_dmq3.c:			bs->ltgtype == LTG_MAKELOVE_ONTOP) {
ai_dmq3.c:	if (bs->ctfroam_time > FloatTime())
ai_dmq3.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_dmq3.c:	if (bs->ltgtype != LTG_TEAMACCOMPANY) {
ai_dmq3.c:			bs->decisionmaker = bs->client;
ai_dmq3.c:			bs->ordered = qfalse;
ai_dmq3.c:			bs->teammate = c;
ai_dmq3.c:			bs->teammatevisible_time = FloatTime();
ai_dmq3.c:			bs->teammessage_time = 0;
ai_dmq3.c:			bs->arrive_time = 1;
ai_dmq3.c:			BotVoiceChat(bs, bs->teammate, VOICECHAT_ONFOLLOW);
ai_dmq3.c:			bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
ai_dmq3.c:			bs->ltgtype = LTG_TEAMACCOMPANY;
ai_dmq3.c:			bs->formation_dist = 3.5 * 32;		//3.5 meter
ai_dmq3.c:	if (bs->teamtaskpreference & (TEAMTP_ATTACKER|TEAMTP_DEFENDER)) {
ai_dmq3.c:		if (bs->teamtaskpreference & TEAMTP_ATTACKER) {
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		bs->decisionmaker = bs->client;
ai_dmq3.c:		bs->ordered = qfalse;
ai_dmq3.c:		if (BotTeam(bs) == TEAM_RED) memcpy(&bs->teamgoal, &redobelisk, sizeof(bot_goal_t));
ai_dmq3.c:		else memcpy(&bs->teamgoal, &blueobelisk, sizeof(bot_goal_t));
ai_dmq3.c:		bs->ltgtype = LTG_DEFENDKEYAREA;
ai_dmq3.c:		bs->teamgoal_time = FloatTime() + TEAM_DEFENDKEYAREA_TIME;
ai_dmq3.c:		bs->defendaway_time = 0;
ai_dmq3.c:		bs->ltgtype = 0;
ai_dmq3.c:		bs->ctfroam_time = FloatTime() + CTF_ROAM_TIME;
ai_dmq3.c:		if (bs->ltgtype != LTG_RUSHBASE) {
ai_dmq3.c:			bs->ltgtype = LTG_RUSHBASE;
ai_dmq3.c:			bs->teamgoal_time = FloatTime() + CTF_RUSHBASE_TIME;
ai_dmq3.c:			bs->rushbaseaway_time = 0;
ai_dmq3.c:			bs->decisionmaker = bs->client;
ai_dmq3.c:			bs->ordered = qfalse;
ai_dmq3.c:	bs->order_time = 0;
ai_dmq3.c:	if (bs->cur_ps.weaponstate == WEAPON_RAISING ||
ai_dmq3.c:			bs->cur_ps.weaponstate == WEAPON_DROPPING) {
ai_dmq3.c:		trap_EA_SelectWeapon(bs->client, bs->weaponnum);
ai_dmq3.c:		newweaponnum = trap_BotChooseBestFightWeapon(bs->ws, bs->inventory);
ai_dmq3.c:		if (bs->weaponnum != newweaponnum) bs->weaponchange_time = FloatTime();
ai_dmq3.c:		bs->weaponnum = newweaponnum;
ai_dmq3.c:		//BotAI_Print(PRT_MESSAGE, "bs->weaponnum = %d\n", bs->weaponnum);
ai_dmq3.c:		trap_EA_SelectWeapon(bs->client, bs->weaponnum);
ai_dmq3.c:	VectorCopy(bs->cur_ps.origin, initmove.origin);
ai_dmq3.c:	VectorCopy(bs->cur_ps.velocity, initmove.velocity);
ai_dmq3.c:	initmove.viewoffset[2] += bs->cur_ps.viewheight;
ai_dmq3.c:	initmove.entitynum = bs->entitynum;
ai_dmq3.c:	initmove.client = bs->client;
ai_dmq3.c:	initmove.thinktime = bs->thinktime;
ai_dmq3.c:	if (bs->cur_ps.groundEntityNum != ENTITYNUM_NONE) initmove.or_moveflags |= MFL_ONGROUND;
ai_dmq3.c:	if ((bs->cur_ps.pm_flags & PMF_TIME_KNOCKBACK) && (bs->cur_ps.pm_time > 0)) {
ai_dmq3.c:	if ((bs->cur_ps.pm_flags & PMF_TIME_WATERJUMP) && (bs->cur_ps.pm_time > 0)) {
ai_dmq3.c:	if (bs->cur_ps.pm_flags & PMF_DUCKED) initmove.presencetype = PRESENCE_CROUCH;
ai_dmq3.c:	if (bs->walker > 0.5) initmove.or_moveflags |= MFL_WALK;
ai_dmq3.c:	VectorCopy(bs->viewangles, initmove.viewangles);
ai_dmq3.c:	trap_BotInitMoveState(bs->ms, &initmove);
ai_dmq3.c:	if (!oldinventory[INVENTORY_KAMIKAZE] && bs->inventory[INVENTORY_KAMIKAZE] >= 1) {
ai_dmq3.c:	if (!oldinventory[INVENTORY_INVULNERABILITY] && bs->inventory[INVENTORY_INVULNERABILITY] >= 1) {
ai_dmq3.c:	if (!bs->inventory[INVENTORY_KAMIKAZE] && !bs->inventory[INVENTORY_INVULNERABILITY]) {
ai_dmq3.c:		if (!oldinventory[INVENTORY_SCOUT] && bs->inventory[INVENTORY_SCOUT] >= 1) {
ai_dmq3.c:		if (!oldinventory[INVENTORY_GUARD] && bs->inventory[INVENTORY_GUARD] >= 1) {
ai_dmq3.c:		if (!oldinventory[INVENTORY_DOUBLER] && bs->inventory[INVENTORY_DOUBLER] >= 1) {
ai_dmq3.c:		if (!oldinventory[INVENTORY_AMMOREGEN] && bs->inventory[INVENTORY_AMMOREGEN] >= 1) {
ai_dmq3.c:		leader = ClientFromName(bs->teamleader);
ai_dmq3.c:			if (!(bs->teamtaskpreference & TEAMTP_ATTACKER)) {
ai_dmq3.c:					//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
ai_dmq3.c:					if ( bs->ltgtype != LTG_GETFLAG &&
ai_dmq3.c:						 bs->ltgtype != LTG_ATTACKENEMYBASE &&
ai_dmq3.c:						 bs->ltgtype != LTG_HARVEST ) {
ai_dmq3.c:						if ((gametype != GT_CTF || (bs->redflagstatus == 0 && bs->blueflagstatus == 0)) &&
ai_dmq3.c:							(gametype != GT_1FCTF || bs->neutralflagstatus == 0) ) {
ai_dmq3.c:							//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
ai_dmq3.c:					bs->teamtaskpreference |= TEAMTP_ATTACKER;
ai_dmq3.c:			bs->teamtaskpreference &= ~TEAMTP_DEFENDER;
ai_dmq3.c:			if (!(bs->teamtaskpreference & TEAMTP_DEFENDER)) {
ai_dmq3.c:					//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
ai_dmq3.c:					if ( bs->ltgtype != LTG_DEFENDKEYAREA ) {
ai_dmq3.c:						if ((gametype != GT_CTF || (bs->redflagstatus == 0 && bs->blueflagstatus == 0)) &&
ai_dmq3.c:							(gametype != GT_1FCTF || bs->neutralflagstatus == 0) ) {
ai_dmq3.c:							//trap_BotEnterChat(bs->cs, leader, CHAT_TELL);
ai_dmq3.c:				bs->teamtaskpreference |= TEAMTP_DEFENDER;
ai_dmq3.c:			bs->teamtaskpreference &= ~TEAMTP_ATTACKER;
ai_dmq3.c:	memcpy(oldinventory, bs->inventory, sizeof(oldinventory));
ai_dmq3.c:	bs->inventory[INVENTORY_ARMOR] = bs->cur_ps.stats[STAT_ARMOR];
ai_dmq3.c:	bs->inventory[INVENTORY_GAUNTLET] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_GAUNTLET)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_SHOTGUN] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_SHOTGUN)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_MACHINEGUN] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_MACHINEGUN)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_GRENADELAUNCHER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_GRENADE_LAUNCHER)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_ROCKETLAUNCHER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_ROCKET_LAUNCHER)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_LIGHTNING] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_LIGHTNING)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_RAILGUN] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_RAILGUN)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_PLASMAGUN] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_PLASMAGUN)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_BFG10K] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_BFG)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_GRAPPLINGHOOK] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_GRAPPLING_HOOK)) != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_NAILGUN] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_NAILGUN)) != 0;;
ai_dmq3.c:	bs->inventory[INVENTORY_PROXLAUNCHER] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_PROX_LAUNCHER)) != 0;;
ai_dmq3.c:	bs->inventory[INVENTORY_CHAINGUN] = (bs->cur_ps.stats[STAT_WEAPONS] & (1 << WP_CHAINGUN)) != 0;;
ai_dmq3.c:	bs->inventory[INVENTORY_SHELLS] = bs->cur_ps.ammo[WP_SHOTGUN];
ai_dmq3.c:	bs->inventory[INVENTORY_BULLETS] = bs->cur_ps.ammo[WP_MACHINEGUN];
ai_dmq3.c:	bs->inventory[INVENTORY_GRENADES] = bs->cur_ps.ammo[WP_GRENADE_LAUNCHER];
ai_dmq3.c:	bs->inventory[INVENTORY_CELLS] = bs->cur_ps.ammo[WP_PLASMAGUN];
ai_dmq3.c:	bs->inventory[INVENTORY_LIGHTNINGAMMO] = bs->cur_ps.ammo[WP_LIGHTNING];
ai_dmq3.c:	bs->inventory[INVENTORY_ROCKETS] = bs->cur_ps.ammo[WP_ROCKET_LAUNCHER];
ai_dmq3.c:	bs->inventory[INVENTORY_SLUGS] = bs->cur_ps.ammo[WP_RAILGUN];
ai_dmq3.c:	bs->inventory[INVENTORY_BFGAMMO] = bs->cur_ps.ammo[WP_BFG];
ai_dmq3.c:	bs->inventory[INVENTORY_NAILS] = bs->cur_ps.ammo[WP_NAILGUN];
ai_dmq3.c:	bs->inventory[INVENTORY_MINES] = bs->cur_ps.ammo[WP_PROX_LAUNCHER];
ai_dmq3.c:	bs->inventory[INVENTORY_BELT] = bs->cur_ps.ammo[WP_CHAINGUN];
ai_dmq3.c:	bs->inventory[INVENTORY_HEALTH] = bs->cur_ps.stats[STAT_HEALTH];
ai_dmq3.c:	bs->inventory[INVENTORY_TELEPORTER] = bs->cur_ps.stats[STAT_HOLDABLE_ITEM] == MODELINDEX_TELEPORTER;
ai_dmq3.c:	bs->inventory[INVENTORY_MEDKIT] = bs->cur_ps.stats[STAT_HOLDABLE_ITEM] == MODELINDEX_MEDKIT;
ai_dmq3.c:	bs->inventory[INVENTORY_KAMIKAZE] = bs->cur_ps.stats[STAT_HOLDABLE_ITEM] == MODELINDEX_KAMIKAZE;
ai_dmq3.c:	bs->inventory[INVENTORY_PORTAL] = bs->cur_ps.stats[STAT_HOLDABLE_ITEM] == MODELINDEX_PORTAL;
ai_dmq3.c:	bs->inventory[INVENTORY_INVULNERABILITY] = bs->cur_ps.stats[STAT_HOLDABLE_ITEM] == MODELINDEX_INVULNERABILITY;
ai_dmq3.c:	bs->inventory[INVENTORY_QUAD] = bs->cur_ps.powerups[PW_QUAD] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_ENVIRONMENTSUIT] = bs->cur_ps.powerups[PW_BATTLESUIT] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_HASTE] = bs->cur_ps.powerups[PW_HASTE] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_INVISIBILITY] = bs->cur_ps.powerups[PW_INVIS] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_REGEN] = bs->cur_ps.powerups[PW_REGEN] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_FLIGHT] = bs->cur_ps.powerups[PW_FLIGHT] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_SCOUT] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_SCOUT;
ai_dmq3.c:	bs->inventory[INVENTORY_GUARD] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_GUARD;
ai_dmq3.c:	bs->inventory[INVENTORY_DOUBLER] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_DOUBLER;
ai_dmq3.c:	bs->inventory[INVENTORY_AMMOREGEN] = bs->cur_ps.stats[STAT_PERSISTANT_POWERUP] == MODELINDEX_AMMOREGEN;
ai_dmq3.c:	bs->inventory[INVENTORY_REDFLAG] = bs->cur_ps.powerups[PW_REDFLAG] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_BLUEFLAG] = bs->cur_ps.powerups[PW_BLUEFLAG] != 0;
ai_dmq3.c:	bs->inventory[INVENTORY_NEUTRALFLAG] = bs->cur_ps.powerups[PW_NEUTRALFLAG] != 0;
ai_dmq3.c:		bs->inventory[INVENTORY_REDCUBE] = bs->cur_ps.generic1;
ai_dmq3.c:		bs->inventory[INVENTORY_BLUECUBE] = 0;
ai_dmq3.c:		bs->inventory[INVENTORY_REDCUBE] = 0;
ai_dmq3.c:		bs->inventory[INVENTORY_BLUECUBE] = bs->cur_ps.generic1;
ai_dmq3.c:	VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:	bs->inventory[ENEMY_HEIGHT] = (int) dir[2];
ai_dmq3.c:	bs->inventory[ENEMY_HORIZONTAL_DIST] = (int) VectorLength(dir);
ai_dmq3.c:	if (bs->inventory[INVENTORY_KAMIKAZE] <= 0)
ai_dmq3.c:	if (bs->kamikaze_time > FloatTime())
ai_dmq3.c:	bs->kamikaze_time = FloatTime() + 0.2;
ai_dmq3.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:		VectorSubtract(bs->origin, target, dir);
ai_dmq3.c:			BotAI_Trace(&trace, bs->eye, NULL, NULL, target, bs->client, CONTENTS_SOLID);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:			VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:		trap_EA_Use(bs->client);
ai_dmq3.c:	if (bs->inventory[INVENTORY_INVULNERABILITY] <= 0)
ai_dmq3.c:	if (bs->invulnerability_time > FloatTime())
ai_dmq3.c:	bs->invulnerability_time = FloatTime() + 0.2;
ai_dmq3.c:		VectorSubtract(bs->origin, target, dir);
ai_dmq3.c:			BotAI_Trace(&trace, bs->eye, NULL, NULL, target, bs->client, CONTENTS_SOLID);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:		VectorSubtract(bs->origin, target, dir);
ai_dmq3.c:			BotAI_Trace(&trace, bs->eye, NULL, NULL, target, bs->client, CONTENTS_SOLID);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:		VectorSubtract(bs->origin, target, dir);
ai_dmq3.c:			BotAI_Trace(&trace, bs->eye, NULL, NULL, target, bs->client, CONTENTS_SOLID);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:		VectorSubtract(bs->origin, target, dir);
ai_dmq3.c:			BotAI_Trace(&trace, bs->eye, NULL, NULL, target, bs->client, CONTENTS_SOLID);
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 40) {
ai_dmq3.c:		if (bs->inventory[INVENTORY_TELEPORTER] > 0) {
ai_dmq3.c:				trap_EA_Use(bs->client);
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 60) {
ai_dmq3.c:		if (bs->inventory[INVENTORY_MEDKIT] > 0) {
ai_dmq3.c:			trap_EA_Use(bs->client);
ai_dmq3.c:	if ((bs->cur_ps.eFlags ^ bs->last_eFlags) & EF_TELEPORT_BIT) {
ai_dmq3.c:		bs->teleport_time = FloatTime();
ai_dmq3.c:	bs->last_eFlags = bs->cur_ps.eFlags;
ai_dmq3.c:	return (bs->cur_ps.pm_type == PM_DEAD);
ai_dmq3.c:	if (bs->cur_ps.pm_type == PM_SPECTATOR) return qtrue;
ai_dmq3.c:	trap_GetConfigstring(CS_PLAYERS+bs->client, buf, sizeof(buf));
ai_dmq3.c:	return (bs->cur_ps.pm_type == PM_FREEZE || bs->cur_ps.pm_type == PM_INTERMISSION);
ai_dmq3.c:	VectorCopy(bs->origin, feet);
ai_dmq3.c:	if (bs->inventory[INVENTORY_QUAD]) {
ai_dmq3.c:		if (bs->weaponnum != WP_GAUNTLET ||
ai_dmq3.c:			bs->inventory[ENEMY_HORIZONTAL_DIST] < 80) {
ai_dmq3.c:	if (bs->inventory[ENEMY_HEIGHT] > 200) return 0;
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 60) return 0;
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 80) {
ai_dmq3.c:		if (bs->inventory[INVENTORY_ARMOR] < 40) return 0;
ai_dmq3.c:	if (bs->inventory[INVENTORY_BFG10K] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_BFGAMMO] > 7) return 100;
ai_dmq3.c:	if (bs->inventory[INVENTORY_RAILGUN] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_SLUGS] > 5) return 95;
ai_dmq3.c:	if (bs->inventory[INVENTORY_LIGHTNING] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_LIGHTNINGAMMO] > 50) return 90;
ai_dmq3.c:	if (bs->inventory[INVENTORY_ROCKETLAUNCHER] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_ROCKETS] > 5) return 90;
ai_dmq3.c:	if (bs->inventory[INVENTORY_PLASMAGUN] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_CELLS] > 40) return 85;
ai_dmq3.c:	if (bs->inventory[INVENTORY_GRENADELAUNCHER] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_GRENADES] > 10) return 80;
ai_dmq3.c:	if (bs->inventory[INVENTORY_SHOTGUN] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_SHELLS] > 10) return 50;
ai_dmq3.c:	if (bs->weaponnum == WP_GAUNTLET) {
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 40) {
ai_dmq3.c:	if (bs->weaponnum == WP_MACHINEGUN) {
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 60) {
ai_dmq3.c:		if (bs->ltgtype == LTG_ATTACKENEMYBASE) {
ai_dmq3.c:			if (bs->enemy != redobelisk.entitynum ||
ai_dmq3.c:						bs->enemy != blueobelisk.entitynum) {
ai_dmq3.c:	if (bs->enemy >= 0) {
ai_dmq3.c:		BotEntityInfo(bs->enemy, &entinfo);
ai_dmq3.c:	if (bs->ltgtype == LTG_GETFLAG)
ai_dmq3.c:		BotEntityInfo(bs->enemy, &entinfo);
ai_dmq3.c:		BotEntityInfo(bs->enemy, &entinfo);
ai_dmq3.c:		if (bs->ltgtype == LTG_ATTACKENEMYBASE) {
ai_dmq3.c:			if (bs->enemy != redobelisk.entitynum ||
ai_dmq3.c:						bs->enemy != blueobelisk.entitynum) {
ai_dmq3.c:	if (bs->ltgtype == LTG_GETFLAG)
ai_dmq3.c:	if (bs->inventory[INVENTORY_ROCKETLAUNCHER] <= 0) return qfalse;
ai_dmq3.c:	if (bs->inventory[INVENTORY_ROCKETS] < 3) return qfalse;
ai_dmq3.c:	if (bs->inventory[INVENTORY_QUAD]) return qfalse;
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 60) return qfalse;
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 90) {
ai_dmq3.c:		if (bs->inventory[INVENTORY_ARMOR] < 40) return qfalse;
ai_dmq3.c:	rocketjumper = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_WEAPONJUMPING, 0, 1);
ai_dmq3.c:	if (!bs->inventory[INVENTORY_SCOUT] &&
ai_dmq3.c:		!bs->inventory[INVENTORY_GUARD] &&
ai_dmq3.c:		!bs->inventory[INVENTORY_DOUBLER] &&
ai_dmq3.c:		!bs->inventory[INVENTORY_AMMOREGEN] ) {
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 60) return qfalse;
ai_dmq3.c:	if (bs->inventory[INVENTORY_HEALTH] < 80) {
ai_dmq3.c:		if (bs->inventory[INVENTORY_ARMOR] < 40) return qfalse;
ai_dmq3.c:	if (bs->inventory[INVENTORY_BFG10K] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_BFGAMMO] > 7) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_RAILGUN] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_SLUGS] > 5) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_LIGHTNING] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_LIGHTNINGAMMO] > 50) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_ROCKETLAUNCHER] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_ROCKETS] > 5) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_NAILGUN] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_NAILS] > 5) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_PROXLAUNCHER] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_MINES] > 5) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_CHAINGUN] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_BELT] > 40) return qtrue;
ai_dmq3.c:	if (bs->inventory[INVENTORY_PLASMAGUN] > 0 &&
ai_dmq3.c:			bs->inventory[INVENTORY_CELLS] > 20) return qtrue;
ai_dmq3.c:	bs->decisionmaker = bs->client;
ai_dmq3.c:	bs->teammessage_time = 0;
ai_dmq3.c:	bs->ltgtype = LTG_CAMP;
ai_dmq3.c:	memcpy(&bs->teamgoal, goal, sizeof(bot_goal_t));
ai_dmq3.c:	camper = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CAMPER, 0, 1);
ai_dmq3.c:	if (camper > 0.99) bs->teamgoal_time = FloatTime() + 99999;
ai_dmq3.c:	else bs->teamgoal_time = FloatTime() + 120 + 180 * camper + random() * 15;
ai_dmq3.c:	bs->camp_time = FloatTime();
ai_dmq3.c:	bs->teammate = 0;
ai_dmq3.c:	bs->arrive_time = 1;
ai_dmq3.c:	camper = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CAMPER, 0, 1);
ai_dmq3.c:	if (bs->ltgtype == LTG_TEAMHELP ||
ai_dmq3.c:			bs->ltgtype == LTG_TEAMACCOMPANY ||
ai_dmq3.c:			bs->ltgtype == LTG_DEFENDKEYAREA ||
ai_dmq3.c:			bs->ltgtype == LTG_GETFLAG ||
ai_dmq3.c:			bs->ltgtype == LTG_RUSHBASE ||
ai_dmq3.c:			bs->ltgtype == LTG_CAMP ||
ai_dmq3.c:			bs->ltgtype == LTG_CAMPORDER ||
ai_dmq3.c:			bs->ltgtype == LTG_PATROL) {
ai_dmq3.c:	if (bs->camp_time > FloatTime() - 60 + 300 * (1-camper)) return qfalse;
ai_dmq3.c:		bs->camp_time = FloatTime();
ai_dmq3.c:	if ((bs->inventory[INVENTORY_ROCKETLAUNCHER] <= 0 || bs->inventory[INVENTORY_ROCKETS < 10]) &&
ai_dmq3.c:		(bs->inventory[INVENTORY_RAILGUN] <= 0 || bs->inventory[INVENTORY_SLUGS] < 10) &&
ai_dmq3.c:		(bs->inventory[INVENTORY_BFG10K] <= 0 || bs->inventory[INVENTORY_BFGAMMO] < 10)) {
ai_dmq3.c:		traveltime = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, goal.areanum, TFL_DEFAULT);
ai_dmq3.c:	bs->ordered = qfalse;
ai_dmq3.c:		trap_BotRemoveFromAvoidGoals(bs->gs, goal.number);
ai_dmq3.c:	bs->ltg_time = 0;
ai_dmq3.c:		VectorCopy(bs->origin, bestorg);
ai_dmq3.c:		BotAI_Trace(&trace, bs->origin, NULL, NULL, bestorg, bs->entitynum, MASK_SOLID);
ai_dmq3.c:		VectorSubtract(trace.endpos, bs->origin, dir);
ai_dmq3.c:			VectorAdd(bs->origin, dir, bestorg);
ai_dmq3.c:			BotAI_Trace(&trace, bestorg, NULL, NULL, belowbestorg, bs->entitynum, MASK_SOLID);
ai_dmq3.c:				pc = trap_PointContents(trace.endpos, bs->entitynum);
ai_dmq3.c:	attackentity = bs->enemy;
ai_dmq3.c:	if (bs->attackchase_time > FloatTime()) {
ai_dmq3.c:		goal.areanum = bs->lastenemyareanum;
ai_dmq3.c:		VectorCopy(bs->lastenemyorigin, goal.origin);
ai_dmq3.c:		trap_BotMoveToGoal(&moveresult, bs->ms, &goal, tfl);
ai_dmq3.c:	attack_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_ATTACK_SKILL, 0, 1);
ai_dmq3.c:	jumper = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_JUMPER, 0, 1);
ai_dmq3.c:	croucher = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CROUCHER, 0, 1);
ai_dmq3.c:	VectorSubtract(entinfo.origin, bs->origin, forward);
ai_dmq3.c:	if (bs->attackcrouch_time < FloatTime() - 1) {
ai_dmq3.c:		else if (bs->attackcrouch_time < FloatTime() - 1 && random() < croucher) {
ai_dmq3.c:			bs->attackcrouch_time = FloatTime() + croucher * 5;
ai_dmq3.c:	if (bs->attackcrouch_time > FloatTime()) movetype = MOVE_CROUCH;
ai_dmq3.c:		if (bs->attackjump_time > FloatTime()) {
ai_dmq3.c:			bs->attackjump_time = FloatTime() + 1;
ai_dmq3.c:	if (bs->cur_ps.weapon == WP_GAUNTLET) {
ai_dmq3.c:			if (trap_BotMoveInDirection(bs->ms, forward, 400, movetype)) return moveresult;
ai_dmq3.c:			if (trap_BotMoveInDirection(bs->ms, backward, 400, movetype)) return moveresult;
ai_dmq3.c:	bs->attackstrafe_time += bs->thinktime;
ai_dmq3.c:	if (bs->attackstrafe_time > strafechange_time) {
ai_dmq3.c:			bs->flags ^= BFL_STRAFERIGHT;
ai_dmq3.c:			bs->attackstrafe_time = 0;
ai_dmq3.c:		if (bs->flags & BFL_STRAFERIGHT) VectorNegate(sideward, sideward);
ai_dmq3.c:		if (trap_BotMoveInDirection(bs->ms, sideward, 400, movetype))
ai_dmq3.c:		bs->flags ^= BFL_STRAFERIGHT;
ai_dmq3.c:		bs->attackstrafe_time = 0;
ai_dmq3.c://	bs->attackchase_time = AAS_Time() + 6;
ai_dmq3.c:	if (bs->client < 0 || bs->client >= MAX_CLIENTS) {
ai_dmq3.c:		trap_GetConfigstring(CS_PLAYERS+bs->client, info1, sizeof(info1));
ai_dmq3.c:	alertness = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_ALERTNESS, 0, 1);
ai_dmq3.c:	easyfragger = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_EASY_FRAGGER, 0, 1);
ai_dmq3.c:	healthdecrease = bs->lasthealth > bs->inventory[INVENTORY_HEALTH];
ai_dmq3.c:	bs->lasthealth = bs->inventory[INVENTORY_HEALTH];
ai_dmq3.c:		VectorSubtract(curenemyinfo.origin, bs->origin, dir);
ai_dmq3.c:		BotAI_Trace(&trace, bs->eye, NULL, NULL, target, bs->client, CONTENTS_SOLID);
ai_dmq3.c:			if (goal->entitynum == bs->enemy) {
ai_dmq3.c:			bs->enemy = goal->entitynum;
ai_dmq3.c:			bs->enemysight_time = FloatTime();
ai_dmq3.c:			bs->enemysuicide = qfalse;
ai_dmq3.c:			bs->enemydeath_time = 0;
ai_dmq3.c:			bs->enemyvisible_time = FloatTime();
ai_dmq3.c:		if (i == bs->client) continue;
ai_dmq3.c:		if (EntityIsDead(&entinfo) || entinfo.number == bs->entitynum) continue;
ai_dmq3.c:		VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:		vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, f, i);
ai_dmq3.c:			VectorSubtract(bs->origin, entinfo.origin, dir);
ai_dmq3.c:		bs->enemy = entinfo.number;
ai_dmq3.c:		if (curenemy >= 0) bs->enemysight_time = FloatTime() - 2;
ai_dmq3.c:		else bs->enemysight_time = FloatTime();
ai_dmq3.c:		bs->enemysuicide = qfalse;
ai_dmq3.c:		bs->enemydeath_time = 0;
ai_dmq3.c:		bs->enemyvisible_time = FloatTime();
ai_dmq3.c:		if (i == bs->client)
ai_dmq3.c:		vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, i);
ai_dmq3.c:		if (i == bs->client)
ai_dmq3.c:		if (i == bs->client)
ai_dmq3.c:		vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, i);
ai_dmq3.c:		if (i == bs->client)
ai_dmq3.c:		VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:		vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, i);
ai_dmq3.c:		if (i == bs->client) continue;
ai_dmq3.c:		vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, i);
ai_dmq3.c:		if (i == bs->client)
ai_dmq3.c:		vis = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, i);
ai_dmq3.c:	if (bs->enemy < 0) {
ai_dmq3.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_dmq3.c:	if (bs->enemy >= MAX_CLIENTS) {
ai_dmq3.c:		if ( bs->enemy == redobelisk.entitynum ||
ai_dmq3.c:			bs->enemy == blueobelisk.entitynum ) {
ai_dmq3.c:		VectorSubtract(target, bs->eye, dir);
ai_dmq3.c:		vectoangles(dir, bs->ideal_viewangles);
ai_dmq3.c:		VectorCopy(target, bs->aimtarget);
ai_dmq3.c:	//BotAI_Print(PRT_MESSAGE, "client %d: aiming at client %d\n", bs->entitynum, bs->enemy);
ai_dmq3.c:	aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL, 0, 1);
ai_dmq3.c:	aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY, 0, 1);
ai_dmq3.c:		reactiontime = 0.5 * trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_REACTIONTIME, 0, 1);
ai_dmq3.c:		if (bs->enemysight_time > FloatTime() - reactiontime) return;
ai_dmq3.c:		if (bs->teleport_time > FloatTime() - reactiontime) return;
ai_dmq3.c:	trap_BotGetWeaponInfo(bs->ws, bs->weaponnum, &wi);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_MACHINEGUN, 0, 1);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_SHOTGUN, 0, 1);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_GRENADELAUNCHER, 0, 1);
ai_dmq3.c:		aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_GRENADELAUNCHER, 0, 1);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_ROCKETLAUNCHER, 0, 1);
ai_dmq3.c:		aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_ROCKETLAUNCHER, 0, 1);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_LIGHTNING, 0, 1);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_RAILGUN, 0, 1);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_PLASMAGUN, 0, 1);
ai_dmq3.c:		aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_PLASMAGUN, 0, 1);
ai_dmq3.c:		aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY_BFG10K, 0, 1);
ai_dmq3.c:		aim_skill = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_SKILL_BFG10K, 0, 1);
ai_dmq3.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_dmq3.c:	if (bs->enemyposition_time < FloatTime()) {
ai_dmq3.c:		bs->enemyposition_time = FloatTime() + 0.5;
ai_dmq3.c:		VectorCopy(enemyvelocity, bs->enemyvelocity);
ai_dmq3.c:		VectorCopy(entinfo.origin, bs->enemyorigin);
ai_dmq3.c:		VectorSubtract(entinfo.origin, bs->enemyorigin, dir);
ai_dmq3.c:			if (DotProduct(bs->enemyvelocity, enemyvelocity) < 0) {
ai_dmq3.c:	enemyvisible = BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy);
ai_dmq3.c:		VectorCopy(bs->origin, start);
ai_dmq3.c:		start[2] += bs->cur_ps.viewheight;
ai_dmq3.c:		BotAI_Trace(&trace, start, mins, maxs, bestorigin, bs->entitynum, MASK_SHOT);
ai_dmq3.c:			VectorSubtract(bestorigin, bs->origin, dir);
ai_dmq3.c:			VectorSubtract(entinfo.origin, bs->enemyorigin, dir);
ai_dmq3.c:						bs->cur_ps.weaponstate == WEAPON_READY) {
ai_dmq3.c:					VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:					trap_AAS_PredictClientMovement(&move, bs->enemy, origin,
ai_dmq3.c:					VectorSubtract(entinfo.origin, bs->origin, dir);
ai_dmq3.c:			if (entinfo.origin[2] < bs->origin[2] + 16) {
ai_dmq3.c:				BotAI_Trace(&trace, start, NULL, NULL, groundtarget, bs->entitynum, MASK_SHOT);
ai_dmq3.c:		VectorCopy(bs->lastenemyorigin, bestorigin);
ai_dmq3.c:				goal.entitynum = bs->client;
ai_dmq3.c:				goal.areanum = bs->areanum;
ai_dmq3.c:				VectorCopy(bs->eye, goal.origin);
ai_dmq3.c:				if (trap_BotPredictVisiblePosition(bs->lastenemyorigin, bs->lastenemyareanum, &goal, TFL_DEFAULT, target)) {
ai_dmq3.c:					VectorSubtract(target, bs->eye, dir);
ai_dmq3.c:		BotAI_Trace(&trace, bs->eye, NULL, NULL, bestorigin, bs->entitynum, MASK_SHOT);
ai_dmq3.c:		VectorCopy(trace.endpos, bs->aimtarget);
ai_dmq3.c:		VectorCopy(bestorigin, bs->aimtarget);
ai_dmq3.c:	VectorSubtract(bestorigin, bs->eye, dir);
ai_dmq3.c:	vectoangles(dir, bs->ideal_viewangles);
ai_dmq3.c:	bs->ideal_viewangles[PITCH] += 6 * wi.vspread * crandom() * (1 - aim_accuracy);
ai_dmq3.c:	bs->ideal_viewangles[PITCH] = AngleMod(bs->ideal_viewangles[PITCH]);
ai_dmq3.c:	bs->ideal_viewangles[YAW] += 6 * wi.hspread * crandom() * (1 - aim_accuracy);
ai_dmq3.c:	bs->ideal_viewangles[YAW] = AngleMod(bs->ideal_viewangles[YAW]);
ai_dmq3.c:		if (aim_accuracy > 0.9 && bs->enemysight_time < FloatTime() - 1) {
ai_dmq3.c:			if (bs->ideal_viewangles[PITCH] > 180) bs->ideal_viewangles[PITCH] -= 360;
ai_dmq3.c:			VectorCopy(bs->ideal_viewangles, bs->viewangles);
ai_dmq3.c:			trap_EA_View(bs->client, bs->viewangles);
ai_dmq3.c:	attackentity = bs->enemy;
ai_dmq3.c:	reactiontime = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_REACTIONTIME, 0, 1);
ai_dmq3.c:	if (bs->enemysight_time > FloatTime() - reactiontime) return;
ai_dmq3.c:	if (bs->teleport_time > FloatTime() - reactiontime) return;
ai_dmq3.c:	if (bs->weaponchange_time > FloatTime() - 0.1) return;
ai_dmq3.c:	if (bs->firethrottlewait_time > FloatTime()) return;
ai_dmq3.c:	firethrottle = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_FIRETHROTTLE, 0, 1);
ai_dmq3.c:	if (bs->firethrottleshoot_time < FloatTime()) {
ai_dmq3.c:			bs->firethrottlewait_time = FloatTime() + firethrottle;
ai_dmq3.c:			bs->firethrottleshoot_time = 0;
ai_dmq3.c:			bs->firethrottleshoot_time = FloatTime() + 1 - firethrottle;
ai_dmq3.c:			bs->firethrottlewait_time = 0;
ai_dmq3.c:	VectorSubtract(bs->aimtarget, bs->eye, dir);
ai_dmq3.c:	if (bs->weaponnum == WP_GAUNTLET) {
ai_dmq3.c:	if (!InFieldOfVision(bs->viewangles, fov, angles))
ai_dmq3.c:	BotAI_Trace(&bsptrace, bs->eye, NULL, NULL, bs->aimtarget, bs->client, CONTENTS_SOLID|CONTENTS_PLAYERCLIP);
ai_dmq3.c:	trap_BotGetWeaponInfo(bs->ws, bs->weaponnum, &wi);
ai_dmq3.c:	VectorCopy(bs->origin, start);
ai_dmq3.c:	start[2] += bs->cur_ps.viewheight;
ai_dmq3.c:	AngleVectors(bs->viewangles, forward, right, NULL);
ai_dmq3.c:	BotAI_Trace(&trace, start, mins, maxs, end, bs->entitynum, MASK_SHOT);
ai_dmq3.c:		if (bs->flags & BFL_ATTACKED) {
ai_dmq3.c:			trap_EA_Attack(bs->client);
ai_dmq3.c:		trap_EA_Attack(bs->client);
ai_dmq3.c:	bs->flags ^= BFL_ATTACKED;
ai_dmq3.c:		bs->tfl &= ~TFL_FUNCBOB;
ai_dmq3.c:		if (bs->origin[0] > mins[0] && bs->origin[0] < maxs[0]) {
ai_dmq3.c:			if (bs->origin[1] > mins[1] && bs->origin[1] < maxs[1]) {
ai_dmq3.c:				if (bs->origin[2] < mins[2]) {
ai_dmq3.c:			if (i == bs->client) continue;
ai_dmq3.c:			if (EntityIsDead(&entinfo) || entinfo.number == bs->entitynum) continue;
ai_dmq3.c:			bs->flags |= BFL_IDEALVIEWSET;
ai_dmq3.c:			VectorSubtract(buttonorg, bs->eye, dir);
ai_dmq3.c:			vectoangles(dir, bs->ideal_viewangles);
ai_dmq3.c:			aim_accuracy = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_AIM_ACCURACY, 0, 1);
ai_dmq3.c:			bs->ideal_viewangles[PITCH] += 8 * crandom() * (1 - aim_accuracy);
ai_dmq3.c:			bs->ideal_viewangles[PITCH] = AngleMod(bs->ideal_viewangles[PITCH]);
ai_dmq3.c:			bs->ideal_viewangles[YAW] += 8 * crandom() * (1 - aim_accuracy);
ai_dmq3.c:			bs->ideal_viewangles[YAW] = AngleMod(bs->ideal_viewangles[YAW]);
ai_dmq3.c:			if (InFieldOfVision(bs->viewangles, 20, bs->ideal_viewangles)) {
ai_dmq3.c:				trap_EA_Attack(bs->client);
ai_dmq3.c:		bs->tfl &= ~TFL_FUNCBOB;
ai_dmq3.c:		BotAI_Trace(&bsptrace, bs->eye, NULL, NULL, goalorigin, bs->entitynum, MASK_SHOT);
ai_dmq3.c:			VectorCopy(bs->origin, activategoal->goal.origin);
ai_dmq3.c:			activategoal->goal.areanum = bs->areanum;
ai_dmq3.c:	VectorCopy(bs->origin, activategoal->goal.origin);
ai_dmq3.c:	activategoal->goal.areanum = bs->areanum;
ai_dmq3.c:	if (!bs->activatestack)
ai_dmq3.c:	BotEnableActivateGoalAreas(bs->activatestack, qtrue);
ai_dmq3.c:	bs->activatestack->inuse = qfalse;
ai_dmq3.c:	bs->activatestack->justused_time = FloatTime();
ai_dmq3.c:	bs->activatestack = bs->activatestack->next;
ai_dmq3.c:		if (!bs->activategoalheap[i].inuse) {
ai_dmq3.c:			if (bs->activategoalheap[i].justused_time < besttime) {
ai_dmq3.c:				besttime = bs->activategoalheap[i].justused_time;
ai_dmq3.c:		memcpy(&bs->activategoalheap[best], activategoal, sizeof(bot_activategoal_t));
ai_dmq3.c:		bs->activategoalheap[best].inuse = qtrue;
ai_dmq3.c:		bs->activategoalheap[best].next = bs->activatestack;
ai_dmq3.c:		bs->activatestack = &bs->activategoalheap[best];
ai_dmq3.c:	while(bs->activatestack)
ai_dmq3.c:	for (a = bs->activatestack; a; a = a->next) {
ai_dmq3.c:		if (bs->activategoalheap[i].inuse)
ai_dmq3.c:		if (bs->activategoalheap[i].goal.entitynum == entitynum) {
ai_dmq3.c:			if (bs->activategoalheap[i].justused_time > FloatTime() - 2)
ai_dmq3.c:			if ( bs->activatestack && bs->activatestack->inuse &&
ai_dmq3.c:				 bs->activatestack->goal.entitynum == activategoal->goal.entitynum &&
ai_dmq3.c:				 bs->activatestack->time > FloatTime() &&
ai_dmq3.c:				 bs->activatestack->start_time < FloatTime() - 2)
ai_dmq3.c:			if ( trap_AAS_AreaReachability(bs->areanum) ) {
ai_dmq3.c:				t = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, activategoal->goal.areanum, bs->tfl);
ai_dmq3.c:			if ( bs->activatestack && bs->activatestack->inuse &&
ai_dmq3.c:				 bs->activatestack->goal.entitynum == activategoal->goal.entitynum &&
ai_dmq3.c:				 bs->activatestack->time > FloatTime() &&
ai_dmq3.c:				 bs->activatestack->start_time < FloatTime() - 2)
ai_dmq3.c:			if ( trap_AAS_AreaReachability(bs->areanum) ) {
ai_dmq3.c:				t = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, activategoal->goal.areanum, bs->tfl);
ai_dmq3.c:	ClientName(bs->client, netname, sizeof(netname));
ai_dmq3.c:	trap_EA_Say(bs->client, buf);
ai_dmq3.c:	trap_BotMoveInDirection(bs->ms, dir, 400, MOVE_WALK);
ai_dmq3.c:		bs->notblocked_time = FloatTime();
ai_dmq3.c:	ClientName(bs->client, netname, sizeof(netname));
ai_dmq3.c:			if (bs->activatestack && !bs->activatestack->inuse)
ai_dmq3.c:				bs->activatestack = NULL;
ai_dmq3.c:				trap_AAS_AreaReachability(bs->areanum))
ai_dmq3.c:	VectorCopy(bs->origin, start);
ai_dmq3.c:	//bsptrace = AAS_Trace(start, mins, maxs, end, bs->entitynum, MASK_PLAYERSOLID);
ai_dmq3.c:	if (bs->flags & BFL_AVOIDRIGHT) VectorNegate(sideward, sideward);
ai_dmq3.c:	if (movetype != MOVE_CROUCH || !trap_BotMoveInDirection(bs->ms, hordir, 400, movetype)) {
ai_dmq3.c:		if (!trap_BotMoveInDirection(bs->ms, sideward, 400, movetype)) {
ai_dmq3.c:			bs->flags ^= BFL_AVOIDRIGHT;
ai_dmq3.c:			trap_BotMoveInDirection(bs->ms, sideward, 400, movetype);
ai_dmq3.c:	if (bs->predictobstacles_goalareanum == goal->areanum &&
ai_dmq3.c:		bs->predictobstacles_time > FloatTime() - 6) {
ai_dmq3.c:	bs->predictobstacles_goalareanum = goal->areanum;
ai_dmq3.c:	bs->predictobstacles_time = FloatTime();
ai_dmq3.c:	trap_AAS_PredictRoute(&route, bs->areanum, bs->origin,
ai_dmq3.c:							goal->areanum, bs->tfl, 100, 1000,
ai_dmq3.c:						if (bs->activatestack && !bs->activatestack->inuse)
ai_dmq3.c:							bs->activatestack = NULL;
ai_dmq3.c:	ClientName(bs->client, botname, sizeof(botname));
ai_dmq3.c:	while((handle = trap_BotNextConsoleMessage(bs->cs, &m)) != 0) {
ai_dmq3.c:		if (trap_BotNumConsoleMessages(bs->cs) < 10) {
ai_dmq3.c:					trap_BotRemoveConsoleMessage(bs->cs, handle);
ai_dmq3.c:					trap_BotRemoveConsoleMessage(bs->cs, handle);
ai_dmq3.c:				if (bs->client == ClientFromName(netname)) {
ai_dmq3.c:					trap_BotRemoveConsoleMessage(bs->cs, handle);
ai_dmq3.c:					if (trap_BotReplyChat(bs->cs, message, context, CONTEXT_REPLY,
ai_dmq3.c:				else if (/* bs->ainode != AINode_Stand && */ BotValidChatPosition(bs) && !TeamPlayIsOn()) {
ai_dmq3.c:					chat_reply = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_CHAT_REPLY, 0, 1);
ai_dmq3.c:						if (trap_BotReplyChat(bs->cs, message, context, CONTEXT_REPLY,
ai_dmq3.c:							trap_BotRemoveConsoleMessage(bs->cs, handle);
ai_dmq3.c:							bs->stand_time = FloatTime() + BotChatTime(bs);
ai_dmq3.c:							//EA_Say(bs->client, bs->cs.chatmessage);
ai_dmq3.c:		trap_BotRemoveConsoleMessage(bs->cs, handle);
ai_dmq3.c:	trap_BotAddAvoidSpot(bs->ms, state->pos.trBase, 160, AVOID_ALWAYS);
ai_dmq3.c:	if (!(bs->inventory[INVENTORY_PLASMAGUN] > 0 && bs->inventory[INVENTORY_CELLS] > 0) &&
ai_dmq3.c:		!(bs->inventory[INVENTORY_ROCKETLAUNCHER] > 0 && bs->inventory[INVENTORY_ROCKETS] > 0) &&
ai_dmq3.c:		!(bs->inventory[INVENTORY_BFG10K] > 0 && bs->inventory[INVENTORY_BFGAMMO] > 0) ) {
ai_dmq3.c:	trap_BotAddAvoidSpot(bs->ms, state->pos.trBase, 160, AVOID_ALWAYS);
ai_dmq3.c:	if (bs->numproxmines >= MAX_PROXMINES)
ai_dmq3.c:	bs->proxmines[bs->numproxmines] = state->number;
ai_dmq3.c:	bs->numproxmines++;
ai_dmq3.c:	bs->kamikazebody = state->number;
ai_dmq3.c:	if (bs->entityeventTime[state->number] == g_entities[state->number].eventTime) {
ai_dmq3.c:	bs->entityeventTime[state->number] = g_entities[state->number].eventTime;
ai_dmq3.c:			if (target == bs->client) {
ai_dmq3.c:				bs->botdeathtype = mod;
ai_dmq3.c:				bs->lastkilledby = attacker;
ai_dmq3.c:					target == ENTITYNUM_WORLD) bs->botsuicide = qtrue;
ai_dmq3.c:				else bs->botsuicide = qfalse;
ai_dmq3.c:				bs->num_deaths++;
ai_dmq3.c:			else if (attacker == bs->client) {
ai_dmq3.c:				bs->enemydeathtype = mod;
ai_dmq3.c:				bs->lastkilledplayer = target;
ai_dmq3.c:				bs->killedenemy_time = FloatTime();
ai_dmq3.c:				bs->num_kills++;
ai_dmq3.c:			else if (attacker == bs->enemy && target == attacker) {
ai_dmq3.c:				bs->enemysuicide = qtrue;
ai_dmq3.c:						bs->neutralflagstatus = 3;	//enemy dropped the flag
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:				bs->redflagstatus = 0;
ai_dmq3.c:				bs->flagstatuschanged = qtrue;
ai_dmq3.c:				bs->blueflagstatus = 0;
ai_dmq3.c:				bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->blueflagstatus = 0;
ai_dmq3.c:						bs->redflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->blueflagstatus = 0;
ai_dmq3.c:						bs->redflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->blueflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->redflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->blueflagstatus = 1;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->redflagstatus = 1;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->neutralflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->neutralflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->neutralflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->neutralflagstatus = 0;
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->neutralflagstatus = BotTeam(bs) == TEAM_RED ? 2 : 1; //FIXME: check Team_TakeFlagSound in g_team.c
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:						bs->neutralflagstatus = BotTeam(bs) == TEAM_BLUE ? 2 : 1; //FIXME: check Team_TakeFlagSound in g_team.c
ai_dmq3.c:						bs->flagstatuschanged = qtrue;
ai_dmq3.c:			if (state->number == bs->client) {
ai_dmq3.c:					if (bs->inventory[INVENTORY_TELEPORTER] > 0) {
ai_dmq3.c:						trap_EA_Use(bs->client);
ai_dmq3.c:	trap_BotAddAvoidSpot(bs->ms, vec3_origin, 0, AVOID_CLEAR);
ai_dmq3.c:	bs->kamikazebody = 0;
ai_dmq3.c:	bs->numproxmines = 0;
ai_dmq3.c:	while( ( ent = BotAI_GetSnapshotEntity( bs->client, ent, &state ) ) != -1 ) {
ai_dmq3.c:	BotAI_GetEntityState(bs->client, &state);
ai_dmq3.c:	state.event = bs->cur_ps.externalEvent;
ai_dmq3.c:	state.eventParm = bs->cur_ps.externalEventParm;
ai_dmq3.c:	if (bs->inventory[INVENTORY_ENVIRONMENTSUIT] <= 0) {
ai_dmq3.c:		if (trap_AAS_PointContents(bs->eye) & (CONTENTS_WATER|CONTENTS_SLIME|CONTENTS_LAVA)) {
ai_dmq3.c:	bs->lastair_time = FloatTime();
ai_dmq3.c:	if (bs->altroutegoal.areanum) {
ai_dmq3.c:		if (bs->reachedaltroutegoal_time)
ai_dmq3.c:		t = trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, bs->altroutegoal.areanum, bs->tfl);
ai_dmq3.c:			bs->reachedaltroutegoal_time = FloatTime();
ai_dmq3.c:		memcpy(goal, &bs->altroutegoal, sizeof(bot_goal_t));
ai_dmq3.c:		return &bs->altroutegoal;
ai_dmq3.c:	goal = &bs->altroutegoal;
ai_dmq3.c:	bs->reachedaltroutegoal_time = 0;
ai_dmq3.c:	if (bs->setupcount > 0) {
ai_dmq3.c:		bs->setupcount--;
ai_dmq3.c:		if (bs->setupcount > 0) return;
ai_dmq3.c:		trap_Characteristic_String(bs->character, CHARACTERISTIC_GENDER, gender, sizeof(gender));
ai_dmq3.c:		trap_GetUserinfo(bs->client, userinfo, sizeof(userinfo));
ai_dmq3.c:		trap_SetUserinfo(bs->client, userinfo);
ai_dmq3.c:		if ( !bs->map_restart && g_gametype.integer != GT_TOURNAMENT ) {
ai_dmq3.c:			Com_sprintf(buf, sizeof(buf), "team %s", bs->settings.team);
ai_dmq3.c:			trap_EA_Command(bs->client, buf);
ai_dmq3.c:		if (gender[0] == 'm') trap_BotSetChatGender(bs->cs, CHAT_GENDERMALE);
ai_dmq3.c:		else if (gender[0] == 'f')  trap_BotSetChatGender(bs->cs, CHAT_GENDERFEMALE);
ai_dmq3.c:		else  trap_BotSetChatGender(bs->cs, CHAT_GENDERLESS);
ai_dmq3.c:		ClientName(bs->client, name, sizeof(name));
ai_dmq3.c:		trap_BotSetChatName(bs->cs, name, bs->client);
ai_dmq3.c:		bs->lastframe_health = bs->inventory[INVENTORY_HEALTH];
ai_dmq3.c:		bs->lasthitcount = bs->cur_ps.persistant[PERS_HITS];
ai_dmq3.c:		bs->setupcount = 0;
ai_dmq3.c:	bs->flags &= ~BFL_IDEALVIEWSET;
ai_dmq3.c:	if (!bs->ainode) {
ai_dmq3.c:	//if (!bs->entergamechat && bs->entergame_time > FloatTime() - 8) {
ai_dmq3.c:	//		bs->stand_time = FloatTime() + BotChatTime(bs);
ai_dmq3.c:	//	bs->entergamechat = qtrue;
ai_dmq3.c:	//	if (bs->ainode(bs)) break;
ai_dmq3.c:	if (!bs->inuse) return;
ai_dmq3.c:	//	trap_BotDumpGoalStack(bs->gs);
ai_dmq3.c:	//	trap_BotDumpAvoidGoals(bs->gs);
ai_dmq3.c:	//	ClientName(bs->client, name, sizeof(name));
ai_dmq3.c:	bs->lastframe_health = bs->inventory[INVENTORY_HEALTH];
ai_dmq3.c:	bs->lasthitcount = bs->cur_ps.persistant[PERS_HITS];
ai_main.c:	trap_BotInitialChat( bs->cs, type, mcontext, vars[0], vars[1], vars[2], vars[3], vars[4], vars[5], vars[6], vars[7] );
ai_main.c:	ClientName(bs->client, netname, sizeof(netname));
ai_main.c:	if (Q_stricmp(netname, bs->teamleader) == 0) leader = "L";
ai_main.c:			if (BotTeam(bs) == TEAM_RED) Com_sprintf(flagstatus, sizeof(flagstatus), S_COLOR_RED"%2d", bs->inventory[INVENTORY_REDCUBE]);
ai_main.c:			else Com_sprintf(flagstatus, sizeof(flagstatus), S_COLOR_BLUE"%2d", bs->inventory[INVENTORY_BLUECUBE]);
ai_main.c:	switch(bs->ltgtype) {
ai_main.c:			EasyClientName(bs->teammate, goalname, sizeof(goalname));
ai_main.c:			EasyClientName(bs->teammate, goalname, sizeof(goalname));
ai_main.c:			trap_BotGoalName(bs->teamgoal.number, goalname, sizeof(goalname));
ai_main.c:			trap_BotGoalName(bs->teamgoal.number, goalname, sizeof(goalname));
ai_main.c:			ClientName(bs->teamgoal.entitynum, goalname, sizeof(goalname));
ai_main.c:	ClientName(bs->client, netname, sizeof(netname));
ai_main.c:	if (Q_stricmp(netname, bs->teamleader) == 0) leader = "L";
ai_main.c:			if (BotTeam(bs) == TEAM_RED) Com_sprintf(carrying, sizeof(carrying), "%2d", bs->inventory[INVENTORY_REDCUBE]);
ai_main.c:			else Com_sprintf(carrying, sizeof(carrying), "%2d", bs->inventory[INVENTORY_BLUECUBE]);
ai_main.c:	switch(bs->ltgtype) {
ai_main.c:			EasyClientName(bs->teammate, goalname, sizeof(goalname));
ai_main.c:			EasyClientName(bs->teammate, goalname, sizeof(goalname));
ai_main.c:			trap_BotGoalName(bs->teamgoal.number, goalname, sizeof(goalname));
ai_main.c:			trap_BotGoalName(bs->teamgoal.number, goalname, sizeof(goalname));
ai_main.c:			ClientName(bs->teamgoal.entitynum, goalname, sizeof(goalname));
ai_main.c:			trap_BotGetTopGoal(bs->gs, &goal);
ai_main.c:  	trap_SetConfigstring (CS_BOTINFO + bs->client, cs);
ai_main.c:	leader = ClientFromName(bs->teamleader);
ai_main.c:	if (bs->ideal_viewangles[PITCH] > 180) bs->ideal_viewangles[PITCH] -= 360;
ai_main.c:	if (bs->enemy >= 0) {
ai_main.c:		factor = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_VIEW_FACTOR, 0.01f, 1);
ai_main.c:		maxchange = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_VIEW_MAXCHANGE, 1, 1800);
ai_main.c:			diff = abs(AngleDifference(bs->viewangles[i], bs->ideal_viewangles[i]));
ai_main.c:			bs->viewangles[i] = BotChangeViewAngle(bs->viewangles[i],
ai_main.c:											bs->ideal_viewangles[i], anglespeed);
ai_main.c:			bs->viewangles[i] = AngleMod(bs->viewangles[i]);
ai_main.c:			bs->ideal_viewangles[i] = AngleMod(bs->ideal_viewangles[i]);
ai_main.c:			diff = AngleDifference(bs->viewangles[i], bs->ideal_viewangles[i]);
ai_main.c:			bs->viewanglespeed[i] += (bs->viewanglespeed[i] - disired_speed);
ai_main.c:			if (bs->viewanglespeed[i] > 180) bs->viewanglespeed[i] = maxchange;
ai_main.c:			if (bs->viewanglespeed[i] < -180) bs->viewanglespeed[i] = -maxchange;
ai_main.c:			anglespeed = bs->viewanglespeed[i];
ai_main.c:			bs->viewangles[i] += anglespeed;
ai_main.c:			bs->viewangles[i] = AngleMod(bs->viewangles[i]);
ai_main.c:			bs->viewanglespeed[i] *= 0.45 * (1 - factor);
ai_main.c:		//BotAI_Print(PRT_MESSAGE, "ideal_angles %f %f\n", bs->ideal_viewangles[0], bs->ideal_viewangles[1], bs->ideal_viewangles[2]);`
ai_main.c:		//bs->viewangles[i] = bs->ideal_viewangles[i];
ai_main.c:	//bs->viewangles[PITCH] = 0;
ai_main.c:	if (bs->viewangles[PITCH] > 180) bs->viewangles[PITCH] -= 360;
ai_main.c:	trap_EA_View(bs->client, bs->viewangles);
ai_main.c:		bs->viewangles[j] = AngleMod(bs->viewangles[j] + SHORT2ANGLE(bs->cur_ps.delta_angles[j]));
ai_main.c:	trap_EA_GetInput(bs->client, (float) time / 1000, &bi);
ai_main.c:		if (bs->lastucmd.buttons & BUTTON_ATTACK) bi.actionflags &= ~(ACTION_RESPAWN|ACTION_ATTACK);
ai_main.c:	BotInputToUserCommand(&bi, &bs->lastucmd, bs->cur_ps.delta_angles, time);
ai_main.c:		bs->viewangles[j] = AngleMod(bs->viewangles[j] - SHORT2ANGLE(bs->cur_ps.delta_angles[j]));
ai_main.c:	if (!bs || !bs->inuse) {
ai_main.c:	BotAI_GetClientState( client, &bs->cur_ps );
ai_main.c:			trap_BotQueueConsoleMessage(bs->cs, CMS_NORMAL, args);
ai_main.c:			trap_BotQueueConsoleMessage(bs->cs, CMS_CHAT, args);
ai_main.c:			trap_BotQueueConsoleMessage(bs->cs, CMS_CHAT, args);
ai_main.c:		bs->viewangles[j] = AngleMod(bs->viewangles[j] + SHORT2ANGLE(bs->cur_ps.delta_angles[j]));
ai_main.c:	bs->ltime += thinktime;
ai_main.c:	bs->thinktime = thinktime;
ai_main.c:	VectorCopy(bs->cur_ps.origin, bs->origin);
ai_main.c:	VectorCopy(bs->cur_ps.origin, bs->eye);
ai_main.c:	bs->eye[2] += bs->cur_ps.viewheight;
ai_main.c:	bs->areanum = BotPointAreaNum(bs->origin);
ai_main.c:	BotAI_Print(PRT_MESSAGE, "start out code %d\n", bs->enemy);
ai_main.c:	if (bs->enemy == -1) {
ai_main.c:		bot = &g_entities[bs->entitynum];
ai_main.c:		bs->lasthealth = bot->health;
ai_main.c:		if (bs->weaponnum == WP_NONE) {
ai_main.c:			bs->weaponnum = WP_MACHINEGUN;
ai_main.c:		trap_EA_SelectWeapon(bs->client, bs->weaponnum);
ai_main.c:		bs->viewangles[j] = AngleMod(bs->viewangles[j] - SHORT2ANGLE(bs->cur_ps.delta_angles[j]));
ai_main.c:		bs->lastgoal_decisionmaker,
ai_main.c:		bs->lastgoal_ltgtype,
ai_main.c:		bs->lastgoal_teammate,
ai_main.c:		bs->lastgoal_teamgoal.areanum,
ai_main.c:		bs->lastgoal_teamgoal.entitynum,
ai_main.c:		bs->lastgoal_teamgoal.flags,
ai_main.c:		bs->lastgoal_teamgoal.iteminfo,
ai_main.c:		bs->lastgoal_teamgoal.number,
ai_main.c:		bs->lastgoal_teamgoal.origin[0],
ai_main.c:		bs->lastgoal_teamgoal.origin[1],
ai_main.c:		bs->lastgoal_teamgoal.origin[2],
ai_main.c:		bs->lastgoal_teamgoal.mins[0],
ai_main.c:		bs->lastgoal_teamgoal.mins[1],
ai_main.c:		bs->lastgoal_teamgoal.mins[2],
ai_main.c:		bs->lastgoal_teamgoal.maxs[0],
ai_main.c:		bs->lastgoal_teamgoal.maxs[1],
ai_main.c:		bs->lastgoal_teamgoal.maxs[2]
ai_main.c:	var = va( "botsession%i", bs->client );
ai_main.c:	var = va( "botsession%i", bs->client );
ai_main.c:		&bs->lastgoal_decisionmaker,
ai_main.c:		&bs->lastgoal_ltgtype,
ai_main.c:		&bs->lastgoal_teammate,
ai_main.c:		&bs->lastgoal_teamgoal.areanum,
ai_main.c:		&bs->lastgoal_teamgoal.entitynum,
ai_main.c:		&bs->lastgoal_teamgoal.flags,
ai_main.c:		&bs->lastgoal_teamgoal.iteminfo,
ai_main.c:		&bs->lastgoal_teamgoal.number,
ai_main.c:		&bs->lastgoal_teamgoal.origin[0],
ai_main.c:		&bs->lastgoal_teamgoal.origin[1],
ai_main.c:		&bs->lastgoal_teamgoal.origin[2],
ai_main.c:		&bs->lastgoal_teamgoal.mins[0],
ai_main.c:		&bs->lastgoal_teamgoal.mins[1],
ai_main.c:		&bs->lastgoal_teamgoal.mins[2],
ai_main.c:		&bs->lastgoal_teamgoal.maxs[0],
ai_main.c:		&bs->lastgoal_teamgoal.maxs[1],
ai_main.c:		&bs->lastgoal_teamgoal.maxs[2]
ai_main.c:	if (bs && bs->inuse) {
ai_main.c:	bs->character = trap_BotLoadCharacter(settings->characterfile, settings->skill);
ai_main.c:	if (!bs->character) {
ai_main.c:	memcpy(&bs->settings, settings, sizeof(bot_settings_t));
ai_main.c:	bs->gs = trap_BotAllocGoalState(client);
ai_main.c:	trap_Characteristic_String(bs->character, CHARACTERISTIC_ITEMWEIGHTS, filename, MAX_PATH);
ai_main.c:	errnum = trap_BotLoadItemWeights(bs->gs, filename);
ai_main.c:		trap_BotFreeGoalState(bs->gs);
ai_main.c:	bs->ws = trap_BotAllocWeaponState();
ai_main.c:	trap_Characteristic_String(bs->character, CHARACTERISTIC_WEAPONWEIGHTS, filename, MAX_PATH);
ai_main.c:	errnum = trap_BotLoadWeaponWeights(bs->ws, filename);
ai_main.c:		trap_BotFreeGoalState(bs->gs);
ai_main.c:		trap_BotFreeWeaponState(bs->ws);
ai_main.c:	bs->cs = trap_BotAllocChatState();
ai_main.c:	trap_Characteristic_String(bs->character, CHARACTERISTIC_CHAT_FILE, filename, MAX_PATH);
ai_main.c:	trap_Characteristic_String(bs->character, CHARACTERISTIC_CHAT_NAME, name, MAX_PATH);
ai_main.c:	errnum = trap_BotLoadChatFile(bs->cs, filename, name);
ai_main.c:		trap_BotFreeChatState(bs->cs);
ai_main.c:		trap_BotFreeGoalState(bs->gs);
ai_main.c:		trap_BotFreeWeaponState(bs->ws);
ai_main.c:	trap_Characteristic_String(bs->character, CHARACTERISTIC_GENDER, gender, MAX_PATH);
ai_main.c:	if (*gender == 'f' || *gender == 'F') trap_BotSetChatGender(bs->cs, CHAT_GENDERFEMALE);
ai_main.c:	else if (*gender == 'm' || *gender == 'M') trap_BotSetChatGender(bs->cs, CHAT_GENDERMALE);
ai_main.c:	else trap_BotSetChatGender(bs->cs, CHAT_GENDERLESS);
ai_main.c:	bs->inuse = qtrue;
ai_main.c:	bs->client = client;
ai_main.c:	bs->entitynum = client;
ai_main.c:	bs->setupcount = 4;
ai_main.c:	bs->entergame_time = FloatTime();
ai_main.c:	bs->ms = trap_BotAllocMoveState();
ai_main.c:	bs->walker = trap_Characteristic_BFloat(bs->character, CHARACTERISTIC_WALKER, 0, 1);
ai_main.c:	bs->enemy = -1;
ai_main.c:		trap_BotMutateGoalFuzzyLogic(bs->gs, 1);
ai_main.c:	if (!bs || !bs->inuse) {
ai_main.c:		trap_BotEnterChat(bs->cs, bs->client, CHAT_ALL);
ai_main.c:	trap_BotFreeMoveState(bs->ms);
ai_main.c:	trap_BotFreeGoalState(bs->gs);
ai_main.c:	trap_BotFreeChatState(bs->cs);
ai_main.c:	trap_BotFreeWeaponState(bs->ws);
ai_main.c:	trap_BotFreeCharacter(bs->character);
ai_main.c:	BotFreeWaypoints(bs->checkpoints);
ai_main.c:	BotFreeWaypoints(bs->patrolpoints);
ai_main.c:	bs->inuse = qfalse;
ai_main.c:	memcpy(&settings, &bs->settings, sizeof(bot_settings_t));
ai_main.c:	memcpy(&ps, &bs->cur_ps, sizeof(playerState_t));
ai_main.c:	inuse = bs->inuse;
ai_main.c:	client = bs->client;
ai_main.c:	entitynum = bs->entitynum;
ai_main.c:	character = bs->character;
ai_main.c:	movestate = bs->ms;
ai_main.c:	goalstate = bs->gs;
ai_main.c:	chatstate = bs->cs;
ai_main.c:	weaponstate = bs->ws;
ai_main.c:	entergame_time = bs->entergame_time;
ai_main.c:	BotFreeWaypoints(bs->checkpoints);
ai_main.c:	BotFreeWaypoints(bs->patrolpoints);
ai_main.c:	bs->ms = movestate;
ai_main.c:	bs->gs = goalstate;
ai_main.c:	bs->cs = chatstate;
ai_main.c:	bs->ws = weaponstate;
ai_main.c:	memcpy(&bs->cur_ps, &ps, sizeof(playerState_t));
ai_main.c:	memcpy(&bs->settings, &settings, sizeof(bot_settings_t));
ai_main.c:	bs->inuse = inuse;
ai_main.c:	bs->client = client;
ai_main.c:	bs->entitynum = entitynum;
ai_main.c:	bs->character = character;
ai_main.c:	bs->entergame_time = entergame_time;
ai_main.c:	if (bs->ms) trap_BotResetMoveState(bs->ms);
ai_main.c:	if (bs->gs) trap_BotResetGoalState(bs->gs);
ai_main.c:	if (bs->ws) trap_BotResetWeaponState(bs->ws);
ai_main.c:	if (bs->gs) trap_BotResetAvoidGoals(bs->gs);
ai_main.c:	if (bs->ms) trap_BotResetAvoidReach(bs->ms);
ai_qbmw.c:		bs->ai_state.position_target[i] = qfalse;
ai_qbmw.c:			if (targets[num-1] == bs->enemy) {
ai_qbmw.c:				bs->ai_state.position_target[i] = qtrue;
ai_qbmw.c:	gentity_t *bot = &g_entities[bs->entitynum];
ai_qbmw.c:	findEntities(bs, bs->origin);
ai_qbmw.c:	bs->ai_state.ai_health = bot->health;
ai_qbmw.c:	bs->ai_state.current_weapon = bot->s.weapon;
ai_qbmw.c:	bs->ai_state.ai_weapons = 0;
ai_qbmw.c:	bs->ai_state.ai_weapons = bs->inventory[INVENTORY_SHOTGUN] << 0;
ai_qbmw.c:	bs->ai_state.ai_weapons = bs->inventory[INVENTORY_MACHINEGUN] << 1;
ai_qbmw.c:	bs->ai_state.ai_weapons = bs->inventory[INVENTORY_ROCKETLAUNCHER] << 2;
ai_qbmw.c:	bs->ai_state.ai_weapons = bs->inventory[INVENTORY_RAILGUN] << 3;
ai_qbmw.c:	bs->ai_state.ai_weapons = bs->inventory[INVENTORY_PLASMAGUN] << 4;
ai_qbmw.c:	if (bs->enemy < 0) {
ai_qbmw.c:		bs->ai_state.target_visible = qfalse;
ai_qbmw.c:		bs->ai_state.target_health = 0;
ai_qbmw.c:		target = &g_entities[bs->enemy];
ai_qbmw.c:		enemyvisible = testVisible(bs->entitynum, bs->eye, bs->viewangles, 360, bs->enemy);
ai_qbmw.c:		bs->ai_state.target_visible = enemyvisible;
ai_qbmw.c:		bs->ai_state.target_health = target->health;
ai_qbmw.c:		// bs->ai_state.target_current_weapon = target->s.weapon;
ai_qbmw.c:	if (bs->lasthealth != bot->health) {
ai_qbmw.c:		bs->ai_state.being_shot = qtrue;
ai_qbmw.c:		bs->ai_state.being_shot_time = FloatTime() + AI_BEING_SHOT_TIME;
ai_qbmw.c:	} else if (FloatTime() > bs->ai_state.being_shot_time) {
ai_qbmw.c:		bs->ai_state.being_shot = qfalse;
ai_qbmw.c:	reward = bs->ai_state.ai_health - bs->ai_state.target_health;
ai_qbmw.c:	if (bs->ai_state.ai_health == 0){
ai_qbmw.c:	if (bs->ai_state.target_health == 0){
ai_qbmw.c:	wp = bs->ai_state.current_weapon;
ai_qbmw.c:	if (bs->ai_state.position_target[POSITION_NEAR] == qtrue){
ai_qbmw.c:	else if (bs->ai_state.position_target[POSITION_MEDIUM] == qtrue){
ai_qbmw.c:	else if (bs->ai_state.position_target[POSITION_FAR] == qtrue){
ai_qbmw.c:	if (bs->ai_state.ai_bad_switch){
ai_qbmw.c:		bs->ai_state.ai_bad_switch = qfalse;
ai_qbmw.c:	if ((!bs->ai_state.target_visible) && (bs->ai_state.last_action & SUBACTION_ATTACK))
ai_qbmw.c:	stateid |= bs->ai_state.position_target[POSITION_NEAR];
ai_qbmw.c:	stateid |= bs->ai_state.position_target[POSITION_MEDIUM] << 1;
ai_qbmw.c:	stateid |= bs->ai_state.position_target[POSITION_FAR] << 2;
ai_qbmw.c:	stateid |= ((bs->ai_state.ai_health / 10) & 0xf) << 3;
ai_qbmw.c:	stateid |= ((bs->ai_state.target_health / 10) & 0xf) << 7;
ai_qbmw.c:	stateid |= (bs->ai_state.current_weapon & 0xf) << 11;
ai_qbmw.c:	stateid |= bs->ai_state.being_shot << 12;
ai_qbmw.c:	stateid |= bs->ai_state.target_visible << 13;
ai_qbmw.c:	stateid |= (bs->ai_state.ai_weapons & 0x1f) << 14;
ai_qbmw.c:	stateid |= bs->ai_state.position_cover[POSITION_NEAR] << 19;
ai_qbmw.c:	stateid |= bs->ai_state.position_cover[POSITION_MEDIUM] << 20;
ai_qbmw.c:	stateid |= bs->ai_state.position_cover[POSITION_FAR] << 21;
ai_qbmw.c:	bs->ai_state.last_action = boltzAction(bs);
ai_qbmw.c:	bs->ai_state.last_state = generateStateID(bs);
ai_qbmw.c:	return bs->ai_state.last_action;
ai_qbmw.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_qbmw.c:	VectorSubtract(entinfo.origin, bs->origin, dir);
ai_qbmw.c:	moveresult = trap_BotMoveInDirection(bs->ms, dir, 400, MOVE_WALK);
ai_qbmw.c:	moveresult = trap_BotMoveInDirection(bs->ms, dir, 400, MOVE_WALK);
ai_qbmw.c:	moveresult = trap_BotMoveInDirection(bs->ms, dir, 400, MOVE_WALK);
ai_qbmw.c:	if (bs->ai_state.last_action != ACTION_FAILURE) {
ai_qbmw.c:		updateQ(bs->ai_state.last_state, bs, bs->ai_state.last_action);
ai_qbmw.c:	if (bs->ai_state.repeataction && bs->ai_state.last_action != ACTION_FAILURE) {
ai_qbmw.c:		action = bs->ai_state.last_action;
ai_qbmw.c:		bs->ai_state.repeataction--;
ai_qbmw.c:		if (bs->enemy < 0) {
ai_qbmw.c:		goal.entitynum = bs->enemy;
ai_qbmw.c:		BotEntityInfo(bs->enemy, &entinfo);
ai_qbmw.c:		trap_BotMoveToGoal(&moveresult, bs->ms, &goal, TFL_DEFAULT);
ai_qbmw.c:			bs->ai_state.last_action = ACTION_TO_TARGET;
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:		if (bs->enemy < 0) {
ai_qbmw.c:		goal.entitynum = bs->enemy;
ai_qbmw.c:		BotEntityInfo(bs->enemy, &entinfo);
ai_qbmw.c:		trap_BotMoveToGoal(&moveresult, bs->ms, &goal, TFL_DEFAULT);
ai_qbmw.c:			bs->ai_state.last_action = ACTION_TO_TARGET;
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:				  bs->ai_state.last_action = ACTION_FAILURE;
ai_qbmw.c:				  bs->ai_state.last_action = ACTION_TO_COVER;
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:				  bs->ai_state.last_action = ACTION_FAILURE;
ai_qbmw.c:				  bs->ai_state.last_action = ACTION_AW_COVER;
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:		if (bs->enemy < 0) {
ai_qbmw.c:		goal.entitynum = bs->enemy;
ai_qbmw.c:		BotEntityInfo(bs->enemy, &entinfo);
ai_qbmw.c:		trap_BotMoveToGoal(&moveresult, bs->ms, &goal, TFL_DEFAULT);
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:			bs->ai_state.last_action = ACTION_FAILURE;
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:			bs->ai_state.last_action = ACTION_FAILURE;
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:			bs->ai_state.last_action = ACTION_FAILURE;
ai_qbmw.c:			bs->ai_state.repeataction = MOVEMENT_REPEAT;
ai_qbmw.c:		if (bs->inventory[INVENTORY_SHOTGUN]) {
ai_qbmw.c:			bs->weaponnum = WP_SHOTGUN;
ai_qbmw.c:			bs->ai_state.ai_bad_switch = qtrue;
ai_qbmw.c:		if (bs->inventory[INVENTORY_MACHINEGUN]) {
ai_qbmw.c:			bs->weaponnum = WP_MACHINEGUN;
ai_qbmw.c:			bs->ai_state.ai_bad_switch = qtrue;
ai_qbmw.c:		if (bs->inventory[INVENTORY_ROCKETLAUNCHER]) {
ai_qbmw.c:			bs->weaponnum = WP_ROCKET_LAUNCHER;
ai_qbmw.c:			bs->ai_state.ai_bad_switch = qtrue;
ai_qbmw.c:		if (bs->inventory[INVENTORY_RAILGUN]) {
ai_qbmw.c:			bs->weaponnum = WP_RAILGUN;
ai_qbmw.c:			bs->ai_state.ai_bad_switch = qtrue;
ai_qbmw.c:		if (bs->inventory[INVENTORY_PLASMAGUN]) {
ai_qbmw.c:			bs->weaponnum = WP_PLASMAGUN;
ai_qbmw.c:			bs->ai_state.ai_bad_switch = qtrue;
ai_qbmw.c:		trap_BotGetWeaponInfo(bs->ws, bs->weaponnum, &wi);
ai_qbmw.c:			if (bs->flags & BFL_ATTACKED) {
ai_qbmw.c:				trap_EA_Attack(bs->client);
ai_qbmw.c:			trap_EA_Attack(bs->client);
ai_qbmw.c:		bs->flags ^= BFL_ATTACKED;
ai_qbmw.c:	if (bs->enemy < 0)
ai_qbmw.c:	// Test reachability from bs->origin to cover
ai_qbmw.c:	if (trap_AAS_AreaTravelTimeToGoalArea(bs->areanum, bs->origin, BotPointAreaNum(cover), TFL_DEFAULT) >= MAX_COVER_TRAVEL_TIME)
ai_qbmw.c:	return !testVisible(bs->entitynum, cover, bs->viewangles, 360, bs->enemy);
ai_qbmw.c:	BotEntityInfo(bs->enemy, &entinfo);
ai_qbmw.c:	VectorSubtract(bs->origin, entinfo.origin, forward);
ai_qbmw.c:			VectorAdd(bs->origin, cover, cover);
ai_qbmw.c:				trap_BotMoveToGoal(&moveresult, bs->ms, &goal, TFL_DEFAULT);
ai_qbmw.c:			VectorAdd(bs->origin, cover, cover);
ai_qbmw.c:				trap_BotMoveToGoal(&moveresult, bs->ms, &goal, TFL_DEFAULT);
ai_qbmw.c:			VectorAdd(bs->origin, cover, cover);
ai_qbmw.c:				trap_BotMoveToGoal(&moveresult, bs->ms, &goal, TFL_DEFAULT);
ai_team.c:	if (!strlen(bs->teamleader)) return qfalse;
ai_team.c:	if (ClientFromName(bs->teamleader) == -1) return qfalse;
ai_team.c:	if (bs->client == toclient) {
ai_team.c:		trap_BotGetChatMessage(bs->cs, buf, sizeof(buf));
ai_team.c:		ClientName(bs->client, name, sizeof(name));
ai_team.c:		trap_BotQueueConsoleMessage(bs->cs, CMS_CHAT, teamchat);
ai_team.c:		trap_BotEnterChat(bs->cs, toclient, CHAT_TELL);
ai_team.c:	trap_BotGetChatMessage(bs->cs, buf, sizeof(buf));
ai_team.c:		trap_EA_Command(bs->client, va("vsay_team %s", voicechat));
ai_team.c:		trap_EA_Command(bs->client, va("vtell %d %s", toclient, voicechat));
ai_team.c:		trap_EA_Command(bs->client, va("vosay_team %s", voicechat));
ai_team.c:		trap_EA_Command(bs->client, va("votell %d %s", toclient, voicechat));
ai_team.c:	switch(bs->numteammates) {
ai_team.c:			if (teammates[0] != bs->flagcarrier) other = teammates[0];
ai_team.c:			if (teammates[0] != bs->flagcarrier) other = teammates[0];
ai_team.c:			if ( bs->flagcarrier != -1 ) {
ai_team.c:				ClientName(bs->flagcarrier, carriername, sizeof(carriername));
ai_team.c:				if (bs->flagcarrier == bs->client) {
ai_team.c:			if (teammates[2] != bs->flagcarrier) other = teammates[2];
ai_team.c:			if (bs->flagcarrier != -1) {
ai_team.c:				ClientName(bs->flagcarrier, carriername, sizeof(carriername));
ai_team.c:					if (teammates[i] == bs->flagcarrier) {
ai_team.c:					if (bs->flagcarrier == bs->client) {
ai_team.c:					if (teammates[i] == bs->flagcarrier) {
ai_team.c:				if (teammates[numteammates - i - 1] == bs->flagcarrier) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:		switch(bs->numteammates) {
ai_team.c:		switch(bs->numteammates) {
ai_team.c:			if (teammates[0] == bs->flagcarrier) other = teammates[1];
ai_team.c:			if (teammates[0] != bs->flagcarrier) other = teammates[0];
ai_team.c:			if (teammates[2] != bs->flagcarrier) other = teammates[2];
ai_team.c:				if (teammates[i] == bs->flagcarrier) {
ai_team.c:			if ( bs->flagcarrier != -1 ) {
ai_team.c:				ClientName(bs->flagcarrier, carriername, sizeof(carriername));
ai_team.c:					if (teammates[numteammates - i - 1] == bs->flagcarrier) {
ai_team.c:					if (bs->flagcarrier == bs->client) {
ai_team.c:					if (teammates[numteammates - i - 1] == bs->flagcarrier) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:	if (BotTeam(bs) == TEAM_RED) flagstatus = bs->redflagstatus * 2 + bs->blueflagstatus;
ai_team.c:	else flagstatus = bs->blueflagstatus * 2 + bs->redflagstatus;
ai_team.c:		if (teammates[0] == bs->client) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:				if (teammates[0] == bs->flagcarrier) other = teammates[1];
ai_team.c:				if (teammates[0] != bs->flagcarrier) other = teammates[0];
ai_team.c:				if (teammates[2] != bs->flagcarrier) other = teammates[2];
ai_team.c:				if ( bs->flagcarrier != -1 ) {
ai_team.c:					ClientName(bs->flagcarrier, carriername, sizeof(carriername));
ai_team.c:					if (bs->flagcarrier == bs->client) {
ai_team.c:					if (teammates[i] == bs->flagcarrier) {
ai_team.c:				if (bs->flagcarrier != -1) {
ai_team.c:					ClientName(bs->flagcarrier, carriername, sizeof(carriername));
ai_team.c:						if (teammates[numteammates - i - 1] == bs->flagcarrier) {
ai_team.c:						if (bs->flagcarrier == bs->client) {
ai_team.c:						if (teammates[numteammates - i - 1] == bs->flagcarrier) {
ai_team.c:				if (teammates[0] == bs->flagcarrier) other = teammates[1];
ai_team.c:				if (teammates[0] != bs->flagcarrier) other = teammates[0];
ai_team.c:				if (teammates[2] != bs->flagcarrier) other = teammates[2];
ai_team.c:				ClientName(bs->flagcarrier, carriername, sizeof(carriername));
ai_team.c:				if (bs->flagcarrier == bs->client) {
ai_team.c:					if (teammates[i] == bs->flagcarrier) {
ai_team.c:				ClientName(bs->flagcarrier, carriername, sizeof(carriername));
ai_team.c:					if (teammates[numteammates - i - 1] == bs->flagcarrier) {
ai_team.c:					if (bs->flagcarrier == bs->client) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:	switch(bs->neutralflagstatus) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:	if (!(bs->ctfstrategy & CTFS_AGRESSIVE)) {
ai_team.c:						ClientName(i, bs->teamleader, sizeof(bs->teamleader));
ai_team.c:			if (!bs->askteamleader_time && !bs->becometeamleader_time) {
ai_team.c:				if (bs->entergame_time + 10 > FloatTime()) {
ai_team.c:					bs->askteamleader_time = FloatTime() + 5 + random() * 10;
ai_team.c:					bs->becometeamleader_time = FloatTime() + 5 + random() * 10;
ai_team.c:			if (bs->askteamleader_time && bs->askteamleader_time < FloatTime()) {
ai_team.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_team.c:				bs->askteamleader_time = 0;
ai_team.c:				bs->becometeamleader_time = FloatTime() + 8 + random() * 10;
ai_team.c:			if (bs->becometeamleader_time && bs->becometeamleader_time < FloatTime()) {
ai_team.c:				trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_team.c:				ClientName(bs->client, netname, sizeof(netname));
ai_team.c:				strncpy(bs->teamleader, netname, sizeof(bs->teamleader));
ai_team.c:				bs->teamleader[sizeof(bs->teamleader)] = '\0';
ai_team.c:				bs->becometeamleader_time = 0;
ai_team.c:	bs->askteamleader_time = 0;
ai_team.c:	bs->becometeamleader_time = 0;
ai_team.c:	ClientName(bs->client, netname, sizeof(netname));
ai_team.c:	if (Q_stricmp(netname, bs->teamleader) != 0) return;
ai_team.c:			if (bs->numteammates != numteammates || bs->forceorders) {
ai_team.c:				bs->teamgiveorders_time = FloatTime();
ai_team.c:				bs->numteammates = numteammates;
ai_team.c:				bs->forceorders = qfalse;
ai_team.c:			if (bs->teamgiveorders_time && bs->teamgiveorders_time < FloatTime() - 5) {
ai_team.c:				bs->teamgiveorders_time = FloatTime() + 120;
ai_team.c:			if (bs->numteammates != numteammates || bs->flagstatuschanged || bs->forceorders) {
ai_team.c:				bs->teamgiveorders_time = FloatTime();
ai_team.c:				bs->numteammates = numteammates;
ai_team.c:				bs->flagstatuschanged = qfalse;
ai_team.c:				bs->forceorders = qfalse;
ai_team.c:			if (bs->lastflagcapture_time < FloatTime() - 240) {
ai_team.c:				bs->lastflagcapture_time = FloatTime();
ai_team.c:					bs->ctfstrategy ^= CTFS_AGRESSIVE;
ai_team.c:					bs->teamgiveorders_time = FloatTime();
ai_team.c:			if (bs->teamgiveorders_time && bs->teamgiveorders_time < FloatTime() - 3) {
ai_team.c:				bs->teamgiveorders_time = 0;
ai_team.c:			if (bs->numteammates != numteammates || bs->flagstatuschanged || bs->forceorders) {
ai_team.c:				bs->teamgiveorders_time = FloatTime();
ai_team.c:				bs->numteammates = numteammates;
ai_team.c:				bs->flagstatuschanged = qfalse;
ai_team.c:				bs->forceorders = qfalse;
ai_team.c:			if (bs->lastflagcapture_time < FloatTime() - 240) {
ai_team.c:				bs->lastflagcapture_time = FloatTime();
ai_team.c:					bs->ctfstrategy ^= CTFS_AGRESSIVE;
ai_team.c:					bs->teamgiveorders_time = FloatTime();
ai_team.c:			if (bs->teamgiveorders_time && bs->teamgiveorders_time < FloatTime() - 2) {
ai_team.c:				bs->teamgiveorders_time = 0;
ai_team.c:			if (bs->numteammates != numteammates || bs->forceorders) {
ai_team.c:				bs->teamgiveorders_time = FloatTime();
ai_team.c:				bs->numteammates = numteammates;
ai_team.c:				bs->forceorders = qfalse;
ai_team.c:			if (bs->teamgiveorders_time && bs->teamgiveorders_time < FloatTime() - 5) {
ai_team.c:				bs->teamgiveorders_time = FloatTime() + 30;
ai_team.c:			if (bs->numteammates != numteammates || bs->forceorders) {
ai_team.c:				bs->teamgiveorders_time = FloatTime();
ai_team.c:				bs->numteammates = numteammates;
ai_team.c:				bs->forceorders = qfalse;
ai_team.c:			if (bs->teamgiveorders_time && bs->teamgiveorders_time < FloatTime() - 5) {
ai_team.c:				bs->teamgiveorders_time = FloatTime() + 30;
ai_vcmd.c:	bs->decisionmaker = client;
ai_vcmd.c:	bs->ordered = qtrue;
ai_vcmd.c:	bs->order_time = FloatTime();
ai_vcmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_vcmd.c:	bs->ltgtype = LTG_GETFLAG;
ai_vcmd.c:	bs->teamgoal_time = FloatTime() + CTF_GETFLAG_TIME;
ai_vcmd.c:		bs->decisionmaker = client;
ai_vcmd.c:		bs->ordered = qtrue;
ai_vcmd.c:		bs->order_time = FloatTime();
ai_vcmd.c:		bs->teammessage_time = FloatTime() + 2 * random();
ai_vcmd.c:		bs->ltgtype = LTG_HARVEST;
ai_vcmd.c:		bs->teamgoal_time = FloatTime() + TEAM_HARVEST_TIME;
ai_vcmd.c:		bs->harvestaway_time = 0;
ai_vcmd.c:		bs->decisionmaker = client;
ai_vcmd.c:		bs->ordered = qtrue;
ai_vcmd.c:		bs->order_time = FloatTime();
ai_vcmd.c:		bs->teammessage_time = FloatTime() + 2 * random();
ai_vcmd.c:		bs->ltgtype = LTG_ATTACKENEMYBASE;
ai_vcmd.c:		bs->teamgoal_time = FloatTime() + TEAM_ATTACKENEMYBASE_TIME;
ai_vcmd.c:		bs->attackaway_time = 0;
ai_vcmd.c:			case TEAM_RED: memcpy(&bs->teamgoal, &redobelisk, sizeof(bot_goal_t)); break;
ai_vcmd.c:			case TEAM_BLUE: memcpy(&bs->teamgoal, &blueobelisk, sizeof(bot_goal_t)); break;
ai_vcmd.c:			case TEAM_RED: memcpy(&bs->teamgoal, &ctf_redflag, sizeof(bot_goal_t)); break;
ai_vcmd.c:			case TEAM_BLUE: memcpy(&bs->teamgoal, &ctf_blueflag, sizeof(bot_goal_t)); break;
ai_vcmd.c:	bs->decisionmaker = client;
ai_vcmd.c:	bs->ordered = qtrue;
ai_vcmd.c:	bs->order_time = FloatTime();
ai_vcmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_vcmd.c:	bs->ltgtype = LTG_DEFENDKEYAREA;
ai_vcmd.c:	bs->teamgoal_time = FloatTime() + TEAM_DEFENDKEYAREA_TIME;
ai_vcmd.c:	bs->defendaway_time = 0;
ai_vcmd.c:	bs->decisionmaker = client;
ai_vcmd.c:	bs->ltgtype = 0;
ai_vcmd.c:	bs->lead_time = 0;
ai_vcmd.c:	bs->lastgoal_ltgtype = 0;
ai_vcmd.c:	trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_vcmd.c:	bs->teamgoal.entitynum = -1;
ai_vcmd.c:			//if (BotEntityVisible(bs->entitynum, bs->eye, bs->viewangles, 360, client)) {
ai_vcmd.c:				bs->teamgoal.entitynum = client;
ai_vcmd.c:				bs->teamgoal.areanum = areanum;
ai_vcmd.c:				VectorCopy(entinfo.origin, bs->teamgoal.origin);
ai_vcmd.c:				VectorSet(bs->teamgoal.mins, -8, -8, -8);
ai_vcmd.c:				VectorSet(bs->teamgoal.maxs, 8, 8, 8);
ai_vcmd.c:	if (bs->teamgoal.entitynum < 0) {
ai_vcmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_vcmd.c:	bs->decisionmaker = client;
ai_vcmd.c:	bs->ordered = qtrue;
ai_vcmd.c:	bs->order_time = FloatTime();
ai_vcmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_vcmd.c:	bs->ltgtype = LTG_CAMPORDER;
ai_vcmd.c:	bs->teamgoal_time = FloatTime() + TEAM_CAMP_TIME;
ai_vcmd.c:	bs->teammate = client;
ai_vcmd.c:	bs->arrive_time = 0;
ai_vcmd.c:	bs->teamgoal.entitynum = -1;
ai_vcmd.c:			bs->teamgoal.entitynum = client;
ai_vcmd.c:			bs->teamgoal.areanum = areanum;
ai_vcmd.c:			VectorCopy(entinfo.origin, bs->teamgoal.origin);
ai_vcmd.c:			VectorSet(bs->teamgoal.mins, -8, -8, -8);
ai_vcmd.c:			VectorSet(bs->teamgoal.maxs, 8, 8, 8);
ai_vcmd.c:	if (bs->teamgoal.entitynum < 0) {
ai_vcmd.c:		trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_vcmd.c:	bs->decisionmaker = client;
ai_vcmd.c:	bs->ordered = qtrue;
ai_vcmd.c:	bs->order_time = FloatTime();
ai_vcmd.c:	bs->teammate = client;
ai_vcmd.c:	bs->teammatevisible_time = FloatTime();
ai_vcmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_vcmd.c:	bs->teamgoal_time = FloatTime() + TEAM_ACCOMPANY_TIME;
ai_vcmd.c:	bs->ltgtype = LTG_TEAMACCOMPANY;
ai_vcmd.c:	bs->formation_dist = 3.5 * 32;		//3.5 meter
ai_vcmd.c:	bs->arrive_time = 0;
ai_vcmd.c:	bs->decisionmaker = client;
ai_vcmd.c:	bs->ordered = qtrue;
ai_vcmd.c:	bs->order_time = FloatTime();
ai_vcmd.c:	bs->teammessage_time = FloatTime() + 2 * random();
ai_vcmd.c:	bs->ltgtype = LTG_RETURNFLAG;
ai_vcmd.c:	bs->teamgoal_time = FloatTime() + CTF_RETURNFLAG_TIME;
ai_vcmd.c:	bs->rushbaseaway_time = 0;
ai_vcmd.c:	ClientName(client, bs->teamleader, sizeof(bs->teamleader));
ai_vcmd.c:	if (!Q_stricmp(bs->teamleader, ClientName(client, netname, sizeof(netname)))) {
ai_vcmd.c:		bs->teamleader[0] = '\0';
ai_vcmd.c:	ClientName(bs->client, netname, sizeof(netname));
ai_vcmd.c:	if (!Q_stricmp(netname, bs->teamleader)) {
ai_vcmd.c:		trap_BotEnterChat(bs->cs, 0, CHAT_TEAM);
ai_vcmd.c:	trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_vcmd.c:	trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
ai_vcmd.c:	trap_BotEnterChat(bs->cs, client, CHAT_TELL);
ai_vcmd.c:	trap_EA_Action(bs->client, ACTION_AFFIRMATIVE);
