2016-01-16 19:28:04 +00:00
|
|
|
allow plain files to override files inside a PAK file -- Sander van Dijk.
|
2014-09-08 09:30:51 +00:00
|
|
|
|
2021-08-29 20:21:02 +00:00
|
|
|
diff --git a/Quake/common.c b/Quake/common.c
|
2021-09-03 08:01:24 +00:00
|
|
|
index bd246f1..2326383 100644
|
2021-08-29 20:21:02 +00:00
|
|
|
--- a/Quake/common.c
|
|
|
|
+++ b/Quake/common.c
|
2021-09-03 08:01:24 +00:00
|
|
|
@@ -2039,13 +2039,6 @@ static void COM_AddGameDirectory (const char *base, const char *dir)
|
2014-09-08 09:30:51 +00:00
|
|
|
else path_id = 1U;
|
2016-01-16 19:28:04 +00:00
|
|
|
|
2014-09-10 07:28:28 +00:00
|
|
|
_add_path:
|
2014-09-08 09:30:51 +00:00
|
|
|
- // 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++)
|
|
|
|
{
|
2021-09-03 08:01:24 +00:00
|
|
|
@@ -2077,6 +2070,13 @@ _add_path:
|
2014-09-08 09:30:51 +00:00
|
|
|
if (!pak) break;
|
|
|
|
}
|
2014-09-10 07:28:28 +00:00
|
|
|
|
2016-01-16 19:28:04 +00:00
|
|
|
+ // add the directory to the search path -- moved here from before the pakX.pak loop -- svdijk.
|
2014-09-08 09:30:51 +00:00
|
|
|
+ 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;
|
2014-09-10 07:28:28 +00:00
|
|
|
+
|
|
|
|
if (!been_here && host_parms->userdir != host_parms->basedir)
|
|
|
|
{
|
|
|
|
been_here = true;
|
|
|
|
|