From d6cf79f3ebbd046932740aeb43c1a7088070bbb5 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 13 Dec 2007 22:17:02 +0000 Subject: [PATCH] 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 --- model_brush.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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++) -- 2.39.2