]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix detection of q3map2 deluxemapping in the case of one referenced but
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 13 Dec 2007 22:17:02 +0000 (22:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 13 Dec 2007 22:17:02 +0000 (22:17 +0000)
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

index f2804be78581bb2211b5e2b8391d84b65e3ff1be..8d671c0007e19a0ac424a5d3c37b6c1b78d2b710 100644 (file)
@@ -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++)