From 9a45a0f535e312cd97db12c3a2ec1068fa381136 Mon Sep 17 00:00:00 2001 From: Pavel Stupnikov Date: Tue, 22 Dec 2020 16:29:48 +0300 Subject: Feature: Set exclusive access to industry from GS (#8115) --- src/saveload/afterload.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/saveload/afterload.cpp') diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 7d1e70212..c617348d7 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -3125,6 +3125,14 @@ bool AfterLoadGame() } } + /* Make sure all industries exclusive supplier/consumer set correctly. */ + if (IsSavegameVersionBefore(SLV_GS_INDUSTRY_CONTROL)) { + for (Industry *i : Industry::Iterate()) { + i->exclusive_supplier = INVALID_OWNER; + i->exclusive_consumer = INVALID_OWNER; + } + } + /* Compute station catchment areas. This is needed here in case UpdateStationAcceptance is called below. */ Station::RecomputeCatchmentForAll(); -- cgit v1.2.3-54-g00ecf