mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2024-12-12 13:42:21 +00:00
add the z flag to most read Qopen calls
This commit is contained in:
parent
7b3a0f0cb8
commit
1ec1bfff69
6 changed files with 12 additions and 12 deletions
|
@ -97,7 +97,7 @@ qboolean CL_CheckOrDownloadFile (char *filename)
|
||||||
|
|
||||||
// FS_CreatePath (name);
|
// FS_CreatePath (name);
|
||||||
|
|
||||||
fp = Qopen (name, "r+b");
|
fp = Qopen (name, "r+bz");
|
||||||
if (fp) { // it exists
|
if (fp) { // it exists
|
||||||
int len;
|
int len;
|
||||||
Qseek(fp, 0, SEEK_END);
|
Qseek(fp, 0, SEEK_END);
|
||||||
|
|
|
@ -2037,7 +2037,7 @@ void Create_Savestrings (void)
|
||||||
for (i=0 ; i<MAX_SAVEGAMES ; i++)
|
for (i=0 ; i<MAX_SAVEGAMES ; i++)
|
||||||
{
|
{
|
||||||
Com_sprintf (name, sizeof(name), "%s/save/save%i/server.ssv", FS_Gamedir(), i);
|
Com_sprintf (name, sizeof(name), "%s/save/save%i/server.ssv", FS_Gamedir(), i);
|
||||||
f = Qopen (name, "rb");
|
f = Qopen (name, "rbz");
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
strcpy (m_savestrings[i], "<EMPTY>");
|
strcpy (m_savestrings[i], "<EMPTY>");
|
||||||
|
@ -2520,7 +2520,7 @@ void StartServer_MenuInit( void )
|
||||||
** load the list of map names
|
** load the list of map names
|
||||||
*/
|
*/
|
||||||
Com_sprintf( mapsname, sizeof( mapsname ), "%s/maps.lst", FS_Gamedir() );
|
Com_sprintf( mapsname, sizeof( mapsname ), "%s/maps.lst", FS_Gamedir() );
|
||||||
if ( ( fp = Qopen( mapsname, "rb" ) ) == 0 )
|
if ( ( fp = Qopen( mapsname, "rbz" ) ) == 0 )
|
||||||
{
|
{
|
||||||
if ( ( length = FS_LoadFile( "maps.lst", ( void ** ) &buffer ) ) == -1 )
|
if ( ( length = FS_LoadFile( "maps.lst", ( void ** ) &buffer ) ) == -1 )
|
||||||
Com_Error( ERR_DROP, "couldn't find maps.lst\n" );
|
Com_Error( ERR_DROP, "couldn't find maps.lst\n" );
|
||||||
|
|
|
@ -473,7 +473,7 @@ void ReadGame (char *filename)
|
||||||
|
|
||||||
gi.FreeTags (TAG_GAME);
|
gi.FreeTags (TAG_GAME);
|
||||||
|
|
||||||
f = Qopen (filename, "rb");
|
f = Qopen (filename, "rbz");
|
||||||
if (!f)
|
if (!f)
|
||||||
gi.error ("Couldn't open %s", filename);
|
gi.error ("Couldn't open %s", filename);
|
||||||
|
|
||||||
|
@ -668,7 +668,7 @@ void ReadLevel (char *filename)
|
||||||
void *base;
|
void *base;
|
||||||
edict_t *ent;
|
edict_t *ent;
|
||||||
|
|
||||||
f = Qopen (filename, "rb");
|
f = Qopen (filename, "rbz");
|
||||||
if (!f)
|
if (!f)
|
||||||
gi.error ("Couldn't open %s", filename);
|
gi.error ("Couldn't open %s", filename);
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ void ReadGame (char *filename)
|
||||||
|
|
||||||
gi.FreeTags (TAG_GAME);
|
gi.FreeTags (TAG_GAME);
|
||||||
|
|
||||||
f = Qopen (filename, "rb");
|
f = Qopen (filename, "rbz");
|
||||||
if (!f)
|
if (!f)
|
||||||
gi.error ("Couldn't open %s", filename);
|
gi.error ("Couldn't open %s", filename);
|
||||||
|
|
||||||
|
@ -691,7 +691,7 @@ void ReadLevel (char *filename)
|
||||||
void *base;
|
void *base;
|
||||||
edict_t *ent;
|
edict_t *ent;
|
||||||
|
|
||||||
f = Qopen (filename, "rb");
|
f = Qopen (filename, "rbz");
|
||||||
if (!f)
|
if (!f)
|
||||||
gi.error ("Couldn't open %s", filename);
|
gi.error ("Couldn't open %s", filename);
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ int FS_FOpenFile (char *filename, QFile **file)
|
||||||
if (!strncmp (filename, link->from, link->fromlength))
|
if (!strncmp (filename, link->from, link->fromlength))
|
||||||
{
|
{
|
||||||
Com_sprintf (netpath, sizeof(netpath), "%s%s",link->to, filename+link->fromlength);
|
Com_sprintf (netpath, sizeof(netpath), "%s%s",link->to, filename+link->fromlength);
|
||||||
*file = Qopen (netpath, "rb");
|
*file = Qopen (netpath, "rbz");
|
||||||
if (*file)
|
if (*file)
|
||||||
{
|
{
|
||||||
Com_DPrintf ("link file: %s\n",netpath);
|
Com_DPrintf ("link file: %s\n",netpath);
|
||||||
|
@ -258,7 +258,7 @@ int FS_FOpenFile (char *filename, QFile **file)
|
||||||
|
|
||||||
Com_sprintf (netpath, sizeof(netpath), "%s/%s",search->filename, filename);
|
Com_sprintf (netpath, sizeof(netpath), "%s/%s",search->filename, filename);
|
||||||
|
|
||||||
*file = Qopen (netpath, "rb");
|
*file = Qopen (netpath, "rbz");
|
||||||
if (!*file)
|
if (!*file)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ int FS_FOpenFile (char *filename, QFile **file)
|
||||||
{
|
{
|
||||||
Com_sprintf (netpath, sizeof(netpath), "%s/%s",FS_Gamedir(), filename);
|
Com_sprintf (netpath, sizeof(netpath), "%s/%s",FS_Gamedir(), filename);
|
||||||
|
|
||||||
*file = Qopen (netpath, "rb");
|
*file = Qopen (netpath, "rbz");
|
||||||
if (!*file)
|
if (!*file)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
|
@ -311,7 +311,7 @@ void SV_ReadLevelFile (void)
|
||||||
Com_DPrintf("SV_ReadLevelFile()\n");
|
Com_DPrintf("SV_ReadLevelFile()\n");
|
||||||
|
|
||||||
Com_sprintf (name, sizeof(name), "%s/save/current/%s.sv2", FS_Gamedir(), sv.name);
|
Com_sprintf (name, sizeof(name), "%s/save/current/%s.sv2", FS_Gamedir(), sv.name);
|
||||||
f = Qopen(name, "rb");
|
f = Qopen(name, "rbz");
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
Com_Printf ("Failed to open %s\n", name);
|
Com_Printf ("Failed to open %s\n", name);
|
||||||
|
@ -414,7 +414,7 @@ void SV_ReadServerFile (void)
|
||||||
Com_DPrintf("SV_ReadServerFile()\n");
|
Com_DPrintf("SV_ReadServerFile()\n");
|
||||||
|
|
||||||
Com_sprintf (name, sizeof(name), "%s/save/current/server.ssv", FS_Gamedir());
|
Com_sprintf (name, sizeof(name), "%s/save/current/server.ssv", FS_Gamedir());
|
||||||
f = Qopen (name, "rb");
|
f = Qopen (name, "rbz");
|
||||||
if (!f)
|
if (!f)
|
||||||
{
|
{
|
||||||
Com_Printf ("Couldn't read %s\n", name);
|
Com_Printf ("Couldn't read %s\n", name);
|
||||||
|
|
Loading…
Reference in a new issue