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

ai_main.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.

Data Structures

struct  bot_activategoal_s
struct  bot_state_s
struct  bot_waypoint_s

Defines

#define BFL_AIMATENEMY   8
#define BFL_ATTACKED   2
#define BFL_ATTACKJUMPED   4
#define BFL_AVOIDRIGHT   16
#define BFL_FIGHTSUICIDAL   64
#define BFL_IDEALVIEWSET   32
#define BFL_STRAFERIGHT   1
#define CTF
#define CTF_GETFLAG_TIME   600
#define CTF_RETURNFLAG_TIME   180
#define CTF_ROAM_TIME   60
#define CTF_RUSHBASE_TIME   120
#define CTFS_AGRESSIVE   1
#define FloatTime()   floattime
#define LTG_ATTACKENEMYBASE   13
#define LTG_CAMP   7
#define LTG_CAMPORDER   8
#define LTG_DEFENDKEYAREA   3
#define LTG_GETFLAG   4
#define LTG_GETITEM   10
#define LTG_HARVEST   12
#define LTG_KILL   11
#define LTG_MAKELOVE_ONTOP   15
#define LTG_MAKELOVE_UNDER   14
#define LTG_PATROL   9
#define LTG_RETURNFLAG   6
#define LTG_RUSHBASE   5
#define LTG_TEAMACCOMPANY   2
#define LTG_TEAMHELP   1
#define MAX_ACTIVATEAREAS   32
#define MAX_ACTIVATESTACK   8
#define MAX_ITEMS   256
#define MAX_PROXMINES   64
#define PATROL_BACK   4
#define PATROL_LOOP   1
#define PATROL_REVERSE   2
#define PRESENCE_CROUCH   4
#define PRESENCE_NONE   1
#define PRESENCE_NORMAL   2
#define TEAM_ACCOMPANY_TIME   600
#define TEAM_ATTACKENEMYBASE_TIME   600
#define TEAM_CAMP_TIME   600
#define TEAM_DEFENDKEYAREA_TIME   600
#define TEAM_GETITEM_TIME   60
#define TEAM_HARVEST_TIME   120
#define TEAM_HELP_TIME   60
#define TEAM_KILL_SOMEONE   180
#define TEAM_LEAD_TIME   600
#define TEAM_PATROL_TIME   600
#define TEAMTP_ATTACKER   2
#define TEAMTP_DEFENDER   1

Typedefs

typedef bot_activategoal_s bot_activategoal_t
typedef bot_state_s bot_state_t
typedef bot_waypoint_s bot_waypoint_t

Functions

void QDECL QDECL BotAI_BotInitialChat (bot_state_t *bs, char *type,...)
int BotAI_GetClientState (int clientNum, playerState_t *state)
int BotAI_GetEntityState (int entityNum, entityState_t *state)
int BotAI_GetSnapshotEntity (int clientNum, int sequence, entityState_t *state)
void QDECL BotAI_Print (int type, char *fmt,...)
void BotAI_Trace (bsp_trace_t *bsptrace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask)
void BotEntityInfo (int entnum, aas_entityinfo_t *info)
void BotResetState (bot_state_t *bs)
int BotTeamLeader (bot_state_t *bs)
int NumBots (void)

Variables

float floattime


Define Documentation

#define BFL_AIMATENEMY   8
 

Definition at line 41 of file ai_main.h.

#define BFL_ATTACKED   2
 

Definition at line 39 of file ai_main.h.

#define BFL_ATTACKJUMPED   4
 

Definition at line 40 of file ai_main.h.

#define BFL_AVOIDRIGHT   16
 

Definition at line 42 of file ai_main.h.

#define BFL_FIGHTSUICIDAL   64
 

Definition at line 44 of file ai_main.h.

#define BFL_IDEALVIEWSET   32
 

Definition at line 43 of file ai_main.h.

#define BFL_STRAFERIGHT   1
 

Definition at line 38 of file ai_main.h.

#define CTF
 

Definition at line 34 of file ai_main.h.

#define CTF_GETFLAG_TIME   600
 

Definition at line 72 of file ai_main.h.

#define CTF_RETURNFLAG_TIME   180
 

Definition at line 74 of file ai_main.h.

#define CTF_ROAM_TIME   60
 

Definition at line 75 of file ai_main.h.

#define CTF_RUSHBASE_TIME   120
 

Definition at line 73 of file ai_main.h.

#define CTFS_AGRESSIVE   1
 

