From 19018c02ab3e3ede834c428ecba810b250699dbd Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 16 Apr 2013 03:22:39 +0000 Subject: [PATCH] when using engine particles (not effectinfo), prevent spawning particles for EFFECT_EF_FLAME and EFFECT_EF_STARDUST when paused git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11935 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_particles.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cl_particles.c b/cl_particles.c index 853c25e2..d4febd9a 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -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); -- 2.39.2