--- a/hedgewars/GSHandlers.inc Fri Dec 26 19:34:05 2008 +0000
+++ b/hedgewars/GSHandlers.inc Sun Dec 28 15:42:55 2008 +0000
@@ -723,8 +723,8 @@
cc:= cc * len;
cs:= cs * len;
-HHGear^.dX:= Gear^.X + cc*Gear^.Elasticity - HHGear^.X;
-HHGear^.dY:= Gear^.Y + cs*Gear^.Elasticity - HHGear^.Y;
+tx:= HHGear^.X;
+ty:= HHGear^.Y;
if ((Gear^.Message and gm_Down) <> 0) and (Gear^.Elasticity < Gear^.Friction) then
if not (TestCollisionXwithGear(HHGear, hwSign(ropeDx))
@@ -737,6 +737,9 @@
HHGear^.X:= Gear^.X + cc*Gear^.Elasticity;
HHGear^.Y:= Gear^.Y + cs*Gear^.Elasticity;
+HHGear^.dX:= HHGear^.X - tx;
+HHGear^.dY:= HHGear^.Y - ty;
+
haveCollision:= false;
if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then
begin