reformat
This commit is contained in:
parent
7b03b70668
commit
d4d5f3f521
|
@ -76,19 +76,18 @@
|
||||||
#define MAX_PROXMINES 64
|
#define MAX_PROXMINES 64
|
||||||
|
|
||||||
//check points
|
//check points
|
||||||
typedef struct bot_waypoint_s
|
typedef struct bot_waypoint_s {
|
||||||
{
|
|
||||||
int inuse;
|
int inuse;
|
||||||
char name[32];
|
char name[32];
|
||||||
bot_goal_t goal;
|
bot_goal_t goal;
|
||||||
struct bot_waypoint_s *next, *prev;
|
struct bot_waypoint_s* next;
|
||||||
|
struct bot_waypoint_s* prev;
|
||||||
} bot_waypoint_t;
|
} bot_waypoint_t;
|
||||||
|
|
||||||
#define MAX_ACTIVATESTACK 8
|
#define MAX_ACTIVATESTACK 8
|
||||||
#define MAX_ACTIVATEAREAS 32
|
#define MAX_ACTIVATEAREAS 32
|
||||||
|
|
||||||
typedef struct bot_activategoal_s
|
typedef struct bot_activategoal_s {
|
||||||
{
|
|
||||||
int inuse;
|
int inuse;
|
||||||
bot_goal_t goal; //goal to activate (buttons etc.)
|
bot_goal_t goal; //goal to activate (buttons etc.)
|
||||||
float time; //time to activate something
|
float time; //time to activate something
|
||||||
|
@ -105,8 +104,7 @@ typedef struct bot_activategoal_s
|
||||||
} bot_activategoal_t;
|
} bot_activategoal_t;
|
||||||
|
|
||||||
//bot state
|
//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 inuse; //true if this state is used by a bot client
|
||||||
int botthink_residual; //residual for the bot thinks
|
int botthink_residual; //residual for the bot thinks
|
||||||
int client; //client number of the bot
|
int client; //client number of the bot
|
||||||
|
|
|
@ -68,8 +68,7 @@ typedef enum
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//a trace is returned when a box is swept through the AAS world
|
//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
|
qboolean startsolid;// if true, the initial point was in a solid area
|
||||||
float fraction; // time completed, 1.0 = didn't hit anything
|
float fraction; // time completed, 1.0 = didn't hit anything
|
||||||
vec3_t endpos; // final position
|
vec3_t endpos; // final position
|
||||||
|
@ -109,8 +108,7 @@ typedef struct bsp_trace_s
|
||||||
|
|
||||||
|
|
||||||
//entity info
|
//entity info
|
||||||
typedef struct aas_entityinfo_s
|
typedef struct aas_entityinfo_s {
|
||||||
{
|
|
||||||
int valid; // true if updated this frame
|
int valid; // true if updated this frame
|
||||||
int type; // entity type
|
int type; // entity type
|
||||||
int flags; // entity flags
|
int flags; // entity flags
|
||||||
|
@ -137,8 +135,7 @@ typedef struct aas_entityinfo_s
|
||||||
} aas_entityinfo_t;
|
} aas_entityinfo_t;
|
||||||
|
|
||||||
// area info
|
// area info
|
||||||
typedef struct aas_areainfo_s
|
typedef struct aas_areainfo_s {
|
||||||
{
|
|
||||||
int contents;
|
int contents;
|
||||||
int flags;
|
int flags;
|
||||||
int presencetype;
|
int presencetype;
|
||||||
|
@ -164,8 +161,7 @@ typedef struct aas_areainfo_s
|
||||||
#define SE_HITBOUNDINGBOX 2048 // hit the specified bounding box
|
#define SE_HITBOUNDINGBOX 2048 // hit the specified bounding box
|
||||||
#define SE_TOUCHCLUSTERPORTAL 4096 // touching a cluster portal
|
#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
|
vec3_t endpos; //position at the end of movement prediction
|
||||||
int endarea; //area at end of movement prediction
|
int endarea; //area at end of movement prediction
|
||||||
vec3_t velocity; //velocity at the 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_CLUSTERPORTALS 2
|
||||||
#define ALTROUTEGOAL_VIEWPORTALS 4
|
#define ALTROUTEGOAL_VIEWPORTALS 4
|
||||||
|
|
||||||
typedef struct aas_altroutegoal_s
|
typedef struct aas_altroutegoal_s {
|
||||||
{
|
|
||||||
vec3_t origin;
|
vec3_t origin;
|
||||||
int areanum;
|
int areanum;
|
||||||
unsigned short starttraveltime;
|
unsigned short starttraveltime;
|
||||||
|
@ -198,8 +193,7 @@ typedef struct aas_altroutegoal_s
|
||||||
#define RSE_ENTERCONTENTS 4 //stop when entering the given contents
|
#define RSE_ENTERCONTENTS 4 //stop when entering the given contents
|
||||||
#define RSE_ENTERAREA 8 //stop when entering the given area
|
#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
|
vec3_t endpos; //position at the end of movement prediction
|
||||||
int endarea; //area at end of movement prediction
|
int endarea; //area at end of movement prediction
|
||||||
int stopevent; //event that made the prediction stop
|
int stopevent; //event that made the prediction stop
|
||||||
|
|
|
@ -26,24 +26,22 @@
|
||||||
#define CHAT_TELL 2
|
#define CHAT_TELL 2
|
||||||
|
|
||||||
//a console message
|
//a console message
|
||||||
typedef struct bot_consolemessage_s
|
typedef struct bot_consolemessage_s {
|
||||||
{
|
|
||||||
int handle;
|
int handle;
|
||||||
float time; //message time
|
float time; //message time
|
||||||
int type; //message type
|
int type; //message type
|
||||||
char message[MAX_MESSAGE_SIZE]; //message
|
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;
|
} bot_consolemessage_t;
|
||||||
|
|
||||||
//match variable
|
//match variable
|
||||||
typedef struct bot_matchvariable_s
|
typedef struct bot_matchvariable_s {
|
||||||
{
|
|
||||||
char offset;
|
char offset;
|
||||||
int length;
|
int length;
|
||||||
} bot_matchvariable_t;
|
} bot_matchvariable_t;
|
||||||
//returned to AI when a match is found
|
//returned to AI when a match is found
|
||||||
typedef struct bot_match_s
|
typedef struct bot_match_s {
|
||||||
{
|
|
||||||
char string[MAX_MESSAGE_SIZE];
|
char string[MAX_MESSAGE_SIZE];
|
||||||
int type;
|
int type;
|
||||||
int subtype;
|
int subtype;
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
#define GFL_DROPPED 4
|
#define GFL_DROPPED 4
|
||||||
|
|
||||||
//a bot goal
|
//a bot goal
|
||||||
typedef struct bot_goal_s
|
typedef struct bot_goal_s {
|
||||||
{
|
|
||||||
vec3_t origin; //origin of the goal
|
vec3_t origin; //origin of the goal
|
||||||
int areanum; //area number of the goal
|
int areanum; //area number of the goal
|
||||||
vec3_t mins, maxs; //mins and maxs of the goal
|
vec3_t mins, maxs; //mins and maxs of the goal
|
||||||
|
|
|
@ -57,8 +57,7 @@
|
||||||
|
|
||||||
//structure used to initialize the movement state
|
//structure used to initialize the movement state
|
||||||
//the or_moveflags MFL_ONGROUND, MFL_TELEPORTED and MFL_WATERJUMP come from the playerstate
|
//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 origin; //origin of the bot
|
||||||
vec3_t velocity; //velocity of the bot
|
vec3_t velocity; //velocity of the bot
|
||||||
vec3_t viewoffset; //view offset
|
vec3_t viewoffset; //view offset
|
||||||
|
@ -71,8 +70,7 @@ typedef struct bot_initmove_s
|
||||||
} bot_initmove_t;
|
} bot_initmove_t;
|
||||||
|
|
||||||
//NOTE: the ideal_viewangles are only valid if MFL_MOVEMENTVIEW is set
|
//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 failure; //true if movement failed all together
|
||||||
int type; //failure or blocked type
|
int type; //failure or blocked type
|
||||||
int blocked; //true if blocked by an entity
|
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
|
// bk001204: from code/botlib/be_ai_move.c
|
||||||
// TTimo 04/12/2001 was moved here to avoid dup defines
|
// TTimo 04/12/2001 was moved here to avoid dup defines
|
||||||
typedef struct bot_avoidspot_s
|
typedef struct bot_avoidspot_s {
|
||||||
{
|
|
||||||
vec3_t origin;
|
vec3_t origin;
|
||||||
float radius;
|
float radius;
|
||||||
int type;
|
int type;
|
||||||
|
|
|
@ -24,8 +24,7 @@
|
||||||
#define DAMAGETYPE_RADIAL 2 //radial damage
|
#define DAMAGETYPE_RADIAL 2 //radial damage
|
||||||
#define DAMAGETYPE_VISIBLE 4 //damage to all entities visible to the projectile
|
#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 name[MAX_STRINGFIELD];
|
||||||
char model[MAX_STRINGFIELD];
|
char model[MAX_STRINGFIELD];
|
||||||
int flags;
|
int flags;
|
||||||
|
@ -42,8 +41,7 @@ typedef struct projectileinfo_s
|
||||||
float bouncestop;
|
float bouncestop;
|
||||||
} projectileinfo_t;
|
} projectileinfo_t;
|
||||||
|
|
||||||
typedef struct weaponinfo_s
|
typedef struct weaponinfo_s {
|
||||||
{
|
|
||||||
int valid; //true if the weapon info is valid
|
int valid; //true if the weapon info is valid
|
||||||
int number; //number of the weapon
|
int number; //number of the weapon
|
||||||
char name[MAX_STRINGFIELD];
|
char name[MAX_STRINGFIELD];
|
||||||
|
|
|
@ -90,8 +90,7 @@ struct weaponinfo_s;
|
||||||
#define ACTION_FOLLOWME 0x8000000
|
#define ACTION_FOLLOWME 0x8000000
|
||||||
|
|
||||||
//the bot input, will be converted to an usercmd_t
|
//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)
|
float thinktime; //time since last output (in seconds)
|
||||||
vec3_t dir; //movement direction
|
vec3_t dir; //movement direction
|
||||||
float speed; //speed in the range [0, 400]
|
float speed; //speed in the range [0, 400]
|
||||||
|
@ -106,8 +105,7 @@ typedef struct bot_input_s
|
||||||
#define BSPTRACE
|
#define BSPTRACE
|
||||||
|
|
||||||
//bsp_trace_t hit surface
|
//bsp_trace_t hit surface
|
||||||
typedef struct bsp_surface_s
|
typedef struct bsp_surface_s {
|
||||||
{
|
|
||||||
char name[16];
|
char name[16];
|
||||||
int flags;
|
int flags;
|
||||||
int value;
|
int value;
|
||||||
|
@ -115,8 +113,7 @@ typedef struct bsp_surface_s
|
||||||
|
|
||||||
//remove the bsp_trace_s structure definition l8r on
|
//remove the bsp_trace_s structure definition l8r on
|
||||||
//a trace is returned when a box is swept through the world
|
//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 allsolid; // if true, plane is not valid
|
||||||
qboolean startsolid; // if true, the initial point was in a solid area
|
qboolean startsolid; // if true, the initial point was in a solid area
|
||||||
float fraction; // time completed, 1.0 = didn't hit anything
|
float fraction; // time completed, 1.0 = didn't hit anything
|
||||||
|
@ -132,8 +129,7 @@ typedef struct bsp_trace_s
|
||||||
#endif // BSPTRACE
|
#endif // BSPTRACE
|
||||||
|
|
||||||
//entity state
|
//entity state
|
||||||
typedef struct bot_entitystate_s
|
typedef struct bot_entitystate_s {
|
||||||
{
|
|
||||||
int type; // entity type
|
int type; // entity type
|
||||||
int flags; // entity flags
|
int flags; // entity flags
|
||||||
vec3_t origin; // origin of the entity
|
vec3_t origin; // origin of the entity
|
||||||
|
@ -155,8 +151,7 @@ typedef struct bot_entitystate_s
|
||||||
} bot_entitystate_t;
|
} bot_entitystate_t;
|
||||||
|
|
||||||
//bot AI library exported functions
|
//bot AI library exported functions
|
||||||
typedef struct botlib_import_s
|
typedef struct botlib_import_s {
|
||||||
{
|
|
||||||
//print messages from the bot library
|
//print messages from the bot library
|
||||||
void (QDECL* Print)(int type, char* fmt, ...);
|
void (QDECL* Print)(int type, char* fmt, ...);
|
||||||
//trace a bbox through the world
|
//trace a bbox through the world
|
||||||
|
@ -193,8 +188,7 @@ typedef struct botlib_import_s
|
||||||
void(*DebugPolygonDelete)(int id);
|
void(*DebugPolygonDelete)(int id);
|
||||||
} botlib_import_t;
|
} botlib_import_t;
|
||||||
|
|
||||||
typedef struct aas_export_s
|
typedef struct aas_export_s {
|
||||||
{
|
|
||||||
//-----------------------------------
|
//-----------------------------------
|
||||||
// be_aas_entity.h
|
// be_aas_entity.h
|
||||||
//-----------------------------------
|
//-----------------------------------
|
||||||
|
@ -253,8 +247,7 @@ typedef struct aas_export_s
|
||||||
int stopevent, int stopareanum, int visualize);
|
int stopevent, int stopareanum, int visualize);
|
||||||
} aas_export_t;
|
} aas_export_t;
|
||||||
|
|
||||||
typedef struct ea_export_s
|
typedef struct ea_export_s {
|
||||||
{
|
|
||||||
//ClientCommand elementary actions
|
//ClientCommand elementary actions
|
||||||
void(*EA_Command)(int client, const char* command);
|
void(*EA_Command)(int client, const char* command);
|
||||||
void(*EA_Say)(int client, char* str);
|
void(*EA_Say)(int client, char* str);
|
||||||
|
@ -286,8 +279,7 @@ typedef struct ea_export_s
|
||||||
void(*EA_ResetInput)(int client);
|
void(*EA_ResetInput)(int client);
|
||||||
} ea_export_t;
|
} ea_export_t;
|
||||||
|
|
||||||
typedef struct ai_export_s
|
typedef struct ai_export_s {
|
||||||
{
|
|
||||||
//-----------------------------------
|
//-----------------------------------
|
||||||
// be_ai_char.h
|
// be_ai_char.h
|
||||||
//-----------------------------------
|
//-----------------------------------
|
||||||
|
@ -385,8 +377,7 @@ typedef struct ai_export_s
|
||||||
} ai_export_t;
|
} ai_export_t;
|
||||||
|
|
||||||
//bot AI library imported functions
|
//bot AI library imported functions
|
||||||
typedef struct botlib_export_s
|
typedef struct botlib_export_s {
|
||||||
{
|
|
||||||
//Area Awareness System functions
|
//Area Awareness System functions
|
||||||
aas_export_t aas;
|
aas_export_t aas;
|
||||||
//Elementary Action functions
|
//Elementary Action functions
|
||||||
|
|
Loading…
Reference in New Issue