hedgewars/uStats.pas
changeset 14025 bc61809bfb1e
parent 14020 544b32038664
child 14028 bbecf663d599
--- a/hedgewars/uStats.pas	Sat Oct 27 19:50:01 2018 +0200
+++ b/hedgewars/uStats.pas	Sat Oct 27 20:31:31 2018 +0200
@@ -217,8 +217,8 @@
 
     // Hog hurts, poisons or kills itself (except sacrifice)
     else if (CurrentHedgehog^.stats.Sacrificed = false) and ((CurrentHedgehog^.stats.StepDamageRecv > 0) or (CurrentHedgehog^.stats.StepPoisoned) or (CurrentHedgehog^.stats.StepDied)) then
-        // Hurting itself only (not drowning)
-        if (CurrentHedgehog^.stats.StepDamageGiven = CurrentHedgehog^.stats.StepDamageRecv) and (CurrentHedgehog^.stats.StepDamageRecv >= 1) then
+        // Hurt itself only (without dying)
+        if (CurrentHedgehog^.stats.StepDamageGiven = CurrentHedgehog^.stats.StepDamageRecv) and (CurrentHedgehog^.stats.StepDamageRecv >= 1) and (not CurrentHedgehog^.stats.StepDied) then
             begin
             // Announcer message + random taunt
             AddCaption(FormatA(GetEventString(eidHurtSelf), s), capcolDefault, capgrpMessage);
@@ -229,7 +229,7 @@
                 2: AddVoice(sndDrat, CurrentTeam^.voicepack);
                 end;
             end
-        // Hurt itself and others
+        // Hurt itself and others, or died
         else
             AddVoice(sndStupid, PreviousTeam^.voicepack)