summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-12-24 00:25:17 +0000
committersmatz <smatz@openttd.org>2008-12-24 00:25:17 +0000
commit5b26afbd6b0446373a9f21ec80ee8bac82c11f0b (patch)
treef0aba5948b2117aec30d9cc96066e742cfcdc029 /src
parent4a1f4144ebc0b94bd7ef138ce557bfbcaf2a9818 (diff)
downloadopenttd-5b26afbd6b0446373a9f21ec80ee8bac82c11f0b.tar.xz
(svn r14734) -Codechange: type of bankrupt_asked is CompanyMask, not byte
Diffstat (limited to 'src')
-rw-r--r--src/ai/default/default.cpp6
-rw-r--r--src/company_base.h2
-rw-r--r--src/economy.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index dc9ad189a..8e5f4a069 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -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;
}
diff --git a/src/company_base.h b/src/company_base.h
index 96603ca7b..665cfe08a 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -65,7 +65,7 @@ struct Company : PoolItem<Company, CompanyByte, &_Company_pool> {
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;
diff --git a/src/economy.cpp b/src/economy.cpp
index 95225c077..cccbf0b93 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -564,7 +564,7 @@ static void CompanyCheckBankrupt(Company *c)
* 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;
}