summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-08-27 19:47:50 +0000
committerrubidium <rubidium@openttd.org>2009-08-27 19:47:50 +0000
commitcd6da9ef01a50936935063aa2e904e499a1fa1f5 (patch)
tree847234d3d16ed3d3e5e8e4e1f0f79e55945f665b /src
parent51edb37a7b9e8a2f8fb7ad63733730f840e67bc2 (diff)
downloadopenttd-cd6da9ef01a50936935063aa2e904e499a1fa1f5.tar.xz
(svn r17296) -Fix/feature [FS#3152]: allow rail wagons to be build when only el rail engines are available
Diffstat (limited to 'src')
-rw-r--r--src/engine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 0e64c1ec2..a77d1c313 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -766,7 +766,7 @@ bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company)
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;