hedgewars/uCollisions.pas
changeset 855 8842c71d16bf
parent 839 1493f697d1bb
child 883 07a568ba44e0
equal deleted inserted replaced
854:fef7f2d908bf 855:8842c71d16bf
   198    my:= hwRound(Gear^.Y);
   198    my:= hwRound(Gear^.Y);
   199 
   199 
   200    for i:= 0 to Pred(Count) do
   200    for i:= 0 to Pred(Count) do
   201     with cinfos[i] do
   201     with cinfos[i] do
   202       if (Gear <> cGear) and
   202       if (Gear <> cGear) and
   203          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius)) and
   203          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) and
   204          ((mx > x) xor (Dir > 0)) then
   204          ((mx > x) xor (Dir > 0)) then
   205          if (cGear^.Kind in [gtHedgehog, gtMine]) then
   205          if (cGear^.Kind in [gtHedgehog, gtMine]) then
   206              begin
   206              begin
   207              with cGear^ do
   207              with cGear^ do
   208                   begin
   208                   begin
   246    my:= hwRound(Gear^.Y);
   246    my:= hwRound(Gear^.Y);
   247 
   247 
   248    for i:= 0 to Pred(Count) do
   248    for i:= 0 to Pred(Count) do
   249     with cinfos[i] do
   249     with cinfos[i] do
   250       if (Gear <> cGear) and
   250       if (Gear <> cGear) and
   251          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius)) and
   251          (sqr(mx - x) + sqr(my - y) <= sqr(Radius + Gear^.Radius + 2)) and
   252          ((my > y) xor (Dir > 0)) then
   252          ((my > y) xor (Dir > 0)) then
   253          if (cGear^.Kind in [gtHedgehog, gtMine]) then
   253          if (cGear^.Kind in [gtHedgehog, gtMine]) then
   254              begin
   254              begin
   255              with cGear^ do
   255              with cGear^ do
   256                   begin
   256                   begin