fix for
issue #828: Manual placement animation is drawn twice
--- a/hedgewars/uGearsHandlersMess.pas Mon Nov 24 04:16:28 2014 +0100
+++ b/hedgewars/uGearsHandlersMess.pas Mon Nov 24 20:44:45 2014 +0100
@@ -2646,6 +2646,8 @@
HHGear^.X := int2hwFloat(Gear^.Target.X);
HHGear^.Y := int2hwFloat(Gear^.Target.Y);
HHGear^.State := HHGear^.State or gstMoving;
+ if not Gear^.Hedgehog^.Unplaced then
+ Gear^.State:= Gear^.State or gstAnimation;
Gear^.Hedgehog^.Unplaced := false;
isCursorVisible := false;
playSound(sndWarp)
--- a/hedgewars/uGearsRender.pas Mon Nov 24 04:16:28 2014 +0100
+++ b/hedgewars/uGearsRender.pas Mon Nov 24 20:44:45 2014 +0100
@@ -1205,7 +1205,7 @@
gtAirBomb: DrawSpriteRotated(sprAirBomb, x, y, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
gtTeleport: begin
HHGear:= Gear^.Hedgehog^.Gear;
- if not Gear^.Hedgehog^.Unplaced then
+ if ((Gear^.State and gstAnimation) <> 0) then
DrawSpriteRotatedF(sprTeleport, x + 1, y - 3, Gear^.Pos, hwSign(Gear^.dX), 0);
DrawSpriteRotatedF(sprTeleport, hwRound(HHGear^.X) + 1 + WorldDx, hwRound(HHGear^.Y) - 3 + WorldDy, 11 - Gear^.Pos, hwSign(HHGear^.dX), 0);
end;