equal
deleted
inserted
replaced
851 default: NOT_REACHED(); |
851 default: NOT_REACHED(); |
852 } |
852 } |
853 |
853 |
854 for (; min < max; min++, y += step_size) { |
854 for (; min < max; min++, y += step_size) { |
855 const EngineID engine = eng_list[min]; |
855 const EngineID engine = eng_list[min]; |
856 const uint num_engines = GetGroupNumEngines(selected_group, engine); |
856 /* Note: num_engines is only used in the autoreplace GUI, so it is correct to use _local_player here. */ |
|
857 const uint num_engines = GetGroupNumEngines(_local_player, selected_group, engine); |
857 |
858 |
858 SetDParam(0, engine); |
859 SetDParam(0, engine); |
859 DrawString(x + x_offset, y, STR_ENGINE_NAME, engine == selected_id ? 0xC : 0x10); |
860 DrawString(x + x_offset, y, STR_ENGINE_NAME, engine == selected_id ? 0xC : 0x10); |
860 DrawVehicleEngine(type, x, y + y_offset, engine, (show_count && num_engines == 0) ? PALETTE_CRASH : GetEnginePalette(engine, _local_player)); |
861 DrawVehicleEngine(type, x, y + y_offset, engine, (show_count && num_engines == 0) ? PALETTE_CRASH : GetEnginePalette(engine, _local_player)); |
861 if (show_count) { |
862 if (show_count) { |