]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_lightning.c
parse gridsize like q3map2 does (less strict)
[xonotic/darkplaces.git] / r_lightning.c
index 7da3ee770bb66a62ef549f11e0f55a3892631114..cc3afdbf6871b63cb95ab07dffb55e74fa63c9f4 100644 (file)
@@ -215,20 +215,6 @@ void R_CalcLightningBeamPolygonTexCoord2f(float *tc, float t1, float t2)
        }
 }
 
-void R_FogLightningBeam_Vertex3f_Color4f(const float *v, float *c, int numverts, float r, float g, float b, float a)
-{
-       int i;
-       float fog;
-       for (i = 0;i < numverts;i++, v += 3, c += 4)
-       {
-               fog = RSurf_FogVertex(v);
-               c[0] = r * fog;
-               c[1] = g * fog;
-               c[2] = b * fog;
-               c[3] = a;
-       }
-}
-
 float beamrepeatscale;
 
 void R_DrawLightningBeam_TransparentCallback(const entity_render_t *ent, const rtlight_t *rtlight, int numsurfaces, int *surfacelist)
@@ -237,8 +223,7 @@ void R_DrawLightningBeam_TransparentCallback(const entity_render_t *ent, const r
        float vertex3f[12*3];
        float texcoord2f[12*2];
 
-       RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, r_lightningbeam_color_red.value * r_refdef.view.colorscale, r_lightningbeam_color_green.value * r_refdef.view.colorscale, r_lightningbeam_color_blue.value * r_refdef.view.colorscale, 1, 12, vertex3f, texcoord2f, NULL, NULL, NULL, 6, r_lightningbeamelement3i, r_lightningbeamelement3s, false, false);
-       rsurface.fograngerecip = r_refdef.fograngerecip;
+       RSurf_ActiveCustomEntity(&identitymatrix, &identitymatrix, 0, 0, r_lightningbeam_color_red.value * r_refdef.view.colorscale, r_lightningbeam_color_green.value * r_refdef.view.colorscale, r_lightningbeam_color_blue.value * r_refdef.view.colorscale, 1, 12, vertex3f, texcoord2f, NULL, NULL, NULL, NULL, 6, r_lightningbeamelement3i, r_lightningbeamelement3s, false, false);
 
        if (r_lightningbeam_qmbtexture.integer && r_lightningbeamqmbtexture == NULL)
                r_lightningbeams_setupqmbtexture();