# HG changeset patch # User nemo # Date 1383883708 18000 # Node ID a342837fc875f50627d54545655626934aba29ea # Parent 69a1e18330c0207917740de80ff71e8f540f84e3 just an experiment. make these offset 2 as well on X diff -r 69a1e18330c0 -r a342837fc875 hedgewars/uGearsHandlersRope.pas --- a/hedgewars/uGearsHandlersRope.pas Thu Nov 07 22:23:34 2013 -0500 +++ b/hedgewars/uGearsHandlersRope.pas Thu Nov 07 23:08:28 2013 -0500 @@ -168,7 +168,7 @@ cd:= 1; // apply gravity if there is no obstacle - if not (TestCollisionXwithXYShift(HHGear, _1*cd, 0, cd, true)) then + if not (TestCollisionXwithXYShift(HHGear, _2*cd, 0, cd, true)) then HHGear^.dY := HHGear^.dY + cGravity * 16; if (GameFlags and gfMoreWind) <> 0 then @@ -195,13 +195,11 @@ if ((Gear^.Message and gmDown) <> 0) and (Gear^.Elasticity < Gear^.Friction) then if not (TestCollisionXwithXYShift(HHGear, _2*hwSign(ropeDx), 0, hwSign(ropeDx), true) or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1*hwSign(ropeDy), hwSign(ropeDy)))) then - //or TestCollisionXwithXYShift(HHGear, _1*hwSign(ropeDx), 0, hwSign(ropeDx), true)) then Gear^.Elasticity := Gear^.Elasticity + _1_2; if ((Gear^.Message and gmUp) <> 0) and (Gear^.Elasticity > _30) then if not (TestCollisionXwithXYShift(HHGear, -_2*hwSign(ropeDx), 0, -hwSign(ropeDx), true) or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1*-hwSign(ropeDy), -hwSign(ropeDy)))) then - //or TestCollisionXwithXYShift(HHGear, -_1*hwSign(ropeDx), 0, -hwSign(ropeDx))) then Gear^.Elasticity := Gear^.Elasticity - _1_2; HHGear^.X := Gear^.X + mdX * Gear^.Elasticity; @@ -317,7 +315,7 @@ end; haveCollision := false; - if TestCollisionXwithXYShift(HHGear, _1*hwSign(HHGear^.dX), 0, hwSign(HHGear^.dX), true) then + if TestCollisionXwithXYShift(HHGear, _2*hwSign(HHGear^.dX), 0, hwSign(HHGear^.dX), true) then begin HHGear^.dX := -_0_6 * HHGear^.dX; haveCollision := true