# HG changeset patch # User unc0rr # Date 1213817646 0 # Node ID 36b5cc8264e83afcdc917b8fa32dbefee2c7f405 # Parent 4fe2c4c57d10686751512b0e1d92314c6139e009 Damaged hedgehog animation diff -r 4fe2c4c57d10 -r 36b5cc8264e8 hedgewars/HHHandlers.inc --- a/hedgewars/HHHandlers.inc Wed Jun 18 18:57:34 2008 +0000 +++ b/hedgewars/HHHandlers.inc Wed Jun 18 19:34:06 2008 +0000 @@ -571,6 +571,7 @@ if (Gear^.State and (gstMoving or gstDrowning)) <> 0 then begin + if Gear^.Damage > 0 then CalcRotationDirAngle(Gear); AllInactive:= false; exit end; diff -r 4fe2c4c57d10 -r 36b5cc8264e8 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Jun 18 18:57:34 2008 +0000 +++ b/hedgewars/uGears.pas Wed Jun 18 19:34:06 2008 +0000 @@ -247,8 +247,8 @@ RopePoints.Count:= 0; end; gtExplosion: begin - Result^.X:= Result^.X - _25; - Result^.Y:= Result^.Y - _25; + Result^.X:= Result^.X; + Result^.Y:= Result^.Y; end; gtMine: begin Result^.State:= Result^.State or gstMoving; @@ -711,22 +711,32 @@ defaultPos:= false end end else // not gstHHDriven -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 ((Gear^.State or gstMoving) <> 0) 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; + 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; if defaultPos then @@ -894,7 +904,7 @@ end; end; gtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State); - gtExplosion: DrawSprite(sprExplosion50, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State); + gtExplosion: DrawSprite(sprExplosion50, hwRound(Gear^.X) - 32 + WorldDx, hwRound(Gear^.Y) - 32 + WorldDy, Gear^.State); gtMine: if ((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420) then DrawRotated(sprMineOff, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle) else DrawRotated(sprMineOn, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle); diff -r 4fe2c4c57d10 -r 36b5cc8264e8 share/hedgewars/Data/Graphics/Hedgehog.png Binary file share/hedgewars/Data/Graphics/Hedgehog.png has changed