diff --git a/plugins/md3model/md3.cpp b/plugins/md3model/md3.cpp index e3db3ae7..99434212 100644 --- a/plugins/md3model/md3.cpp +++ b/plugins/md3model/md3.cpp @@ -31,7 +31,7 @@ #include "ident.h" #include "md3normals.h" -// the maximum size of game reletive pathnames +// the maximum size of game relative pathnames #define MAX_QPATH 64 /* diff --git a/tools/quake3/common/cmdlib.c b/tools/quake3/common/cmdlib.c index cd1f7d22..1761ae2a 100644 --- a/tools/quake3/common/cmdlib.c +++ b/tools/quake3/common/cmdlib.c @@ -113,7 +113,7 @@ void ExpandWildcards( int *argc, char ***argv ){ int handle; int i; char filename[1024]; - char filebase[1024]; + char filepath[1024]; char *path; ex_argc = 0; @@ -131,11 +131,11 @@ void ExpandWildcards( int *argc, char ***argv ){ return; } - ExtractFilePath( path, filebase ); + ExtractFilePath( path, filepath ); do { - sprintf( filename, "%s%s", filebase, fileinfo.name ); + sprintf( filename, "%s%s", filepath, fileinfo.name ); ex_argv[ex_argc++] = copystring( filename ); } while ( _findnext( handle, &fileinfo ) != -1 ); @@ -751,14 +751,11 @@ void DefaultExtension( char *path, const char *extension ){ void DefaultPath( char *path, const char *basepath ){ - char temp[128]; - - if ( path[ 0 ] == '/' || path[ 0 ] == '\\' ) { - return; // absolute path location + if( !path_is_absolute( path ) ){ + char* temp = strdup( path ); + sprintf( path, "%s%s", basepath, temp ); + free( temp ); } - strcpy( temp,path ); - strcpy( path,basepath ); - strcat( path,temp ); } diff --git a/tools/quake3/q3data/q3data.c b/tools/quake3/q3data/q3data.c index a757b9d4..3c042e91 100644 --- a/tools/quake3/q3data/q3data.c +++ b/tools/quake3/q3data/q3data.c @@ -69,7 +69,7 @@ packheader_t pakheader; ============== ReleaseFile - Filename should be gamedir reletive. + Filename should be gamedir relative. Either copies the file to the release dir, or adds it to the pak file. ============== diff --git a/tools/quake3/q3map2/convert_map.c b/tools/quake3/q3map2/convert_map.c index 8f62d1fe..420441da 100644 --- a/tools/quake3/q3map2/convert_map.c +++ b/tools/quake3/q3map2/convert_map.c @@ -1010,7 +1010,7 @@ int ConvertBSPToMap_Ext( char *bspName, qboolean brushPrimitives ){ entity_t *e; vec3_t origin; const char *value; - char name[ 1024 ], base[ 1024 ]; + char name[ 1024 ]; /* note it */ @@ -1022,9 +1022,6 @@ int ConvertBSPToMap_Ext( char *bspName, qboolean brushPrimitives ){ strcat( name, "_converted.map" ); Sys_Printf( "writing %s\n", name ); - ExtractFileBase( bspName, base ); - strcat( base, ".bsp" ); - /* open it */ f = fopen( name, "wb" ); if ( f == NULL ) {