Oops so I made a linux build before a minute for nothing.
EDIT: Ok I just tested it. Team detection work good but sometimes the bots get confused and watch the enemy some time before to start to shoot it, maybe is because you use strange way for storing the teams information.
It is much better to get the teams for the real clients and bots both. This you can do if you put
Code:
if (msg_type == message_TeamInfo)
botMsgFunction = BotClient_CS_TeamInfo
in this parts of the code
Code:
else if (msg_dest == MSG_ALL)
{
// some code...
}
In This way you will get the teams for all the players in the server and you can store the teams in ThreatTab[].iTeam. Then you can use something like pBot->iTeam to get the bots teams. i.e
pBot->iTeam = Util_GetTeam(pBot->pEdict); and to update it on every 2 seconds or maybe 1.
Tell me if you don't think that this is good method.