g_ai.h
Go to the documentation of this file.00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef G_AI_H
00027 #define G_AI_H
00028
00029 typedef struct {
00030 pos3_t to;
00031 pos3_t stop;
00032 shoot_types_t shootType;
00033 byte shots;
00034 edict_t *target;
00035 const fireDef_t *fd;
00036 int z_align;
00037 } aiAction_t;
00038
00039 #define GUETE_HIDE 60
00040 #define GUETE_CLOSE_IN 20
00041 #define GUETE_KILL 30
00042 #define GUETE_RANDOM 10
00043 #define GUETE_REACTION_ERADICATION 30
00044 #define GUETE_REACTION_FEAR_FACTOR 20
00045 #define GUETE_CIV_FACTOR 0.25
00046
00047 #define GUETE_CIV_RANDOM 10
00048 #define GUETE_RUN_AWAY 50
00049 #define GUETE_CIV_LAZINESS 5
00050 #define RUN_AWAY_DIST 160
00051 #define WAYPOINT_CIV_DIST 768
00052
00053 #define GUETE_MISSION_OPPONENT_TARGET 50
00054 #define GUETE_MISSION_TARGET 60
00055
00056 #define AI_ACTION_NOTHING_FOUND -10000.0
00057
00058 #define CLOSE_IN_DIST 1200.0
00059 #define SPREAD_FACTOR 8.0
00060 #define SPREAD_NORM(x) (x > 0 ? SPREAD_FACTOR/(x*torad) : 0)
00061
00062 #define HIDE_DIST 7
00063 #define HERD_DIST 7
00064
00065
00066
00067
00068 void AI_TurnIntoDirection(edict_t *ent, const pos3_t pos);
00069 qboolean AI_FindHidingLocation(int team, edict_t *ent, const pos3_t from, int *tuLeft);
00070 qboolean AI_FindHerdLocation(edict_t *ent, const pos3_t from, const vec3_t target, int tu);
00071 int AI_GetHidingTeam(const edict_t *ent);
00072 const item_t *AI_GetItemForShootType(shoot_types_t shootType, const edict_t *ent);
00073
00074
00075
00076
00077 void AIL_ActorThink(player_t * player, edict_t * ent);
00078 int AIL_InitActor(edict_t * ent, char *type, char *subtype);
00079 void AIL_Cleanup(void);
00080 void AIL_Init(void);
00081 void AIL_Shutdown(void);
00082
00083 #endif