git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4924 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2015-06-28 14:59:02 +00:00
parent 4e9d4dcc27
commit ad9b98f73c

View file

@ -2840,13 +2840,18 @@ static int Mod_Batches_Generate(model_t *mod)
batch_t *batch, *lbatch = NULL; batch_t *batch, *lbatch = NULL;
vec4_t plane; vec4_t plane;
int merge = sh_config.texture_maxsize / mod->lightmaps.height; int merge = 1;
while (merge > mod->lightmaps.count) /*
merge /= 2; if (mod->fromgame == fg_quake3 && *mod->name != '*')
{
int limit = min(sh_config.texture_maxsize / mod->lightmaps.height, mod_mergeq3lightmaps.ival);
while (merge*2 <= limit)
merge *= 2;
if (merge < 1)//erk? if (merge < 1)//erk?
merge = 1; merge = 1;
}
*/
mod->lightmaps.count = (mod->lightmaps.count+merge-1) & ~(merge-1); mod->lightmaps.count = (mod->lightmaps.count+merge-1) & ~(merge-1);
mod->lightmaps.count /= merge; mod->lightmaps.count /= merge;
mod->lightmaps.height *= merge; mod->lightmaps.height *= merge;