From d178bb20c6e8634a194f6e91b9f410d0d625f71e Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 7 Oct 2007 13:48:11 +0000 Subject: [PATCH] fix reflections not working when just reflective stuff, but no water, is on the map git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7608 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model_brush.c b/model_brush.c index b8063634..98229c7e 100644 --- a/model_brush.c +++ b/model_brush.c @@ -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; -- 2.39.2