diff options
author | peter1138 <peter1138@openttd.org> | 2007-05-27 09:33:41 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-05-27 09:33:41 +0000 |
commit | 7273802f0cfa18e9b4e60b714c1520b1df54e6c4 (patch) | |
tree | 03a243592bfcf5d9bd3ccc466a406d39d43af054 /src/vehicle.cpp | |
parent | 4f6ffd4e12543cefda3c9708cc3a766bf5c45184 (diff) | |
download | openttd-7273802f0cfa18e9b4e60b714c1520b1df54e6c4.tar.xz |
(svn r9956) -Codechange: Add tram livery schemes
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index a0de1e47c..a8b51ece0 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2520,7 +2520,13 @@ const Livery *GetEngineLivery(EngineID engine_type, PlayerID player, EngineID pa case VEH_ROAD: { const RoadVehicleInfo *rvi = RoadVehInfo(engine_type); if (cargo_type == CT_INVALID) cargo_type = rvi->cargo_type; - scheme = IsCargoInClass(cargo_type, CC_PASSENGERS) ? LS_BUS : LS_TRUCK; + if (HASBIT(EngInfo(engine_type)->misc_flags, EF_ROAD_TRAM)) { + /* Tram */ + scheme = IsCargoInClass(cargo_type, CC_PASSENGERS) ? LS_PASSENGER_TRAM : LS_FREIGHT_TRAM; + } else { + /* Bus or truck */ + scheme = IsCargoInClass(cargo_type, CC_PASSENGERS) ? LS_BUS : LS_TRUCK; + } break; } |