Definition at line 84 of file ai_main.h.

 
#define FloatTime  )     floattime
 

Definition at line 290 of file ai_main.h.

Referenced by AIEnter_Battle_Chase(), AIEnter_Respawn(), AIEnter_Stand(), AINode_Battle_Chase(), AINode_Battle_Fight(), AINode_Battle_NBG(), AINode_Battle_Retreat(), AINode_Intermission(), AINode_Respawn(), AINode_Seek_ActivateEntity(), AINode_Seek_LTG(), AINode_Seek_NBG(), AINode_Stand(), BotAIBlocked(), BotAimAtEnemy(), BotAIPredictObstacles(), BotAIRegularUpdate(), BotAISetupClient(), BotAlternateRoute(), BotAttackMove(), BotChat_Death(), BotChat_EndLevel(), BotChat_EnemySuicide(), BotChat_EnterGame(), BotChat_ExitGame(), BotChat_HitNoDeath(), BotChat_HitNoKill(), BotChat_HitTalking(), BotChat_Kill(), BotChat_Random(), BotChat_StartLevel(), BotCheckAir(), BotCheckAttack(), BotCheckConsoleMessages(), BotCheckEvents(), BotChooseWeapon(), BotClearPath(), BotCTFRetreatGoals(), BotCTFSeekGoals(), BotDeathmatchAI(), BotDumpNodeSwitches(), BotFindEnemy(), BotGetActivateGoal(), BotGetItemLongTermGoal(), BotGetLongTermGoal(), BotGetTime(), BotGoCamp(), BotGoForActivateGoal(), BotGoForAir(), BotIsGoingToActivateEntity(), BotLongTermGoal(), BotMatch_AttackEnemyBase(), BotMatch_Camp(), BotMatch_CTF(), BotMatch_DefendKeyArea(), BotMatch_GetFlag(), BotMatch_GetItem(), BotMatch_HelpAccompany(), BotMatch_Kill(), BotMatch_LeadTheWay(), BotMatch_Patrol(), BotMatch_ReturnFlag(), BotMatch_RushBase(), BotPopFromActivateGoalStack(), BotPushOntoActivateGoalStack(), BotReachedGoal(), BotRecordNodeSwitch(), BotRefuseOrder(), BotSetLastOrderedTask(), BotSetTeleportTime(), BotTeamAI(), BotVoiceChat_Camp(), BotVoiceChat_Defend(), BotVoiceChat_FollowMe(), BotVoiceChat_GetFlag(), BotVoiceChat_Offense(), BotVoiceChat_ReturnFlag(), and BotWantsToCamp().

#define LTG_ATTACKENEMYBASE   13
 

Definition at line 58 of file ai_main.h.

Referenced by BotCheckItemPickup(), BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), and BotSetTeamStatus().

#define LTG_CAMP   7
 

Definition at line 52 of file ai_main.h.

Referenced by BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), BotSetTeamStatus(), and BotWantsToCamp().

#define LTG_CAMPORDER   8
 

Definition at line 53 of file ai_main.h.

Referenced by BotCTFSeekGoals(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), BotSetTeamStatus(), and BotWantsToCamp().

#define LTG_DEFENDKEYAREA   3
 

Definition at line 48 of file ai_main.h.

Referenced by BotCTFSeekGoals(), BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), BotSetTeamStatus(), and BotWantsToCamp().

#define LTG_GETFLAG   4
 

Definition at line 49 of file ai_main.h.

Referenced by BotCheckItemPickup(), BotCTFSeekGoals(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), BotSetTeamStatus(), and BotWantsToCamp().

#define LTG_GETITEM   10
 

Definition at line 55 of file ai_main.h.

Referenced by BotCTFSeekGoals(), BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), and BotSetTeamStatus().

#define LTG_HARVEST   12
 

Definition at line 57 of file ai_main.h.

Referenced by BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), and BotSetTeamStatus().

#define LTG_KILL   11
 

Definition at line 56 of file ai_main.h.

Referenced by BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), and BotSetTeamStatus().

#define LTG_MAKELOVE_ONTOP   15
 

Definition at line 60 of file ai_main.h.

#define LTG_MAKELOVE_UNDER   14
 

Definition at line 59 of file ai_main.h.

Referenced by BotCTFSeekGoals().

#define LTG_PATROL   9
 

Definition at line 54 of file ai_main.h.

