# HG changeset patch # User Wuzzy # Date 1523537567 -7200 # Node ID 78f097923bcbc0cf3322dd9e6e220dd032a3facc # Parent 9071600f7b22624cecebb518aaa18a492d167be9 Don't let hedgehogs moan if they take 0 Sudden Death damage diff -r 9071600f7b22 -r 78f097923bcb ChangeLog.txt --- a/ChangeLog.txt Thu Apr 12 01:51:38 2018 +0200 +++ b/ChangeLog.txt Thu Apr 12 14:52:47 2018 +0200 @@ -13,7 +13,7 @@ + Hedgehog tag translucency is now changed with [Switch] + [Change hedgehog tags] + When using flying saucer shortly after a jump, stay in-mid air + No longer cut off team/hedgehog names when not playing online - * Fix possible network desyncronization and crash when players rejoin an active game + * Fix possible network desynchronization and crash when players rejoin an active game * Fix time box being usable in Sudden Death with 0 health decrease * Fix chat input key being sometimes registered twice * Fix not displaying current volume status after pressing mute key diff -r 9071600f7b22 -r 78f097923bcb hedgewars/uGears.pas --- a/hedgewars/uGears.pas Thu Apr 12 01:51:38 2018 +0200 +++ b/hedgewars/uGears.pas Thu Apr 12 14:52:47 2018 +0200 @@ -158,8 +158,12 @@ end; if tmp > 0 then begin - inc(Gear^.Damage, min(tmp, max(0,Gear^.Health - 1 - Gear^.Damage))); - HHHurt(Gear^.Hedgehog, dsPoison); + // SD damage never reduces health below 1 + tmp:= min(tmp, max(0, Gear^.Health - 1 - Gear^.Damage)); + inc(Gear^.Damage, tmp); + if tmp > 0 then + // Make hedgehog moan on damage + HHHurt(Gear^.Hedgehog, dsPoison); end end;