// lighting info
for (i = 0;i < MAXLIGHTMAPS;i++)
surface->lightmapinfo->styles[i] = in->styles[i];
- // force lightmap upload on first time seeing the surface
- surface->cached_dlight = true;
surface->lightmapinfo->lightmaptexturestride = 0;
surface->lightmaptexture = NULL;
i = LittleLong(in->lightofs);
else // LordHavoc: white lighting (bsp version 29)
surface->lightmapinfo->samples = loadmodel->brushq1.lightdata + (i * 3);
+ // check if we should apply a lightmap to this
if (!(surface->lightmapinfo->texinfo->flags & TEX_SPECIAL) || surface->lightmapinfo->samples)
{
int i, iu, iv;
if (ssize > 256 || tsize > 256)
Host_Error("Bad surface extents");
+ // force lightmap upload on first time seeing the surface
+ surface->cached_dlight = true;
// stainmap for permanent marks on walls
surface->lightmapinfo->stainsamples = (unsigned char *)Mem_Alloc(loadmodel->mempool, ssize * tsize * 3);
// clear to white
{
if (i == LUMP_ENTITIES)
continue;
- mod->brush.qw_md4sum ^= Com_BlockChecksum(mod_base + header->lumps[i].fileofs, header->lumps[i].filelen);
+ mod->brush.qw_md4sum ^= LittleLong(Com_BlockChecksum(mod_base + header->lumps[i].fileofs, header->lumps[i].filelen));
if (i == LUMP_VISIBILITY || i == LUMP_LEAFS || i == LUMP_NODES)
continue;
- mod->brush.qw_md4sum2 ^= Com_BlockChecksum(mod_base + header->lumps[i].fileofs, header->lumps[i].filelen);
+ mod->brush.qw_md4sum2 ^= LittleLong(Com_BlockChecksum(mod_base + header->lumps[i].fileofs, header->lumps[i].filelen));
}
Mod_Q1BSP_LoadEntities(&header->lumps[LUMP_ENTITIES]);