Changeset - r17822:2216a89739e6
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-07-02 19:07:47
frosch@openttd.org
(svn r22623) -Cleanup: DoAcquireCompany() does not need to sell shares, ChangeOwnershipOfCompanyItems() already does that and it does it better.
1 file changed with 0 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/economy.cpp
Show inline comments
 
@@ -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);
0 comments (0 inline, 0 general)