hedgewars/GSHandlers.inc
changeset 3378 4f2185ed8ca8
parent 3359 d17b9f6adae5
child 3382 633046fa040c
--- a/hedgewars/GSHandlers.inc	Thu Apr 29 18:53:22 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Apr 29 19:21:40 2010 +0000
@@ -1992,6 +1992,10 @@
         DeleteCI(HHGear);
         SetAllHHToActive;
         Gear^.doStep:= @doStepTeleportAnim;
+        // copy old HH position and direction to Gear (because we need them for drawing the vanishing hog)
+        Gear^.dX:= HHGear^.dX;
+         // retrieve the cursor direction (it was previously copied to X so it doesn't get lost)
+         HHGear^.dX.isNegative := (Gear^.X.QWordValue <> 0);
         Gear^.X:= HHGear^.X;
         Gear^.Y:= HHGear^.Y;
         HHGear^.X:= int2hwFloat(TargetPoint.X);