Fix jump landing after turn end
authorunc0rr
Thu, 27 Nov 2008 22:45:41 +0000
changeset 1518 4e5796fe3aac
parent 1517 27caa8c6e73a
child 1519 7b6adbe5266a
Fix jump landing after turn end
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Thu Nov 27 18:33:47 2008 +0000
+++ b/hedgewars/HHHandlers.inc	Thu Nov 27 22:45:41 2008 +0000
@@ -456,8 +456,10 @@
                  Gear^.State:= Gear^.State and not gstMoving;
                  SetLittle(Gear^.dX)
                  end
-         else if hwAbs(Gear^.dX) > cLittle then Gear^.dX:= -Gear^.Elasticity * Gear^.dX
-                                           else SetLittle(Gear^.dX);
+         else if (hwAbs(Gear^.dX) > cLittle)
+                and ((Gear^.State and gstHHJumping) = 0)
+                then Gear^.dX:= -Gear^.Elasticity * Gear^.dX
+                else SetLittle(Gear^.dX);
 
 if (not isFalling) and
    (hwAbs(Gear^.dX) + hwAbs(Gear^.dY) < _0_03) then