mirror of
https://github.com/Garux/netradiant-custom.git
synced 2026-09-28 00:00:03 +02:00
Merge branch 'nobigfirst' into 'master'
revert "allocate bigger first"
partial revert of d4fa608 ([L2313](https://gitlab.com/xonotic/netradiant/commit/8bc246a01343d9c9dd3a8b678681710cf04a2953#416ec0c19ddc04c6485e9853a0c8a125f98dca13_2295_2313))
see #54 ([13326399](https://gitlab.com/xonotic/netradiant/issues/54#note_13326399))
"allocate bigger first" change was meant to save allocation time keeping same lightmap file size, actually wastes both time and size
See merge request !32
This commit is contained in:
@@ -2310,12 +2310,6 @@ static int CompareRawLightmap( const void *a, const void *b ){
|
||||
/* get min number of surfaces */
|
||||
min = ( alm->numLightSurfaces < blm->numLightSurfaces ? alm->numLightSurfaces : blm->numLightSurfaces );
|
||||
|
||||
/* compare size, allocate bigger first */
|
||||
diff = ( blm->w * blm->h ) - ( alm->w * alm->h );
|
||||
if ( diff != 0 ) {
|
||||
return diff;
|
||||
}
|
||||
|
||||
/* iterate */
|
||||
for ( i = 0; i < min; i++ )
|
||||
{
|
||||
@@ -2338,6 +2332,12 @@ static int CompareRawLightmap( const void *a, const void *b ){
|
||||
return diff;
|
||||
}
|
||||
|
||||
/* compare size */
|
||||
diff = ( blm->w * blm->h ) - ( alm->w * alm->h );
|
||||
if ( diff != 0 ) {
|
||||
return diff;
|
||||
}
|
||||
|
||||
/* must be equivalent */
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user