00001 #ifndef __AI__
00002 #define __AI__
00003
00004
00005 typedef enum
00006 {
00007 DIST_MELEE,
00008 DIST_LONG,
00009 } distance_e;
00010
00011
00012 typedef enum
00013 {
00014 ATTACK_MELEE,
00015 ATTACK_RANGE,
00016 } attack_e;
00017
00018 enum
00019 {
00020 SQUAD_IDLE,
00021 SQUAD_STAND_AND_SHOOT,
00022 SQUAD_RETREAT,
00023 SQUAD_COVER,
00024 SQUAD_TRANSITION,
00025 SQUAD_POINT,
00026 SQUAD_SCOUT,
00027 NUM_SQUAD_STATES,
00028 };
00029
00030
00031 typedef enum
00032 {
00033 RANK_CIVILIAN,
00034 RANK_CREWMAN,
00035 RANK_ENSIGN,
00036 RANK_LT_JG,
00037 RANK_LT,
00038 RANK_LT_COMM,
00039 RANK_COMMANDER,
00040 RANK_CAPTAIN
00041 } rank_t;
00042
00043 qboolean NPC_CheckPlayerTeamStealth( void );
00044
00045
00046 void NPC_BSGrenadier_Default( void );
00047
00048
00049 void NPC_BSSniper_Default( void );
00050
00051
00052 void NPC_BSST_Investigate( void );
00053 void NPC_BSST_Default( void );
00054 void NPC_BSST_Sleep( void );
00055
00056
00057 void NPC_BSJedi_Investigate( void );
00058 void NPC_BSJedi_Default( void );
00059 void NPC_BSJedi_FollowLeader( void );
00060
00061
00062 void NPC_BSDroid_Default( void );
00063
00064
00065 void NPC_BSImperialProbe_Default( void );
00066
00067
00068 void NPC_BSATST_Default( void );
00069
00070 void NPC_BSInterrogator_Default( void );
00071
00072
00073 void NPC_BSMark1_Default( void );
00074
00075
00076 void NPC_BSMark2_Default( void );
00077
00078
00079 void NPC_BSMineMonster_Default( void );
00080 void NPC_BSHowler_Default( void );
00081 void NPC_BSRancor_Default( void );
00082
00083
00084
00085 #define MAX_FRAME_GROUPS 32
00086
00087 typedef struct AIGroupMember_s
00088 {
00089 int number;
00090 int waypoint;
00091 int pathCostToEnemy;
00092 int closestBuddy;
00093 } AIGroupMember_t;
00094
00095 #define MAX_GROUP_MEMBERS 32
00096
00097 typedef struct AIGroupInfo_s
00098 {
00099 int numGroup;
00100 qboolean processed;
00101 team_t team;
00102 gentity_t *enemy;
00103 int enemyWP;
00104 int speechDebounceTime;
00105 int lastClearShotTime;
00106 int lastSeenEnemyTime;
00107 int morale;
00108 int moraleAdjust;
00109 int moraleDebounce;
00110 int memberValidateTime;
00111 int activeMemberNum;
00112 gentity_t *commander;
00113 vec3_t enemyLastSeenPos;
00114 int numState[ NUM_SQUAD_STATES ];
00115 AIGroupMember_t member[ MAX_GROUP_MEMBERS ];
00116 } AIGroupInfo_t;
00117
00118 int AI_GetGroupSize( vec3_t origin, int radius, team_t playerTeam, gentity_t *avoid );
00119 int AI_GetGroupSize2( gentity_t *ent, int radius );
00120
00121 void AI_GetGroup( gentity_t *self );
00122
00123 qboolean AI_CheckEnemyCollision( gentity_t *ent, qboolean takeEnemy );
00124 gentity_t *AI_DistributeAttack( gentity_t *attacker, gentity_t *enemy, team_t team, int threshold );
00125
00126 #endif //__AI__