(svn r16934) -Codechange: introduce a simple helper function to check whether a station is pending deletion or not

This commit is contained in:
rubidium
2009-07-24 07:38:10 +00:00
parent c1ffbc3bce
commit 803cf87885
6 changed files with 19 additions and 8 deletions

View File

@@ -107,7 +107,7 @@ static Waypoint *FindDeletedWaypointCloseTo(TileIndex tile, StringID str)
uint thres = 8;
FOR_ALL_WAYPOINTS(wp) {
if ((wp->facilities & ~FACIL_WAYPOINT) == 0 && wp->string_id == str && (wp->owner == _current_company || wp->owner == OWNER_NONE)) {
if (!wp->IsInUse() && wp->string_id == str && (wp->owner == _current_company || wp->owner == OWNER_NONE)) {
uint cur_dist = DistanceManhattan(tile, wp->xy);
if (cur_dist < thres) {