]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
forgot one part of the shadowmesh fix
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Aug 2005 05:44:23 +0000 (05:44 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Aug 2005 05:44:23 +0000 (05:44 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5668 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index 0c4598e86436b610d725384a9d237b88fdabd4bc..411a52fd6e6b77c16d479baa95bb8c455350b9a6 100644 (file)
@@ -3008,8 +3008,11 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
        numshadowmeshtriangles = 0;
        for (j = 0, surface = loadmodel->data_surfaces;j < loadmodel->num_surfaces;j++, surface++)
        {
-               surface->num_firstshadowmeshtriangle = numshadowmeshtriangles;
-               numshadowmeshtriangles += surface->num_triangles;
+               if (surface->texture->basematerialflags & MATERIALFLAG_SOLID)
+               {
+                       surface->num_firstshadowmeshtriangle = numshadowmeshtriangles;
+                       numshadowmeshtriangles += surface->num_triangles;
+               }
        }
        loadmodel->brush.shadowmesh = Mod_ShadowMesh_Begin(loadmodel->mempool, numshadowmeshtriangles * 3, numshadowmeshtriangles, NULL, NULL, NULL, false, false, true);
        for (j = 0, surface = loadmodel->data_surfaces;j < loadmodel->num_surfaces;j++, surface++)