summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-27 21:33:26 +0000
committerrubidium <rubidium@openttd.org>2007-08-27 21:33:26 +0000
commitac838de385f25f473a2305ac666d35babf42f3ab (patch)
tree547b6661ba325dd3a5f5a287a7202ee034590910 /src/build_vehicle_gui.cpp
parent5ce935c6ebf8ea88bb28909addbb0ccf937acaba (diff)
downloadopenttd-ac838de385f25f473a2305ac666d35babf42f3ab.tar.xz
(svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 8b19a9ac8..5728212ab 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -853,7 +853,8 @@ void DrawEngineList(VehicleType type, int x, int y, const EngineList eng_list, u
for (; min < max; min++, y += step_size) {
const EngineID engine = eng_list[min];
- const uint num_engines = GetGroupNumEngines(selected_group, engine);
+ /* Note: num_engines is only used in the autoreplace GUI, so it is correct to use _local_player here. */
+ const uint num_engines = GetGroupNumEngines(_local_player, selected_group, engine);
SetDParam(0, engine);
DrawString(x + x_offset, y, STR_ENGINE_NAME, engine == selected_id ? 0xC : 0x10);