# HG changeset patch # User sheepluva # Date 1446581905 -3600 # Node ID d63ef6afabe379991cbe390aa05cc3e52aa706fd # Parent 13ce106c88361c453c2a56af1999a92360e02d65 make hammer non-lethal again (as requested by unC0Rr) diff -r 13ce106c8836 -r d63ef6afabe3 ChangeLog.txt --- a/ChangeLog.txt Tue Nov 03 21:43:56 2015 +0300 +++ b/ChangeLog.txt Tue Nov 03 21:18:25 2015 +0100 @@ -1,6 +1,9 @@ + features * bugfixes +0.9.22 -> 0.9.23 + * Hammer damage is now rounded down. This means it will cause NO DAMAGE to a hedgehog with less than 3 hp. + 0.9.21 -> 0.9.22 + New Weapon / Map object: AirMine (floating mine that will follow nearby hedgehogs) + Extensive changes to TechRacer: Variable terrain types, enhanced parameters, hwmap interpreter, fuel limiter, etc. diff -r 13ce106c8836 -r d63ef6afabe3 hedgewars/uGearsHandlersMess.pas --- a/hedgewars/uGearsHandlersMess.pas Tue Nov 03 21:43:56 2015 +0300 +++ b/hedgewars/uGearsHandlersMess.pas Tue Nov 03 21:18:25 2015 +0100 @@ -5255,13 +5255,12 @@ d:= 2 else d:= 3; - // always round up - if dmg mod d > 0 then - dmg:= dmg div d + 1 - else - dmg:= dmg div d; - - ApplyDamage(tmp, CurrentHedgehog, dmg, dsUnknown); + + // always rounding down + dmg:= dmg div d; + + if dmg > 0 then + ApplyDamage(tmp, CurrentHedgehog, dmg, dsUnknown); end; end;