diff options
author | rubidium <rubidium@openttd.org> | 2009-01-10 09:51:14 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-10 09:51:14 +0000 |
commit | 0543f50181fcdaa5c4f1365c2dfefc65649175a9 (patch) | |
tree | c150281da19ec8c75bcae7d7526de3017ee154db /src/build_vehicle_gui.cpp | |
parent | 5f53496e54f3080b1c1c1c000d47f914fb3e6f10 (diff) | |
download | openttd-0543f50181fcdaa5c4f1365c2dfefc65649175a9.tar.xz |
(svn r14952) -Codechange: unify the "can vehicle go to station" tests
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r-- | src/build_vehicle_gui.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 7cfcc6aec..27a1e039f 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -987,6 +987,8 @@ struct BuildVehicleWindow : Window { this->eng_list.Clear(); + const Station *st = GetStation(this->window_number); + /* Make list of all available planes. * Also check to see if the previously selected plane is still available, * and if not, reset selection to INVALID_ENGINE. This could be the case @@ -996,7 +998,7 @@ struct BuildVehicleWindow : Window { EngineID eid = e->index; if (!IsEngineBuildable(eid, VEH_AIRCRAFT, _local_company)) continue; /* First VEH_END window_numbers are fake to allow a window open for all different types at once */ - if (!this->listview_mode && !CanAircraftUseStation(eid, this->window_number)) continue; + if (!this->listview_mode && !CanVehicleUseStation(eid, st)) continue; *this->eng_list.Append() = eid; if (eid == this->sel_engine) sel_id = eid; |