Referenced by BotCTFSeekGoals(), BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), and BotSetTeamStatus().

#define LTG_RETURNFLAG   6
 

Definition at line 51 of file ai_main.h.

Referenced by BotCTFSeekGoals(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), and BotSetTeamStatus().

#define LTG_RUSHBASE   5
 

Definition at line 50 of file ai_main.h.

Referenced by BotCTFSeekGoals(), BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), BotSetTeamStatus(), and BotWantsToCamp().

#define LTG_TEAMACCOMPANY   2
 

Definition at line 47 of file ai_main.h.

Referenced by BotChat_Random(), BotCTFSeekGoals(), BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), BotSetTeamStatus(), and BotWantsToCamp().

#define LTG_TEAMHELP   1
 

Definition at line 46 of file ai_main.h.

Referenced by BotChat_Random(), BotCTFSeekGoals(), BotGetLongTermGoal(), BotMatch_WhatAreYouDoing(), BotReportStatus(), BotSetInfoConfigString(), BotSetTeamStatus(), and BotWantsToCamp().

#define MAX_ACTIVATEAREAS   32
 

Definition at line 102 of file ai_main.h.

Referenced by BotGetActivateGoal().

#define MAX_ACTIVATESTACK   8
 

Definition at line 101 of file ai_main.h.

#define MAX_ITEMS   256
 

Definition at line 36 of file ai_main.h.

Referenced by CG_RegisterGraphics(), CG_RegisterSounds(), and SaveRegisteredItems().

#define MAX_PROXMINES   64
 

Definition at line 90 of file ai_main.h.

#define PATROL_BACK   4
 

Definition at line 79 of file ai_main.h.

#define PATROL_LOOP   1
 

Definition at line 77 of file ai_main.h.

#define PATROL_REVERSE   2
 

Definition at line 78 of file ai_main.h.

#define PRESENCE_CROUCH   4
 

Definition at line 88 of file ai_main.h.

#define PRESENCE_NONE   1
 

Definition at line 86 of file ai_main.h.

#define PRESENCE_NORMAL   2
 

Definition at line 87 of file ai_main.h.

#define TEAM_ACCOMPANY_TIME   600
 

Definition at line 63 of file ai_main.h.

#define TEAM_ATTACKENEMYBASE_TIME   600
 

Definition at line 70 of file ai_main.h.

#define TEAM_CAMP_TIME   600
 

Definition at line 65 of file ai_main.h.

#define TEAM_DEFENDKEYAREA_TIME   600
 

Definition at line 64 of file ai_main.h.

#define TEAM_GETITEM_TIME   60
 

Definition at line 68 of file ai_main.h.

#define TEAM_HARVEST_TIME   120
 

Definition at line 71 of file ai_main.h.

#define TEAM_HELP_TIME   60
 

Definition at line 62 of file ai_main.h.

#define TEAM_KILL_SOMEONE   180
 

Definition at line 69 of file ai_main.h.

#define TEAM_LEAD_TIME   600
 

Definition at line 67 of file ai_main.h.

#define TEAM_PATROL_TIME   600
 

Definition at line 66 of file ai_main.h.

#define TEAMTP_ATTACKER   2
 

Definition at line 82 of file ai_main.h.

Referenced by BotCTFSeekGoals(), and BotMatch_TaskPreference().

#define TEAMTP_DEFENDER   1
 

Definition at line 81 of file ai_main.h.


Typedef Documentation

typedef struct bot_activategoal_s bot_activategoal_t
 

Referenced by BotAIBlocked(), BotAIPredictObstacles(), BotEnableActivateGoalAreas(), BotFuncButtonActivateGoal(), BotFuncDoorActivateGoal(), BotGetActivateGoal(), BotGoForActivateGoal(), BotIsGoingToActivateEntity(), BotPrintActivateGoalInfo(), BotPushOntoActivateGoalStack(), and BotTriggerMultipleActivateGoal().

typedef struct bot_state_s bot_state_t
 

