hedgewars/uAIMisc.pas
changeset 8810 b885b995aa95
parent 8777 cce79a042cfc
child 8833 c13ebed437cb
child 8845 8cf1ed3bae45
equal deleted inserted replaced
8808:636cd1b8361d 8810:b885b995aa95
   264     if ((x and LAND_WIDTH_MASK) = 0) and ((y and LAND_HEIGHT_MASK) = 0) then
   264     if ((x and LAND_WIDTH_MASK) = 0) and ((y and LAND_HEIGHT_MASK) = 0) then
   265     begin
   265     begin
   266         MeX:= hwRound(Me^.X);
   266         MeX:= hwRound(Me^.X);
   267         MeY:= hwRound(Me^.Y);
   267         MeY:= hwRound(Me^.Y);
   268         // We are still inside the hog. Skip radius test
   268         // We are still inside the hog. Skip radius test
   269         if ((((x-MeX)*(x-MeX)) + ((y-MeY)*(y-MeY))) < 256) and (Land[y, x] <= lfAllObjMask) then
   269         if ((((x-MeX)*(x-MeX)) + ((y-MeY)*(y-MeY))) < 256) and (Land[y, x] <= lfAllObjMask) and ((Land[y, x] and lfObjMask) < 2) then
   270             exit(false);
   270             exit(false);
   271     end;
   271     end;
   272     TestCollExcludingMe:= TestColl(x, y, r)
   272     TestCollExcludingMe:= TestColl(x, y, r)
   273 end;
   273 end;
   274 
   274