From 305be5e835a9fc1b1145067fb0c01fcfda03b401 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 1 Mar 2011 18:00:30 +0000 Subject: [PATCH] * gl_model.c: relaxed searchpath requirements for external lit file loading: they are now allowed from the same game directory as the map itself as well as from a searchpath with a higher priority. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@428 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/gl_model.c | 9 +++++---- README.html | 2 +- README.sgml | 2 +- README.txt | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Quake/gl_model.c b/Quake/gl_model.c index f29cee38..86665cf3 100644 --- a/Quake/gl_model.c +++ b/Quake/gl_model.c @@ -1,7 +1,7 @@ /* Copyright (C) 1996-2001 Id Software, Inc. Copyright (C) 2002-2009 John Fitzgibbons and others -Copyright (C) 2007-2008 Kristian Duske +Copyright (C) 2011 O.Sezer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -645,11 +645,12 @@ void Mod_LoadLighting (lump_t *l) data = (byte*) COM_LoadHunkFile (litfilename, &path_id); if (data) { - // use lit file only from the same gamedir as the map itself - if (path_id != loadmodel->path_id) + // use lit file only from the same gamedir as the map + // itself or from a searchpath with higher priority. + if (path_id < loadmodel->path_id) { Hunk_FreeToLowMark(mark); - Con_Printf("%s ignored (not from the same gamedir)\n", litfilename); + Con_Printf("ignored %s from a gamedir with lower priority\n", litfilename); } else if (data[0] == 'Q' && data[1] == 'L' && data[2] == 'I' && data[3] == 'T') diff --git a/README.html b/README.html index 1b879292..db703b80 100644 --- a/README.html +++ b/README.html @@ -133,7 +133,7 @@ Compile time options include
  • Fixed an erroneous protocol check in the server code
  • Raised the default zone memory size to 384 kb
  • Raised the default max_edicts from 1024 to 2048
  • -
  • Revised lit file loading, the lit file must be from the same game directory as the map itself
  • +
  • Revised lit file loading, the lit file must be from the same game directory as the map itself or from a searchpath with a higher priority
  • Fixed rest of the compiler warnings
  • Other minor sound and cdaudio updates
  • diff --git a/README.sgml b/README.sgml index 424a5904..b542ec9d 100644 --- a/README.sgml +++ b/README.sgml @@ -81,7 +81,7 @@ Compile time options include Fixed an erroneous protocol check in the server code Raised the default zone memory size to 384 kb Raised the default max_edicts from 1024 to 2048 - Revised lit file loading, the lit file must be from the same game directory as the map itself + Revised lit file loading, the lit file must be from the same game directory as the map itself or from a searchpath with a higher priority Fixed rest of the compiler warnings Other minor sound and cdaudio updates diff --git a/README.txt b/README.txt index 3b7e6cc6..26ead853 100644 --- a/README.txt +++ b/README.txt @@ -135,7 +135,8 @@ o Raised the default max_edicts from 1024 to 2048 o Revised lit file loading, the lit file must be from the same game - directory as the map itself + directory as the map itself or from a searchpath with a higher + priority o Fixed rest of the compiler warnings