Don't redefine MAX_PATH in bot code
This commit is contained in:
parent
39b0702550
commit
815c898bf5
8 changed files with 14 additions and 30 deletions
|
@ -220,10 +220,9 @@ void AAS_ProjectPointOntoVector( vec3_t point, vec3_t vStart, vec3_t vEnd, vec3_
|
|||
int AAS_LoadFiles(const char *mapname)
|
||||
{
|
||||
int errnum;
|
||||
char aasfile[MAX_PATH];
|
||||
// char bspfile[MAX_PATH];
|
||||
char aasfile[MAX_QPATH];
|
||||
|
||||
strcpy(aasworld.mapname, mapname);
|
||||
Q_strncpyz(aasworld.mapname, mapname, sizeof(aasworld.mapname));
|
||||
//NOTE: first reset the entity links into the AAS areas and BSP leaves
|
||||
// the AAS link heap and BSP link heap are reset after respectively the
|
||||
// AAS file and BSP file are loaded
|
||||
|
@ -232,7 +231,7 @@ int AAS_LoadFiles(const char *mapname)
|
|||
AAS_LoadBSPFile();
|
||||
|
||||
//load the aas file
|
||||
Com_sprintf(aasfile, MAX_PATH, "maps/%s.aas", mapname);
|
||||
Com_sprintf(aasfile, sizeof(aasfile), "maps/%s.aas", mapname);
|
||||
errnum = AAS_LoadAASFile(aasfile);
|
||||
if (errnum != BLERR_NOERROR)
|
||||
return errnum;
|
||||
|
|
|
@ -268,7 +268,7 @@ itemconfig_t *LoadItemConfig(char *filename)
|
|||
{
|
||||
int max_iteminfo;
|
||||
token_t token;
|
||||
char path[MAX_PATH];
|
||||
char path[MAX_QPATH];
|
||||
source_t *source;
|
||||
itemconfig_t *ic;
|
||||
iteminfo_t *ii;
|
||||
|
|
|
@ -199,7 +199,7 @@ weaponconfig_t *LoadWeaponConfig(char *filename)
|
|||
{
|
||||
int max_weaponinfo, max_projectileinfo;
|
||||
token_t token;
|
||||
char path[MAX_PATH];
|
||||
char path[MAX_QPATH];
|
||||
int i, j;
|
||||
source_t *source;
|
||||
weaponconfig_t *wc;
|
||||
|
|
|
@ -971,7 +971,7 @@ int PC_Directive_include(source_t *source)
|
|||
{
|
||||
script_t *script;
|
||||
token_t token;
|
||||
char path[MAX_PATH];
|
||||
char path[MAX_QPATH];
|
||||
#ifdef QUAKE
|
||||
foundfile_t file;
|
||||
#endif //QUAKE
|
||||
|
|
|
@ -29,10 +29,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH MAX_QPATH
|
||||
#endif
|
||||
|
||||
#ifndef PATH_SEPERATORSTR
|
||||
#if defined(WIN32)|defined(_WIN32)|defined(__NT__)|defined(__WINDOWS__)|defined(__WINDOWS_386__)
|
||||
#define PATHSEPERATOR_STR "\\"
|
||||
|
|
|
@ -160,9 +160,7 @@ punctuation_t default_punctuations[] =
|
|||
{NULL, 0}
|
||||
};
|
||||
|
||||
#ifdef BSPC
|
||||
char basefolder[MAX_PATH];
|
||||
#else
|
||||
#ifdef BOTLIB
|
||||
char basefolder[MAX_QPATH];
|
||||
#endif
|
||||
|
||||
|
@ -1441,9 +1439,7 @@ void FreeScript(script_t *script)
|
|||
//============================================================================
|
||||
void PS_SetBaseFolder(char *path)
|
||||
{
|
||||
#ifdef BSPC
|
||||
sprintf(basefolder, path);
|
||||
#else
|
||||
#ifdef BOTLIB
|
||||
Com_sprintf(basefolder, sizeof(basefolder), "%s", path);
|
||||
#endif
|
||||
} //end of the function PS_SetBaseFolder
|
||||
|
|
|
@ -30,8 +30,5 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
*****************************************************************************/
|
||||
|
||||
#define Vector2Angles(v,a) vectoangles(v,a)
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH MAX_QPATH
|
||||
#endif
|
||||
#define Maximum(x,y) (x > y ? x : y)
|
||||
#define Minimum(x,y) (x < y ? x : y)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue