]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_particles.c
when using engine particles (not effectinfo), prevent spawning particles
[xonotic/darkplaces.git] / cl_particles.c
index 853c25e20afd58315ff0f97815ae20e02c11d798..d4febd9aac69905cdb08d3cfd2d4fd7327a8089b 100644 (file)
@@ -919,6 +919,7 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
        vec3_t center;
        matrix4x4_t tempmatrix;
        particle_t *part;
+
        VectorLerp(originmins, 0.5, originmaxs, center);
        Matrix4x4_CreateTranslate(&tempmatrix, center[0], center[1], center[2]);
        if (effectnameindex == EFFECT_SVC_PARTICLE)
@@ -1210,6 +1211,8 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
        }
        else if (effectnameindex == EFFECT_EF_FLAME)
        {
+               if (!spawnparticles)
+                       count = 0;
                count *= 300 * cl_particles_quality.value;
                while (count-- > 0)
                        CL_NewParticle(center, pt_smoke, 0x6f0f00, 0xe3974f, tex_particle, 4, 0, lhrandom(64, 128), 384, -1, 0, lhrandom(originmins[0], originmaxs[0]), lhrandom(originmins[1], originmaxs[1]), lhrandom(originmins[2], originmaxs[2]), lhrandom(velocitymins[0], velocitymaxs[0]), lhrandom(velocitymins[1], velocitymaxs[1]), lhrandom(velocitymins[2], velocitymaxs[2]), 1, 4, 16, 128, true, 0, 1, PBLEND_ADD, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);
@@ -1217,6 +1220,8 @@ static void CL_ParticleEffect_Fallback(int effectnameindex, float count, const v
        }
        else if (effectnameindex == EFFECT_EF_STARDUST)
        {
+               if (!spawnparticles)
+                       count = 0;
                count *= 200 * cl_particles_quality.value;
                while (count-- > 0)
                        CL_NewParticle(center, pt_static, 0x903010, 0xFFD030, tex_particle, 4, 0, lhrandom(64, 128), 128, 1, 0, lhrandom(originmins[0], originmaxs[0]), lhrandom(originmins[1], originmaxs[1]), lhrandom(originmins[2], originmaxs[2]), lhrandom(velocitymins[0], velocitymaxs[0]), lhrandom(velocitymins[1], velocitymaxs[1]), lhrandom(velocitymins[2], velocitymaxs[2]), 0.2, 0.8, 16, 128, true, 0, 1, PBLEND_ADD, PARTICLE_BILLBOARD, -1, -1, -1, 1, 1, 0, 0, NULL);