Changeset - r10479:08b722b708ec
[Not reviewed]
master
0 3 0
smatz - 15 years ago 2008-12-24 00:25:17
smatz@openttd.org
(svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte
3 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/ai/default/default.cpp
Show inline comments
 
@@ -3889,10 +3889,10 @@ static void AiHandleTakeover(Company *c)
 
		if (IsHumanCompany(_current_company)) return;
 
	}
 

	
 
	if (c->bankrupt_asked == 255) return;
 
	if (c->bankrupt_asked == MAX_UVALUE(CompanyMask)) return;
 

	
 
	{
 
		uint asked = c->bankrupt_asked;
 
		CompanyMask asked = c->bankrupt_asked;
 
		Company *company, *best_company = NULL;
 
		int32 best_val = -1;
 

	
 
@@ -3909,7 +3909,7 @@ static void AiHandleTakeover(Company *c)
 

	
 
		// Asked all companies?
 
		if (best_val == -1) {
 
			c->bankrupt_asked = 255;
 
			c->bankrupt_asked = MAX_UVALUE(CompanyMask);
 
			return;
 
		}
 

	
src/company_base.h
Show inline comments
 
@@ -65,7 +65,7 @@ struct Company : PoolItem<Company, Compa
 
	byte num_valid_stat_ent;
 

	
 
	byte quarters_of_bankrupcy;
 
	byte bankrupt_asked; ///< which companies were asked about buying it?
 
	CompanyMask bankrupt_asked; ///< which companies were asked about buying it?
 
	int16 bankrupt_timeout;
 
	Money bankrupt_value;
 

	
src/economy.cpp
Show inline comments
 
@@ -564,7 +564,7 @@ static void CompanyCheckBankrupt(Company
 
				 * is no THE-END, otherwise mark the client as spectator to make sure
 
				 * he/she is no long in control of this company */
 
				if (!_networking) {
 
					c->bankrupt_asked = 0xFF;
 
					c->bankrupt_asked = MAX_UVALUE(CompanyMask);
 
					c->bankrupt_timeout = 0x456;
 
					break;
 
				}
0 comments (0 inline, 0 general)