hedgewars/uCollisions.pas
changeset 7268 3a61c53346a8
parent 6992 b8f3d8991e92
child 7270 93e92e82d5c8
equal deleted inserted replaced
7266:74ad631a72bf 7268:3a61c53346a8
   146             IntersectGear:= nil;
   146             IntersectGear:= nil;
   147             TestWord:= 0
   147             TestWord:= 0
   148             end
   148             end
   149         else
   149         else
   150             TestWord:= 255
   150             TestWord:= 255
   151     else TestWord:= 0;
   151 else 
       
   152     TestWord:= 0;
   152 
   153 
   153 x:= hwRound(Gear^.X);
   154 x:= hwRound(Gear^.X);
   154 if Dir < 0 then
   155 if Dir < 0 then
   155     x:= x - Gear^.Radius
   156     x:= x - Gear^.Radius
   156 else
   157 else
   191 y:= hwRound(Gear^.Y);
   192 y:= hwRound(Gear^.Y);
   192 if Dir < 0 then
   193 if Dir < 0 then
   193     y:= y - Gear^.Radius
   194     y:= y - Gear^.Radius
   194 else
   195 else
   195     y:= y + Gear^.Radius;
   196     y:= y + Gear^.Radius;
       
   197 
   196 if (y and LAND_HEIGHT_MASK) = 0 then
   198 if (y and LAND_HEIGHT_MASK) = 0 then
   197     begin
   199     begin
   198     x:= hwRound(Gear^.X) - Gear^.Radius + 1;
   200     x:= hwRound(Gear^.X) - Gear^.Radius + 1;
   199     i:= x + Gear^.Radius * 2 - 2;
   201     i:= x + Gear^.Radius * 2 - 2;
   200     repeat
   202     repeat