Fix screwed up whitespace in files.c
Apologies to anyone merging this :(
This commit is contained in:
parent
5fd456ff7c
commit
70b165ee33
1 changed files with 169 additions and 169 deletions
|
@ -450,9 +450,9 @@ long FS_filelength(fileHandle_t f)
|
||||||
h = FS_FileForHandle(f);
|
h = FS_FileForHandle(f);
|
||||||
|
|
||||||
if(h == NULL)
|
if(h == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
else
|
else
|
||||||
return FS_fplength(h);
|
return FS_fplength(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1057,8 +1057,8 @@ qboolean FS_IsDemoExt(const char *filename, int namelen)
|
||||||
return qtrue;
|
return qtrue;
|
||||||
|
|
||||||
#ifdef LEGACY_PROTOCOL
|
#ifdef LEGACY_PROTOCOL
|
||||||
if(protocol == com_legacyprotocol->integer)
|
if(protocol == com_legacyprotocol->integer)
|
||||||
return qtrue;
|
return qtrue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for(index = 0; demo_protocols[index]; index++)
|
for(index = 0; demo_protocols[index]; index++)
|
||||||
|
@ -1103,8 +1103,8 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
// be prepended, so we don't need to worry about "c:" or "//limbo"
|
// be prepended, so we don't need to worry about "c:" or "//limbo"
|
||||||
if(strstr(filename, ".." ) || strstr(filename, "::"))
|
if(strstr(filename, ".." ) || strstr(filename, "::"))
|
||||||
{
|
{
|
||||||
if(file == NULL)
|
if(file == NULL)
|
||||||
return qfalse;
|
return qfalse;
|
||||||
|
|
||||||
*file = 0;
|
*file = 0;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1114,8 +1114,8 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
// any other time the key should only be accessed in memory using the provided functions
|
// any other time the key should only be accessed in memory using the provided functions
|
||||||
if(com_fullyInitialized && strstr(filename, "q3key"))
|
if(com_fullyInitialized && strstr(filename, "q3key"))
|
||||||
{
|
{
|
||||||
if(file == NULL)
|
if(file == NULL)
|
||||||
return qfalse;
|
return qfalse;
|
||||||
|
|
||||||
*file = 0;
|
*file = 0;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1130,8 +1130,8 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
{
|
{
|
||||||
hash = FS_HashFileName(filename, search->pack->hashSize);
|
hash = FS_HashFileName(filename, search->pack->hashSize);
|
||||||
|
|
||||||
if(search->pack->hashTable[hash])
|
if(search->pack->hashTable[hash])
|
||||||
{
|
{
|
||||||
// look through all the pak file elements
|
// look through all the pak file elements
|
||||||
pak = search->pack;
|
pak = search->pack;
|
||||||
pakFile = pak->hashTable[hash];
|
pakFile = pak->hashTable[hash];
|
||||||
|
@ -1143,14 +1143,14 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
{
|
{
|
||||||
// found it!
|
// found it!
|
||||||
if(pakFile->len)
|
if(pakFile->len)
|
||||||
return pakFile->len;
|
return pakFile->len;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// It's not nice, but legacy code depends
|
// It's not nice, but legacy code depends
|
||||||
// on positive value if file exists no matter
|
// on positive value if file exists no matter
|
||||||
// what size
|
// what size
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pakFile = pakFile->next;
|
pakFile = pakFile->next;
|
||||||
|
@ -1166,13 +1166,13 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
|
|
||||||
if(filep)
|
if(filep)
|
||||||
{
|
{
|
||||||
len = FS_fplength(filep);
|
len = FS_fplength(filep);
|
||||||
fclose(filep);
|
fclose(filep);
|
||||||
|
|
||||||
if(len)
|
if(len)
|
||||||
return len;
|
return len;
|
||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1258,7 +1258,7 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
if(fs_debug->integer)
|
if(fs_debug->integer)
|
||||||
{
|
{
|
||||||
Com_Printf("FS_FOpenFileRead: %s (found in '%s')\n",
|
Com_Printf("FS_FOpenFileRead: %s (found in '%s')\n",
|
||||||
filename, pak->pakFilename);
|
filename, pak->pakFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pakFile->len;
|
return pakFile->len;
|
||||||
|
@ -1301,7 +1301,7 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
if (filep == NULL)
|
if (filep == NULL)
|
||||||
{
|
{
|
||||||
*file = 0;
|
*file = 0;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strncpyz(fsh[*file].name, filename, sizeof(fsh[*file].name));
|
Q_strncpyz(fsh[*file].name, filename, sizeof(fsh[*file].name));
|
||||||
|
@ -1310,7 +1310,7 @@ long FS_FOpenFileReadDir(const char *filename, searchpath_t *search, fileHandle_
|
||||||
if(fs_debug->integer)
|
if(fs_debug->integer)
|
||||||
{
|
{
|
||||||
Com_Printf("FS_FOpenFileRead: %s (found in '%s/%s')\n", filename,
|
Com_Printf("FS_FOpenFileRead: %s (found in '%s/%s')\n", filename,
|
||||||
dir->path, dir->gamedir);
|
dir->path, dir->gamedir);
|
||||||
}
|
}
|
||||||
|
|
||||||
fsh[*file].handleFiles.file.o = filep;
|
fsh[*file].handleFiles.file.o = filep;
|
||||||
|
@ -1340,18 +1340,18 @@ long FS_FOpenFileRead(const char *filename, fileHandle_t *file, qboolean uniqueF
|
||||||
|
|
||||||
for(search = fs_searchpaths; search; search = search->next)
|
for(search = fs_searchpaths; search; search = search->next)
|
||||||
{
|
{
|
||||||
len = FS_FOpenFileReadDir(filename, search, file, uniqueFILE, qfalse);
|
len = FS_FOpenFileReadDir(filename, search, file, uniqueFILE, qfalse);
|
||||||
|
|
||||||
if(file == NULL)
|
if(file == NULL)
|
||||||
{
|
{
|
||||||
if(len > 0)
|
if(len > 0)
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(len >= 0 && *file)
|
if(len >= 0 && *file)
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1441,17 +1441,17 @@ vmInterpret_t FS_FindVM(void **startSearch, char *found, int foundlen, const cha
|
||||||
{
|
{
|
||||||
pack = search->pack;
|
pack = search->pack;
|
||||||
|
|
||||||
if(lastSearch && lastSearch->pack)
|
if(lastSearch && lastSearch->pack)
|
||||||
{
|
{
|
||||||
// make sure we only try loading one VM file per game dir
|
// make sure we only try loading one VM file per game dir
|
||||||
// i.e. if VM from pak7.pk3 fails we won't try one from pak6.pk3
|
// i.e. if VM from pak7.pk3 fails we won't try one from pak6.pk3
|
||||||
|
|
||||||
if(!FS_FilenameCompare(lastSearch->pack->pakPathname, pack->pakPathname))
|
if(!FS_FilenameCompare(lastSearch->pack->pakPathname, pack->pakPathname))
|
||||||
{
|
{
|
||||||
search = search->next;
|
search = search->next;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(FS_FOpenFileReadDir(qvmName, search, NULL, qfalse, qfalse) > 0)
|
if(FS_FOpenFileReadDir(qvmName, search, NULL, qfalse, qfalse) > 0)
|
||||||
{
|
{
|
||||||
|
@ -1621,7 +1621,7 @@ int FS_Seek( fileHandle_t f, long offset, int origin ) {
|
||||||
|
|
||||||
if (fsh[f].streamed) {
|
if (fsh[f].streamed) {
|
||||||
fsh[f].streamed = qfalse;
|
fsh[f].streamed = qfalse;
|
||||||
FS_Seek( f, offset, origin );
|
FS_Seek( f, offset, origin );
|
||||||
fsh[f].streamed = qtrue;
|
fsh[f].streamed = qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1827,7 +1827,7 @@ long FS_ReadFileDir(const char *qpath, void *searchPath, qboolean unpure, void *
|
||||||
{
|
{
|
||||||
// look for it in the filesystem or pack files
|
// look for it in the filesystem or pack files
|
||||||
len = FS_FOpenFileRead(qpath, &h, qfalse);
|
len = FS_FOpenFileRead(qpath, &h, qfalse);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// look for it in a specific search path only
|
// look for it in a specific search path only
|
||||||
|
@ -2253,7 +2253,7 @@ char **FS_ListFilteredFiles( const char *path, const char *extension, char *filt
|
||||||
|
|
||||||
temp = pathLength;
|
temp = pathLength;
|
||||||
if (pathLength) {
|
if (pathLength) {
|
||||||
temp++; // include the '/'
|
temp++; // include the '/'
|
||||||
}
|
}
|
||||||
nfiles = FS_AddFileToList( name + temp, list, nfiles );
|
nfiles = FS_AddFileToList( name + temp, list, nfiles );
|
||||||
}
|
}
|
||||||
|
@ -2266,8 +2266,8 @@ char **FS_ListFilteredFiles( const char *path, const char *extension, char *filt
|
||||||
|
|
||||||
// don't scan directories for files if we are pure or restricted
|
// don't scan directories for files if we are pure or restricted
|
||||||
if ( fs_numServerPaks && !allowNonPureFilesOnDisk ) {
|
if ( fs_numServerPaks && !allowNonPureFilesOnDisk ) {
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
netpath = FS_BuildOSPath( search->dir->path, search->dir->gamedir, path );
|
netpath = FS_BuildOSPath( search->dir->path, search->dir->gamedir, path );
|
||||||
sysFiles = Sys_ListFiles( netpath, extension, filter, &numSysFiles, qfalse );
|
sysFiles = Sys_ListFiles( netpath, extension, filter, &numSysFiles, qfalse );
|
||||||
for ( i = 0 ; i < numSysFiles ; i++ ) {
|
for ( i = 0 ; i < numSysFiles ; i++ ) {
|
||||||
|
@ -2969,9 +2969,9 @@ qboolean FS_ComparePaks( char *neededpaks, int len, qboolean dlstring ) {
|
||||||
// never autodownload any of the id paks
|
// never autodownload any of the id paks
|
||||||
if(FS_idPak(fs_serverReferencedPakNames[i], BASEGAME, NUM_ID_PAKS)
|
if(FS_idPak(fs_serverReferencedPakNames[i], BASEGAME, NUM_ID_PAKS)
|
||||||
#ifndef STANDALONE
|
#ifndef STANDALONE
|
||||||
|| FS_idPak(fs_serverReferencedPakNames[i], BASETA, NUM_TA_PAKS)
|
|| FS_idPak(fs_serverReferencedPakNames[i], BASETA, NUM_TA_PAKS)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -3172,12 +3172,12 @@ static void FS_Startup( const char *gameName )
|
||||||
}
|
}
|
||||||
// fs_homepath is somewhat particular to *nix systems, only add if relevant
|
// fs_homepath is somewhat particular to *nix systems, only add if relevant
|
||||||
|
|
||||||
#ifdef MACOS_X
|
#ifdef MACOS_X
|
||||||
fs_apppath = Cvar_Get ("fs_apppath", Sys_DefaultAppPath(), CVAR_INIT|CVAR_PROTECTED );
|
fs_apppath = Cvar_Get ("fs_apppath", Sys_DefaultAppPath(), CVAR_INIT|CVAR_PROTECTED );
|
||||||
// Make MacOSX also include the base path included with the .app bundle
|
// Make MacOSX also include the base path included with the .app bundle
|
||||||
if (fs_apppath->string[0])
|
if (fs_apppath->string[0])
|
||||||
FS_AddGameDirectory(fs_apppath->string, gameName);
|
FS_AddGameDirectory(fs_apppath->string, gameName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// NOTE: same filtering below for mods and basegame
|
// NOTE: same filtering below for mods and basegame
|
||||||
if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) {
|
if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) {
|
||||||
|
@ -3274,54 +3274,54 @@ static void FS_CheckPak0( void )
|
||||||
curpack = path->pack;
|
curpack = path->pack;
|
||||||
|
|
||||||
if(!Q_stricmpn( curpack->pakGamename, "demoq3", MAX_OSPATH )
|
if(!Q_stricmpn( curpack->pakGamename, "demoq3", MAX_OSPATH )
|
||||||
&& !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
|
&& !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
|
||||||
{
|
{
|
||||||
if(curpack->checksum == DEMO_PAK0_CHECKSUM)
|
if(curpack->checksum == DEMO_PAK0_CHECKSUM)
|
||||||
founddemo = qtrue;
|
founddemo = qtrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
|
else if(!Q_stricmpn( curpack->pakGamename, BASEGAME, MAX_OSPATH )
|
||||||
&& strlen(pakBasename) == 4 && !Q_stricmpn( pakBasename, "pak", 3 )
|
&& strlen(pakBasename) == 4 && !Q_stricmpn( pakBasename, "pak", 3 )
|
||||||
&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_ID_PAKS - 1)
|
&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_ID_PAKS - 1)
|
||||||
{
|
{
|
||||||
if( curpack->checksum != pak_checksums[pakBasename[3]-'0'] )
|
if( curpack->checksum != pak_checksums[pakBasename[3]-'0'] )
|
||||||
{
|
{
|
||||||
if(pakBasename[3] == '0')
|
if(pakBasename[3] == '0')
|
||||||
{
|
{
|
||||||
Com_Printf("\n\n"
|
Com_Printf("\n\n"
|
||||||
"**************************************************\n"
|
"**************************************************\n"
|
||||||
"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
|
"WARNING: " BASEGAME "/pak0.pk3 is present but its checksum (%u)\n"
|
||||||
"is not correct. Please re-copy pak0.pk3 from your\n"
|
"is not correct. Please re-copy pak0.pk3 from your\n"
|
||||||
"legitimate Q3 CDROM.\n"
|
"legitimate Q3 CDROM.\n"
|
||||||
"**************************************************\n\n\n",
|
"**************************************************\n\n\n",
|
||||||
curpack->checksum );
|
curpack->checksum );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Com_Printf("\n\n"
|
Com_Printf("\n\n"
|
||||||
"**************************************************\n"
|
"**************************************************\n"
|
||||||
"WARNING: " BASEGAME "/pak%d.pk3 is present but its checksum (%u)\n"
|
"WARNING: " BASEGAME "/pak%d.pk3 is present but its checksum (%u)\n"
|
||||||
"is not correct. Please re-install the point release\n"
|
"is not correct. Please re-install the point release\n"
|
||||||
"**************************************************\n\n\n",
|
"**************************************************\n\n\n",
|
||||||
pakBasename[3]-'0', curpack->checksum );
|
pakBasename[3]-'0', curpack->checksum );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foundPak |= 1<<(pakBasename[3]-'0');
|
foundPak |= 1<<(pakBasename[3]-'0');
|
||||||
}
|
}
|
||||||
else if(!Q_stricmpn(curpack->pakGamename, BASETA, MAX_OSPATH)
|
else if(!Q_stricmpn(curpack->pakGamename, BASETA, MAX_OSPATH)
|
||||||
&& strlen(pakBasename) == 4 && !Q_stricmpn(pakBasename, "pak", 3)
|
&& strlen(pakBasename) == 4 && !Q_stricmpn(pakBasename, "pak", 3)
|
||||||
&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_TA_PAKS - 1)
|
&& pakBasename[3] >= '0' && pakBasename[3] <= '0' + NUM_TA_PAKS - 1)
|
||||||
|
|
||||||
{
|
{
|
||||||
if(curpack->checksum != missionpak_checksums[pakBasename[3]-'0'])
|
if(curpack->checksum != missionpak_checksums[pakBasename[3]-'0'])
|
||||||
{
|
{
|
||||||
Com_Printf("\n\n"
|
Com_Printf("\n\n"
|
||||||
"**************************************************\n"
|
"**************************************************\n"
|
||||||
"WARNING: " BASETA "/pak%d.pk3 is present but its checksum (%u)\n"
|
"WARNING: " BASETA "/pak%d.pk3 is present but its checksum (%u)\n"
|
||||||
"is not correct. Please re-install Team Arena\n"
|
"is not correct. Please re-install Team Arena\n"
|
||||||
"**************************************************\n\n\n",
|
"**************************************************\n\n\n",
|
||||||
pakBasename[3]-'0', curpack->checksum );
|
pakBasename[3]-'0', curpack->checksum );
|
||||||
}
|
}
|
||||||
|
|
||||||
foundTA |= 1 << (pakBasename[3]-'0');
|
foundTA |= 1 << (pakBasename[3]-'0');
|
||||||
|
@ -3338,12 +3338,12 @@ static void FS_CheckPak0( void )
|
||||||
if(curpack->checksum == pak_checksums[index])
|
if(curpack->checksum == pak_checksums[index])
|
||||||
{
|
{
|
||||||
Com_Printf("\n\n"
|
Com_Printf("\n\n"
|
||||||
"**************************************************\n"
|
"**************************************************\n"
|
||||||
"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
|
"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
|
||||||
"Running in standalone mode won't work\n"
|
"Running in standalone mode won't work\n"
|
||||||
"Please rename, or remove this file\n"
|
"Please rename, or remove this file\n"
|
||||||
"**************************************************\n\n\n",
|
"**************************************************\n\n\n",
|
||||||
curpack->pakFilename, BASEGAME, PATH_SEP, index);
|
curpack->pakFilename, BASEGAME, PATH_SEP, index);
|
||||||
|
|
||||||
|
|
||||||
foundPak |= 0x80000000;
|
foundPak |= 0x80000000;
|
||||||
|
@ -3355,12 +3355,12 @@ static void FS_CheckPak0( void )
|
||||||
if(curpack->checksum == missionpak_checksums[index])
|
if(curpack->checksum == missionpak_checksums[index])
|
||||||
{
|
{
|
||||||
Com_Printf("\n\n"
|
Com_Printf("\n\n"
|
||||||
"**************************************************\n"
|
"**************************************************\n"
|
||||||
"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
|
"WARNING: %s is renamed pak file %s%cpak%d.pk3\n"
|
||||||
"Running in standalone mode won't work\n"
|
"Running in standalone mode won't work\n"
|
||||||
"Please rename, or remove this file\n"
|
"Please rename, or remove this file\n"
|
||||||
"**************************************************\n\n\n",
|
"**************************************************\n\n\n",
|
||||||
curpack->pakFilename, BASETA, PATH_SEP, index);
|
curpack->pakFilename, BASETA, PATH_SEP, index);
|
||||||
|
|
||||||
foundTA |= 0x80000000;
|
foundTA |= 0x80000000;
|
||||||
}
|
}
|
||||||
|
@ -3401,21 +3401,21 @@ static void FS_CheckPak0( void )
|
||||||
if((foundPak & 0x01) != 0x01)
|
if((foundPak & 0x01) != 0x01)
|
||||||
{
|
{
|
||||||
Q_strcat(errorText, sizeof(errorText),
|
Q_strcat(errorText, sizeof(errorText),
|
||||||
"\"pak0.pk3\" is missing. Please copy it "
|
"\"pak0.pk3\" is missing. Please copy it "
|
||||||
"from your legitimate Q3 CDROM. ");
|
"from your legitimate Q3 CDROM. ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if((foundPak & 0x1fe) != 0x1fe)
|
if((foundPak & 0x1fe) != 0x1fe)
|
||||||
{
|
{
|
||||||
Q_strcat(errorText, sizeof(errorText),
|
Q_strcat(errorText, sizeof(errorText),
|
||||||
"Point Release files are missing. Please "
|
"Point Release files are missing. Please "
|
||||||
"re-install the 1.32 point release. ");
|
"re-install the 1.32 point release. ");
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strcat(errorText, sizeof(errorText),
|
Q_strcat(errorText, sizeof(errorText),
|
||||||
va("Also check that your ioq3 executable is in "
|
va("Also check that your ioq3 executable is in "
|
||||||
"the correct place and that every file "
|
"the correct place and that every file "
|
||||||
"in the \"%s\" directory is present and readable", BASEGAME));
|
"in the \"%s\" directory is present and readable", BASEGAME));
|
||||||
|
|
||||||
Com_Error(ERR_FATAL, "%s", errorText);
|
Com_Error(ERR_FATAL, "%s", errorText);
|
||||||
}
|
}
|
||||||
|
@ -3427,15 +3427,15 @@ static void FS_CheckPak0( void )
|
||||||
if((foundTA & 0x01) != 0x01)
|
if((foundTA & 0x01) != 0x01)
|
||||||
{
|
{
|
||||||
Com_sprintf(errorText, sizeof(errorText),
|
Com_sprintf(errorText, sizeof(errorText),
|
||||||
"\"" BASETA "%cpak0.pk3\" is missing. Please copy it "
|
"\"" BASETA "%cpak0.pk3\" is missing. Please copy it "
|
||||||
"from your legitimate Quake 3 Team Arena CDROM. ", PATH_SEP);
|
"from your legitimate Quake 3 Team Arena CDROM. ", PATH_SEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((foundTA & 0x0e) != 0x0e)
|
if((foundTA & 0x0e) != 0x0e)
|
||||||
{
|
{
|
||||||
Q_strcat(errorText, sizeof(errorText),
|
Q_strcat(errorText, sizeof(errorText),
|
||||||
"Team Arena Point Release files are missing. Please "
|
"Team Arena Point Release files are missing. Please "
|
||||||
"re-install the latest Team Arena point release.");
|
"re-install the latest Team Arena point release.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Com_Error(ERR_FATAL, "%s", errorText);
|
Com_Error(ERR_FATAL, "%s", errorText);
|
||||||
|
@ -3870,8 +3870,8 @@ qboolean FS_ConditionalRestart(int checksumFeed, qboolean disconnect)
|
||||||
if(fs_gamedirvar->modified)
|
if(fs_gamedirvar->modified)
|
||||||
{
|
{
|
||||||
if(FS_FilenameCompare(lastValidGame, fs_gamedirvar->string) &&
|
if(FS_FilenameCompare(lastValidGame, fs_gamedirvar->string) &&
|
||||||
(*lastValidGame || FS_FilenameCompare(fs_gamedirvar->string, com_basegame->string)) &&
|
(*lastValidGame || FS_FilenameCompare(fs_gamedirvar->string, com_basegame->string)) &&
|
||||||
(*fs_gamedirvar->string || FS_FilenameCompare(lastValidGame, com_basegame->string)))
|
(*fs_gamedirvar->string || FS_FilenameCompare(lastValidGame, com_basegame->string)))
|
||||||
{
|
{
|
||||||
Com_GameRestart(checksumFeed, disconnect);
|
Com_GameRestart(checksumFeed, disconnect);
|
||||||
return qtrue;
|
return qtrue;
|
||||||
|
@ -3903,28 +3903,28 @@ int FS_FOpenFileByMode( const char *qpath, fileHandle_t *f, fsMode_t mode ) {
|
||||||
sync = qfalse;
|
sync = qfalse;
|
||||||
|
|
||||||
switch( mode ) {
|
switch( mode ) {
|
||||||
case FS_READ:
|
case FS_READ:
|
||||||
r = FS_FOpenFileRead( qpath, f, qtrue );
|
r = FS_FOpenFileRead( qpath, f, qtrue );
|
||||||
break;
|
break;
|
||||||
case FS_WRITE:
|
case FS_WRITE:
|
||||||
*f = FS_FOpenFileWrite( qpath );
|
*f = FS_FOpenFileWrite( qpath );
|
||||||
r = 0;
|
r = 0;
|
||||||
if (*f == 0) {
|
if (*f == 0) {
|
||||||
r = -1;
|
r = -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FS_APPEND_SYNC:
|
case FS_APPEND_SYNC:
|
||||||
sync = qtrue;
|
sync = qtrue;
|
||||||
case FS_APPEND:
|
case FS_APPEND:
|
||||||
*f = FS_FOpenFileAppend( qpath );
|
*f = FS_FOpenFileAppend( qpath );
|
||||||
r = 0;
|
r = 0;
|
||||||
if (*f == 0) {
|
if (*f == 0) {
|
||||||
r = -1;
|
r = -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Com_Error( ERR_FATAL, "FS_FOpenFileByMode: bad mode" );
|
Com_Error( ERR_FATAL, "FS_FOpenFileByMode: bad mode" );
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!f) {
|
if (!f) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue