Changeset - r23260:a1eebf4e2805
[Not reviewed]
master
0 1 0
Peter Nelson - 6 years ago 2019-02-02 15:12:33
peter1138@openttd.org
Fix: DMU/EMU livery should apply to passenger carriages with DMU/EMU engines.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -1810,17 +1810,18 @@ LiveryScheme GetEngineLiveryScheme(Engin
 
			if (cargo_type == CT_INVALID) cargo_type = CT_GOODS; // The vehicle does not carry anything, let's pick some freight cargo
 
			if (e->u.rail.railveh_type == RAILVEH_WAGON) {
 
				if (!CargoSpec::Get(cargo_type)->is_freight) {
 
					if (parent_engine_type == INVALID_ENGINE) {
 
						return LS_PASSENGER_WAGON_STEAM;
 
					} else {
 
						bool is_mu = HasBit(EngInfo(parent_engine_type)->misc_flags, EF_RAIL_IS_MU);
 
						switch (RailVehInfo(parent_engine_type)->engclass) {
 
							default: NOT_REACHED();
 
							case EC_STEAM:    return LS_PASSENGER_WAGON_STEAM;
 
							case EC_DIESEL:   return LS_PASSENGER_WAGON_DIESEL;
 
							case EC_ELECTRIC: return LS_PASSENGER_WAGON_ELECTRIC;
 
							case EC_DIESEL:   return is_mu ? LS_DMU : LS_PASSENGER_WAGON_DIESEL;
 
							case EC_ELECTRIC: return is_mu ? LS_EMU : LS_PASSENGER_WAGON_ELECTRIC;
 
							case EC_MONORAIL: return LS_PASSENGER_WAGON_MONORAIL;
 
							case EC_MAGLEV:   return LS_PASSENGER_WAGON_MAGLEV;
 
						}
 
					}
 
				} else {
 
					return LS_FREIGHT_WAGON;
0 comments (0 inline, 0 general)