]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Stop showing the effect on gibbed dead bodies, and only show it on gibs instead....
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 10 Apr 2011 21:21:41 +0000 (00:21 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 10 Apr 2011 21:21:41 +0000 (00:21 +0300)
qcsrc/client/gibs.qc

index 6b1ea0451e67002ca335c8b6702e0d2d75bb3e36..30cb786c9666b1b3af952471a7d83da00d77dc6b 100644 (file)
@@ -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);
 }