# HG changeset patch # User unc0rr # Date 1213821814 0 # Node ID 3c7d4e7ccdff90c1074cff2474a69f3d7ac38e46 # Parent 17148964400dfa219ec4e32c920c90a19ddcc1d5 - Fix firepunch sprite direction when use in high jump - Fix highjump double sprite issue introduced two revs ago diff -r 17148964400d -r 3c7d4e7ccdff hedgewars/GSHandlers.inc --- 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; diff -r 17148964400d -r 3c7d4e7ccdff hedgewars/uGears.pas --- 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;