--- a/hedgewars/uGearsHandlersRope.pas Tue Jan 29 13:45:31 2013 -0500
+++ b/hedgewars/uGearsHandlersRope.pas Thu Jan 31 21:28:08 2013 -0500
@@ -164,13 +164,13 @@
ty := HHGear^.Y;
if ((Gear^.Message and gmDown) <> 0) and (Gear^.Elasticity < Gear^.Friction) then
- if not (TestCollisionXwithGear(HHGear, hwSign(ropeDx))
- or (TestCollisionYwithGear(HHGear, hwSign(ropeDy)) <> 0)) then
+ if not (TestCollisionXwithXYShift(HHGear, _0, -1, hwSign(ropeDx))
+ or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1, hwSign(ropeDy)))) then
Gear^.Elasticity := Gear^.Elasticity + _1_2;
if ((Gear^.Message and gmUp) <> 0) and (Gear^.Elasticity > _30) then
- if not (TestCollisionXwithGear(HHGear, -hwSign(ropeDx))
- or (TestCollisionYwithGear(HHGear, -hwSign(ropeDy)) <> 0)) then
+ if not (TestCollisionXwithXYShift(HHGear, _0, -1, -hwSign(ropeDx))
+ or ((ropeDy.QWordValue <> 0) and TestCollisionYwithXYShift(HHGear, 0, 1, -hwSign(ropeDy)))) then
Gear^.Elasticity := Gear^.Elasticity - _1_2;
HHGear^.X := Gear^.X + mdX * Gear^.Elasticity;