diff --git a/quakespasm/Quake/r_brush.c b/quakespasm/Quake/r_brush.c index 4805e066..0f43dbc0 100644 --- a/quakespasm/Quake/r_brush.c +++ b/quakespasm/Quake/r_brush.c @@ -45,6 +45,7 @@ qboolean lightmap_modified[MAX_LIGHTMAPS]; glRect_t lightmap_rectchange[MAX_LIGHTMAPS]; int allocated[MAX_LIGHTMAPS][BLOCK_WIDTH]; +int last_lightmap_allocated; //ericw -- optimization: remember the index of the last lightmap AllocBlock stored a surf in // the lightmap texture data needs to be kept in // main memory so texsubimage can update properly @@ -716,7 +717,12 @@ int AllocBlock (int w, int h, int *x, int *y) int best, best2; int texnum; - for (texnum=0 ; texnum