# HG changeset patch
# User sheepluva
# Date 1437239457 -7200
# Node ID 2aa09da8f3ef46758a493e86115f48c98010a87f
# Parent  67ef023005081d2da6b4460cadefbff8050ba4bc
fix pickhammer collision when moving upwards, thanks to MK for reporting

diff -r 67ef02300508 -r 2aa09da8f3ef hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Jul 18 02:44:36 2015 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sat Jul 18 19:10:57 2015 +0200
@@ -1504,6 +1504,11 @@
         SetLittle(HHGear^.dX);
         HHGear^.dY := _0;
         end
+    else if Gear^.dY.isNegative and (TestCollisionYwithGear(HHGear, -1) <> 0) then
+        begin
+        Gear^.dY := cGravity;
+        HHGear^.dY := cGravity;
+        end
     else
         begin
         if CheckLandValue(hwRound(Gear^.X), hwRound(Gear^.Y + Gear^.dY + cGravity), lfLandMask) then