so botlib doesn't outright crash.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3397 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2059803eb5
commit
8019ad0fae
1 changed files with 156 additions and 156 deletions
|
@ -169,39 +169,39 @@ typedef struct bot_entitystate_s
|
|||
typedef struct botlib_import_s
|
||||
{
|
||||
//print messages from the bot library
|
||||
void (QDECL *Print)(int type, char *fmt, ...);
|
||||
void (QDECL *Print)(int type, char *fmt, ...) LIKEPRINTF(2);
|
||||
//trace a bbox through the world
|
||||
void (*Trace)(bsp_trace_t *trace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask);
|
||||
void (QDECL *Trace)(bsp_trace_t *trace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int passent, int contentmask);
|
||||
//trace a bbox against a specific entity
|
||||
void (*EntityTrace)(bsp_trace_t *trace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int entnum, int contentmask);
|
||||
void (QDECL *EntityTrace)(bsp_trace_t *trace, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int entnum, int contentmask);
|
||||
//retrieve the contents at the given point
|
||||
int (*PointContents)(vec3_t point);
|
||||
int (QDECL *PointContents)(vec3_t point);
|
||||
//check if the point is in potential visible sight
|
||||
int (*inPVS)(vec3_t p1, vec3_t p2);
|
||||
int (QDECL *inPVS)(vec3_t p1, vec3_t p2);
|
||||
//retrieve the BSP entity data lump
|
||||
char *(*BSPEntityData)(void);
|
||||
char *(QDECL *BSPEntityData)(void);
|
||||
//
|
||||
void (*BSPModelMinsMaxsOrigin)(int modelnum, vec3_t angles, vec3_t mins, vec3_t maxs, vec3_t origin);
|
||||
void (QDECL *BSPModelMinsMaxsOrigin)(int modelnum, vec3_t angles, vec3_t mins, vec3_t maxs, vec3_t origin);
|
||||
//send a bot client command
|
||||
void (*BotClientCommand)(int client, char *command);
|
||||
void (QDECL *BotClientCommand)(int client, char *command);
|
||||
//memory allocation
|
||||
void *(*GetMemory)(int size); // allocate from Zone
|
||||
void (*FreeMemory)(void *ptr); // free memory from Zone
|
||||
int (*AvailableMemory)(void); // available Zone memory
|
||||
void *(*HunkAlloc)(int size); // allocate from hunk
|
||||
void *(QDECL *GetMemory)(int size); // allocate from Zone
|
||||
void (QDECL *FreeMemory)(void *ptr); // free memory from Zone
|
||||
int (QDECL *AvailableMemory)(void); // available Zone memory
|
||||
void *(QDECL *HunkAlloc)(int size); // allocate from hunk
|
||||
//file system access
|
||||
int (*FS_FOpenFile)( const char *qpath, fileHandle_t *file, fsMode_t mode );
|
||||
int (*FS_Read)( void *buffer, int len, fileHandle_t f );
|
||||
int (*FS_Write)( const void *buffer, int len, fileHandle_t f );
|
||||
void (*FS_FCloseFile)( fileHandle_t f );
|
||||
int (*FS_Seek)( fileHandle_t f, long offset, int origin );
|
||||
int (QDECL *FS_FOpenFile)( const char *qpath, fileHandle_t *file, fsMode_t mode );
|
||||
int (QDECL *FS_Read)( void *buffer, int len, fileHandle_t f );
|
||||
int (QDECL *FS_Write)( const void *buffer, int len, fileHandle_t f );
|
||||
void (QDECL *FS_FCloseFile)( fileHandle_t f );
|
||||
int (QDECL *FS_Seek)( fileHandle_t f, long offset, int origin );
|
||||
//debug visualisation stuff
|
||||
int (*DebugLineCreate)(void);
|
||||
void (*DebugLineDelete)(int line);
|
||||
void (*DebugLineShow)(int line, vec3_t start, vec3_t end, int color);
|
||||
int (QDECL *DebugLineCreate)(void);
|
||||
void (QDECL *DebugLineDelete)(int line);
|
||||
void (QDECL *DebugLineShow)(int line, vec3_t start, vec3_t end, int color);
|
||||
//
|
||||
int (*DebugPolygonCreate)(int color, int numPoints, vec3_t *points);
|
||||
void (*DebugPolygonDelete)(int id);
|
||||
int (QDECL *DebugPolygonCreate)(int color, int numPoints, vec3_t *points);
|
||||
void (QDECL *DebugPolygonDelete)(int id);
|
||||
} botlib_import_t;
|
||||
|
||||
typedef struct aas_export_s
|
||||
|
@ -209,53 +209,53 @@ typedef struct aas_export_s
|
|||
//-----------------------------------
|
||||
// be_aas_entity.h
|
||||
//-----------------------------------
|
||||
void (*AAS_EntityInfo)(int entnum, struct aas_entityinfo_s *info);
|
||||
void (QDECL *AAS_EntityInfo)(int entnum, struct aas_entityinfo_s *info);
|
||||
//-----------------------------------
|
||||
// be_aas_main.h
|
||||
//-----------------------------------
|
||||
int (*AAS_Initialized)(void);
|
||||
void (*AAS_PresenceTypeBoundingBox)(int presencetype, vec3_t mins, vec3_t maxs);
|
||||
float (*AAS_Time)(void);
|
||||
int (QDECL *AAS_Initialized)(void);
|
||||
void (QDECL *AAS_PresenceTypeBoundingBox)(int presencetype, vec3_t mins, vec3_t maxs);
|
||||
float (QDECL *AAS_Time)(void);
|
||||
//--------------------------------------------
|
||||
// be_aas_sample.c
|
||||
//--------------------------------------------
|
||||
int (*AAS_PointAreaNum)(vec3_t point);
|
||||
int (*AAS_PointReachabilityAreaIndex)( vec3_t point );
|
||||
int (*AAS_TraceAreas)(vec3_t start, vec3_t end, int *areas, vec3_t *points, int maxareas);
|
||||
int (*AAS_BBoxAreas)(vec3_t absmins, vec3_t absmaxs, int *areas, int maxareas);
|
||||
int (*AAS_AreaInfo)( int areanum, struct aas_areainfo_s *info );
|
||||
int (QDECL *AAS_PointAreaNum)(vec3_t point);
|
||||
int (QDECL *AAS_PointReachabilityAreaIndex)( vec3_t point );
|
||||
int (QDECL *AAS_TraceAreas)(vec3_t start, vec3_t end, int *areas, vec3_t *points, int maxareas);
|
||||
int (QDECL *AAS_BBoxAreas)(vec3_t absmins, vec3_t absmaxs, int *areas, int maxareas);
|
||||
int (QDECL *AAS_AreaInfo)( int areanum, struct aas_areainfo_s *info );
|
||||
//--------------------------------------------
|
||||
// be_aas_bspq3.c
|
||||
//--------------------------------------------
|
||||
int (*AAS_PointContents)(vec3_t point);
|
||||
int (*AAS_NextBSPEntity)(int ent);
|
||||
int (*AAS_ValueForBSPEpairKey)(int ent, char *key, char *value, int size);
|
||||
int (*AAS_VectorForBSPEpairKey)(int ent, char *key, vec3_t v);
|
||||
int (*AAS_FloatForBSPEpairKey)(int ent, char *key, float *value);
|
||||
int (*AAS_IntForBSPEpairKey)(int ent, char *key, int *value);
|
||||
int (QDECL *AAS_PointContents)(vec3_t point);
|
||||
int (QDECL *AAS_NextBSPEntity)(int ent);
|
||||
int (QDECL *AAS_ValueForBSPEpairKey)(int ent, char *key, char *value, int size);
|
||||
int (QDECL *AAS_VectorForBSPEpairKey)(int ent, char *key, vec3_t v);
|
||||
int (QDECL *AAS_FloatForBSPEpairKey)(int ent, char *key, float *value);
|
||||
int (QDECL *AAS_IntForBSPEpairKey)(int ent, char *key, int *value);
|
||||
//--------------------------------------------
|
||||
// be_aas_reach.c
|
||||
//--------------------------------------------
|
||||
int (*AAS_AreaReachability)(int areanum);
|
||||
int (QDECL *AAS_AreaReachability)(int areanum);
|
||||
//--------------------------------------------
|
||||
// be_aas_route.c
|
||||
//--------------------------------------------
|
||||
int (*AAS_AreaTravelTimeToGoalArea)(int areanum, vec3_t origin, int goalareanum, int travelflags);
|
||||
int (*AAS_EnableRoutingArea)(int areanum, int enable);
|
||||
int (*AAS_PredictRoute)(struct aas_predictroute_s *route, int areanum, vec3_t origin,
|
||||
int (QDECL *AAS_AreaTravelTimeToGoalArea)(int areanum, vec3_t origin, int goalareanum, int travelflags);
|
||||
int (QDECL *AAS_EnableRoutingArea)(int areanum, int enable);
|
||||
int (QDECL *AAS_PredictRoute)(struct aas_predictroute_s *route, int areanum, vec3_t origin,
|
||||
int goalareanum, int travelflags, int maxareas, int maxtime,
|
||||
int stopevent, int stopcontents, int stoptfl, int stopareanum);
|
||||
//--------------------------------------------
|
||||
// be_aas_altroute.c
|
||||
//--------------------------------------------
|
||||
int (*AAS_AlternativeRouteGoals)(vec3_t start, int startareanum, vec3_t goal, int goalareanum, int travelflags,
|
||||
int (QDECL *AAS_AlternativeRouteGoals)(vec3_t start, int startareanum, vec3_t goal, int goalareanum, int travelflags,
|
||||
struct aas_altroutegoal_s *altroutegoals, int maxaltroutegoals,
|
||||
int type);
|
||||
//--------------------------------------------
|
||||
// be_aas_move.c
|
||||
//--------------------------------------------
|
||||
int (*AAS_Swimming)(vec3_t origin);
|
||||
int (*AAS_PredictClientMovement)(struct aas_clientmove_s *move,
|
||||
int (QDECL *AAS_Swimming)(vec3_t origin);
|
||||
int (QDECL *AAS_PredictClientMovement)(struct aas_clientmove_s *move,
|
||||
int entnum, vec3_t origin,
|
||||
int presencetype, int onground,
|
||||
vec3_t velocity, vec3_t cmdmove,
|
||||
|
@ -267,33 +267,33 @@ typedef struct aas_export_s
|
|||
typedef struct ea_export_s
|
||||
{
|
||||
//ClientCommand elementary actions
|
||||
void (*EA_Command)(int client, char *command );
|
||||
void (*EA_Say)(int client, char *str);
|
||||
void (*EA_SayTeam)(int client, char *str);
|
||||
void (QDECL *EA_Command)(int client, char *command );
|
||||
void (QDECL *EA_Say)(int client, char *str);
|
||||
void (QDECL *EA_SayTeam)(int client, char *str);
|
||||
//
|
||||
void (*EA_Action)(int client, int action);
|
||||
void (*EA_Gesture)(int client);
|
||||
void (*EA_Talk)(int client);
|
||||
void (*EA_Attack)(int client);
|
||||
void (*EA_Use)(int client);
|
||||
void (*EA_Respawn)(int client);
|
||||
void (*EA_MoveUp)(int client);
|
||||
void (*EA_MoveDown)(int client);
|
||||
void (*EA_MoveForward)(int client);
|
||||
void (*EA_MoveBack)(int client);
|
||||
void (*EA_MoveLeft)(int client);
|
||||
void (*EA_MoveRight)(int client);
|
||||
void (*EA_Crouch)(int client);
|
||||
void (QDECL *EA_Action)(int client, int action);
|
||||
void (QDECL *EA_Gesture)(int client);
|
||||
void (QDECL *EA_Talk)(int client);
|
||||
void (QDECL *EA_Attack)(int client);
|
||||
void (QDECL *EA_Use)(int client);
|
||||
void (QDECL *EA_Respawn)(int client);
|
||||
void (QDECL *EA_MoveUp)(int client);
|
||||
void (QDECL *EA_MoveDown)(int client);
|
||||
void (QDECL *EA_MoveForward)(int client);
|
||||
void (QDECL *EA_MoveBack)(int client);
|
||||
void (QDECL *EA_MoveLeft)(int client);
|
||||
void (QDECL *EA_MoveRight)(int client);
|
||||
void (QDECL *EA_Crouch)(int client);
|
||||
|
||||
void (*EA_SelectWeapon)(int client, int weapon);
|
||||
void (*EA_Jump)(int client);
|
||||
void (*EA_DelayedJump)(int client);
|
||||
void (*EA_Move)(int client, vec3_t dir, float speed);
|
||||
void (*EA_View)(int client, vec3_t viewangles);
|
||||
void (QDECL *EA_SelectWeapon)(int client, int weapon);
|
||||
void (QDECL *EA_Jump)(int client);
|
||||
void (QDECL *EA_DelayedJump)(int client);
|
||||
void (QDECL *EA_Move)(int client, vec3_t dir, float speed);
|
||||
void (QDECL *EA_View)(int client, vec3_t viewangles);
|
||||
//send regular input to the server
|
||||
void (*EA_EndRegular)(int client, float thinktime);
|
||||
void (*EA_GetInput)(int client, float thinktime, bot_input_t *input);
|
||||
void (*EA_ResetInput)(int client);
|
||||
void (QDECL *EA_EndRegular)(int client, float thinktime);
|
||||
void (QDECL *EA_GetInput)(int client, float thinktime, bot_input_t *input);
|
||||
void (QDECL *EA_ResetInput)(int client);
|
||||
} ea_export_t;
|
||||
|
||||
typedef struct ai_export_s
|
||||
|
@ -301,97 +301,97 @@ typedef struct ai_export_s
|
|||
//-----------------------------------
|
||||
// be_ai_char.h
|
||||
//-----------------------------------
|
||||
int (*BotLoadCharacter)(char *charfile, float skill);
|
||||
void (*BotFreeCharacter)(int character);
|
||||
float (*Characteristic_Float)(int character, int index);
|
||||
float (*Characteristic_BFloat)(int character, int index, float min, float max);
|
||||
int (*Characteristic_Integer)(int character, int index);
|
||||
int (*Characteristic_BInteger)(int character, int index, int min, int max);
|
||||
void (*Characteristic_String)(int character, int index, char *buf, int size);
|
||||
int (QDECL *BotLoadCharacter)(char *charfile, float skill);
|
||||
void (QDECL *BotFreeCharacter)(int character);
|
||||
float (QDECL *Characteristic_Float)(int character, int index);
|
||||
float (QDECL *Characteristic_BFloat)(int character, int index, float min, float max);
|
||||
int (QDECL *Characteristic_Integer)(int character, int index);
|
||||
int (QDECL *Characteristic_BInteger)(int character, int index, int min, int max);
|
||||
void (QDECL *Characteristic_String)(int character, int index, char *buf, int size);
|
||||
//-----------------------------------
|
||||
// be_ai_chat.h
|
||||
//-----------------------------------
|
||||
int (*BotAllocChatState)(void);
|
||||
void (*BotFreeChatState)(int handle);
|
||||
void (*BotQueueConsoleMessage)(int chatstate, int type, char *message);
|
||||
void (*BotRemoveConsoleMessage)(int chatstate, int handle);
|
||||
int (*BotNextConsoleMessage)(int chatstate, struct bot_consolemessage_s *cm);
|
||||
int (*BotNumConsoleMessages)(int chatstate);
|
||||
void (*BotInitialChat)(int chatstate, char *type, int mcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7);
|
||||
int (*BotNumInitialChats)(int chatstate, char *type);
|
||||
int (*BotReplyChat)(int chatstate, char *message, int mcontext, int vcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7);
|
||||
int (*BotChatLength)(int chatstate);
|
||||
void (*BotEnterChat)(int chatstate, int client, int sendto);
|
||||
void (*BotGetChatMessage)(int chatstate, char *buf, int size);
|
||||
int (*StringContains)(char *str1, char *str2, int casesensitive);
|
||||
int (*BotFindMatch)(char *str, struct bot_match_s *match, unsigned long int context);
|
||||
void (*BotMatchVariable)(struct bot_match_s *match, int variable, char *buf, int size);
|
||||
void (*UnifyWhiteSpaces)(char *string);
|
||||
void (*BotReplaceSynonyms)(char *string, unsigned long int context);
|
||||
int (*BotLoadChatFile)(int chatstate, char *chatfile, char *chatname);
|
||||
void (*BotSetChatGender)(int chatstate, int gender);
|
||||
void (*BotSetChatName)(int chatstate, char *name, int client);
|
||||
int (QDECL *BotAllocChatState)(void);
|
||||
void (QDECL *BotFreeChatState)(int handle);
|
||||
void (QDECL *BotQueueConsoleMessage)(int chatstate, int type, char *message);
|
||||
void (QDECL *BotRemoveConsoleMessage)(int chatstate, int handle);
|
||||
int (QDECL *BotNextConsoleMessage)(int chatstate, struct bot_consolemessage_s *cm);
|
||||
int (QDECL *BotNumConsoleMessages)(int chatstate);
|
||||
void (QDECL *BotInitialChat)(int chatstate, char *type, int mcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7);
|
||||
int (QDECL *BotNumInitialChats)(int chatstate, char *type);
|
||||
int (QDECL *BotReplyChat)(int chatstate, char *message, int mcontext, int vcontext, char *var0, char *var1, char *var2, char *var3, char *var4, char *var5, char *var6, char *var7);
|
||||
int (QDECL *BotChatLength)(int chatstate);
|
||||
void (QDECL *BotEnterChat)(int chatstate, int client, int sendto);
|
||||
void (QDECL *BotGetChatMessage)(int chatstate, char *buf, int size);
|
||||
int (QDECL *StringContains)(char *str1, char *str2, int casesensitive);
|
||||
int (QDECL *BotFindMatch)(char *str, struct bot_match_s *match, unsigned long int context);
|
||||
void (QDECL *BotMatchVariable)(struct bot_match_s *match, int variable, char *buf, int size);
|
||||
void (QDECL *UnifyWhiteSpaces)(char *string);
|
||||
void (QDECL *BotReplaceSynonyms)(char *string, unsigned long int context);
|
||||
int (QDECL *BotLoadChatFile)(int chatstate, char *chatfile, char *chatname);
|
||||
void (QDECL *BotSetChatGender)(int chatstate, int gender);
|
||||
void (QDECL *BotSetChatName)(int chatstate, char *name, int client);
|
||||
//-----------------------------------
|
||||
// be_ai_goal.h
|
||||
//-----------------------------------
|
||||
void (*BotResetGoalState)(int goalstate);
|
||||
void (*BotResetAvoidGoals)(int goalstate);
|
||||
void (*BotRemoveFromAvoidGoals)(int goalstate, int number);
|
||||
void (*BotPushGoal)(int goalstate, struct bot_goal_s *goal);
|
||||
void (*BotPopGoal)(int goalstate);
|
||||
void (*BotEmptyGoalStack)(int goalstate);
|
||||
void (*BotDumpAvoidGoals)(int goalstate);
|
||||
void (*BotDumpGoalStack)(int goalstate);
|
||||
void (*BotGoalName)(int number, char *name, int size);
|
||||
int (*BotGetTopGoal)(int goalstate, struct bot_goal_s *goal);
|
||||
int (*BotGetSecondGoal)(int goalstate, struct bot_goal_s *goal);
|
||||
int (*BotChooseLTGItem)(int goalstate, vec3_t origin, int *inventory, int travelflags);
|
||||
int (*BotChooseNBGItem)(int goalstate, vec3_t origin, int *inventory, int travelflags,
|
||||
void (QDECL *BotResetGoalState)(int goalstate);
|
||||
void (QDECL *BotResetAvoidGoals)(int goalstate);
|
||||
void (QDECL *BotRemoveFromAvoidGoals)(int goalstate, int number);
|
||||
void (QDECL *BotPushGoal)(int goalstate, struct bot_goal_s *goal);
|
||||
void (QDECL *BotPopGoal)(int goalstate);
|
||||
void (QDECL *BotEmptyGoalStack)(int goalstate);
|
||||
void (QDECL *BotDumpAvoidGoals)(int goalstate);
|
||||
void (QDECL *BotDumpGoalStack)(int goalstate);
|
||||
void (QDECL *BotGoalName)(int number, char *name, int size);
|
||||
int (QDECL *BotGetTopGoal)(int goalstate, struct bot_goal_s *goal);
|
||||
int (QDECL *BotGetSecondGoal)(int goalstate, struct bot_goal_s *goal);
|
||||
int (QDECL *BotChooseLTGItem)(int goalstate, vec3_t origin, int *inventory, int travelflags);
|
||||
int (QDECL *BotChooseNBGItem)(int goalstate, vec3_t origin, int *inventory, int travelflags,
|
||||
struct bot_goal_s *ltg, float maxtime);
|
||||
int (*BotTouchingGoal)(vec3_t origin, struct bot_goal_s *goal);
|
||||
int (*BotItemGoalInVisButNotVisible)(int viewer, vec3_t eye, vec3_t viewangles, struct bot_goal_s *goal);
|
||||
int (*BotGetLevelItemGoal)(int index, char *classname, struct bot_goal_s *goal);
|
||||
int (*BotGetNextCampSpotGoal)(int num, struct bot_goal_s *goal);
|
||||
int (*BotGetMapLocationGoal)(char *name, struct bot_goal_s *goal);
|
||||
float (*BotAvoidGoalTime)(int goalstate, int number);
|
||||
void (*BotSetAvoidGoalTime)(int goalstate, int number, float avoidtime);
|
||||
void (*BotInitLevelItems)(void);
|
||||
void (*BotUpdateEntityItems)(void);
|
||||
int (*BotLoadItemWeights)(int goalstate, char *filename);
|
||||
void (*BotFreeItemWeights)(int goalstate);
|
||||
void (*BotInterbreedGoalFuzzyLogic)(int parent1, int parent2, int child);
|
||||
void (*BotSaveGoalFuzzyLogic)(int goalstate, char *filename);
|
||||
void (*BotMutateGoalFuzzyLogic)(int goalstate, float range);
|
||||
int (*BotAllocGoalState)(int client);
|
||||
void (*BotFreeGoalState)(int handle);
|
||||
int (QDECL *BotTouchingGoal)(vec3_t origin, struct bot_goal_s *goal);
|
||||
int (QDECL *BotItemGoalInVisButNotVisible)(int viewer, vec3_t eye, vec3_t viewangles, struct bot_goal_s *goal);
|
||||
int (QDECL *BotGetLevelItemGoal)(int index, char *classname, struct bot_goal_s *goal);
|
||||
int (QDECL *BotGetNextCampSpotGoal)(int num, struct bot_goal_s *goal);
|
||||
int (QDECL *BotGetMapLocationGoal)(char *name, struct bot_goal_s *goal);
|
||||
float (QDECL *BotAvoidGoalTime)(int goalstate, int number);
|
||||
void (QDECL *BotSetAvoidGoalTime)(int goalstate, int number, float avoidtime);
|
||||
void (QDECL *BotInitLevelItems)(void);
|
||||
void (QDECL *BotUpdateEntityItems)(void);
|
||||
int (QDECL *BotLoadItemWeights)(int goalstate, char *filename);
|
||||
void (QDECL *BotFreeItemWeights)(int goalstate);
|
||||
void (QDECL *BotInterbreedGoalFuzzyLogic)(int parent1, int parent2, int child);
|
||||
void (QDECL *BotSaveGoalFuzzyLogic)(int goalstate, char *filename);
|
||||
void (QDECL *BotMutateGoalFuzzyLogic)(int goalstate, float range);
|
||||
int (QDECL *BotAllocGoalState)(int client);
|
||||
void (QDECL *BotFreeGoalState)(int handle);
|
||||
//-----------------------------------
|
||||
// be_ai_move.h
|
||||
//-----------------------------------
|
||||
void (*BotResetMoveState)(int movestate);
|
||||
void (*BotMoveToGoal)(struct bot_moveresult_s *result, int movestate, struct bot_goal_s *goal, int travelflags);
|
||||
int (*BotMoveInDirection)(int movestate, vec3_t dir, float speed, int type);
|
||||
void (*BotResetAvoidReach)(int movestate);
|
||||
void (*BotResetLastAvoidReach)(int movestate);
|
||||
int (*BotReachabilityArea)(vec3_t origin, int testground);
|
||||
int (*BotMovementViewTarget)(int movestate, struct bot_goal_s *goal, int travelflags, float lookahead, vec3_t target);
|
||||
int (*BotPredictVisiblePosition)(vec3_t origin, int areanum, struct bot_goal_s *goal, int travelflags, vec3_t target);
|
||||
int (*BotAllocMoveState)(void);
|
||||
void (*BotFreeMoveState)(int handle);
|
||||
void (*BotInitMoveState)(int handle, struct bot_initmove_s *initmove);
|
||||
void (*BotAddAvoidSpot)(int movestate, vec3_t origin, float radius, int type);
|
||||
void (QDECL *BotResetMoveState)(int movestate);
|
||||
void (QDECL *BotMoveToGoal)(struct bot_moveresult_s *result, int movestate, struct bot_goal_s *goal, int travelflags);
|
||||
int (QDECL *BotMoveInDirection)(int movestate, vec3_t dir, float speed, int type);
|
||||
void (QDECL *BotResetAvoidReach)(int movestate);
|
||||
void (QDECL *BotResetLastAvoidReach)(int movestate);
|
||||
int (QDECL *BotReachabilityArea)(vec3_t origin, int testground);
|
||||
int (QDECL *BotMovementViewTarget)(int movestate, struct bot_goal_s *goal, int travelflags, float lookahead, vec3_t target);
|
||||
int (QDECL *BotPredictVisiblePosition)(vec3_t origin, int areanum, struct bot_goal_s *goal, int travelflags, vec3_t target);
|
||||
int (QDECL *BotAllocMoveState)(void);
|
||||
void (QDECL *BotFreeMoveState)(int handle);
|
||||
void (QDECL *BotInitMoveState)(int handle, struct bot_initmove_s *initmove);
|
||||
void (QDECL *BotAddAvoidSpot)(int movestate, vec3_t origin, float radius, int type);
|
||||
//-----------------------------------
|
||||
// be_ai_weap.h
|
||||
//-----------------------------------
|
||||
int (*BotChooseBestFightWeapon)(int weaponstate, int *inventory);
|
||||
void (*BotGetWeaponInfo)(int weaponstate, int weapon, struct weaponinfo_s *weaponinfo);
|
||||
int (*BotLoadWeaponWeights)(int weaponstate, char *filename);
|
||||
int (*BotAllocWeaponState)(void);
|
||||
void (*BotFreeWeaponState)(int weaponstate);
|
||||
void (*BotResetWeaponState)(int weaponstate);
|
||||
int (QDECL *BotChooseBestFightWeapon)(int weaponstate, int *inventory);
|
||||
void (QDECL *BotGetWeaponInfo)(int weaponstate, int weapon, struct weaponinfo_s *weaponinfo);
|
||||
int (QDECL *BotLoadWeaponWeights)(int weaponstate, char *filename);
|
||||
int (QDECL *BotAllocWeaponState)(void);
|
||||
void (QDECL *BotFreeWeaponState)(int weaponstate);
|
||||
void (QDECL *BotResetWeaponState)(int weaponstate);
|
||||
//-----------------------------------
|
||||
// be_ai_gen.h
|
||||
//-----------------------------------
|
||||
int (*GeneticParentsAndChildSelection)(int numranks, float *ranks, int *parent1, int *parent2, int *child);
|
||||
int (QDECL *GeneticParentsAndChildSelection)(int numranks, float *ranks, int *parent1, int *parent2, int *child);
|
||||
} ai_export_t;
|
||||
|
||||
//bot AI library imported functions
|
||||
|
@ -404,29 +404,29 @@ typedef struct botlib_export_s
|
|||
//AI functions
|
||||
ai_export_t ai;
|
||||
//setup the bot library, returns BLERR_
|
||||
int (*BotLibSetup)(void);
|
||||
int (QDECL *BotLibSetup)(void);
|
||||
//shutdown the bot library, returns BLERR_
|
||||
int (*BotLibShutdown)(void);
|
||||
int (QDECL *BotLibShutdown)(void);
|
||||
//sets a library variable returns BLERR_
|
||||
int (*BotLibVarSet)(char *var_name, char *value);
|
||||
int (QDECL *BotLibVarSet)(char *var_name, char *value);
|
||||
//gets a library variable returns BLERR_
|
||||
int (*BotLibVarGet)(char *var_name, char *value, int size);
|
||||
int (QDECL *BotLibVarGet)(char *var_name, char *value, int size);
|
||||
|
||||
//sets a C-like define returns BLERR_
|
||||
int (*PC_AddGlobalDefine)(char *string);
|
||||
int (*PC_LoadSourceHandle)(const char *filename);
|
||||
int (*PC_FreeSourceHandle)(int handle);
|
||||
int (*PC_ReadTokenHandle)(int handle, pc_token_t *pc_token);
|
||||
int (*PC_SourceFileAndLine)(int handle, char *filename, int *line);
|
||||
int (QDECL *PC_AddGlobalDefine)(char *string);
|
||||
int (QDECL *PC_LoadSourceHandle)(const char *filename);
|
||||
int (QDECL *PC_FreeSourceHandle)(int handle);
|
||||
int (QDECL *PC_ReadTokenHandle)(int handle, pc_token_t *pc_token);
|
||||
int (QDECL *PC_SourceFileAndLine)(int handle, char *filename, int *line);
|
||||
|
||||
//start a frame in the bot library
|
||||
int (*BotLibStartFrame)(float time);
|
||||
int (QDECL *BotLibStartFrame)(float time);
|
||||
//load a new map in the bot library
|
||||
int (*BotLibLoadMap)(const char *mapname);
|
||||
int (QDECL *BotLibLoadMap)(const char *mapname);
|
||||
//entity updates
|
||||
int (*BotLibUpdateEntity)(int ent, bot_entitystate_t *state);
|
||||
int (QDECL *BotLibUpdateEntity)(int ent, bot_entitystate_t *state);
|
||||
//just for testing
|
||||
int (*Test)(int parm0, char *parm1, vec3_t parm2, vec3_t parm3);
|
||||
int (QDECL *Test)(int parm0, char *parm1, vec3_t parm2, vec3_t parm3);
|
||||
} botlib_export_t;
|
||||
|
||||
//linking of bot library
|
||||
|
|
Loading…
Reference in a new issue