diff --git a/Quake/common.c b/Quake/common.c index ada5f395..6aa13c05 100644 --- a/Quake/common.c +++ b/Quake/common.c @@ -1352,7 +1352,6 @@ typedef struct #define MAX_FILES_IN_PACK 2048 -char com_cachedir[MAX_OSPATH]; char com_gamedir[MAX_OSPATH]; char com_basedir[MAX_OSPATH]; @@ -1479,10 +1478,9 @@ int COM_FindFile (char *filename, int *handle, FILE **file) { searchpath_t *search; char netpath[MAX_OSPATH]; - char cachepath[MAX_OSPATH]; pack_t *pak; int i; - int findtime, cachetime; + int findtime; if (file && handle) Sys_Error ("COM_FindFile: both handle and file set"); @@ -1540,27 +1538,6 @@ int COM_FindFile (char *filename, int *handle, FILE **file) if (findtime == -1) continue; - // see if the file needs to be updated in the cache - if (!com_cachedir[0]) - strcpy (cachepath, netpath); - else - { -#if defined(_WIN32) - if ((strlen(netpath) < 2) || (netpath[1] != ':')) - sprintf (cachepath,"%s%s", com_cachedir, netpath); - else - sprintf (cachepath,"%s%s", com_cachedir, netpath+2); -#else - sprintf (cachepath,"%s%s", com_cachedir, netpath); -#endif - - cachetime = Sys_FileTime (cachepath); - - if (cachetime < findtime) - COM_CopyFile (netpath, cachepath); - strcpy (netpath, cachepath); - } - // Sys_Printf ("FindFile: %s\n",netpath); com_filesize = Sys_FileOpenRead (netpath, &i); if (handle) @@ -1874,19 +1851,6 @@ void COM_InitFilesystem (void) //johnfitz -- modified based on topaz's tutorial com_basedir[j-1] = 0; } - i = COM_CheckParm ("-cachedir"); - if (i && i < com_argc-1) - { - if (com_argv[i+1][0] == '-') - com_cachedir[0] = 0; - else - strcpy (com_cachedir, com_argv[i+1]); - } - else if (host_parms.cachedir) - strcpy (com_cachedir, host_parms.cachedir); - else - com_cachedir[0] = 0; - // start up with GAMENAME by default (id1) COM_AddGameDirectory (va("%s/"GAMENAME, com_basedir)); strcpy (com_gamedir, va("%s/"GAMENAME, com_basedir)); diff --git a/Quake/main.c b/Quake/main.c index 465fa799..cd407972 100644 --- a/Quake/main.c +++ b/Quake/main.c @@ -33,7 +33,6 @@ int main(int argc, char *argv[]) double time, oldtime, newtime; parms.basedir = "."; - parms.cachedir = NULL; parms.argc = argc; parms.argv = argv; diff --git a/Quake/quakedef.h b/Quake/quakedef.h index ba9710fc..42e591c7 100644 --- a/Quake/quakedef.h +++ b/Quake/quakedef.h @@ -272,7 +272,10 @@ typedef struct typedef struct { char *basedir; - char *cachedir; // for development over ISDN lines + char *userdir; // user's directory on UNIX platforms. + // if user directories are enabled, basedir + // and userdir will point to different + // memory locations, otherwise to the same. int argc; char **argv; void *membase;