# HG changeset patch # User rubidium # Date 2009-08-27 19:47:50 # Node ID 68ac0ef0475e38f8497460f6db6f1259c4c723a0 # Parent 8c6d40a5f07dd26176ea8cc28678e123d5e3e404 (svn r17296) -Fix/feature [FS#3152]: allow rail wagons to be build when only el rail engines are available diff --git a/src/engine.cpp b/src/engine.cpp --- a/src/engine.cpp +++ b/src/engine.cpp @@ -766,7 +766,7 @@ bool IsEngineBuildable(EngineID engine, if (type == VEH_TRAIN) { /* Check if the rail type is available to this company */ const Company *c = Company::Get(company); - if (!HasBit(c->avail_railtypes, RailVehInfo(engine)->railtype)) return false; + if (((GetRailTypeInfo(RailVehInfo(engine)->railtype))->compatible_railtypes & c->avail_railtypes) == 0) return false; } return true;