diff -r f682e134ac2e -r ba560c17c24c hedgewars/uCollisions.pas --- a/hedgewars/uCollisions.pas Mon May 21 15:42:21 2007 +0000 +++ b/hedgewars/uCollisions.pas Mon May 21 18:07:25 2007 +0000 @@ -191,7 +191,7 @@ end; TestCollisionXKick:= false; -if flag then +if flag and (Gear^.dX > cHHKick) then begin if Count = 0 then exit; mx:= hwRound(Gear^.X); @@ -201,7 +201,8 @@ with cinfos[i] do if (Gear <> cGear) and (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius)) and - ((mx > x) xor (Dir > 0)) then // FIXME: Check Gear.Kind + ((mx > x) xor (Dir > 0)) then + if (cinfos[i].cGear^.Kind in [gtHedgehog, gtMine]) then begin Gear^.dX:= Gear^.dX {* _0_6}; Gear^.dY:= Gear^.dY {* _0_6}; @@ -214,7 +215,7 @@ end; DeleteCI(cinfos[i].cGear); exit - end + end else exit(true) end end; @@ -240,7 +241,7 @@ end; TestCollisionYKick:= false; -if flag then +if flag and (Gear^.dX > cHHKick) then begin if Count = 0 then exit; mx:= hwRound(Gear^.X); @@ -251,9 +252,10 @@ if (Gear <> cGear) and (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius)) and ((my > y) xor (Dir > 0)) then + if (cinfos[i].cGear^.Kind in [gtHedgehog, gtMine]) then begin - Gear^.dX:= Gear^.dX * _0_6; - Gear^.dY:= Gear^.dY * _0_6; + Gear^.dX:= Gear^.dX {* _0_6}; + Gear^.dY:= Gear^.dY {* _0_6}; with cinfos[i].cGear^ do begin dX:= Gear^.dX {* _1_5}; @@ -263,7 +265,7 @@ end; DeleteCI(cinfos[i].cGear); exit - end + end else exit(true) end end;