(svn r8385) -Fix

-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
This commit is contained in:
tron
2007-01-24 07:14:09 +00:00
parent 4dd0d007b1
commit 7fffe8b3d4
13 changed files with 66 additions and 72 deletions

View File

@@ -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;