summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-03-18 22:11:24 +0000
committerpeter1138 <peter1138@openttd.org>2007-03-18 22:11:24 +0000
commit8ef0e43b940e216fff47b6914a79bc1d8c290fc3 (patch)
tree9f739a5459bdb64f7c22ed3403c6418474b3cb93 /src
parente485b8f694fa95d2d88e91b1c81e28ce332e361c (diff)
downloadopenttd-8ef0e43b940e216fff47b6914a79bc1d8c290fc3.tar.xz
(svn r9302) -Codechange: Use cargo class to test for passengers when deciding on the livery scheme to use.
Diffstat (limited to 'src')
-rw-r--r--src/vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 79f12dfea..3ab08b31a 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2508,14 +2508,14 @@ static SpriteID GetEngineColourMap(EngineID engine_type, PlayerID player, Engine
case VEH_ROAD: {
const RoadVehicleInfo *rvi = RoadVehInfo(engine_type);
if (cargo_type == CT_INVALID) cargo_type = rvi->cargo_type;
- scheme = (cargo_type == CT_PASSENGERS) ? LS_BUS : LS_TRUCK;
+ scheme = IsCargoInClass(cargo_type, CC_PASSENGERS) ? LS_BUS : LS_TRUCK;
break;
}
case VEH_SHIP: {
const ShipVehicleInfo *svi = ShipVehInfo(engine_type);
if (cargo_type == CT_INVALID) cargo_type = svi->cargo_type;
- scheme = (cargo_type == CT_PASSENGERS) ? LS_PASSENGER_SHIP : LS_FREIGHT_SHIP;
+ scheme = IsCargoInClass(cargo_type, CC_PASSENGERS) ? LS_PASSENGER_SHIP : LS_FREIGHT_SHIP;
break;
}