changeset 13324 | 78f097923bcb |
parent 13219 | 9c81e34f1933 |
child 13350 | e54d6db06f35 |
--- 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;