# HG changeset patch # User unc0rr # Date 1230478975 0 # Node ID cd907418da911cb981b838ad65a90647c7735753 # Parent c747e69f98f3e21377f6695966a2851e3bfc49da Bring back old rope behaviour when changing its length (that's more correct physical model) diff -r c747e69f98f3 -r cd907418da91 hedgewars/GSHandlers.inc --- 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