diff options
author | Pavel Stupnikov <dp@dpointer.org> | 2020-12-22 16:29:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 14:29:48 +0100 |
commit | 9a45a0f535e312cd97db12c3a2ec1068fa381136 (patch) | |
tree | eb4f235933ea178c370c04c9b12cd00b005f4644 /src/saveload/afterload.cpp | |
parent | b7751c483e5545aa683baf0b9f09a0add34cfefd (diff) | |
download | openttd-9a45a0f535e312cd97db12c3a2ec1068fa381136.tar.xz |
Feature: Set exclusive access to industry from GS (#8115)
Diffstat (limited to 'src/saveload/afterload.cpp')
-rw-r--r-- | src/saveload/afterload.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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(); |