From b27e591856cc4c8d48f47031a3375c2da9a1c444 Mon Sep 17 00:00:00 2001 From: "Tony J. White" Date: Sat, 14 Apr 2007 02:45:11 +0000 Subject: * cg_bounceParticles 0 now takes the extra step of culling particles that enter solids. --- src/cgame/cg_particles.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cgame/cg_particles.c b/src/cgame/cg_particles.c index f9da4db3..80c4b23a 100644 --- a/src/cgame/cg_particles.c +++ b/src/cgame/cg_particles.c @@ -2101,10 +2101,16 @@ static void CG_EvaluateParticlePhysics( particle_t *p ) VectorMA( p->velocity, deltaTime, acceleration, p->velocity ); VectorMA( p->origin, deltaTime, p->velocity, newOrigin ); p->lastEvalTime = cg.time; - + + // we're not doing particle physics, but at least cull them in solids if( !cg_bounceParticles.integer ) { - VectorCopy( newOrigin, p->origin ); + int contents = trap_CM_PointContents( newOrigin, 0 ); + + if( ( contents & CONTENTS_SOLID ) || ( contents & CONTENTS_NODROP ) ) + CG_DestroyParticle( p, NULL ); + else + VectorCopy( newOrigin, p->origin ); return; } -- cgit