]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
rtlights shouldn't do anything with sky and water (this fixes shadowing problems...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Mar 2004 19:32:38 +0000 (19:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 23 Mar 2004 19:32:38 +0000 (19:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4054 d7cf8633-e32d-0410-b094-e92efae38249

gl_rsurf.c

index a3ab306dbd56cc5810946c0948fa60c47f878c85..af6060e0539585dd2683106f5483cbb17094b975 100644 (file)
@@ -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)
                                                {