Make gtDuck use DirAngle instead of Angle for rotation
authorWuzzy <Wuzzy2@mail.ru>
Wed, 25 Oct 2017 23:47:07 +0200
changeset 12769 272fcd3833d2
parent 12768 ad67a3804981
child 12770 d01e9dd5c439
Make gtDuck use DirAngle instead of Angle for rotation
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsRender.pas
--- a/hedgewars/uGearsHandlersMess.pas	Wed Oct 25 23:09:41 2017 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Wed Oct 25 23:47:07 2017 +0200
@@ -6408,7 +6408,7 @@
             if (((Gear^.Pos = 3) or (Gear^.Pos = 7)) and (cWindSpeed > _0)) or (((Gear^.Pos = 4) or (Gear^.Pos = 8)) and (cWindSpeed < _0)) then
                 begin
                 PlaySound(sndDuckWater);
-                Gear^.Angle:= 0;
+                Gear^.DirAngle:= 0;
                 Gear^.Pos:= 1;
                 Gear^.dY:= _0;
                 end;
@@ -6484,9 +6484,9 @@
             if (Gear^.Pos <> 3) and (Gear^.Pos <> 7) then
                 begin
                 if Gear^.Tag = 1 then
-                    Gear^.Angle:= 90 
+                    Gear^.DirAngle:= 90
                 else
-                    Gear^.Angle:= 270;
+                    Gear^.DirAngle:= 270;
                 end;
 
             // Reaching the edge surface
@@ -6509,9 +6509,9 @@
             if (Gear^.Pos <> 4) and (Gear^.Pos <> 8) then
                 begin
                 if Gear^.Tag = 1 then
-                    Gear^.Angle:= 270 
+                    Gear^.DirAngle:= 270
                 else
-                    Gear^.Angle:= 90;
+                    Gear^.DirAngle:= 90;
                 end;
 
             if (RightX = hwRound(Gear^.X) + Gear^.Karma) and (Gear^.Pos <> 4) then
--- a/hedgewars/uGearsRender.pas	Wed Oct 25 23:09:41 2017 +0200
+++ b/hedgewars/uGearsRender.pas	Wed Oct 25 23:47:07 2017 +0200
@@ -1548,7 +1548,7 @@
                                 end
                           end
                       end;
-            gtDuck: DrawSpriteRotatedF(sprDuck, x, y, 1, Gear^.Tag, Gear^.Angle);
+            gtDuck: DrawSpriteRotatedF(sprDuck, x, y, 1, Gear^.Tag, Gear^.DirAngle);
             gtGenericFaller: DrawCircle(x, y, 3, 3, $FF, $00, $00, $FF);  // debug
          end;
     if Gear^.State and gstFrozen <> 0 then untint