Skip to content

Commit

Permalink
botlib: clean up refs #31
Browse files Browse the repository at this point in the history
  • Loading branch information
IR4T4 committed Mar 16, 2014
1 parent 05c839f commit 43f8907
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 631 deletions.
1 change: 0 additions & 1 deletion Makefile.aros
Expand Up @@ -371,7 +371,6 @@ Q3OBJ = \
$(B)/client/l_memory.o \
$(B)/client/l_precomp.o \
$(B)/client/l_script.o \
$(B)/client/l_struct.o \
\
$(B)/client/tr_animation_mdm.o \
$(B)/client/tr_animation_mds.o \
Expand Down
8 changes: 1 addition & 7 deletions src/botlib/be_interface.c
Expand Up @@ -36,14 +36,10 @@
#include "l_memory.h"
#include "l_script.h"
#include "l_precomp.h"
#include "l_struct.h"

#include "../botlib/botlib.h"
#include "be_interface.h"

// library globals in a structure
botlib_globals_t botlibglobals;

botlib_export_t be_botlib_export;
botlib_import_t botimport;

Expand All @@ -56,7 +52,7 @@ int botlibsetup = qfalse;

qboolean BotLibSetup(char *str)
{
if (!botlibglobals.botlibsetup)
if (!botlibsetup)
{
botimport.Print(PRT_ERROR, "%s: bot library used before being setup\n", str);
return qfalse;
Expand All @@ -74,7 +70,6 @@ int Export_BotLibSetup(qboolean singleplayer)
globaldefines = NULL;

botlibsetup = qtrue;
botlibglobals.botlibsetup = qtrue;

return BLERR_NOERROR;
}
Expand All @@ -98,7 +93,6 @@ int Export_BotLibShutdown(void)
PC_RemoveAllGlobalDefines();

botlibsetup = qfalse;
botlibglobals.botlibsetup = qfalse;
recursive = 0;
// print any files still open
PC_CheckOpenSourceHandles();
Expand Down
7 changes: 0 additions & 7 deletions src/botlib/be_interface.h
Expand Up @@ -38,16 +38,9 @@
// global variable structures
//==========================================================

//FIXME: get rid of this global structure
typedef struct botlib_globals_s
{
int botlibsetup; // true when the bot library has been setup
float time; // the global time
} botlib_globals_t;

//==========================================================
// global variables
//==========================================================

extern botlib_globals_t botlibglobals;
extern botlib_import_t botimport;
1 change: 0 additions & 1 deletion src/botlib/botlib.h
Expand Up @@ -82,7 +82,6 @@ typedef struct bsp_trace_s
int ent; // number of entity hit
} bsp_trace_t;


// bot AI library exported functions
typedef struct botlib_import_s
{
Expand Down

0 comments on commit 43f8907

Please sign in to comment.