mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r17296) -Fix/feature [FS#3152]: allow rail wagons to be build when only el rail engines are available
This commit is contained in:
parent
51edb37a7b
commit
cd6da9ef01
@ -766,7 +766,7 @@ bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company)
|
|||||||
if (type == VEH_TRAIN) {
|
if (type == VEH_TRAIN) {
|
||||||
/* Check if the rail type is available to this company */
|
/* Check if the rail type is available to this company */
|
||||||
const Company *c = Company::Get(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;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user