# HG changeset patch # User sheepluva # Date 1316821263 -7200 # Node ID 7f790689205c83d7b0605ce6ebb6207d80e244c8 # Parent dbcebcd3d79fc0de2165b69766fa98d9829035d3 rope: CheezeMonkey (omg I mentioned your name :O) has pointed out that there is still a way to get stuck in walls. This should fix it. NOTE: although not necessary for this fix to work rope behavior got also changed: I removed the direction-bias. if you press left and right at the same time the result is now neutral rather than left. diff -r dbcebcd3d79f -r 7f790689205c hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sat Sep 24 00:54:47 2011 +0200 +++ b/hedgewars/GSHandlers.inc Sat Sep 24 01:41:03 2011 +0200 @@ -1503,9 +1503,11 @@ exit end; - if (Gear^.Message and gmLeft <> 0) then HHGear^.dX := HHGear^.dX - _0_0002 - else - if (Gear^.Message and gmRight <> 0) then HHGear^.dX := HHGear^.dX + _0_0002; + if (Gear^.Message and gmLeft <> 0) and not TestCollisionXwithGear(HHGear, -1) then + HHGear^.dX := HHGear^.dX - _0_0002; + + if (Gear^.Message and gmRight <> 0) and not TestCollisionXwithGear(HHGear, 1) then + HHGear^.dX := HHGear^.dX + _0_0002; // vector between hedgehog and rope attaching point ropeDx := HHGear^.X - Gear^.X;