mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
Reject lit files if they're the wrong size (eg hipnotic/start.bsp vs id1/start.lit or just a bsp that no longer has any coloured lits, etc).
From Spike. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1654 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
799b48d3f8
commit
361c66d06a
1 changed files with 8 additions and 3 deletions
|
@ -731,9 +731,14 @@ void Mod_LoadLighting (lump_t *l)
|
||||||
i = LittleLong(((int *)data)[1]);
|
i = LittleLong(((int *)data)[1]);
|
||||||
if (i == 1)
|
if (i == 1)
|
||||||
{
|
{
|
||||||
Con_DPrintf2("%s loaded\n", litfilename);
|
if (8+l->filelen*3 == com_filesize)
|
||||||
loadmodel->lightdata = data + 8;
|
{
|
||||||
return;
|
Con_DPrintf2("%s loaded\n", litfilename);
|
||||||
|
loadmodel->lightdata = data + 8;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Hunk_FreeToLowMark(mark);
|
||||||
|
Con_Printf("Outdated .lit file (%s should be %u bytes, not %u)\n", litfilename, 8+l->filelen*3, com_filesize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue