hedgewars/GSHandlers.inc
changeset 7661 3046ad5b361e
parent 7659 a5cf49dc993e
child 7716 95117607b81a
--- a/hedgewars/GSHandlers.inc	Mon Sep 03 14:08:01 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Mon Sep 03 20:46:34 2012 +0200
@@ -1771,14 +1771,17 @@
     or (TestCollisionYwithGear(Gear, 1) = 0) then
         begin
         AllInactive := false;
+
         Gear^.dY := Gear^.dY + cGravity;
+
+        if (Gear^.dY.isNegative) and (TestCollisionYwithGear(Gear, -1) <> 0) then
+            Gear^.dY := _0;
+
         Gear^.Y := Gear^.Y + Gear^.dY;
+
         if (not Gear^.dY.isNegative) and (Gear^.dY > _0_001) then
             SetAllHHToActive;
-            
-        if (Gear^.dY.isNegative) and (TestCollisionYwithGear(Gear, -1) <> 0) then
-            Gear^.dY := _0;
-            
+
         if (not Gear^.dY.isNegative) and (TestCollisionYwithGear(Gear, 1) <> 0) then
             begin
             if (Gear^.dY > _0_2) and (k = gtExplosives) then