hedgewars/uCollisions.pas
changeset 4705 593ef1ad3cd3
parent 4684 1b2bbc86af5b
child 4798 84fb1ff0a1c0
equal deleted inserted replaced
4704:a07dfebaa497 4705:593ef1ad3cd3
   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