From: Mircea Kitsune Date: Mon, 4 Apr 2011 14:10:27 +0000 (+0300) Subject: Always apply the effect to bodies as well, even if gibs from that player are found... X-Git-Tag: xonotic-v0.6.0~110^2^2~129 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6bcc9cde5eba6a8751615b2e330f08326bb11635;p=xonotic%2Fxonotic-data.pk3dir.git Always apply the effect to bodies as well, even if gibs from that player are found. Otherwise, if a body is gibbed but the player has respawned, both the gibs and respawned player having damage effects would cause the gibs blocking the effect on the respawned player. Not sure how this can be prevented, but it shouldn't be a big issue. --- diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index 61f6e9629..777d1f1fd 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -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); }