Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ai_cmd.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

int BotMatchMessage (bot_state_t *bs, char *message)
void BotPrintTeamGoal (bot_state_t *bs)

Variables

int notleader [MAX_CLIENTS]


Function Documentation

int BotMatchMessage bot_state_t bs,
char *  message
 

Definition at line 1799 of file ai_cmd.c.

References bot_match_t, bot_state_t, BotAI_Print(), BotMatch_AttackEnemyBase(), BotMatch_Camp(), BotMatch_CheckPoint(), BotMatch_CTF(), BotMatch_DefendKeyArea(), BotMatch_Dismiss(), BotMatch_EnterGame(), BotMatch_FormationSpace(), BotMatch_GetFlag(), BotMatch_GetItem(), BotMatch_HelpAccompany(), BotMatch_JoinSubteam(), BotMatch_Kill(), BotMatch_LeadTheWay(), BotMatch_LeaveSubteam(), BotMatch_NewLeader(), BotMatch_Patrol(), BotMatch_ReturnFlag(), BotMatch_RushBase(), BotMatch_StartTeamLeaderShip(), BotMatch_StopTeamLeaderShip(), BotMatch_Suicide(), BotMatch_TaskPreference(), BotMatch_WhatAreYouDoing(), BotMatch_WhatIsMyCommand(), BotMatch_WhereAreYou(), BotMatch_WhichTeam(), BotMatch_WhoIsTeamLeader(), bot_state_s::client, match(), MSG_ACCOMPANY, MSG_ATTACKENEMYBASE, MSG_CAMP, MSG_CHECKPOINT, MSG_CREATENEWFORMATION, MSG_CTF, MSG_DEFENDKEYAREA, MSG_DISMISS, MSG_DOFORMATION, MSG_ENTERGAME, MSG_FORMATIONPOSITION, MSG_FORMATIONSPACE, MSG_GETFLAG, MSG_GETITEM, MSG_HARVEST, MSG_HELP, MSG_JOINSUBTEAM, MSG_KILL, MSG_LEADTHEWAY, MSG_LEAVESUBTEAM, MSG_NEWLEADER, MSG_PATROL, MSG_RETURNFLAG, MSG_RUSHBASE, MSG_STARTTEAMLEADERSHIP, MSG_STOPTEAMLEADERSHIP, MSG_SUICIDE, MSG_TASKPREFERENCE, MSG_WAIT, MSG_WHATAREYOUDOING, MSG_WHATISMYCOMMAND, MSG_WHEREAREYOU, MSG_WHICHTEAM, MSG_WHOISTEAMLAEDER, MTCONTEXT_CTF, MTCONTEXT_INITIALTEAMCHAT, MTCONTEXT_MISC, PRT_MESSAGE, trap_BotFindMatch(), trap_EA_SayTeam(), and bot_match_s::type.

Referenced by BotCheckConsoleMessages().

