* 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
This commit is contained in:
Ozkan Sezer 2011-03-01 18:00:30 +00:00
parent c53dd74e4d
commit 305be5e835
4 changed files with 9 additions and 7 deletions

View File

@ -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')

View File

@ -133,7 +133,7 @@ Compile time options include
<LI> Fixed an erroneous protocol check in the server code</LI>
<LI> Raised the default zone memory size to 384 kb</LI>
<LI> Raised the default max_edicts from 1024 to 2048</LI>
<LI> Revised lit file loading, the lit file must be from the same game directory as the map itself</LI>
<LI> 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</LI>
<LI> Fixed rest of the compiler warnings</LI>
<LI> Other minor sound and cdaudio updates</LI>
</UL>

View File

@ -81,7 +81,7 @@ Compile time options include
<item> Fixed an erroneous protocol check in the server code
<item> Raised the default zone memory size to 384 kb
<item> Raised the default max_edicts from 1024 to 2048
<item> Revised lit file loading, the lit file must be from the same game directory as the map itself
<item> 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
<item> Fixed rest of the compiler warnings
<item> Other minor sound and cdaudio updates
</itemize>

View File

@ -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