load custom quakespasm.pak from <com_basedir> instead of id1/

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@906 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2014-04-28 05:40:28 +00:00
parent 5ad7885e70
commit 4d32042d71
3 changed files with 18 additions and 9 deletions

View file

@ -1,11 +1,12 @@
support for user directories, based on uhexen2 and tyrquake:
** against quakespasm svn revision 905.
initial experimental support for user directories, based on uhexen2
and tyrquake:
** against quakespasm svn revision 906.
** on-the-fly game directory switching not supported yet.
** minimally tested, needs more work.
Index: Quake/sys_sdl_unix.c
===================================================================
--- Quake/sys_sdl_unix.c (revision 905)
--- Quake/sys_sdl_unix.c (revision 906)
+++ Quake/sys_sdl_unix.c (working copy)
@@ -20,6 +20,8 @@
@ -73,7 +74,7 @@ Index: Quake/sys_sdl_unix.c
void Sys_mkdir (const char *path)
Index: Quake/common.c
===================================================================
--- Quake/common.c (revision 905)
--- Quake/common.c (revision 906)
+++ Quake/common.c (working copy)
@@ -1919,6 +1919,7 @@ static void COM_AddGameDirectory (const
searchpath_t *search;
@ -91,7 +92,15 @@ Index: Quake/common.c
// add the directory to the search path
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
search->path_id = path_id;
@@ -1963,6 +1965,14 @@ static void COM_AddGameDirectory (const
@@ -1943,6 +1945,7 @@ static void COM_AddGameDirectory (const
qspak = NULL;
else {
qboolean old = com_modified;
+ if (been_here) base = host_parms->basedir;
q_snprintf (pakfile, sizeof(pakfile), "%s/quakespasm.pak", base);
qspak = COM_LoadPackFile (pakfile);
com_modified = old;
@@ -1963,6 +1966,14 @@ static void COM_AddGameDirectory (const
}
if (!pak) break;
}

View file

@ -1943,9 +1943,9 @@ static void COM_AddGameDirectory (const char *base, const char *dir)
qspak = NULL;
else {
qboolean old = com_modified;
q_snprintf (pakfile, sizeof(pakfile), "%s/quakespasm.pak", com_gamedir);
q_snprintf (pakfile, sizeof(pakfile), "%s/quakespasm.pak", base);
qspak = COM_LoadPackFile (pakfile);
com_modified = old;/* make quakespasm customization pak to not set com_modified. */
com_modified = old;
}
if (pak) {
search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));