From: havoc Date: Thu, 13 Dec 2007 22:17:02 +0000 (+0000) Subject: fix detection of q3map2 deluxemapping in the case of one referenced but X-Git-Tag: xonotic-v0.1.0preview~2693 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d6cf79f3ebbd046932740aeb43c1a7088070bbb5;p=xonotic%2Fdarkplaces.git fix detection of q3map2 deluxemapping in the case of one referenced but 4 existing in the bsp file (lightmap deluxemap blank blank), a variant of the existing problem with 2 existing in a non-deluxemapped bsp (which are lightmap blank) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7797 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_brush.c b/model_brush.c index f2804be7..8d671c00 100644 --- a/model_brush.c +++ b/model_brush.c @@ -4501,14 +4501,15 @@ static void Mod_Q3BSP_LoadLightmaps(lump_t *l, lump_t *faceslump) } } } - if (endlightmap < 2) - loadmodel->brushq3.deluxemapping = false; // q3map2 sometimes (or always?) makes a second blank lightmap for no // reason when only one lightmap is used, which can throw off the // deluxemapping detection method, so check 2-lightmap bsp's specifically // to see if the second lightmap is blank, if so it is not deluxemapped. - if (endlightmap == 1 && count == 2) + // + // further research has shown q3map2 sometimes creates a deluxemap and two + // blank lightmaps, which must be handled properly as well + if (endlightmap == 1 && count > 1) { c = in[1].rgb; for (i = 0;i < 128*128*3;i++)