fix the unlit models in full light bug

This commit is contained in:
Bill Currie 2002-08-12 02:05:45 +00:00
parent a69b172f6f
commit 7e4e294089

View file

@ -389,14 +389,14 @@ loop:
lightmap = surf->samples; lightmap = surf->samples;
r = 0; r = 0;
if (lightmap) { if (lightmap) {
lightmap += dt * ((surf->extents[0] >> 4) + 1) + ds; lightmap += (dt * ((surf->extents[0] >> 4) + 1) + ds) * mod_lightmap_bytes;
for (maps = 0; maps < MAXLIGHTMAPS && surf->styles[maps] != 255; for (maps = 0; maps < MAXLIGHTMAPS && surf->styles[maps] != 255;
maps++) { maps++) {
scale = d_lightstylevalue[surf->styles[maps]]; scale = d_lightstylevalue[surf->styles[maps]];
r += *lightmap * scale; r += *lightmap * scale;
lightmap += ((surf->extents[0] >> 4) + 1) * lightmap += ((surf->extents[0] >> 4) + 1) *
((surf->extents[1] >> 4) + 1); ((surf->extents[1] >> 4) + 1) * mod_lightmap_bytes;
} }
r >>= 8; r >>= 8;