This commit is contained in:
Walter Julius Hennecke 2014-03-09 23:49:29 +01:00
parent 7b03b70668
commit d4d5f3f521
20 changed files with 2492 additions and 2517 deletions

View File

@ -76,19 +76,18 @@
#define MAX_PROXMINES 64
//check points
typedef struct bot_waypoint_s
{
typedef struct bot_waypoint_s {
int inuse;
char name[32];
bot_goal_t goal;
struct bot_waypoint_s *next, *prev;
struct bot_waypoint_s* next;
struct bot_waypoint_s* prev;
} bot_waypoint_t;
#define MAX_ACTIVATESTACK 8
#define MAX_ACTIVATEAREAS 32
typedef struct bot_activategoal_s
{
typedef struct bot_activategoal_s {
int inuse;
bot_goal_t goal; //goal to activate (buttons etc.)
float time; //time to activate something
@ -105,8 +104,7 @@ typedef struct bot_activategoal_s
} bot_activategoal_t;
//bot state
typedef struct bot_state_s
{
typedef struct bot_state_s {
int inuse; //true if this state is used by a bot client
int botthink_residual; //residual for the bot thinks
int client; //client number of the bot

View File

@ -68,8 +68,7 @@ typedef enum
*/
//a trace is returned when a box is swept through the AAS world
typedef struct aas_trace_s
{
typedef struct aas_trace_s {
qboolean startsolid;// if true, the initial point was in a solid area
float fraction; // time completed, 1.0 = didn't hit anything
vec3_t endpos; // final position
@ -109,8 +108,7 @@ typedef struct bsp_trace_s
//entity info
typedef struct aas_entityinfo_s
{
typedef struct aas_entityinfo_s {
int valid; // true if updated this frame
int type; // entity type
int flags; // entity flags
@ -137,8 +135,7 @@ typedef struct aas_entityinfo_s
} aas_entityinfo_t;
// area info
typedef struct aas_areainfo_s
{
typedef struct aas_areainfo_s {
int contents;
int flags;
int presencetype;
@ -164,8 +161,7 @@ typedef struct aas_areainfo_s
#define SE_HITBOUNDINGBOX 2048 // hit the specified bounding box
#define SE_TOUCHCLUSTERPORTAL 4096 // touching a cluster portal
typedef struct aas_clientmove_s
{
typedef struct aas_clientmove_s {
vec3_t endpos; //position at the end of movement prediction
int endarea; //area at end of movement prediction
vec3_t velocity; //velocity at the end of movement prediction
@ -182,8 +178,7 @@ typedef struct aas_clientmove_s
#define ALTROUTEGOAL_CLUSTERPORTALS 2
#define ALTROUTEGOAL_VIEWPORTALS 4
typedef struct aas_altroutegoal_s
{
typedef struct aas_altroutegoal_s {
vec3_t origin;
int areanum;
unsigned short starttraveltime;
@ -198,8 +193,7 @@ typedef struct aas_altroutegoal_s
#define RSE_ENTERCONTENTS 4 //stop when entering the given contents
#define RSE_ENTERAREA 8 //stop when entering the given area
typedef struct aas_predictroute_s
{
typedef struct aas_predictroute_s {
vec3_t endpos; //position at the end of movement prediction
int endarea; //area at end of movement prediction
int stopevent; //event that made the prediction stop

View File

@ -26,24 +26,22 @@
#define CHAT_TELL 2
//a console message
typedef struct bot_consolemessage_s
{
typedef struct bot_consolemessage_s {
int handle;
float time; //message time
int type; //message type
char message[MAX_MESSAGE_SIZE]; //message
struct bot_consolemessage_s *prev, *next; //prev and next in list
struct bot_consolemessage_s* prev; // prev in list
struct bot_consolemessage_s* next; // next in list
} bot_consolemessage_t;
//match variable
typedef struct bot_matchvariable_s
{
typedef struct bot_matchvariable_s {
char offset;
int length;
} bot_matchvariable_t;
//returned to AI when a match is found
typedef struct bot_match_s
{
typedef struct bot_match_s {
char string[MAX_MESSAGE_SIZE];
int type;
int subtype;

View File

@ -22,8 +22,7 @@
#define GFL_DROPPED 4
//a bot goal
typedef struct bot_goal_s
{
typedef struct bot_goal_s {
vec3_t origin; //origin of the goal
int areanum; //area number of the goal
vec3_t mins, maxs; //mins and maxs of the goal

View File

@ -57,8 +57,7 @@
//structure used to initialize the movement state
//the or_moveflags MFL_ONGROUND, MFL_TELEPORTED and MFL_WATERJUMP come from the playerstate
typedef struct bot_initmove_s
{
typedef struct bot_initmove_s {
vec3_t origin; //origin of the bot
vec3_t velocity; //velocity of the bot
vec3_t viewoffset; //view offset
@ -71,8 +70,7 @@ typedef struct bot_initmove_s
} bot_initmove_t;
//NOTE: the ideal_viewangles are only valid if MFL_MOVEMENTVIEW is set
typedef struct bot_moveresult_s
{
typedef struct bot_moveresult_s {
int failure; //true if movement failed all together
int type; //failure or blocked type
int blocked; //true if blocked by an entity
@ -86,8 +84,7 @@ typedef struct bot_moveresult_s
// bk001204: from code/botlib/be_ai_move.c
// TTimo 04/12/2001 was moved here to avoid dup defines
typedef struct bot_avoidspot_s
{
typedef struct bot_avoidspot_s {
vec3_t origin;
float radius;
int type;

View File

@ -24,8 +24,7 @@
#define DAMAGETYPE_RADIAL 2 //radial damage
#define DAMAGETYPE_VISIBLE 4 //damage to all entities visible to the projectile
typedef struct projectileinfo_s
{
typedef struct projectileinfo_s {
char name[MAX_STRINGFIELD];
char model[MAX_STRINGFIELD];
int flags;
@ -42,8 +41,7 @@ typedef struct projectileinfo_s
float bouncestop;
} projectileinfo_t;
typedef struct weaponinfo_s
{
typedef struct weaponinfo_s {
int valid; //true if the weapon info is valid
int number; //number of the weapon
char name[MAX_STRINGFIELD];

View File

@ -90,8 +90,7 @@ struct weaponinfo_s;
#define ACTION_FOLLOWME 0x8000000
//the bot input, will be converted to an usercmd_t
typedef struct bot_input_s
{
typedef struct bot_input_s {
float thinktime; //time since last output (in seconds)
vec3_t dir; //movement direction
float speed; //speed in the range [0, 400]
@ -106,8 +105,7 @@ typedef struct bot_input_s
#define BSPTRACE
//bsp_trace_t hit surface
typedef struct bsp_surface_s
{
typedef struct bsp_surface_s {
char name[16];
int flags;
int value;
@ -115,8 +113,7 @@ typedef struct bsp_surface_s
//remove the bsp_trace_s structure definition l8r on
//a trace is returned when a box is swept through the world
typedef struct bsp_trace_s
{
typedef struct bsp_trace_s {
qboolean allsolid; // if true, plane is not valid
qboolean startsolid; // if true, the initial point was in a solid area
float fraction; // time completed, 1.0 = didn't hit anything
@ -132,8 +129,7 @@ typedef struct bsp_trace_s
#endif // BSPTRACE
//entity state
typedef struct bot_entitystate_s
{
typedef struct bot_entitystate_s {
int type; // entity type
int flags; // entity flags
vec3_t origin; // origin of the entity
@ -155,8 +151,7 @@ typedef struct bot_entitystate_s
} bot_entitystate_t;
//bot AI library exported functions
typedef struct botlib_import_s
{
typedef struct botlib_import_s {
//print messages from the bot library
void (QDECL* Print)(int type, char* fmt, ...);
//trace a bbox through the world
@ -193,8 +188,7 @@ typedef struct botlib_import_s
void(*DebugPolygonDelete)(int id);
} botlib_import_t;
typedef struct aas_export_s
{
typedef struct aas_export_s {
//-----------------------------------
// be_aas_entity.h
//-----------------------------------
@ -253,8 +247,7 @@ typedef struct aas_export_s
int stopevent, int stopareanum, int visualize);
} aas_export_t;
typedef struct ea_export_s
{
typedef struct ea_export_s {
//ClientCommand elementary actions
void(*EA_Command)(int client, const char* command);
void(*EA_Say)(int client, char* str);
@ -286,8 +279,7 @@ typedef struct ea_export_s
void(*EA_ResetInput)(int client);
} ea_export_t;
typedef struct ai_export_s
{
typedef struct ai_export_s {
//-----------------------------------
// be_ai_char.h
//-----------------------------------
@ -385,8 +377,7 @@ typedef struct ai_export_s
} ai_export_t;
//bot AI library imported functions
typedef struct botlib_export_s
{
typedef struct botlib_export_s {
//Area Awareness System functions
aas_export_t aas;
//Elementary Action functions