diff --git a/src/botai/botai.h b/src/botai/botai.h deleted file mode 100644 index 197da706d..000000000 --- a/src/botai/botai.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Wolfenstein: Enemy Territory GPL Source Code - * Copyright (C) 1999-2010 id Software LLC, a ZeniMax Media company. - * - * ET: Legacy - * Copyright (C) 2012 Jan Simek - * - * This file is part of ET: Legacy - http://www.etlegacy.com - * - * ET: Legacy is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * ET: Legacy is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with ET: Legacy. If not, see . - * - * In addition, Wolfenstein: Enemy Territory GPL Source Code is also - * subject to certain additional terms. You should have received a copy - * of these additional terms immediately following the terms and conditions - * of the GNU General Public License which accompanied the source code. - * If not, please request a copy in writing from id Software at the address below. - * - * id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. - * - * @file botai.h - * @author Mr Elusive (MrElusive@idsoftware.com) - * @brief Wolf bot AI - */ - -//debug line colors -#define LINECOLOR_NONE -1 -#define LINECOLOR_RED 1 -#define LINECOLOR_GREEN 2 -#define LINECOLOR_BLUE 3 -#define LINECOLOR_YELLOW 4 -#define LINECOLOR_ORANGE 5 - -//Print types -#define PRT_MESSAGE 1 -#define PRT_WARNING 2 -#define PRT_ERROR 3 -#define PRT_FATAL 4 -#define PRT_EXIT 5 - -//console message types -#define CMS_NORMAL 0 -#define CMS_CHAT 1 - -//some maxs -#define MAX_NETNAME 36 -#define MAX_CLIENTSKINNAME 128 -#define MAX_FILEPATH 144 -#define MAX_CHARACTERNAME 144 - -#ifndef BSPTRACE - -//bsp_trace_t hit surface -typedef struct bsp_surface_s -{ - char name[16]; - int flags; - int value; -} bsp_surface_t; - -//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 -{ - 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 - vec3_t endpos; // final position - cplane_t plane; // surface normal at impact - float exp_dist; // expanded plane distance - int sidenum; // number of the brush side hit - bsp_surface_t surface; // the hit point surface - int contents; // contents on other side of surface hit - int ent; // number of entity hit -} bsp_trace_t; - -#define BSPTRACE -#endif // BSPTRACE - diff --git a/src/botlib/be_interface.c b/src/botlib/be_interface.c index 5a58ba0a8..b1866cfc3 100644 --- a/src/botlib/be_interface.c +++ b/src/botlib/be_interface.c @@ -50,8 +50,7 @@ botlib_globals_t botlibglobals; botlib_export_t be_botlib_export; botlib_import_t botimport; -// -int bot_developer; + //qtrue if the library is setup int botlibsetup = qfalse; @@ -105,8 +104,6 @@ int Sys_MilliSeconds(void) //=========================================================================== qboolean BotLibSetup(char *str) { -// return qtrue; - if (!botlibglobals.botlibsetup) { botimport.Print(PRT_ERROR, "%s: bot library used before being setup\n", str); @@ -114,6 +111,7 @@ qboolean BotLibSetup(char *str) } //end if return qtrue; } //end of the function BotLibSetup + //=========================================================================== // // Parameter: - @@ -125,7 +123,6 @@ int Export_BotLibSetup(qboolean singleplayer) { int errnum; - bot_developer = LibVarGetValue("bot_developer"); //initialize byte swapping (litte endian etc.) Log_Open("botlib.log"); // @@ -147,6 +144,7 @@ int Export_BotLibSetup(qboolean singleplayer) return BLERR_NOERROR; } //end of the function Export_BotLibSetup + //=========================================================================== // // Parameter: - @@ -190,6 +188,7 @@ int Export_BotLibShutdown(void) #endif return BLERR_NOERROR; } //end of the function Export_BotLibShutdown + //=========================================================================== // // Parameter: - @@ -201,6 +200,7 @@ int Export_BotLibVarSet(char *var_name, char *value) LibVarSet(var_name, value); return BLERR_NOERROR; } //end of the function Export_BotLibVarSet + //=========================================================================== // // Parameter: - diff --git a/src/botlib/be_interface.h b/src/botlib/be_interface.h index adef4306e..b681d28b0 100644 --- a/src/botlib/be_interface.h +++ b/src/botlib/be_interface.h @@ -84,7 +84,6 @@ typedef struct botlib_globals_s extern botlib_globals_t botlibglobals; extern botlib_import_t botimport; -extern int bot_developer; //true if developer is on // int Sys_MilliSeconds(void); diff --git a/src/botlib/botlib.h b/src/botlib/botlib.h index 8aff70d14..01bafba16 100644 --- a/src/botlib/botlib.h +++ b/src/botlib/botlib.h @@ -36,7 +36,6 @@ #define BOTLIB_API_VERSION 2 -struct aas_clientmove_s; struct aas_entityinfo_s; struct bot_consolemessage_s; struct bot_match_s; @@ -62,14 +61,6 @@ typedef void (*BotPolyFunc)(int color, int numPoints, float *points); #define BLOCKINGFLAG_MOVER (~0x7fffffff) -//debug line colors -#define LINECOLOR_NONE -1 -#define LINECOLOR_RED 1 //0xf2f2f0f0L -#define LINECOLOR_GREEN 2 //0xd0d1d2d3L -#define LINECOLOR_BLUE 3 //0xf3f3f1f1L -#define LINECOLOR_YELLOW 4 //0xdcdddedfL -#define LINECOLOR_ORANGE 5 //0xe0e1e2e3L - //Print types #define PRT_MESSAGE 1 #define PRT_WARNING 2 @@ -77,10 +68,6 @@ typedef void (*BotPolyFunc)(int color, int numPoints, float *points); #define PRT_FATAL 4 #define PRT_EXIT 5 -//console message types -#define CMS_NORMAL 0 -#define CMS_CHAT 1 - //botlib error codes #define BLERR_NOERROR 0 //no error #define BLERR_LIBRARYNOTSETUP 1 //library not setup diff --git a/src/botlib/botlib_stub.c b/src/botlib/botlib_stub.c index 63682faa3..82bcf6e9f 100644 --- a/src/botlib/botlib_stub.c +++ b/src/botlib/botlib_stub.c @@ -121,7 +121,6 @@ void botlib_stub(void) int PC_LoadSourceHandle(const char *filename) { - // rain - FIXME - LoadSourceFile should take a const filename return (int)LoadSourceFile(filename); } diff --git a/src/botlib/l_log.c b/src/botlib/l_log.c index 7c2f6a1f3..4fb0f7269 100644 --- a/src/botlib/l_log.c +++ b/src/botlib/l_log.c @@ -41,11 +41,9 @@ #include "be_interface.h" //for botimport.Print #include "l_libvar.h" -#define MAX_LOGFILENAMESIZE 1024 - typedef struct logfile_s { - char filename[MAX_LOGFILENAMESIZE]; + char filename[MAX_QPATH]; FILE *fp; int numwrites; } logfile_t; @@ -76,9 +74,10 @@ void Log_AlwaysOpen(char *filename) botimport.Print(PRT_ERROR, "can't open the log file %s\n", filename); return; } //end if - strncpy(logfile.filename, filename, MAX_LOGFILENAMESIZE); + strncpy(logfile.filename, filename, MAX_QPATH); botimport.Print(PRT_MESSAGE, "Opened log %s\n", logfile.filename); } //end of the function Log_Create + //=========================================================================== // // Parameter: -