Adjust routines impacted by DrawRotatedF modification, clear gstHHHJump in rope to avoid crosshair/hat drawing bug.
--- a/hedgewars/GSHandlers.inc Sun May 03 21:12:34 2009 +0000
+++ b/hedgewars/GSHandlers.inc Sun May 03 21:28:15 2009 +0000
@@ -773,8 +773,7 @@
with HHGear^ do
begin
Message:= Message and not gm_Attack;
- State:= State or gstMoving;
- State:= State and not gstWinner;
+ State:= (State or gstMoving) and not gstWinner;
end;
DeleteGear(Gear)
end;
@@ -954,7 +953,7 @@
begin
CheckHHDamage(HHGear);
HHGear^.dY:= _0;
- HHGear^.State:= HHGear^.State and not (gstMoving or gstHHJumping);
+ HHGear^.State:= HHGear^.State and not (gstMoving or gstHHJumping or gstHHHJump);
end else
begin
if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then SetLittle(HHGear^.dX);
--- a/hedgewars/uGears.pas Sun May 03 21:12:34 2009 +0000
+++ b/hedgewars/uGears.pas Sun May 03 21:28:15 2009 +0000
@@ -867,8 +867,8 @@
hwRound(Gear^.X) + WorldDx,
hwRound(Gear^.Y) + WorldDy,
CurAmmoGear^.Pos - 1,
- 1,
- DxDy2Angle(Gear^.dY, Gear^.dX));
+ hwSign(Gear^.dX),
+ aangle);
defaultPos:= false
end;
gtSeduction: begin
@@ -1366,7 +1366,7 @@
gtTarget: DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);
gtMortar: DrawRotated(sprMortar, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX));
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)
+ 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);
gtSeduction: if Gear^.Pos >= 14 then DrawSprite(sprSeduction, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0);