]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_particles.c
added EF_DOUBLESIDED (and internally RENDER_NOCULLFACE)
[xonotic/darkplaces.git] / cl_particles.c
index 7b1d612e2d01c130b56d58f1de256160a54cbf56..d49affc92c4c3464896070d9973ee8001206a9bb 100644 (file)
@@ -828,7 +828,7 @@ void CL_SparkShower (vec3_t org, vec3_t dir, int count, vec_t gravityscale)
                while(count--)
                {
                        k = particlepalette[0x68 + (rand() & 7)];
-                       particle(particletype + pt_spark, k, k, tex_particle, 0.4f, (1.0f / cl_particles_quality.value) * lhrandom(64, 255), (1.0f / cl_particles_quality.value) * 512, gravityscale, 0, org[0], org[1], org[2], dir[0], dir[1], dir[2], 0, 0, 64);
+                       particle(particletype + pt_spark, k, k, tex_particle, 0.4f, (1.0f / cl_particles_quality.value) * lhrandom(64, 255), (1.0f / cl_particles_quality.value) * 512, gravityscale, 0, org[0], org[1], org[2], dir[0], dir[1], dir[2] + sv_gravity.value * 0.1, 0, 0, 64);
                }
        }
 }
@@ -1239,7 +1239,7 @@ void CL_RocketTrail (vec3_t start, vec3_t end, int type, int color, entity_t *en
                                        dec = qd*3;
                                        if (smoke)
                                        {
-                                               particle(particletype + pt_smoke, 0x303030, 0x606060, tex_smoke[rand()&7], 3, qd*cl_particles_smoke_alpha.value*125, qd*cl_particles_smoke_alphafade.value*125, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 0);
+                                               particle(particletype + pt_smoke, 0x303030, 0x606060, tex_smoke[rand()&7], 3, qd*cl_particles_smoke_alpha.value*62, qd*cl_particles_smoke_alphafade.value*62, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 0);
                                                particle(particletype + pt_static, 0x801010, 0xFFA020, tex_smoke[rand()&7], 3, qd*cl_particles_smoke_alpha.value*288, qd*cl_particles_smoke_alphafade.value*1400, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 20);
                                        }
                                        if (bubbles)
@@ -1259,7 +1259,7 @@ void CL_RocketTrail (vec3_t start, vec3_t end, int type, int color, entity_t *en
                                {
                                        dec = qd*3;
                                        if (smoke)
-                                               particle(particletype + pt_smoke, 0x303030, 0x606060, tex_smoke[rand()&7], 3, qd*cl_particles_smoke_alpha.value*100, qd*cl_particles_smoke_alphafade.value*100, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 0);
+                                               particle(particletype + pt_smoke, 0x303030, 0x606060, tex_smoke[rand()&7], 3, qd*cl_particles_smoke_alpha.value*50, qd*cl_particles_smoke_alphafade.value*50, 0, 0, pos[0], pos[1], pos[2], 0, 0, 0, 0, 0, 0);
                                }
                                break;
 
@@ -2064,9 +2064,9 @@ float particle_vertex3f[12], particle_texcoord2f[8];
 void R_DrawParticle(particle_t *p)
 {
 #else
-void R_DrawParticleCallback(const void *calldata1, int calldata2)
+void R_DrawParticle_TransparentCallback(const entity_render_t *ent, int surfacenumber, const rtlight_t *rtlight)
 {
-       const particle_t *p = (particle_t *)calldata1;
+       const particle_t *p = particles + surfacenumber;
        rmeshstate_t m;
 #endif
        pblend_t blendmode;
@@ -2257,9 +2257,9 @@ void R_DrawParticles (void)
                        if (DotProduct(p->org, r_viewforward) >= minparticledist || p->type->orientation == PARTICLE_BEAM)
                        {
                                if (p->type == particletype + pt_decal)
-                                       R_DrawParticleCallback(p, 0);
+                                       R_DrawParticle_TransparentCallback(0, i, 0);
                                else
-                                       R_MeshQueue_AddTransparent(p->org, R_DrawParticleCallback, p, 0);
+                                       R_MeshQueue_AddTransparent(p->org, R_DrawParticle_TransparentCallback, NULL, i, NULL);
                        }
                }
        }