From d36d26a34c4ac8a5a794d6ce8937b3c278cac546 Mon Sep 17 00:00:00 2001 From: AriosJentu Date: Mon, 26 Aug 2019 01:09:46 +1000 Subject: [PATCH] Fix bug with no-frag for Self-Immolation achievement --- qcsrc/server/g_damage.qc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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, -- 2.39.2