]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix reflections not working when just reflective stuff, but no water, is on the map
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Oct 2007 13:48:11 +0000 (13:48 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 7 Oct 2007 13:48:11 +0000 (13:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7608 d7cf8633-e32d-0410-b094-e92efae38249

model_brush.c

index b8063634495742459278e4f4d44b72a1059a6d19..98229c7e3b404b3836724a6a01e48f255dbfb436 100644 (file)
@@ -3666,7 +3666,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend)
                                // we only need to have a drawsky function if it is used(usually only on world model)
                                if (surface->texture->basematerialflags & MATERIALFLAG_SKY)
                                        mod->DrawSky = R_Q1BSP_DrawSky;
-                               if (surface->texture->basematerialflags & MATERIALFLAG_WATERALPHA)
+                               if (surface->texture->basematerialflags & (MATERIALFLAG_WATERSHADER | MATERIALFLAG_REFLECTION))
                                        mod->DrawAddWaterPlanes = R_Q1BSP_DrawAddWaterPlanes;
                                // calculate bounding shapes
                                for (k = 0, vec = (loadmodel->surfmesh.data_vertex3f + 3 * surface->num_firstvertex);k < surface->num_vertices;k++, vec += 3)
@@ -5770,7 +5770,7 @@ void Mod_Q3BSP_Load(model_t *mod, void *buffer, void *bufferend)
                        mod->DrawSky = NULL;
 
                for (j = 0;j < mod->nummodelsurfaces;j++)
-                       if (mod->data_surfaces[j + mod->firstmodelsurface].texture->basematerialflags & MATERIALFLAG_WATERALPHA)
+                       if (mod->data_surfaces[j + mod->firstmodelsurface].texture->basematerialflags & (MATERIALFLAG_WATERSHADER | MATERIALFLAG_REFLECTION))
                                break;
                if (j < mod->nummodelsurfaces)
                        mod->DrawAddWaterPlanes = R_Q1BSP_DrawAddWaterPlanes;