summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorTony J. White <tjw@tjw.org>2007-04-14 02:45:11 +0000
committerTony J. White <tjw@tjw.org>2007-04-14 02:45:11 +0000
commitb27e591856cc4c8d48f47031a3375c2da9a1c444 (patch)
treed1e2fd67300a1640f7458dae234242309fb1f1b3 /src/cgame
parent62a42bbf49500ef0f253e624a2ccc2423b97a61b (diff)
* cg_bounceParticles 0 now takes the extra step of culling particles that
enter solids.
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_particles.c10
1 files 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;
}