(svn r10992) -Fix [FS#1132]: huge amount of vehicles in the "ungrouped" group. Patch by frosch.

This commit is contained in:
rubidium
2007-08-27 21:33:26 +00:00
parent 5ce935c6eb
commit ac838de385
3 changed files with 9 additions and 6 deletions

View File

@@ -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);