diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:34 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:34 +0000 |
commit | 9359c6fc47f6fabddc399d044ea74dc6ebfdfb05 (patch) | |
tree | 0e29635b5f349432059dc99b36df10aac24981f8 /src/engine.cpp | |
parent | 436cf09923d881f3c11c8a4b6262c0a89ad1ee73 (diff) | |
download | openttd-9359c6fc47f6fabddc399d044ea74dc6ebfdfb05.tar.xz |
(svn r23615) -Add: more API functions exposed to NoGo (part 2)
Diffstat (limited to 'src/engine.cpp')
-rw-r--r-- | src/engine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine.cpp b/src/engine.cpp index 33e9bdd7e..5fc32714c 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -996,11 +996,11 @@ bool IsEngineBuildable(EngineID engine, VehicleType type, CompanyID company) if (e->type != type) return false; /* check if it's available */ - if (!HasBit(e->company_avail, company)) return false; + if (company != OWNER_DEITY && !HasBit(e->company_avail, company)) return false; if (!e->IsEnabled()) return false; - if (type == VEH_TRAIN) { + if (type == VEH_TRAIN && company != OWNER_DEITY) { /* Check if the rail type is available to this company */ const Company *c = Company::Get(company); if (((GetRailTypeInfo(e->u.rail.railtype))->compatible_railtypes & c->avail_railtypes) == 0) return false; |