]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Always apply the effect to bodies as well, even if gibs from that player are found...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 4 Apr 2011 14:10:27 +0000 (17:10 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 4 Apr 2011 14:10:27 +0000 (17:10 +0300)
qcsrc/client/gibs.qc

index 61f6e962967e73eea658639b59217608eae53955..777d1f1fde081283065ea544ae1288dbde0f381e 100644 (file)
@@ -316,21 +316,17 @@ void Ent_DamageEffect()
        }
 
        entity head;
-       float foundgib;
 
        // 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 instead.
+       // effect to, it means our player is gibbed. Therefore, apply the particles to the gibs as well.
        for(head = world; (head = find(head, classname, "gib")); )
        {
                if(head.team == entnumber)
                if(random() < autocvar_cl_damageeffect_gib_probability)
-               {
                        pointparticles(particleeffectnum(effectnum), head.origin, '0 0 0', 1);
-                       foundgib = TRUE;
-               }
        }
 
-       // If our player isn't gibbed, apply the effect to him instead.
-       if(!foundgib)
-               pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
+       // 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.
+       pointparticles(particleeffectnum(effectnum), org, '0 0 0', 1);
 }