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 0c4598e..411a52f 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++)
        {
        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++)
        }
        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++)