# HG changeset patch # User Wuzzy # Date 1492632191 -7200 # Node ID c20fbf96b853e0f0a308970a04cfad1f0c18267a # Parent a5a7d0c6d3f3bea972d1019b9186d218f2404424 Fix hedgehog self-damage not counted, and there were never Stupid taunts/announces diff -r a5a7d0c6d3f3 -r c20fbf96b853 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Wed Apr 19 20:50:57 2017 +0200 +++ b/hedgewars/uGearsUtils.pas Wed Apr 19 22:03:11 2017 +0200 @@ -304,15 +304,16 @@ end; end end; - if (GameFlags and gfKarma <> 0) and (GameFlags and gfInvulnerable = 0) and - (CurrentHedgehog^.Effects[heInvulnerable] = 0) then - begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid - inc(CurrentHedgehog^.Gear^.Karma, tmpDmg); - CurrentHedgehog^.Gear^.LastDamage := CurrentHedgehog; - spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg); + if (GameFlags and gfKarma <> 0) and (GameFlags and gfInvulnerable = 0) and + (CurrentHedgehog^.Effects[heInvulnerable] = 0) then + begin // this cannot just use Damage or it interrupts shotgun and gets you called stupid + inc(CurrentHedgehog^.Gear^.Karma, tmpDmg); + CurrentHedgehog^.Gear^.LastDamage := CurrentHedgehog; + spawnHealthTagForHH(CurrentHedgehog^.Gear, tmpDmg); + end; end; + uStats.HedgehogDamaged(Gear, AttackerHog, Damage, false); - end; if AprilOne and (Gear^.Hedgehog^.Hat = 'fr_tomato') and (Damage > 2) then for i := 0 to random(min(Damage,20))+5 do