diff options
author | rubidium <rubidium@openttd.org> | 2007-08-27 21:33:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-27 21:33:26 +0000 |
commit | ac838de385f25f473a2305ac666d35babf42f3ab (patch) | |
tree | 547b6661ba325dd3a5f5a287a7202ee034590910 /src/build_vehicle_gui.cpp | |
parent | 5ce935c6ebf8ea88bb28909addbb0ccf937acaba (diff) | |
download | openttd-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.cpp | 3 |
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); |