From: AriosJentu Date: Sun, 25 Aug 2019 15:09:46 +0000 (+1000) Subject: Fix bug with no-frag for Self-Immolation achievement X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d36d26a34c4ac8a5a794d6ce8937b3c278cac546;p=xonotic%2Fxonotic-data.pk3dir.git Fix bug with no-frag for Self-Immolation achievement --- diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index dae22c5c6..33dffd1a4 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -288,12 +288,6 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .en LogDeath("suicide", deathtype, targ, targ); if(deathtype != DEATH_AUTOTEAMCHANGE.m_id) // special case: don't negate frags if auto switched GiveFrags(attacker, targ, -1, deathtype, weaponentity); - - attacker.suicide = 1; - } - - if (targ != attacker) { - attacker.check_suicide = 1; } // ====== @@ -893,6 +887,14 @@ void Damage(entity targ, entity inflictor, entity attacker, float damage, int de targ.shotgun_inc_pointblank = 1; } } + + if (IS_DEAD(targ)) { + if (targ != attacker) { + attacker.check_suicide = 1; + } else { + attacker.suicide = 1; + } + } } float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,