hedgewars/uCollisions.pas
branch0.9.15
changeset 4721 5e50d8162a96
parent 4705 593ef1ad3cd3
child 4798 84fb1ff0a1c0
equal deleted inserted replaced
4700:e8fd20b2d66b 4721:5e50d8162a96
   101 ga.Count:= 0;
   101 ga.Count:= 0;
   102 if Count = 0 then exit;
   102 if Count = 0 then exit;
   103 mx:= hwRound(Gear^.X);
   103 mx:= hwRound(Gear^.X);
   104 my:= hwRound(Gear^.Y);
   104 my:= hwRound(Gear^.Y);
   105 
   105 
   106 tr:= Gear^.Radius;
   106 tr:= Gear^.Radius + 2;
   107 
   107 
   108 for i:= 0 to Pred(Count) do
   108 for i:= 0 to Pred(Count) do
   109     with cinfos[i] do
   109     with cinfos[i] do
   110         if (Gear <> cGear) and
   110         if (Gear <> cGear) and
   111             (sqr(mx - x) + sqr(my - y) <= sqr(Radius + tr)) then
   111             (sqr(mx - x) + sqr(my - y) <= sqr(Radius + tr)) then