File diff r14125:3ee08ca0423e → r14126:f23988064e74
src/economy.cpp
Show inline comments
 
@@ -301,13 +301,13 @@ void ChangeOwnershipOfCompanyItems(Owner
 
		_current_company = old_owner;
 
		FOR_ALL_COMPANIES(c) {
 
			for (i = 0; i < 4; i++) {
 
				if (c->share_owners[i] == old_owner) {
 
					/* Sell his shares */
 
					CommandCost res = DoCommand(0, c->index, 0, DC_EXEC, CMD_SELL_SHARE_IN_COMPANY);
 
					/* Because we are in a DoCommand, we can't just execute an other one and
 
					/* Because we are in a DoCommand, we can't just execute another one and
 
					 *  expect the money to be removed. We need to do it ourself! */
 
					SubtractMoneyFromCompany(res);
 
				}
 
			}
 
		}
 

	
 
@@ -315,13 +315,13 @@ void ChangeOwnershipOfCompanyItems(Owner
 
		c = Company::Get(old_owner);
 
		for (i = 0; i < 4; i++) {
 
			_current_company = c->share_owners[i];
 
			if (_current_company != INVALID_OWNER) {
 
				/* Sell the shares */
 
				CommandCost res = DoCommand(0, old_owner, 0, DC_EXEC, CMD_SELL_SHARE_IN_COMPANY);
 
				/* Because we are in a DoCommand, we can't just execute an other one and
 
				/* Because we are in a DoCommand, we can't just execute another one and
 
				 *  expect the money to be removed. We need to do it ourself! */
 
				SubtractMoneyFromCompany(res);
 
			}
 
		}
 
	}