diff options
author | tron <tron@openttd.org> | 2007-01-21 16:08:18 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-01-21 16:08:18 +0000 |
commit | bc523186e0f67d15d3ddaa509c3dc93682d32565 (patch) | |
tree | 62b971a1827e32a4c7c4c5d5c4b6ffac8ec5e910 /src/vehicle.cpp | |
parent | 9e9d5905f3a6bd41cca2529a2f46e12610f07847 (diff) | |
download | openttd-bc523186e0f67d15d3ddaa509c3dc93682d32565.tar.xz |
(svn r8314) -Fix
-Codechange: Move the railtype from EngineInfo to RailVehicleInfo, because having a railtype for non-rail vehicles isn't that useful
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 10b68855d..8dc645314 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2843,12 +2843,12 @@ static SpriteID GetEngineColourMap(EngineID engine_type, PlayerID player, Engine /* Determine the livery scheme to use */ switch (GetEngine(engine_type)->type) { case VEH_Train: { - switch (_engine_info[engine_type].railtype) { + const RailVehicleInfo *rvi = RailVehInfo(engine_type); + + switch (rvi->railtype) { case RAILTYPE_RAIL: case RAILTYPE_ELECTRIC: { - const RailVehicleInfo *rvi = RailVehInfo(engine_type); - if (cargo_type == CT_INVALID) cargo_type = rvi->cargo_type; if (rvi->flags & RVI_WAGON) { if (cargo_type == CT_PASSENGERS || cargo_type == CT_MAIL || cargo_type == CT_VALUABLES) { |