mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-02-17 00:52:00 +00:00
Fixed .lit file (colored lighting) support.
This commit is contained in:
parent
98c7aeb439
commit
244ea57e1a
1 changed files with 11 additions and 8 deletions
|
@ -503,15 +503,18 @@ void Mod_LoadLighting (lump_t *l)
|
|||
strcat(litfilename, ".lit");
|
||||
|
||||
loadmodel->lightdata = Hunk_AllocName ( l->filelen*3, litfilename);
|
||||
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);
|
||||
for (i = 0;i < l->filelen;i++)
|
||||
if (!loadmodel->lightdata) // LordHavoc: someone forgot this... preventing .lit from working
|
||||
{
|
||||
d = *in++;
|
||||
*out++ = d;
|
||||
*out++ = d;
|
||||
*out++ = d;
|
||||
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);
|
||||
for (i = 0;i < l->filelen;i++)
|
||||
{
|
||||
d = *in++;
|
||||
*out++ = d;
|
||||
*out++ = d;
|
||||
*out++ = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue