equal
deleted
inserted
replaced
142 { |
142 { |
143 Waypoint *wp, *best = NULL; |
143 Waypoint *wp, *best = NULL; |
144 uint thres = 8; |
144 uint thres = 8; |
145 |
145 |
146 FOR_ALL_WAYPOINTS(wp) { |
146 FOR_ALL_WAYPOINTS(wp) { |
147 if (wp->deleted) { |
147 if (wp->deleted && (wp->owner == OWNER_NONE || wp->owner == _current_player)) { |
148 uint cur_dist = DistanceManhattan(tile, wp->xy); |
148 uint cur_dist = DistanceManhattan(tile, wp->xy); |
149 |
149 |
150 if (cur_dist < thres) { |
150 if (cur_dist < thres) { |
151 thres = cur_dist; |
151 thres = cur_dist; |
152 best = wp; |
152 best = wp; |