summaryrefslogtreecommitdiff
path: root/src/renderer/tr_bsp.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2011-04-23 22:38:25 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:18:07 +0000
commit06006eb6930de74c577c87daf6a0f7917e22d578 (patch)
tree8caec25df040a3f3eddc99b593e51d993b9be1be /src/renderer/tr_bsp.c
parent98438cc3e7d32312bb52b413c12698b67b8cfeb0 (diff)
* Merge ioq3-r1946
Diffstat (limited to 'src/renderer/tr_bsp.c')
-rw-r--r--src/renderer/tr_bsp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/renderer/tr_bsp.c b/src/renderer/tr_bsp.c
index caf62033..563bb36d 100644
--- a/src/renderer/tr_bsp.c
+++ b/src/renderer/tr_bsp.c
@@ -156,9 +156,6 @@ static void R_LoadLightmaps( lump_t *l ) {
//FIXME: HACK: maps with only one lightmap turn up fullbright for some reason.
//this avoids this, but isn't the correct solution.
tr.numLightmaps++;
- } else if ( tr.numLightmaps >= MAX_LIGHTMAPS ) { // 20051020 misantropia
- ri.Printf( PRINT_WARNING, "WARNING: number of lightmaps > MAX_LIGHTMAPS\n" );
- tr.numLightmaps = MAX_LIGHTMAPS;
}
// if we are in r_vertexLight mode, we don't need the lightmaps at all
@@ -166,6 +163,7 @@ static void R_LoadLightmaps( lump_t *l ) {
return;
}
+ tr.lightmaps = ri.Hunk_Alloc( tr.numLightmaps * sizeof(image_t *), h_low );
for ( i = 0 ; i < tr.numLightmaps ; i++ ) {
// expand the 24 bit on-disk to 32 bit
buf_p = buf + i * LIGHTMAP_SIZE*LIGHTMAP_SIZE * 3;