summaryrefslogtreecommitdiff
path: root/src/players.cpp
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-01-24 07:14:09 +0000
committertron <tron@openttd.org>2007-01-24 07:14:09 +0000
commit0996de79df839647968838498d1953319705606d (patch)
treee2918d49dec3bdc87eab67e767fcb414e9cc04c2 /src/players.cpp
parente2f72cbf1ff97f1b0eab68614ac730fe8cd47b73 (diff)
downloadopenttd-0996de79df839647968838498d1953319705606d.tar.xz
(svn r8385) -Fix
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
Diffstat (limited to 'src/players.cpp')
-rw-r--r--src/players.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/players.cpp b/src/players.cpp
index 9cf74ae70..b306a0632 100644
--- a/src/players.cpp
+++ b/src/players.cpp
@@ -653,10 +653,13 @@ byte GetPlayerRailtypes(PlayerID p)
const EngineInfo *ei = EngInfo(i);
if (e->type == VEH_Train && HASBIT(ei->climates, _opt.landscape) &&
- (HASBIT(e->player_avail, p) || _date >= (e->intro_date + 365)) &&
- !(RailVehInfo(i)->flags & RVI_WAGON)) {
- assert(e->railtype < RAILTYPE_END);
- SETBIT(rt, e->railtype);
+ (HASBIT(e->player_avail, p) || _date >= e->intro_date + 365)) {
+ const RailVehicleInfo *rvi = RailVehInfo(i);
+
+ if (!(rvi->flags & RVI_WAGON)) {
+ assert(rvi->railtype < RAILTYPE_END);
+ SETBIT(rt, rvi->railtype);
+ }
}
}