00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #define MAX_AVOIDGOALS 256
00017 #define MAX_GOALSTACK 8
00018
00019 #define GFL_NONE 0
00020 #define GFL_ITEM 1
00021 #define GFL_ROAM 2
00022 #define GFL_DROPPED 4
00023
00024
00025 typedef struct bot_goal_s
00026 {
00027 vec3_t origin;
00028 int areanum;
00029 vec3_t mins, maxs;
00030 int entitynum;
00031 int number;
00032 int flags;
00033 int iteminfo;
00034 } bot_goal_t;
00035
00036
00037 void BotResetGoalState(int goalstate);
00038
00039 void BotResetAvoidGoals(int goalstate);
00040
00041 void BotRemoveFromAvoidGoals(int goalstate, int number);
00042
00043 void BotPushGoal(int goalstate, bot_goal_t *goal);
00044
00045 void BotPopGoal(int goalstate);
00046
00047 void BotEmptyGoalStack(int goalstate);
00048
00049 void BotDumpAvoidGoals(int goalstate);
00050
00051 void BotDumpGoalStack(int goalstate);
00052
00053 void BotGoalName(int number, char *name, int size);
00054
00055 int BotGetTopGoal(int goalstate, bot_goal_t *goal);
00056
00057 int BotGetSecondGoal(int goalstate, bot_goal_t *goal);
00058
00059 int BotChooseLTGItem(int goalstate, vec3_t origin, int *inventory, int travelflags);
00060
00061
00062
00063
00064 int BotChooseNBGItem(int goalstate, vec3_t origin, int *inventory, int travelflags,
00065 bot_goal_t *ltg, float maxtime);
00066
00067 int BotTouchingGoal(vec3_t origin, bot_goal_t *goal);
00068
00069 int BotItemGoalInVisButNotVisible(int viewer, vec3_t eye, vec3_t viewangles, bot_goal_t *goal);
00070
00071
00072 int BotGetLevelItemGoal(int index, char *classname, bot_goal_t *goal);
00073
00074 int BotGetNextCampSpotGoal(int num, bot_goal_t *goal);
00075
00076 int BotGetMapLocationGoal(char *name, bot_goal_t *goal);
00077
00078 float BotAvoidGoalTime(int goalstate, int number);
00079
00080 void BotSetAvoidGoalTime(int goalstate, int number, float avoidtime);
00081
00082 void BotInitLevelItems(void);
00083
00084 void BotUpdateEntityItems(void);
00085
00086 void BotInterbreedGoalFuzzyLogic(int parent1, int parent2, int child);
00087
00088 void BotSaveGoalFuzzyLogic(int goalstate, char *filename);
00089
00090 void BotMutateGoalFuzzyLogic(int goalstate, float range);
00091
00092 int BotLoadItemWeights(int goalstate, char *filename);
00093
00094 void BotFreeItemWeights(int goalstate);
00095
00096 int BotAllocGoalState(int client);
00097
00098 void BotFreeGoalState(int handle);
00099
00100 int BotSetupGoalAI(void);
00101
00102 void BotShutdownGoalAI(void);