reset X/Y too (make drill less explodey. mask fixes revealed an issue)
authornemo
Fri, 27 Dec 2013 23:52:04 -0500
changeset 9872 e0dd66b2e73b
parent 9871 a220ae2097d8
child 9873 8db0c56f7e2f
reset X/Y too (make drill less explodey. mask fixes revealed an issue)
hedgewars/uGearsHandlersMess.pas
--- 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)