File diff r12404:d58b2d050240 → r12405:ba094e765533
src/vehicle.cpp
Show inline comments
 
@@ -1281,25 +1281,25 @@ const Livery *GetEngineLivery(EngineID e
 
				if (v != NULL && parent_engine_type != INVALID_ENGINE && (UsesWagonOverride(v) || (Train::From(v)->IsArticulatedPart() && rvi->railveh_type != RAILVEH_WAGON))) {
 
					/* Wagonoverrides use the coloir scheme of the front engine.
 
					 * Articulated parts use the colour scheme of the first part. (Not supported for articulated wagons) */
 
					engine_type = parent_engine_type;
 
					e = Engine::Get(engine_type);
 
					rvi = RailVehInfo(engine_type);
 
					/* Note: Luckily cargo_type is not needed for engines */
 
				}
 

	
 
				if (cargo_type == CT_INVALID) cargo_type = e->GetDefaultCargoType();
 
				if (cargo_type == CT_INVALID) cargo_type = CT_GOODS; // The vehicle does not carry anything, let's pick some freight cargo
 
				if (rvi->railveh_type == RAILVEH_WAGON) {
 
					if (!GetCargo(cargo_type)->is_freight) {
 
					if (!CargoSpec::Get(cargo_type)->is_freight) {
 
						if (parent_engine_type == INVALID_ENGINE) {
 
							scheme = LS_PASSENGER_WAGON_STEAM;
 
						} else {
 
							switch (RailVehInfo(parent_engine_type)->engclass) {
 
								default: NOT_REACHED();
 
								case EC_STEAM:    scheme = LS_PASSENGER_WAGON_STEAM;    break;
 
								case EC_DIESEL:   scheme = LS_PASSENGER_WAGON_DIESEL;   break;
 
								case EC_ELECTRIC: scheme = LS_PASSENGER_WAGON_ELECTRIC; break;
 
								case EC_MONORAIL: scheme = LS_PASSENGER_WAGON_MONORAIL; break;
 
								case EC_MAGLEV:   scheme = LS_PASSENGER_WAGON_MAGLEV;   break;
 
							}
 
						}