Referenced by AIEnter_Battle_Chase(), AIEnter_Battle_Fight(), AIEnter_Battle_NBG(), AIEnter_Battle_Retreat(), AIEnter_Battle_SuicidalFight(), AIEnter_Intermission(), AIEnter_Observer(), AIEnter_Respawn(), AIEnter_Seek_ActivateEntity(), AIEnter_Seek_LTG(), AIEnter_Seek_NBG(), AIEnter_Stand(), AINode_Battle_Chase(), AINode_Battle_Fight(), AINode_Battle_NBG(), AINode_Battle_Retreat(), AINode_Intermission(), AINode_Observer(), AINode_Respawn(), AINode_Seek_ActivateEntity(), AINode_Seek_LTG(), AINode_Seek_NBG(), AINode_Stand(), BotAddressedToBot(), BotAggression(), BotAI(), BotAI_BotInitialChat(), BotAIBlocked(), BotAimAtEnemy(), BotAIPredictObstacles(), BotAISetupClient(), BotAIShutdownClient(), BotAlternateRoute(), BotAttackMove(), BotBattleUseItems(), BotCanAndWantsToRocketJump(), BotChangeViewAngles(), BotChat_Death(), BotChat_EndLevel(), BotChat_EnemySuicide(), BotChat_EnterGame(), BotChat_ExitGame(), BotChat_HitNoDeath(), BotChat_HitNoKill(), BotChat_HitTalking(), BotChat_Kill(), BotChat_Random(), BotChat_StartLevel(), BotChatTest(), BotChatTime(), BotCheckAir(), BotCheckAttack(), BotCheckConsoleMessages(), BotCheckEvents(), BotCheckForGrenades(), BotCheckItemPickup(), BotCheckSnapshot(), BotChooseWeapon(), BotClearActivateGoalStack(), BotClearPath(), BotCreateGroup(), BotCTFCarryingFlag(), BotCTFOrders(), BotCTFOrders_BothFlagsAtBase(), BotCTFOrders_BothFlagsNotAtBase(), BotCTFOrders_EnemyFlagNotAtBase(), BotCTFOrders_FlagNotAtBase(), BotCTFRetreatGoals(), BotCTFSeekGoals(), BotDeathmatchAI(), BotDontAvoid(), BotDumpNodeSwitches(), BotEnemyFlag(), BotEnemyFlagCarrierVisible(), BotFeelingBad(), BotFindEnemy(), BotFuncButtonActivateGoal(), BotFuncDoorActivateGoal(), BotGetActivateGoal(), BotGetAirGoal(), BotGetAlternateRouteGoal(), BotGetItemLongTermGoal(), BotGetLongTermGoal(), BotGetMessageTeamGoal(), BotGetPatrolWaypoints(), BotGetTeamMateTaskPreference(), BotGoCamp(), BotGoForActivateGoal(), BotGoForAir(), BotGoForPowerups(), BotHasPersistantPowerupAndWeapon(), BotInLavaOrSlime(), BotIntermission(), BotIsDead(), BotIsFirstInRankings(), BotIsGoingToActivateEntity(), BotIsLastInRankings(), BotIsObserver(), BotLongTermGoal(), BotMapScripts(), 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(), BotMatchMessage(), BotNearbyGoal(), BotNearestVisibleItem(), BotNumTeamMates(), BotOppositeTeam(), BotPopFromActivateGoalStack(), BotPrintActivateGoalInfo(), BotPushOntoActivateGoalStack(), BotRandomMove(), BotRandomOpponentName(), BotReachedGoal(), BotReadSessionData(), BotRecordNodeSwitch(), BotRefuseOrder(), BotRememberLastOrderedTask(), BotReportStatus(), BotResetState(), BotRoamGoal(), BotSameTeam(), BotSayTeamOrder(), BotSayTeamOrderAlways(), BotSayVoiceTeamOrder(), BotSelectActivateWeapon(), BotSetInfoConfigString(), BotSetLastOrderedTask(), BotSetTeamMateTaskPreference(), BotSetTeamStatus(), BotSetTeleportTime(), BotSetupForMovement(), BotSetUserInfo(), BotSortTeamMatesByBaseTravelTime(), BotSortTeamMatesByTaskPreference(), BotSynonymContext(), BotTeam(), BotTeamAI(), BotTeamFlag(), BotTeamFlagCarrier(), BotTeamFlagCarrierVisible(), BotTeamGoals(), BotTeamLeader(), BotTeamOrders(), BotTriggerMultipleActivateGoal(), BotUpdateBattleInventory(), BotUpdateInput(), BotUpdateInventory(), BotValidChatPosition(), BotValidTeamLeader(), BotVisibleEnemies(), BotVisibleTeamMatesAndEnemies(), BotVoiceChat(), BotVoiceChat_Camp(), BotVoiceChat_Defend(), BotVoiceChat_DefendFlag(), BotVoiceChat_Dummy(), BotVoiceChat_FollowFlagCarrier(), BotVoiceChat_FollowMe(), BotVoiceChat_GetFlag(), BotVoiceChat_Offense(), BotVoiceChat_Patrol(), BotVoiceChat_ReturnFlag(), BotVoiceChat_StartLeader(), BotVoiceChat_StopLeader(), BotVoiceChat_WantOnDefense(), BotVoiceChat_WantOnOffense(), BotVoiceChat_WhoIsLeader(), BotVoiceChatCommand(), BotVoiceChatOnly(), BotWantsToCamp(), BotWantsToChase(), BotWantsToHelp(), BotWantsToRetreat(), BotWriteSessionData(), ClientOnSameTeamFromName(), FindEnemyByName(), FindHumanTeamLeader(), and NumPlayersOnSameTeam().

