diff --git a/quakespasm/Quake/common.c b/quakespasm/Quake/common.c index 9aa70998..9a758c99 100644 --- a/quakespasm/Quake/common.c +++ b/quakespasm/Quake/common.c @@ -1813,6 +1813,29 @@ void COM_AddGameDirectory (char *dir) } } +static void kill_id1_conback (void) /* QuakeSpasm customization: */ +{ + searchpath_t *search; + int i; + + for (search = com_searchpaths; search; search = search->next) + { + if (!search->pack) + continue; + if (!strstr(search->pack->filename, "/id1/pak0.pak")) + continue; + for (i = 0 ; i < search->pack->numfiles ; i++) + { + if (strcmp(search->pack->files[i].name, + "gfx/conback.lmp") == 0) + { + search->pack->files[i].name[0] = '$'; + return; + } + } + } +} + /* ================= COM_InitFilesystem @@ -1854,6 +1877,11 @@ void COM_InitFilesystem () //johnfitz -- modified based on topaz's tutorial COM_AddGameDirectory (va("%s/"GAMENAME, basedir) ); strcpy (com_gamedir, va("%s/"GAMENAME, basedir)); + if (!fitzmode) + { /* QuakeSpasm customization: */ + kill_id1_conback (); + } + //johnfitz -- track number of mission packs added //since we don't want to allow the "game" command to strip them away com_nummissionpacks = 0; diff --git a/quakespasm/Quake/gl_draw.c b/quakespasm/Quake/gl_draw.c index 2b7ea114..f9773f9b 100644 --- a/quakespasm/Quake/gl_draw.c +++ b/quakespasm/Quake/gl_draw.c @@ -323,6 +323,10 @@ qpic_t *Draw_ConbackPic (void) { if (fitzmode) { return Draw_CachePic ("gfx/conback.lmp"); + } else if (COM_LoadTempFile("gfx/conback.lmp")) { + /* even if we are running in custom mode + allow for mod-provided conback images */ + return Draw_CachePic ("gfx/conback.lmp"); } else { /* QuakeSpasm customization: */ cachepic_t *pic;