diff options
author | rubidium <rubidium@openttd.org> | 2007-07-14 23:10:27 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-07-14 23:10:27 +0000 |
commit | 7aec26887cfc0f40c54a147d566b737cdbbf9451 (patch) | |
tree | 8e0bc57b2b06b68cd87f0cd9d2168ec3eb7ed227 /src/build_vehicle_gui.cpp | |
parent | 197245eefe096da8008ce8d4772ab51fd2fb5cf4 (diff) | |
download | openttd-7aec26887cfc0f40c54a147d566b737cdbbf9451.tar.xz |
(svn r10567) -Add [FS#915]: a "group" with ungrouped vehicles. Patch by Matthias Wolf.
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r-- | src/build_vehicle_gui.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 980de4c36..9fd64dca1 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -823,7 +823,6 @@ void DrawEngineList(VehicleType type, int x, int y, const EngineList eng_list, u byte step_size = GetVehicleListHeight(type); byte x_offset = 0; byte y_offset = 0; - Player *p = GetPlayer(_local_player); assert(max <= EngList_Count(&eng_list)); @@ -854,7 +853,7 @@ 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 = IsDefaultGroupID(selected_group) ? p->num_engines[engine] : GetGroup(selected_group)->num_engines[engine]; + const uint num_engines = GetGroupNumEngines(selected_group, engine); SetDParam(0, engine); DrawString(x + x_offset, y, STR_ENGINE_NAME, engine == selected_id ? 0xC : 0x10); |