diff options
author | rubidium <rubidium@openttd.org> | 2009-07-24 07:38:10 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-24 07:38:10 +0000 |
commit | 803cf87885aa8b6382996940d6418250889b678c (patch) | |
tree | 4ba316e76c8156146a7635f9694096ac30471a32 /src/waypoint_cmd.cpp | |
parent | c1ffbc3bceafb9a0a47680dc28d010396924bc5c (diff) | |
download | openttd-803cf87885aa8b6382996940d6418250889b678c.tar.xz |
(svn r16934) -Codechange: introduce a simple helper function to check whether a station is pending deletion or not
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r-- | src/waypoint_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 7891d7aac..96dd5fc74 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -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) { |