Remove: buying/selling/owning company shares (#10709)

This commit is contained in:
Patric Stout
2023-04-29 10:16:49 +02:00
committed by GitHub
parent 1a24016964
commit 36a0818bc5
19 changed files with 10 additions and 319 deletions

View File

@@ -1775,21 +1775,6 @@ bool AfterLoadGame()
}
}
if (IsSavegameVersionBefore(SLV_84)) {
/* Set all share owners to INVALID_COMPANY for
* 1) all inactive companies
* (when inactive companies were stored in the savegame - TTD, TTDP and some
* *really* old revisions of OTTD; else it is already set in InitializeCompanies())
* 2) shares that are owned by inactive companies or self
* (caused by cheating clients in earlier revisions) */
for (Company *c : Company::Iterate()) {
for (auto &share_owner : c->share_owners) {
if (share_owner == INVALID_COMPANY) continue;
if (!Company::IsValidID(share_owner) || share_owner == c->index) share_owner = INVALID_COMPANY;
}
}
}
/* The water class was moved/unified. */
if (IsSavegameVersionBefore(SLV_146)) {
for (auto t : Map::Iterate()) {