01799                                                     {
01800     bot_match_t match;
01801 
01802     match.type = 0;
01803     //if it is an unknown message
01804     if (!trap_BotFindMatch(message, &match, MTCONTEXT_MISC
01805                                             |MTCONTEXT_INITIALTEAMCHAT
01806                                             |MTCONTEXT_CTF)) {
01807         return qfalse;
01808     }
01809     //react to the found message
01810     switch(match.type)
01811     {
01812         case MSG_HELP:                  //someone calling for help
01813         case MSG_ACCOMPANY:             //someone calling for company
01814         {
01815             BotMatch_HelpAccompany(bs, &match);
01816             break;
01817         }
01818         case MSG_DEFENDKEYAREA:         //teamplay defend a key area
01819         {
01820             BotMatch_DefendKeyArea(bs, &match);
01821             break;
01822         }
01823         case MSG_CAMP:                  //camp somewhere
01824         {
01825             BotMatch_Camp(bs, &match);
01826             break;
01827         }
01828         case MSG_PATROL:                //patrol between several key areas
01829         {
01830             BotMatch_Patrol(bs, &match);
01831             break;
01832         }
01833         //CTF & 1FCTF
01834         case MSG_GETFLAG:               //ctf get the enemy flag
01835         {
01836             BotMatch_GetFlag(bs, &match);
01837             break;
01838         }
01839 #ifdef MISSIONPACK
01840         //CTF & 1FCTF & Obelisk & Harvester
01841         case MSG_ATTACKENEMYBASE:
01842         {
01843             BotMatch_AttackEnemyBase(bs, &match);
01844             break;
01845         }
01846         //Harvester
01847         case MSG_HARVEST:
01848         {
01849             BotMatch_Harvest(bs, &match);
01850             break;
01851         }
01852 #endif
01853         //CTF & 1FCTF & Harvester
01854         case MSG_RUSHBASE:              //ctf rush to the base
01855         {
01856             BotMatch_RushBase(bs, &match);
01857             break;
01858         }
01859         //CTF & 1FCTF
01860         case MSG_RETURNFLAG:
01861         {
01862             BotMatch_ReturnFlag(bs, &match);
01863             break;
01864         }
01865         //CTF & 1FCTF & Obelisk & Harvester
01866         case MSG_TASKPREFERENCE:
01867         {
01868             BotMatch_TaskPreference(bs, &match);
01869             break;
01870         }
01871         //CTF & 1FCTF
01872         case MSG_CTF:
01873         {
01874             BotMatch_CTF(bs, &match);
01875             break;
01876         }
01877         case MSG_GETITEM:
01878         {
01879             BotMatch_GetItem(bs, &match);
01880             break;
01881         }
01882         case MSG_JOINSUBTEAM:           //join a sub team
01883         {
01884             BotMatch_JoinSubteam(bs, &match);
01885             break;
01886         }
01887         case MSG_LEAVESUBTEAM:          //leave a sub team
01888         {
01889             BotMatch_LeaveSubteam(bs, &match);
01890             break;
01891         }
01892         case MSG_WHICHTEAM:
01893         {
01894             BotMatch_WhichTeam(bs, &match);
01895             break;
01896         }
01897         case MSG_CHECKPOINT:            //remember a check point
01898         {
01899             BotMatch_CheckPoint(bs, &match);
01900             break;
01901         }
01902         case MSG_CREATENEWFORMATION:    //start the creation of a new formation
01903         {
01904             trap_EA_SayTeam(bs->client, "the part of my brain to create formations has been damaged");
01905             break;
01906         }
01907         case MSG_FORMATIONPOSITION:     //tell someone his/her position in the formation
01908         {
01909             trap_EA_SayTeam(bs->client, "the part of my brain to create formations has been damaged");
01910             break;
01911         }
01912         case MSG_FORMATIONSPACE:        //set the formation space
01913         {
01914             BotMatch_FormationSpace(bs, &match);
01915             break;
01916         }
01917         case MSG_DOFORMATION:           //form a certain formation
01918         {
01919             break;
01920         }
01921         case MSG_DISMISS:               //dismiss someone
01922         {
01923             BotMatch_Dismiss(bs, &match);
01924             break;
01925         }
01926         case MSG_STARTTEAMLEADERSHIP:   //someone will become the team leader
01927         {
01928             BotMatch_StartTeamLeaderShip(bs, &match);
01929             break;
01930         }
01931         case MSG_STOPTEAMLEADERSHIP:    //someone will stop being the team leader
01932         {
01933             BotMatch_StopTeamLeaderShip(bs, &match);
01934             break;
01935         }
01936         case MSG_WHOISTEAMLAEDER:
01937         {
01938             BotMatch_WhoIsTeamLeader(bs, &match);
01939             break;
01940         }
01941         case MSG_WHATAREYOUDOING:       //ask a bot what he/she is doing
01942         {
01943             BotMatch_WhatAreYouDoing(bs, &match);
01944             break;
01945         }
01946         case MSG_WHATISMYCOMMAND:
01947         {
01948             BotMatch_WhatIsMyCommand(bs, &match);
01949             break;
01950         }
01951         case MSG_WHEREAREYOU:
01952         {
01953             BotMatch_WhereAreYou(bs, &match);
01954             break;
01955         }
01956         case MSG_LEADTHEWAY:
01957         {
01958             BotMatch_LeadTheWay(bs, &match);
01959             break;
01960         }
01961         case MSG_KILL:
01962         {
01963             BotMatch_Kill(bs, &match);
01964             break;
01965         }
01966         case MSG_ENTERGAME:             //someone entered the game
01967         {
01968             BotMatch_EnterGame(bs, &match);
01969             break;
01970         }
01971         case MSG_NEWLEADER:
01972         {
01973             BotMatch_NewLeader(bs, &match);
01974             break;
01975         }
01976         case MSG_WAIT:
01977         {
01978             break;
01979         }
01980         case MSG_SUICIDE:
01981         {
01982             BotMatch_Suicide(bs, &match);
01983             break;
01984         }
01985         default:
01986         {
01987             BotAI_Print(PRT_MESSAGE, "unknown match type\n");
01988             break;
01989         }
01990     }
01991     return qtrue;
01992 }

Here is the call graph for this function:

void BotPrintTeamGoal bot_state_t bs  ) 
 

Referenced by BotCTFSeekGoals(), BotMatch_AttackEnemyBase(), BotMatch_Camp(), BotMatch_DefendKeyArea(), BotMatch_GetFlag(), BotMatch_GetItem(), BotMatch_HelpAccompany(), BotMatch_Kill(), BotMatch_Patrol(), BotMatch_ReturnFlag(), BotMatch_RushBase(), BotVoiceChat_Camp(), BotVoiceChat_Defend(), BotVoiceChat_FollowFlagCarrier(), BotVoiceChat_FollowMe(), BotVoiceChat_GetFlag(), BotVoiceChat_Offense(), BotVoiceChat_Patrol(), and BotVoiceChat_ReturnFlag().


Variable Documentation

int notleader[MAX_CLIENTS]
 

Definition at line 59 of file ai_cmd.c.

Referenced by BotMatch_EnterGame(), BotMatch_StopTeamLeaderShip(), BotVoiceChat_StopLeader(), and FindHumanTeamLeader().


Generated on Thu Aug 25 13:41:30 2005 for Quake III Arena by  doxygen 1.3.9.1