hedgewars/uGearsHandlersMess.pas
changeset 9872 e0dd66b2e73b
parent 9853 8786d4ac9e0b
child 9873 8db0c56f7e2f
--- a/hedgewars/uGearsHandlersMess.pas	Fri Dec 27 17:06:21 2013 -0500
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Dec 27 23:52:04 2013 -0500
@@ -3192,7 +3192,7 @@
 procedure doStepDrill(Gear: PGear);
 var
     t: PGearArray;
-    oldDx, oldDy: hwFloat;
+    oldX, oldY, oldDx, oldDy: hwFloat;
     t2: hwFloat;
 begin
     AllInactive := false;
@@ -3202,6 +3202,8 @@
 
     oldDx := Gear^.dX;
     oldDy := Gear^.dY;
+    oldX := Gear^.X;
+    oldY := Gear^.Y;
 
     doStepFallingGear(Gear);
 
@@ -3217,6 +3219,8 @@
         //hit
         Gear^.dX := oldDx;
         Gear^.dY := oldDy;
+        Gear^.X := oldX;
+        Gear^.Y := oldY;
 
         if GameTicks > Gear^.FlightTime then
             t := CheckGearsCollision(Gear)