correct cake sit-down animation so that it doesn't sit down in mid-air anymore
authorsheepluva
Wed, 16 Jun 2010 21:14:23 +0200
changeset 3508 a7ca07614a2d
parent 3507 2e40893e6034
child 3510 23145a950eae
child 3511 76e2d79b91b1
correct cake sit-down animation so that it doesn't sit down in mid-air anymore
hedgewars/GearDrawing.inc
hedgewars/uGears.pas
--- a/hedgewars/GearDrawing.inc	Wed Jun 16 15:20:18 2010 +0200
+++ b/hedgewars/GearDrawing.inc	Wed Jun 16 21:14:23 2010 +0200
@@ -751,7 +751,7 @@
           gtCake: if Gear^.Pos = 6 then
                      DrawRotatedf(sprCakeWalk, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (GameTicks div 40) mod 6, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90)
                   else
-                     DrawRotatedf(sprCakeDown, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 5 - Gear^.Pos, hwSign(Gear^.dX), 0);
+                     DrawRotatedf(sprCakeDown, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 5 - Gear^.Pos, hwSign(Gear^.dX), Gear^.DirAngle * hwSign(Gear^.dX) + 90);
        gtSeduction: if Gear^.Pos >= 14 then DrawSprite(sprSeduction, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);
       gtWatermelon: DrawRotatedf(sprWatermelon, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 0, Gear^.DirAngle);
       gtMelonPiece: DrawRotatedf(sprWatermelon, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 1, 0, Gear^.DirAngle);
--- a/hedgewars/uGears.pas	Wed Jun 16 15:20:18 2010 +0200
+++ b/hedgewars/uGears.pas	Wed Jun 16 21:14:23 2010 +0200
@@ -431,6 +431,7 @@
                 gear^.Radius:= 7;
                 gear^.Z:= cOnHHZ;
                 gear^.RenderTimer:= true;
+                gear^.DirAngle:= -90 * hwSign(Gear^.dX);
                 if not dX.isNegative then gear^.Angle:= 1 else gear^.Angle:= 3
                 end;
  gtHellishBomb: begin