Added support for q3map2 external lightmaps (bigger lightmaps == less texture changes)
This commit is contained in:
parent
0f8cfe9b7d
commit
45e1a03f3d
1 changed files with 6 additions and 4 deletions
10
gl_q3bsp.c
10
gl_q3bsp.c
|
@ -39,7 +39,7 @@ marea_t map_areas[MAX_MAP_AREAS];
|
|||
=================
|
||||
ModQ3_LoadTextures
|
||||
|
||||
Touches all the shader, this will make sure all textures are effectively loaded.
|
||||
Touches all the shaders, this will make sure all textures are effectively loaded.
|
||||
=================
|
||||
*/
|
||||
void ModQ3_LoadTextures (lump_t *l)
|
||||
|
@ -91,10 +91,12 @@ void ModQ3_LoadLighting (lump_t *l)
|
|||
if (l->filelen % sizeof(dq3lightmap_t))
|
||||
Sys_Error ("MOD_LoadLighting: funny lump size in %s",loadmodel->name);
|
||||
|
||||
loadmodel->lightdata = Hunk_AllocName ( l->filelen, loadname);
|
||||
memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen);
|
||||
loadmodel->numlightmaps = l->filelen/sizeof(dq3lightmap_t);
|
||||
if (!COM_CheckParm("-externallight")) {
|
||||
loadmodel->lightdata = Hunk_AllocName ( l->filelen, loadname);
|
||||
memcpy (loadmodel->lightdata, mod_base + l->fileofs, l->filelen);
|
||||
}
|
||||
|
||||
loadmodel->numlightmaps = l->filelen/sizeof(dq3lightmap_t);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue