Fix da35e7bb: Wrong engine ID in Vehicle::NeedsServicing()

This commit is contained in:
Jonathan G Rennison
2023-09-01 23:22:41 +01:00
parent da35e7bb35
commit 69b2ca9983

View File

@@ -293,7 +293,7 @@ bool Vehicle::NeedsServicing() const
CargoID cargo_type; CargoID cargo_type;
CargoTypes cargo_mask = GetCargoTypesOfArticulatedVehicle(v, &cargo_type); CargoTypes cargo_mask = GetCargoTypesOfArticulatedVehicle(v, &cargo_type);
if (!HasAtMostOneBit(cargo_mask)) { if (!HasAtMostOneBit(cargo_mask)) {
CargoTypes new_engine_default_cargoes = GetCargoTypesOfArticulatedParts(engine_type); CargoTypes new_engine_default_cargoes = GetCargoTypesOfArticulatedParts(new_engine);
if ((cargo_mask & new_engine_default_cargoes) != cargo_mask) { if ((cargo_mask & new_engine_default_cargoes) != cargo_mask) {
/* We cannot refit to mixed cargoes in an automated way */ /* We cannot refit to mixed cargoes in an automated way */
continue; continue;