summaryrefslogtreecommitdiff
path: root/src/ai/default/default.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
commit7fffe8b3d4cc8c75d6ae40c487d4b23fb22b2946 (patch)
treee2918d49dec3bdc87eab67e767fcb414e9cc04c2 /src/ai/default/default.cpp
parent4dd0d007b1cf1f595fba5d690a096e69c7bbca20 (diff)
downloadopenttd-7fffe8b3d4cc8c75d6ae40c487d4b23fb22b2946.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/ai/default/default.cpp')
-rw-r--r--src/ai/default/default.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 63a3ff556..9fc07abd5 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -142,7 +142,7 @@ static EngineID AiChooseTrainToBuild(RailType railtype, int32 money, byte flag,
const RailVehicleInfo *rvi = RailVehInfo(i);
const Engine* e = GetEngine(i);
- if (!IsCompatibleRail(e->railtype, railtype) ||
+ if (!IsCompatibleRail(rvi->railtype, railtype) ||
rvi->flags & RVI_WAGON ||
(rvi->flags & RVI_MULTIHEAD && flag & 1) ||
!HASBIT(e->player_avail, _current_player) ||
@@ -2365,7 +2365,7 @@ static EngineID AiFindBestWagon(CargoID cargo, RailType railtype)
const RailVehicleInfo *rvi = RailVehInfo(i);
const Engine* e = GetEngine(i);
- if (!IsCompatibleRail(e->railtype, railtype) ||
+ if (!IsCompatibleRail(rvi->railtype, railtype) ||
!(rvi->flags & RVI_WAGON) ||
!HASBIT(e->player_avail, _current_player)) {
continue;