typedef struct bot_waypoint_s bot_waypoint_t
 

Referenced by BotCreateWayPoint(), BotFindWayPoint(), BotFreeWaypoints(), BotGetLongTermGoal(), BotGetMessageTeamGoal(), BotGetPatrolWaypoints(), and BotMatch_CheckPoint().


Function Documentation

void QDECL QDECL BotAI_BotInitialChat bot_state_t bs,
char *  type,
  ...
 

Definition at line 218 of file ai_main.c.

References bot_state_t, BotSynonymContext(), bot_state_s::cs, i, memset(), p, QDECL, trap_BotInitialChat(), type, va_arg, va_end, va_list, and va_start.

Referenced by BotChat_Death(), BotChat_EndLevel(), BotChat_EnemySuicide(), BotChat_EnterGame(), BotChat_ExitGame(), BotChat_HitNoDeath(), BotChat_HitNoKill(), BotChat_HitTalking(), BotChat_Kill(), BotChat_Random(), BotChat_StartLevel(), BotChatTest(), BotCreateGroup(), BotCTFOrders_BothFlagsAtBase(), BotCTFOrders_BothFlagsNotAtBase(), BotCTFOrders_EnemyFlagNotAtBase(), BotCTFOrders_FlagNotAtBase(), BotGetLongTermGoal(), BotLongTermGoal(), BotMatch_Camp(), BotMatch_CheckPoint(), BotMatch_Dismiss(), BotMatch_HelpAccompany(), BotMatch_JoinSubteam(), BotMatch_Kill(), BotMatch_LeadTheWay(), BotMatch_LeaveSubteam(), BotMatch_TaskPreference(), BotMatch_WhatAreYouDoing(), BotMatch_WhereAreYou(), BotMatch_WhichTeam(), BotTeamAI(), BotVoiceChat_Camp(), BotVoiceChat_FollowMe(), BotVoiceChat_Patrol(), BotVoiceChat_WantOnDefense(), BotVoiceChat_WantOnOffense(), and BotVoiceChat_WhoIsLeader().

00218                                                                     {
00219     int     i, mcontext;
00220     va_list ap;
00221     char    *p;
00222     char    *vars[MAX_MATCHVARIABLES];
00223 
00224     memset(vars, 0, sizeof(vars));
00225     va_start(ap, type);
00226     p = va_arg(ap, char *);
00227     for (i = 0; i < MAX_MATCHVARIABLES; i++) {
00228         if( !p ) {
00229             break;
00230         }
00231         vars[i] = p;
00232         p = va_arg(ap, char *);
00233     }
00234     va_end(ap);
00235 
00236     mcontext = BotSynonymContext(bs);
00237 
00238     trap_BotInitialChat( bs->cs, type, mcontext, vars[0], vars[1], vars[2], vars[3], vars[4], vars[5], vars[6], vars[7] );
00239 }

Here is the call graph for this function:

int BotAI_GetClientState int  clientNum,
playerState_t state
 

Definition at line 162 of file ai_main.c.

References gentity_s::client, g_entities, gentity_t, gentity_s::inuse, memcpy(), playerState_t, gclient_s::ps, and state.

Referenced by BotAI(), BotClientTravelTimeToGoal(), BotFirstClientInRankings(), BotIsFirstInRankings(), BotIsLastInRankings(), BotLastClientInRankings(), and EntityIsDead().

00162                                                                 {
00163     gentity_t   *ent;
00164 
00165     ent = &g_entities[clientNum];
00166     if ( !ent->inuse ) {
00167         return qfalse;
00168     }
00169     if ( !ent->client ) {
00170         return qfalse;
00171     }
00172 
00173     memcpy( state, &ent->client->ps, sizeof(playerState_t) );
00174     return qtrue;
00175 }

