1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

(svn r22623) -Cleanup: DoAcquireCompany() does not need to sell shares, ChangeOwnershipOfCompanyItems() already does that and it does it better.

This commit is contained in:
frosch
2011-07-02 19:07:47 +00:00
parent a3ede3cea1
commit 0b33df7a8f

View File

@@ -1511,16 +1511,6 @@ static void DoAcquireCompany(Company *c)
owner->current_loan += c->current_loan;
}
Money value = CalculateCompanyValue(c) >> 2;
Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
for (int i = 0; i != 4; i++) {
if (c->share_owners[i] != COMPANY_SPECTATOR) {
cur_company.Change(c->share_owners[i]);
SubtractMoneyFromCompany(CommandCost(EXPENSES_OTHER, -value));
}
}
cur_company.Restore();
if (c->is_ai) AI::Stop(c->index);
DeleteCompanyWindows(ci);