From 594ccfa3382b16ee49d794043973c13ed4229dbd Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Mon, 11 Apr 2011 00:21:41 +0300 Subject: [PATCH] Stop showing the effect on gibbed dead bodies, and only show it on gibs instead. This fixes damage effects showing where the body is after it has been gibbed, therefore displaying there for no reason (also means less particles and better performance with gibs). --- qcsrc/client/gibs.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index 6b1ea0451..30cb786c9 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -317,7 +317,7 @@ void Ent_DamageEffect() // Scan the owner of all gibs in the world. If a gib owner is the same as the player we're applying the // effect to, it means our player is gibbed. Therefore, apply the particles to the gibs as well. - if(autocvar_cl_damageeffect_gibs) + if(autocvar_cl_damageeffect_gibs && body > 1) for(head = world; (head = find(head, classname, "gib")); ) { if(head.team == entnumber) @@ -326,11 +326,14 @@ void Ent_DamageEffect() } // if we aren't in third person mode, hide our own damage effect - if(!body && entnumber == player_localentnum && !autocvar_chase_active) + if(entnumber == player_localentnum && !body) + if(!autocvar_chase_active) + return; + // if this is a gibbed dead body, don't apply the effects to it, only the gibs as done above + if(body > 1) return; - // Now apply the effect to the player. This shouldn't be done on gibbed bodies, but there's no way - // to tell between them and the respawned player, if both have damage effects at the same time. + // Now apply the effect to the actual player. if(random() < autocvar_cl_damageeffect) pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1); } -- 2.39.2