From 0dab13d8227daa31cf55e80977cef0397e7357c6 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 13 Mar 2004 23:50:03 +0000 Subject: [PATCH] don't draw lighting on sky and water git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4016 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rsurf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gl_rsurf.c b/gl_rsurf.c index ffd263dd..f84e671d 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1976,12 +1976,14 @@ void R_Model_Brush_DrawLight(entity_render_t *ent, vec3_t relativelightorigin, v if (r_shadow_compilingrtlight) { // if compiling an rtlight, capture the mesh - Mod_ShadowMesh_AddMesh(r_shadow_mempool, r_shadow_compilingrtlight->static_meshchain_light, surface->texinfo->texture->skin.base, surface->texinfo->texture->skin.gloss, surface->texinfo->texture->skin.nmap, surface->mesh.data_vertex3f, surface->mesh.data_svector3f, surface->mesh.data_tvector3f, surface->mesh.data_normal3f, surface->mesh.data_texcoordtexture2f, surface->mesh.num_triangles, surface->mesh.data_element3i); + t = surface->texinfo->texture; + if (t->shader == &Cshader_wall_lightmap && t->skin.fog == NULL && (t->flags & SURF_SHADOWLIGHT)) + Mod_ShadowMesh_AddMesh(r_shadow_mempool, r_shadow_compilingrtlight->static_meshchain_light, surface->texinfo->texture->skin.base, surface->texinfo->texture->skin.gloss, surface->texinfo->texture->skin.nmap, surface->mesh.data_vertex3f, surface->mesh.data_svector3f, surface->mesh.data_tvector3f, surface->mesh.data_normal3f, surface->mesh.data_texcoordtexture2f, surface->mesh.num_triangles, surface->mesh.data_element3i); } else if (ent != &cl_entities[0].render || surface->visframe == r_framecount) { t = surface->texinfo->texture->currentframe; - if (t->rendertype == SURFRENDER_OPAQUE && t->flags & SURF_SHADOWLIGHT) + if (t->rendertype == SURFRENDER_OPAQUE && (t->flags & SURF_SHADOWLIGHT)) R_Shadow_RenderLighting(surface->mesh.num_vertices, surface->mesh.num_triangles, surface->mesh.data_element3i, surface->mesh.data_vertex3f, surface->mesh.data_svector3f, surface->mesh.data_tvector3f, surface->mesh.data_normal3f, surface->mesh.data_texcoordtexture2f, relativelightorigin, relativeeyeorigin, lightcolor, matrix_modeltolight, matrix_modeltoattenuationxyz, matrix_modeltoattenuationz, t->skin.base, t->skin.nmap, t->skin.gloss, lightcubemap, LIGHTING_DIFFUSE | LIGHTING_SPECULAR); } } -- 2.39.2