- Fix firepunch sprite direction when use in high jump
- Fix highjump double sprite issue introduced two revs ago
--- a/hedgewars/GSHandlers.inc Wed Jun 18 20:16:25 2008 +0000
+++ b/hedgewars/GSHandlers.inc Wed Jun 18 20:43:34 2008 +0000
@@ -1089,7 +1089,8 @@
HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear;
DeleteCI(HHGear);
HHGear^.X:= int2hwFloat(hwRound(HHGear^.X)) - _0_5;
-SetLittle(HHGear^.dX);
+HHGear^.dX:= SignAs(cLittle, Gear^.dX);
+
HHGear^.dY:= - _0_3;
Gear^.X:= HHGear^.X;
--- a/hedgewars/uGears.pas Wed Jun 18 20:16:25 2008 +0000
+++ b/hedgewars/uGears.pas Wed Jun 18 20:43:34 2008 +0000
@@ -711,31 +711,34 @@
defaultPos:= false
end
end else // not gstHHDriven
-if (Gear^.Damage > 0)
-and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
begin
- DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
- hwSign(Gear^.dX),
- 2,
- 1,
- Gear^.DirAngle);
- defaultPos:= false
- end;
-if ((Gear^.State and gstHHJumping) <> 0) then
- begin
- 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
+ if (Gear^.Damage > 0)
+ and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
+ begin
DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
hwSign(Gear^.dX),
- 1,
+ 2,
1,
- 0);
+ Gear^.DirAngle);
defaultPos:= false
+ end;
+
+ if ((Gear^.State and gstHHJumping) <> 0) then
+ begin
+ 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;
end;