# HG changeset patch # User Wuzzy # Date 1492633584 -7200 # Node ID e2b30aba00e18395346c9d48174fa6ec31ffda17 # Parent 4ce7cb441c7578d192d057adc73349958dcbe58d Call hog stupid for selfkilling diff -r 4ce7cb441c75 -r e2b30aba00e1 hedgewars/uStats.pas --- a/hedgewars/uStats.pas Wed Apr 19 22:10:12 2017 +0200 +++ b/hedgewars/uStats.pas Wed Apr 19 22:26:24 2017 +0200 @@ -133,11 +133,12 @@ if ((DamageTotal > 0) or (KillsTotal > 0) or (PoisonTotal > 0)) and ((CurrentHedgehog^.stats.DamageGiven = DamageTotal) and (CurrentHedgehog^.stats.StepKills = KillsTotal) and (PoisonTotal = PoisonTurn + PoisonClan)) then AddVoice(sndFirstBlood, CurrentTeam^.voicepack) - // Hog hurts or poisons itself - else if (CurrentHedgehog^.stats.StepDamageRecv > 0) or (CurrentHedgehog^.stats.StepPoisoned) then + // Hog hurts, poisons or kills itself + else if (CurrentHedgehog^.stats.StepDamageRecv > 0) or (CurrentHedgehog^.stats.StepPoisoned) or (CurrentHedgehog^.Gear = nil) then begin AddVoice(sndStupid, PreviousTeam^.voicepack); - if CurrentHedgehog^.stats.DamageGiven = CurrentHedgehog^.stats.StepDamageRecv then + // Message for hurting itself only (not drowning) + if (CurrentHedgehog^.stats.DamageGiven = CurrentHedgehog^.stats.StepDamageRecv) and (CurrentHedgehog^.stats.StepDamageRecv >= 1) then AddCaption(FormatA(GetEventString(eidHurtSelf), s), cWhiteColor, capgrpMessage); end