Here is the call graph for this function:

int BotAI_GetEntityState int  entityNum,
entityState_t state
 

Definition at line 182 of file ai_main.c.

References entityState_t, g_entities, gentity_t, gentity_s::inuse, entityShared_t::linked, memcpy(), memset(), gentity_s::r, gentity_s::s, state, and entityShared_t::svFlags.

Referenced by BotAI_GetSnapshotEntity(), BotCheckSnapshot(), and BotClearPath().

00182                                                                 {
00183     gentity_t   *ent;
00184 
00185     ent = &g_entities[entityNum];
00186     memset( state, 0, sizeof(entityState_t) );
00187     if (!ent->inuse) return qfalse;
00188     if (!ent->r.linked) return qfalse;
00189     if (ent->r.svFlags & SVF_NOCLIENT) return qfalse;
00190     memcpy( state, &ent->s, sizeof(entityState_t) );
00191     return qtrue;
00192 }

Here is the call graph for this function:

int BotAI_GetSnapshotEntity int  clientNum,
int  sequence,
entityState_t state
 

Definition at line 199 of file ai_main.c.

References BotAI_GetEntityState(), entityState_t, memset(), state, and trap_BotGetSnapshotEntity().

Referenced by BotCheckSnapshot().

00199                                                                                  {
00200     int     entNum;
00201 
00202     entNum = trap_BotGetSnapshotEntity( clientNum, sequence );
00203     if ( entNum == -1 ) {
00204         memset(state, 0, sizeof(entityState_t));
00205         return -1;
00206     }
00207 
00208     BotAI_GetEntityState( entNum, state );
00209 
00210     return sequence + 1;
00211 }

Here is the call graph for this function:

void QDECL BotAI_Print int  type,
char *  fmt,
  ...
 

Definition at line 95 of file ai_main.c.

References G_Error(), G_Printf(), PRT_ERROR, PRT_EXIT, PRT_FATAL, PRT_MESSAGE, PRT_WARNING, QDECL, S_COLOR_RED, S_COLOR_YELLOW, va_end, va_list, va_start, and vsprintf().

Referenced by AINode_Battle_Fight(), AINode_Battle_Retreat(), AINode_Seek_ActivateEntity(), BotAI(), BotAIBlocked(), BotAISetupClient(), BotCheckConsoleMessages(), BotCheckEvents(), BotCreateWayPoint(), BotDeathmatchAI(), BotDumpNodeSwitches(), BotGetActivateGoal(), BotGetItemLongTermGoal(), BotGPSToPosition(), BotMatchMessage(), BotRecordNodeSwitch(), BotReportStatus(), BotSetupAlternativeRouteGoals(), BotSetupDeathmatchAI(), BotTeamplayReport(), BotTestAAS(), ClientName(), and ClientSkin().

00095                                                  {
00096     char str[2048];
00097     va_list ap;
00098 
00099     va_start(ap, fmt);
00100     vsprintf(str, fmt, ap);
00101     va_end(ap);
00102 
00103     switch(type) {
00104         case PRT_MESSAGE: {
00105             G_Printf("%s", str);
00106             break;
00107         }
00108         case PRT_WARNING: {
00109             G_Printf( S_COLOR_YELLOW "Warning: %s", str );
00110             break;
00111         }
00112         case PRT_ERROR: {
00113             G_Printf( S_COLOR_RED "Error: %s", str );
00114             break;
00115         }
00116         case PRT_FATAL: {
00117             G_Printf( S_COLOR_RED "Fatal: %s", str );
00118             break;
00119         }
00120         case PRT_EXIT: {
00121             G_Error( S_COLOR_RED "Exit: %s", str );
00122             break;
00123         }
00124         default: {
00125             G_Printf( "unknown print type\n" );
00126             break;
00127         }
00128     }
00129 }

Here is the call graph for this function:

void BotAI_Trace bsp_trace_t bsptrace,
vec3_t  start,
vec3_t  mins,
vec3_t  maxs,
vec3_t  end,
int  passent,
int  contentmask
 

Definition at line 137 of file ai_main.c.

