mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
d7b79721aa
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1061 af15c1b1-3010-417e-b628-4374ebc0bcbd
37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
allow plain files to override files inside a PAK file -- Sander van Dijk
|
|
|
|
Index: Quake/common.c
|
|
===================================================================
|
|
--- Quake/common.c (revision 1060)
|
|
+++ Quake/common.c (working copy)
|
|
@@ -1900,15 +1900,7 @@ static void COM_AddGameDirectory (const
|
|
if (com_searchpaths)
|
|
path_id = com_searchpaths->path_id << 1;
|
|
else path_id = 1U;
|
|
-
|
|
_add_path:
|
|
- // add the directory to the search path
|
|
- search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
|
- search->path_id = path_id;
|
|
- q_strlcpy (search->filename, com_gamedir, sizeof(search->filename));
|
|
- search->next = com_searchpaths;
|
|
- com_searchpaths = search;
|
|
-
|
|
// add any pak files in the format pak0.pak pak1.pak, ...
|
|
for (i = 0; ; i++)
|
|
{
|
|
@@ -1940,6 +1932,13 @@ _add_path:
|
|
if (!pak) break;
|
|
}
|
|
|
|
+ // add the directory to the search path -- moved here from before the pakX.pak loop -- svdijk
|
|
+ search = (searchpath_t *) Z_Malloc(sizeof(searchpath_t));
|
|
+ search->path_id = path_id;
|
|
+ q_strlcpy (search->filename, com_gamedir, sizeof(search->filename));
|
|
+ search->next = com_searchpaths;
|
|
+ com_searchpaths = search;
|
|
+
|
|
if (!been_here && host_parms->userdir != host_parms->basedir)
|
|
{
|
|
been_here = true;
|
|
|