Fixed .lit file (colored lighting) support.

This commit is contained in:
Forest Hale 2000-06-29 22:18:13 +00:00
parent 98c7aeb439
commit 244ea57e1a

View file

@ -503,6 +503,8 @@ void Mod_LoadLighting (lump_t *l)
strcat(litfilename, ".lit");
loadmodel->lightdata = Hunk_AllocName ( l->filelen*3, litfilename);
if (!loadmodel->lightdata) // LordHavoc: someone forgot this... preventing .lit from working
{
in = loadmodel->lightdata + l->filelen*2; // place the file at the end, so it will not be overwritten until the very last write
out = loadmodel->lightdata;
memcpy (in, mod_base + l->fileofs, l->filelen);
@ -513,6 +515,7 @@ void Mod_LoadLighting (lump_t *l)
*out++ = d;
*out++ = d;
}
}
}