References trace_t::allsolid, bsp_trace_s::allsolid, bsp_trace_t, bsp_trace_s::contents, cplane_s::dist, bsp_trace_s::endpos, trace_t::endpos, bsp_trace_s::ent, trace_t::entityNum, bsp_trace_s::exp_dist, trace_t::fraction, bsp_trace_s::fraction, cplane_s::normal, trace_t::plane, bsp_trace_s::plane, bsp_trace_s::sidenum, cplane_s::signbits, trace_t::startsolid, bsp_trace_s::startsolid, bsp_trace_s::surface, trace_t::surfaceFlags, trap_Trace(), cplane_s::type, bsp_surface_s::value, and VectorCopy.

Referenced by AINode_Seek_ActivateEntity(), BotAimAtEnemy(), BotCheckAttack(), BotClearPath(), BotEntityVisible(), BotFindEnemy(), BotFuncButtonActivateGoal(), BotGetAirGoal(), BotNearestVisibleItem(), BotRoamGoal(), and BotValidChatPosition().

00137                                                                                                                           {
00138     trace_t trace;
00139 
00140     trap_Trace(&trace, start, mins, maxs, end, passent, contentmask);
00141     //copy the trace information
00142     bsptrace->allsolid = trace.allsolid;
00143     bsptrace->startsolid = trace.startsolid;
00144     bsptrace->fraction = trace.fraction;
00145     VectorCopy(trace.endpos, bsptrace->endpos);
00146     bsptrace->plane.dist = trace.plane.dist;
00147     VectorCopy(trace.plane.normal, bsptrace->plane.normal);
00148     bsptrace->plane.signbits = trace.plane.signbits;
00149     bsptrace->plane.type = trace.plane.type;
00150     bsptrace->surface.value = trace.surfaceFlags;
00151     bsptrace->ent = trace.entityNum;
00152     bsptrace->exp_dist = 0;
00153     bsptrace->sidenum = 0;
00154     bsptrace->contents = 0;
00155 }

Here is the call graph for this function:

void BotEntityInfo int  entnum,
aas_entityinfo_t info
 

Definition at line 684 of file ai_main.c.

References aas_entityinfo_t, and trap_AAS_EntityInfo().

Referenced by AINode_Battle_Fight(), AINode_Battle_NBG(), AINode_Battle_Retreat(), AINode_Seek_ActivateEntity(), BotAIBlocked(), BotAimAtEnemy(), BotAttackMove(), BotChat_HitNoDeath(), BotChat_HitNoKill(), BotCheckAttack(), BotCheckEvents(), BotCTFSeekGoals(), BotEnemyFlagCarrierVisible(), BotEntityVisible(), BotFindEnemy(), BotGetActivateGoal(), BotGetLongTermGoal(), BotGoForActivateGoal(), BotLongTermGoal(), BotMapScripts(), BotMatch_Camp(), BotMatch_HelpAccompany(), BotMatch_LeadTheWay(), BotSetTeamStatus(), BotTeamFlagCarrier(), BotTeamFlagCarrierVisible(), BotUpdateBattleInventory(), BotVisibleEnemies(), BotVisibleTeamMatesAndEnemies(), BotVoiceChat_Camp(), BotVoiceChat_FollowMe(), BotWantsToChase(), and BotWantsToRetreat().

00684                                                        {
00685     trap_AAS_EntityInfo(entnum, info);
00686 }

Here is the call graph for this function:

void BotResetState bot_state_t bs  ) 
 

Definition at line 1297 of file ai_main.c.

References bot_settings_t, bot_state_t, BotFreeWaypoints(), bot_state_s::character, bot_state_s::checkpoints, bot_state_s::client, bot_state_s::cs, bot_state_s::cur_ps, bot_state_s::entergame_time, bot_state_s::entitynum, bot_state_s::gs, bot_state_s::inuse, memcpy(), memset(), bot_state_s::ms, bot_state_s::patrolpoints, playerState_t, bot_state_s::settings, trap_BotResetAvoidGoals(), trap_BotResetAvoidReach(), trap_BotResetGoalState(), trap_BotResetMoveState(), trap_BotResetWeaponState(), and bot_state_s::ws.

Referenced by AIEnter_Intermission(), AIEnter_Observer(), and BotAILoadMap().

01297                                     {
01298     int client, entitynum, inuse;
01299     int movestate, goalstate, chatstate, weaponstate;
01300     bot_settings_t settings;
01301     int character;
01302     playerState_t ps;                           //current player state
01303     float entergame_time;
01304 
01305     //save some things that should not be reset here
01306     memcpy(&settings, &bs->