another shot in the dark. let's assume they expect to control their direction as well. this might be the *wrong* direction...
authornemo
Sat, 25 Aug 2012 21:05:27 -0400
changeset 7606 adb1198ade36
parent 7605 10e88fbb5fdb
child 7607 0cae2a3e562c
another shot in the dark. let's assume they expect to control their direction as well. this might be the *wrong* direction...
hedgewars/uGearsHandlersRope.pas
--- a/hedgewars/uGearsHandlersRope.pas	Sat Aug 25 20:54:23 2012 -0400
+++ b/hedgewars/uGearsHandlersRope.pas	Sat Aug 25 21:05:27 2012 -0400
@@ -89,7 +89,11 @@
         HHGear^.Y:= HHGear^.Y-int2hwFloat(pred(i));
         // experiment in simulating something the shoppa players apparently expect
         if Gear^.Message and gmDown <> 0 then
-            HHGear^.dY.QWordValue:= 0
+            HHGear^.dY.QWordValue:= 0;
+        if Gear^.Message and gmRight <> 0 then
+            HHGear^.dX.isNegative:= false
+        else if Gear^.Message and gmLeft <> 0 then
+            HHGear^.dX.isNegative:= true
         end
     else if (TestCollisionYwithGear(HHGear, -1) <> 0) and (TestCollisionYwithGear(HHGear, 1) = 0) then
         begin
@@ -102,7 +106,11 @@
         until (i = -8) or not stuck;
         HHGear^.Y:= HHGear^.Y-int2hwFloat(succ(i));
         if Gear^.Message and gmDown <> 0 then
-            HHGear^.dY.QWordValue:= 0
+            HHGear^.dY.QWordValue:= 0;
+        if Gear^.Message and gmRight <> 0 then
+            HHGear^.dX.isNegative:= false
+        else if Gear^.Message and gmLeft <> 0 then
+            HHGear^.dX.isNegative:= true
         end;
     if TestCollisionXwithGear(HHGear, 1) and not TestCollisionXwithGear(HHGear, -1) then
         begin