* @param tile The destination tile.
* @return Returns the closest tile to the destination on the minimap.
*/
public RSTile getClosestTileOnMap(final RSTile tile) {
if (!methods.calc.tileOnMap(tile) && methods.game.isLoggedIn()) {
final RSTile loc = methods.players.getMyPlayer().getLocation();
final RSTile walk = new RSTile((loc.getX() + tile.getX()) / 2, (loc.getY() + tile.getY()) / 2);
return methods.calc.tileOnMap(walk) ? walk : getClosestTileOnMap(walk);
}
return tile;
}