From e059a88533ac463d802f14c4a25d6c1c69d1c8ea Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Thu, 18 Feb 2021 09:50:33 +0000 Subject: [PATCH] Fix: Autorenew failure advice due to bad refit being shown to all companies (#8681) --- src/autoreplace_cmd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index 5785968cf0..b723380219 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -319,6 +319,8 @@ static CommandCost BuildReplacementVehicle(Vehicle *old_veh, Vehicle **new_vehic /* Does it need to be refitted */ CargoID refit_cargo = GetNewCargoTypeForReplace(old_veh, e, part_of_chain); if (refit_cargo == CT_INVALID) { + if (!IsLocalCompany()) return CommandCost(); + SetDParam(0, old_veh->index); int order_id = GetIncompatibleRefitOrderIdForAutoreplace(old_veh, e);