From 2578b7520089976065dd04e72be94e61fd396fb1 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Fri, 3 Sep 2021 11:01:24 +0300 Subject: [PATCH] re-diff'ed extra patches under Misc/ so that they apply cleanly. --- Misc/fs_search_order.patch | 6 +++--- Misc/quake_retexturing_project.patch | 19 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Misc/fs_search_order.patch b/Misc/fs_search_order.patch index a7317f8e..20a16ca8 100644 --- a/Misc/fs_search_order.patch +++ b/Misc/fs_search_order.patch @@ -1,10 +1,10 @@ allow plain files to override files inside a PAK file -- Sander van Dijk. diff --git a/Quake/common.c b/Quake/common.c -index 6206c3f..27833b8 100644 +index bd246f1..2326383 100644 --- a/Quake/common.c +++ b/Quake/common.c -@@ -2037,13 +2037,6 @@ static void COM_AddGameDirectory (const char *base, const char *dir) +@@ -2039,13 +2039,6 @@ static void COM_AddGameDirectory (const char *base, const char *dir) else path_id = 1U; _add_path: @@ -18,7 +18,7 @@ index 6206c3f..27833b8 100644 // add any pak files in the format pak0.pak pak1.pak, ... for (i = 0; ; i++) { -@@ -2075,6 +2068,13 @@ _add_path: +@@ -2077,6 +2070,13 @@ _add_path: if (!pak) break; } diff --git a/Misc/quake_retexturing_project.patch b/Misc/quake_retexturing_project.patch index dba25cc3..ee37d293 100644 --- a/Misc/quake_retexturing_project.patch +++ b/Misc/quake_retexturing_project.patch @@ -1,5 +1,5 @@ diff --git a/Quake/gl_model.c b/Quake/gl_model.c -index 2b15080..07ff6fd 100644 +index 94f0023..fdb8c4c 100644 --- a/Quake/gl_model.c +++ b/Quake/gl_model.c @@ -37,6 +37,8 @@ qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash); @@ -11,24 +11,21 @@ index 2b15080..07ff6fd 100644 static byte *mod_novis; static int mod_novis_capacity; -@@ -498,7 +500,16 @@ void Mod_LoadTextures (lump_t *l) - if (!isDedicated) //no texture uploading for dedicated server +@@ -534,6 +536,13 @@ void Mod_LoadTextures (lump_t *l) { if (!q_strncasecmp(tx->name,"sky",3)) //sky texture //also note -- was Q_strncmp, changed to match qbsp -+ { + { + if (r_externaltexture_fix.value) { //mk + if (strstr(tx->name,"sky4")) { + if (CRC_Block((byte *)(tx+1), tx->width * tx->height)==13039) -+ q_strlcpy(tx->name, "sky1", sizeof(tx->name)); ++ q_strlcpy(tx->name, "sky1", sizeof(tx->name)); + Con_Printf(" using %s\n", tx->name); + } + } - Sky_LoadTexture (tx); -+ } - else if (tx->name[0] == '*') //warping texture - { - //external textures -- first look in "textures/mapname/" then look in "textures/" -@@ -548,6 +559,50 @@ void Mod_LoadTextures (lump_t *l) + if (loadmodel->bspversion == BSPVERSION_QUAKE64) + Sky_LoadTextureQ64 (tx); + else +@@ -588,6 +597,50 @@ void Mod_LoadTextures (lump_t *l) //external textures -- first look in "textures/mapname/" then look in "textures/" mark = Hunk_LowMark (); COM_StripExtension (loadmodel->name + 5, mapname, sizeof(mapname));