mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Simply check whether the group vehicle list is empty for ToolbarVehicleClick
parent
afa050ed65
commit
e9a4f865b0
|
@ -730,8 +730,8 @@ static void ToolbarVehicleClick(Window *w, VehicleType veh)
|
|||
{
|
||||
int dis = ~0;
|
||||
|
||||
for (const Vehicle *v : Vehicle::Iterate()) {
|
||||
if (v->type == veh && v->IsPrimaryVehicle()) ClrBit(dis, v->owner);
|
||||
for (const Company *c : Company::Iterate()) {
|
||||
if (!c->group_all[veh].vehicle_list.empty()) ClrBit(dis, c->index);
|
||||
}
|
||||
PopupMainCompanyToolbMenu(w, WID_TN_VEHICLE_START + veh, dis);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue