mirror of https://github.com/OpenTTD/OpenTTD
Fix 94167dfd: Don't shade the currently selected engine in autoreplace window. (#11354)
This breaks #7729 which specifically allows autoreplace of same engine types, and also did not work properly if the engine had been built during the current game session.pull/11355/head
parent
89acfc7ff9
commit
2fd3d943aa
|
@ -175,9 +175,7 @@ class ReplaceVehicleWindow : public Window {
|
|||
if (!CheckAutoreplaceValidity(this->sel_engine[0], eid, _local_company)) continue;
|
||||
}
|
||||
|
||||
EngineDisplayFlags flags = (side == 0) ? EngineDisplayFlags::None : e->display_flags;
|
||||
if (side == 1 && eid == this->sel_engine[0]) flags |= EngineDisplayFlags::Shaded;
|
||||
list.emplace_back(eid, e->info.variant_id, flags, 0);
|
||||
list.emplace_back(eid, e->info.variant_id, (side == 0) ? EngineDisplayFlags::None : e->display_flags, 0);
|
||||
|
||||
if (side == 1) {
|
||||
EngineID parent = e->info.variant_id;
|
||||
|
|
Loading…
Reference in New Issue