# HG changeset patch # User Wuzzy # Date 1508968027 -7200 # Node ID 272fcd3833d21d23d2a2ed2121cba2bde39d636c # Parent ad67a38049811f06fbbc3cd30a595ff574d217d0 Make gtDuck use DirAngle instead of Angle for rotation diff -r ad67a3804981 -r 272fcd3833d2 hedgewars/uGearsHandlersMess.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 diff -r ad67a3804981 -r 272fcd3833d2 hedgewars/uGearsRender.pas --- 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