From: havoc Date: Tue, 23 Mar 2004 19:32:38 +0000 (+0000) Subject: rtlights shouldn't do anything with sky and water (this fixes shadowing problems... X-Git-Tag: xonotic-v0.1.0preview~5963 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e03bc233ba4c09e5e676a1b1b0619884c546d7f;p=xonotic%2Fdarkplaces.git rtlights shouldn't do anything with sky and water (this fixes shadowing problems mainly) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4054 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rsurf.c b/gl_rsurf.c index a3ab306d..af6060e0 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -1839,7 +1839,7 @@ void R_Model_Brush_GetLightInfo(entity_render_t *ent, vec3_t relativelightorigin if (!CHECKPVSBIT(outsurfacepvs, surfaceindex)) { surface = model->brushq1.surfaces + surfaceindex; - if (BoxesOverlap(lightmins, lightmaxs, surface->poly_mins, surface->poly_maxs)) + if (BoxesOverlap(lightmins, lightmaxs, surface->poly_mins, surface->poly_maxs) && (surface->flags & SURF_LIGHTMAP) && !surface->texinfo->texture->skin.fog) { for (triangleindex = 0, t = surface->num_firstshadowmeshtriangle, e = model->brush.shadowmesh->element3i + t * 3;triangleindex < surface->mesh.num_triangles;triangleindex++, t++, e += 3) { @@ -2518,7 +2518,7 @@ void R_Q3BSP_GetLightInfo(entity_render_t *ent, vec3_t relativelightorigin, floa surfaceindex = surface - model->brushq3.data_faces; if (!CHECKPVSBIT(outsurfacepvs, surfaceindex)) { - if (BoxesOverlap(lightmins, lightmaxs, surface->mins, surface->maxs)) + if (BoxesOverlap(lightmins, lightmaxs, surface->mins, surface->maxs) && !(surface->texture->surfaceparms & Q3SURFACEPARM_TRANS) && !(surface->texture->surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NODRAW))) { for (triangleindex = 0, t = surface->num_firstshadowmeshtriangle, e = model->brush.shadowmesh->element3i + t * 3;triangleindex < surface->num_triangles;triangleindex++, t++, e += 3) {