# HG changeset patch # User unc0rr # Date 1208893280 0 # Node ID 7c82903753a4643d50ff7ea1c93d23c97e562067 # Parent 9588286683be6e9d49dabcabc02fb734f1dae9d9 Fix hedgehog-on-rope animation diff -r 9588286683be -r 7c82903753a4 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Tue Apr 22 18:33:55 2008 +0000 +++ b/hedgewars/uGears.pas Tue Apr 22 19:41:20 2008 +0000 @@ -476,8 +476,8 @@ procedure DrawHH(Gear: PGear); var t: LongInt; amt: TAmmoType; - hx, hy: LongInt; - aangle: real; + hx, hy, m: LongInt; + aAngle, dAngle: real; defaultPos: boolean; begin defaultPos:= true; @@ -493,11 +493,20 @@ case CurAmmoGear^.Kind of gtShotgunShot: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); gtRope: begin + if Gear^.X < CurAmmoGear^.X then + begin + dAngle:= 0; + m:= 1 + end else + begin + dAngle:= 180; + m:= -1 + end; DrawHedgehog(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, - 1, + m, 1, 0, - DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) - 110); + DxDy2Angle(CurAmmoGear^.dY, CurAmmoGear^.dX) + dAngle); defaultPos:= false end; gtBlowTorch: begin diff -r 9588286683be -r 7c82903753a4 share/hedgewars/Data/Graphics/Hedgehog.png Binary file share/hedgewars/Data/Graphics/Hedgehog.png has changed