Skip to content

Commit

Permalink
Move a large amount of botlib game AI to game VM!
Browse files Browse the repository at this point in the history
Moved ea, goal, move, weap, and weight from botlib/be_ai_* to game/ai_* !

Added and removed a bunch of game system calls.
Added base directory argument to trap_PC_LoadSource, needed for loading bot item and weapon files.
Added PC_ReadStructure (which requires some 400 lines..) to bg_misc.c based on botlib code.

Botlib's BotExportTest function is now broken, though it isn't ever compiled.
  • Loading branch information
zturtleman committed Apr 15, 2013
1 parent b99ff14 commit 864c08a
Show file tree
Hide file tree
Showing 52 changed files with 2,260 additions and 2,535 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1561,11 +1561,6 @@ Q3OBJ = \
$(B)/client/be_ai_char.o \
$(B)/client/be_ai_chat.o \
$(B)/client/be_ai_gen.o \
$(B)/client/be_ai_goal.o \
$(B)/client/be_ai_move.o \
$(B)/client/be_ai_weap.o \
$(B)/client/be_ai_weight.o \
$(B)/client/be_ea.o \
$(B)/client/be_interface.o \
$(B)/client/l_crc.o \
$(B)/client/l_libvar.o \
Expand Down Expand Up @@ -2159,11 +2154,6 @@ Q3DOBJ = \
$(B)/ded/be_ai_char.o \
$(B)/ded/be_ai_chat.o \
$(B)/ded/be_ai_gen.o \
$(B)/ded/be_ai_goal.o \
$(B)/ded/be_ai_move.o \
$(B)/ded/be_ai_weap.o \
$(B)/ded/be_ai_weight.o \
$(B)/ded/be_ea.o \
$(B)/ded/be_interface.o \
$(B)/ded/l_crc.o \
$(B)/ded/l_libvar.o \
Expand Down Expand Up @@ -2353,8 +2343,13 @@ Q3GOBJ_ = \
$(B)/$(BASEGAME)/game/ai_cmd.o \
$(B)/$(BASEGAME)/game/ai_dmnet.o \
$(B)/$(BASEGAME)/game/ai_dmq3.o \
$(B)/$(BASEGAME)/game/ai_ea.o \
$(B)/$(BASEGAME)/game/ai_goal.o \
$(B)/$(BASEGAME)/game/ai_main.o \
$(B)/$(BASEGAME)/game/ai_move.o \
$(B)/$(BASEGAME)/game/ai_team.o \
$(B)/$(BASEGAME)/game/ai_weap.o \
$(B)/$(BASEGAME)/game/ai_weight.o \
$(B)/$(BASEGAME)/game/ai_vcmd.o \
$(B)/$(BASEGAME)/game/bg_misc.o \
$(B)/$(BASEGAME)/game/bg_pmove.o \
Expand Down Expand Up @@ -2405,8 +2400,13 @@ MPGOBJ_ = \
$(B)/$(MISSIONPACK)/game/ai_cmd.o \
$(B)/$(MISSIONPACK)/game/ai_dmnet.o \
$(B)/$(MISSIONPACK)/game/ai_dmq3.o \
$(B)/$(MISSIONPACK)/game/ai_ea.o \
$(B)/$(MISSIONPACK)/game/ai_goal.o \
$(B)/$(MISSIONPACK)/game/ai_main.o \
$(B)/$(MISSIONPACK)/game/ai_move.o \
$(B)/$(MISSIONPACK)/game/ai_team.o \
$(B)/$(MISSIONPACK)/game/ai_weap.o \
$(B)/$(MISSIONPACK)/game/ai_weight.o \
$(B)/$(MISSIONPACK)/game/ai_vcmd.o \
$(B)/$(MISSIONPACK)/game/bg_misc.o \
$(B)/$(MISSIONPACK)/game/bg_pmove.o \
Expand Down
30 changes: 2 additions & 28 deletions code/botlib/be_aas.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Suite 120, Rockville, Maryland 20850 USA.
*
*****************************************************************************/

#define MAX_EPAIRKEY 128

#ifndef MAX_STRINGFIELD
#define MAX_STRINGFIELD 80
#endif
Expand Down Expand Up @@ -127,34 +129,6 @@ typedef struct bsp_trace_s
//
*/

//entity info
typedef struct aas_entityinfo_s
{
int valid; // true if updated this frame
int type; // entity type
int flags; // entity flags
float ltime; // local time
float update_time; // time between last and current update
int number; // number of the entity
vec3_t origin; // origin of the entity
vec3_t angles; // angles of the model
vec3_t old_origin; // for lerping
vec3_t lastvisorigin; // last visible origin
vec3_t mins; // bounding box minimums
vec3_t maxs; // bounding box maximums
int groundent; // ground entity
int solid; // solid type
int modelindex; // model used
int modelindex2; // weapons, CTF flags, etc
int frame; // model frame number
int event; // impulse events -- muzzle flashes, footsteps, etc
int eventParm; // even parameter
int powerups; // bit flags
int weapon; // determines weapon and flash model, etc
int legsAnim; // mask off ANIM_TOGGLEBIT
int torsoAnim; // mask off ANIM_TOGGLEBIT
} aas_entityinfo_t;

// area info
typedef struct aas_areainfo_s
{
Expand Down
2 changes: 0 additions & 2 deletions code/botlib/be_aas_bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ void AAS_PrintFreeBSPLinks(char *str);
//
#endif //AASINTERN

#define MAX_EPAIRKEY 128

//trace through the world
bsp_trace_t AAS_Trace( vec3_t start,
vec3_t mins,
Expand Down
4 changes: 2 additions & 2 deletions code/botlib/be_aas_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ typedef struct bsp_entdata_s
//entity
typedef struct aas_entity_s
{
//entity info
aas_entityinfo_t i;
//entity updated this frame
qboolean valid;
//links into the AAS areas
aas_link_t *areas;
//links into the BSP leaves
Expand Down
Loading

0 comments on commit 864c08a

Please sign in to comment.