diff options
author | rubidium <rubidium@openttd.org> | 2011-01-18 21:28:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-01-18 21:28:07 +0000 |
commit | 6371b75bcc0789d4895e5c157237cbeaf332a99a (patch) | |
tree | 839d8ea502592470cb12a30a64eeb130dc62508a /src/rail.cpp | |
parent | 5f285916100bea2ee28ca3d8680f5bc2c99fa942 (diff) | |
download | openttd-6371b75bcc0789d4895e5c157237cbeaf332a99a.tar.xz |
(svn r21841) -Feature: [NewGRF] Allow to define other railtypes that should be introduced if a particular rail type is introduced, e.g. to make sure slow rail is introduced when fast rail gets introduced
Diffstat (limited to 'src/rail.cpp')
-rw-r--r-- | src/rail.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rail.cpp b/src/rail.cpp index 21ae80661..a2285ef16 100644 --- a/src/rail.cpp +++ b/src/rail.cpp @@ -194,7 +194,7 @@ RailType GetBestRailtype(const CompanyID company) RailTypes GetCompanyRailtypes(CompanyID company) { - RailTypes rt = RAILTYPES_NONE; + RailTypes rts = RAILTYPES_NONE; Engine *e; FOR_ALL_ENGINES_OF_TYPE(e, VEH_TRAIN) { @@ -206,12 +206,12 @@ RailTypes GetCompanyRailtypes(CompanyID company) if (rvi->railveh_type != RAILVEH_WAGON) { assert(rvi->railtype < RAILTYPE_END); - SetBit(rt, rvi->railtype); + rts |= GetRailTypeInfo(rvi->railtype)->introduces_railtypes; } } } - return rt; + return rts; } RailType GetRailTypeByLabel(RailTypeLabel label) |