# HG changeset patch # User Wuzzy # Date 1561299267 -7200 # Node ID 7d41e78891234accd97d3ac7e983bd11e4f3b895 # Parent a6cf13eebb14b2b917ec4d0b3f861a45b4cf829c Explode hog instantly when taking damage while dying diff -r a6cf13eebb14 -r 7d41e7889123 ChangeLog.txt --- a/ChangeLog.txt Sun Jun 23 11:28:00 2019 +0200 +++ b/ChangeLog.txt Sun Jun 23 16:14:27 2019 +0200 @@ -39,6 +39,7 @@ * Add missing winner animation in single missions * Fix hog floating when switching to moving hog * Fix jump key not being ignored after placing girder or target + * Explode hog instantly when taking damage while dying Styles and schemes: + The Specialists: Unlock game scheme diff -r a6cf13eebb14 -r 7d41e7889123 hedgewars/uGearsUtils.pas --- a/hedgewars/uGearsUtils.pas Sun Jun 23 11:28:00 2019 +0200 +++ b/hedgewars/uGearsUtils.pas Sun Jun 23 16:14:27 2019 +0200 @@ -283,8 +283,16 @@ Gear^.LastDamage := AttackerHog; Gear^.Hedgehog^.Team^.Clan^.Flawless:= false; - HHHurt(Gear^.Hedgehog, Source, Damage); - AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color); + + if (Gear^.State and gstHHDeath) <> 0 then + // If hog took damage while dying, explode hog instantly (see doStepHedgehogDead) + Gear^.Timer:= 1 + else + begin + HHHurt(Gear^.Hedgehog, Source, Damage); + AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color); + end; + tmpDmg:= min(Damage, max(0,Gear^.Health-Gear^.Damage)); if (Gear <> CurrentHedgehog^.Gear) and (CurrentHedgehog^.Gear <> nil) and (tmpDmg >= 1) then begin