mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-28 06:52:35 +00:00
Thanks for the patch, gimhael. (#4576)
This commit is contained in:
parent
ecbe1ab9fd
commit
13836e5f4a
2 changed files with 2 additions and 5 deletions
|
@ -155,9 +155,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
|
||||
|
@ -165,6 +162,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;
|
||||
|
|
|
@ -779,7 +779,6 @@ void R_Modellist_f (void);
|
|||
extern refimport_t ri;
|
||||
|
||||
#define MAX_DRAWIMAGES 2048
|
||||
#define MAX_LIGHTMAPS 256
|
||||
#define MAX_SKINS 1024
|
||||
|
||||
|
||||
|
@ -916,7 +915,7 @@ typedef struct {
|
|||
shader_t *sunShader;
|
||||
|
||||
int numLightmaps;
|
||||
image_t *lightmaps[MAX_LIGHTMAPS];
|
||||
image_t **lightmaps;
|
||||
|
||||
trRefEntity_t *currentEntity;
|
||||
trRefEntity_t worldEntity; // point currentEntity at this when rendering world
|
||||
|
|
Loading…
Reference in a new issue