43 | if (next_dest != NULL && next_dest->airport.tile != INVALID_TILE && cur_dest != NULL) {
| 43 | uint cur_dist = cur_dest != NULL ? DistanceSquare(st->airport.tile, cur_dest->airport.tile) : UINT_MAX;
|
---|
44 | if (DistanceSquare(st->airport.tile, next_dest->airport.tile) > v->acache.cached_max_range_sqr ||
| 44 | uint next_dist = next_dest != NULL || next_dest->airport.tile != INVALID_TILE ? DistanceSquare(st->airport.tile, next_dest->airport.tile) : UINT_MAX;
|
---|
45 | DistanceSquare(st->airport.tile, cur_dest->airport.tile) > v->acache.cached_max_range_sqr) continue;
| 45 | if (cur_dist != UINT_MAX && next_dist != UINT_MAX && (cur_dist > max_range || next_dist > max_range)) continue;
|
---|
46 | } else if (next_dest != NULL && next_dest->airport.tile != INVALID_TILE && cur_dest == NULL) {
| 46 | if (cur_dist != UINT_MAX && next_dist == UINT_MAX && cur_dist > max_range) continue;
|
---|
47 | if (DistanceSquare(st->airport.tile, next_dest->airport.tile) > v->acache.cached_max_range_sqr) continue;
| 47 | if (cur_dist == UINT_MAX && next_dist != UINT_MAX && next_dist > max_range) continue;
|
---|
48 | } else if ((next_dest == NULL || next_dest->airport.tile == INVALID_TILE) && cur_dest != NULL) {
| | |
---|
49 | if (DistanceSquare(st->airport.tile, cur_dest->airport.tile) > v->acache.cached_max_range_sqr) continue;
| | |
---|
50 | }
| | |
---|