From 69b2ca99831d1d5cc5f83b745dda3228b0839cc2 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 1 Sep 2023 23:22:41 +0100 Subject: [PATCH] Fix da35e7bb: Wrong engine ID in Vehicle::NeedsServicing() --- src/vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 44a561c2db..f0ac91dfb1 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -293,7 +293,7 @@ bool Vehicle::NeedsServicing() const CargoID cargo_type; CargoTypes cargo_mask = GetCargoTypesOfArticulatedVehicle(v, &cargo_type); 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) { /* We cannot refit to mixed cargoes in an automated way */ continue;