- Fix warning
- Small optimization in DrawHH function
- Fix high jump hedgehog animation not to turn hedgehog view
--- a/hedgewars/uGears.pas Fri Apr 25 20:41:23 2008 +0000
+++ b/hedgewars/uGears.pas Fri Apr 25 21:44:58 2008 +0000
@@ -500,12 +500,12 @@
end;
defaultPos:= true;
-hx:= hwRound(Gear^.X) + 1 + 8 * hwSign(Gear^.dX) + WorldDx;
-hy:= hwRound(Gear^.Y) - 2 + WorldDy;
-aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
-
if (Gear^.State and gstHHDriven) <> 0 then
begin
+ hx:= hwRound(Gear^.X) + 1 + 8 * hwSign(Gear^.dX) + WorldDx;
+ hy:= hwRound(Gear^.Y) - 2 + WorldDy;
+ aangle:= Gear^.Angle * 180 / cMaxAngle - 90;
+
if CurAmmoGear <> nil then
begin
case CurAmmoGear^.Kind of
@@ -540,15 +540,24 @@
gtTeleport: defaultPos:= false;
end
end else
+
if ((Gear^.State and gstHHJumping) <> 0) then
begin
- DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
- hwSign(Gear^.dX),
- 1,
- 1,
- 0);
+ if ((Gear^.State and gstHHHJump) <> 0) then
+ DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
+ - hwSign(Gear^.dX),
+ 1,
+ 1,
+ 0)
+ else
+ DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
+ hwSign(Gear^.dX),
+ 1,
+ 1,
+ 0);
defaultPos:= false
end else
+
if (Gear^.Message and (gm_Left or gm_Right) <> 0)
or ((Gear^.State and gstAttacked) <> 0) then
begin
@@ -560,6 +569,7 @@
defaultPos:= false
end
else
+
begin
amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType;
case amt of
--- a/hedgewars/uStats.pas Fri Apr 25 20:41:23 2008 +0000
+++ b/hedgewars/uStats.pas Fri Apr 25 21:44:58 2008 +0000
@@ -79,8 +79,7 @@
end;
procedure TurnReaction;
-var Gear: PGear;
- i, t: LongInt;
+var i, t: LongInt;
begin
inc(FinishedTurnsTotal);
if FinishedTurnsTotal = 0 then exit;