# HG changeset patch # User nemo # Date 1320593172 18000 # Node ID fa5bc796261d1c0cd27652a9d2629f7d29d82954 # Parent 6d78d3069fa3d96df952f945f233dc2a3c926220 exclude hogs from density check diff -r 6d78d3069fa3 -r fa5bc796261d hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sat Nov 05 21:51:50 2011 -0400 +++ b/hedgewars/uGears.pas Sun Nov 06 10:26:12 2011 -0500 @@ -1314,8 +1314,17 @@ if ((Mask and EXPLDoNotTouchAny) = 0) and (((Mask and EXPLDoNotTouchHH) = 0) or (Gear^.Kind <> gtHedgehog)) then begin DeleteCI(Gear); - Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX)/Gear^.Density; - Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY)/Gear^.Density; + if Gear^.Kind <> gtHedgehog then + begin + Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX)/Gear^.Density; + Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY)/Gear^.Density; + end + else + begin + Gear^.dX:= Gear^.dX + SignAs(_0_005 * dmg + cHHKick, Gear^.X - fX); + Gear^.dY:= Gear^.dY + SignAs(_0_005 * dmg + cHHKick, Gear^.Y - fY); + end; + Gear^.State:= (Gear^.State or gstMoving) and (not gstLoser); if not Gear^.Invulnerable then Gear^.State:= (Gear^.State or gstMoving) and (not gstWinner);