]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_particles.c
m.wantoverbright is gone
[xonotic/darkplaces.git] / cl_particles.c
index 962f9cfa58ea44d6e5517b887dc22ff167dae2f0..9342d8edc6b19dcc4430fa2563145ed8e67d5f74 100644 (file)
@@ -432,7 +432,7 @@ void CL_SparkShower (vec3_t org, vec3_t dir, int count)
        if (!cl_particles.integer) return;
 
        if (cl_stainmaps.integer)
-               R_Stain(org, 32, 96, 96, 96, 2, 128, 128, 128, 2);
+               R_Stain(org, 32, 96, 96, 96, 24, 128, 128, 128, 24);
 
        if (cl_particles_bulletimpacts.integer)
        {
@@ -455,7 +455,7 @@ void CL_SparkShower (vec3_t org, vec3_t dir, int count)
 void CL_PlasmaBurn (vec3_t org)
 {
        if (cl_stainmaps.integer)
-               R_Stain(org, 48, 96, 96, 96, 3, 128, 128, 128, 3);
+               R_Stain(org, 48, 96, 96, 96, 32, 128, 128, 128, 32);
 }
 
 static float bloodcount = 0;
@@ -860,7 +860,7 @@ void CL_MoveParticles (void)
                                {
                                        // assume it's blood (lame, but...)
                                        if (cl_stainmaps.integer)
-                                               R_Stain(v, 32, 32, 16, 16, p->alpha * p->scalex * (1.0f / 400.0f), 192, 48, 48, p->alpha * p->scalex * (1.0f / 400.0f));
+                                               R_Stain(v, 32, 32, 16, 16, p->alpha * p->scalex * (1.0f / 40.0f), 192, 48, 48, p->alpha * p->scalex * (1.0f / 40.0f));
                                        p->die = -1;
                                        freeparticles[j++] = p;
                                        continue;
@@ -1179,8 +1179,6 @@ void R_Particles_Init (void)
        R_RegisterModule("R_Particles", r_part_start, r_part_shutdown, r_part_newmap);
 }
 
-int partindexarray[6] = {0, 1, 2, 0, 2, 3};
-
 void R_DrawParticleCallback(const void *calldata1, int calldata2)
 {
        int additive, texnum, orientation;
@@ -1205,12 +1203,6 @@ void R_DrawParticleCallback(const void *calldata1, int calldata2)
        R_Mesh_Matrix(&r_identitymatrix);
        R_Mesh_State(&m);
 
-       varray_element[0] = 0;
-       varray_element[1] = 1;
-       varray_element[2] = 2;
-       varray_element[3] = 0;
-       varray_element[4] = 2;
-       varray_element[5] = 3;
        if (orientation == PARTICLE_BILLBOARD)
        {
                VectorScale(vright, p->scalex, right);
@@ -1281,11 +1273,11 @@ void R_DrawParticleCallback(const void *calldata1, int calldata2)
                        cb += fogcolor[2] * fog;
                }
        }
-       varray_color[0] = varray_color[4] = varray_color[8] = varray_color[12] = cr * mesh_colorscale;
-       varray_color[1] = varray_color[5] = varray_color[9] = varray_color[13] = cg * mesh_colorscale;
-       varray_color[2] = varray_color[6] = varray_color[10] = varray_color[14] = cb * mesh_colorscale;
+       varray_color[0] = varray_color[4] = varray_color[8] = varray_color[12] = cr * r_colorscale;
+       varray_color[1] = varray_color[5] = varray_color[9] = varray_color[13] = cg * r_colorscale;
+       varray_color[2] = varray_color[6] = varray_color[10] = varray_color[14] = cb * r_colorscale;
        varray_color[3] = varray_color[7] = varray_color[11] = varray_color[15] = ca;
-       R_Mesh_Draw(4, 2);
+       R_Mesh_Draw(4, 2, polygonelements);
 }
 
 void R_DrawParticles (void)