hedgewars/GSHandlers.inc
changeset 3378 4f2185ed8ca8
parent 3359 d17b9f6adae5
child 3382 633046fa040c
equal deleted inserted replaced
3377:a3f0849f26bc 3378:4f2185ed8ca8
  1990         end
  1990         end
  1991     else begin
  1991     else begin
  1992         DeleteCI(HHGear);
  1992         DeleteCI(HHGear);
  1993         SetAllHHToActive;
  1993         SetAllHHToActive;
  1994         Gear^.doStep:= @doStepTeleportAnim;
  1994         Gear^.doStep:= @doStepTeleportAnim;
       
  1995         // copy old HH position and direction to Gear (because we need them for drawing the vanishing hog)
       
  1996         Gear^.dX:= HHGear^.dX;
       
  1997          // retrieve the cursor direction (it was previously copied to X so it doesn't get lost)
       
  1998          HHGear^.dX.isNegative := (Gear^.X.QWordValue <> 0);
  1995         Gear^.X:= HHGear^.X;
  1999         Gear^.X:= HHGear^.X;
  1996         Gear^.Y:= HHGear^.Y;
  2000         Gear^.Y:= HHGear^.Y;
  1997         HHGear^.X:= int2hwFloat(TargetPoint.X);
  2001         HHGear^.X:= int2hwFloat(TargetPoint.X);
  1998         HHGear^.Y:= int2hwFloat(TargetPoint.Y);
  2002         HHGear^.Y:= int2hwFloat(TargetPoint.Y);
  1999         HHGear^.State:= HHGear^.State or gstMoving;
  2003         HHGear^.State:= HHGear^.State or gstMoving;