summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-01-24 15:31:48 +0000
committersmatz <smatz@openttd.org>2009-01-24 15:31:48 +0000
commitadb5eac77ecb6a7c465a60609c0d044eb90ed4c5 (patch)
tree61434313b15bb5c1cbffbade5814f8394c3acc30 /src
parent865492592352743a57c594b4890859b06cfe1961 (diff)
downloadopenttd-adb5eac77ecb6a7c465a60609c0d044eb90ed4c5.tar.xz
(svn r15257) -Cleanup: remove Company::is_noai, it is not needed anymore
Diffstat (limited to 'src')
-rw-r--r--src/company_base.h1
-rw-r--r--src/company_cmd.cpp3
-rw-r--r--src/saveload/company_sl.cpp5
3 files changed, 3 insertions, 6 deletions
diff --git a/src/company_base.h b/src/company_base.h
index 9f2c3c61a..719141a07 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -70,7 +70,6 @@ struct Company : PoolItem<Company, CompanyByte, &_Company_pool> {
Money bankrupt_value;
bool is_ai;
- bool is_noai; ///< This is a NoAI player (for loading old savegames properly)
class AIInstance *ai_instance;
class AIInfo *ai_info;
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 614dbdb18..b40e3a5ea 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -51,8 +51,7 @@ DEFINE_OLD_POOL_GENERIC(Company, Company)
Company::Company(uint16 name_1, bool is_ai) :
name_1(name_1),
location_of_HQ(INVALID_TILE),
- is_ai(is_ai),
- is_noai(false)
+ is_ai(is_ai)
{
for (uint j = 0; j < 4; j++) this->share_owners[j] = COMPANY_SPECTATOR;
}
diff --git a/src/saveload/company_sl.cpp b/src/saveload/company_sl.cpp
index c53b4a5df..8231e9f3d 100644
--- a/src/saveload/company_sl.cpp
+++ b/src/saveload/company_sl.cpp
@@ -130,7 +130,7 @@ static const SaveLoad _company_desc[] = {
SLE_CONDARR(Company, yearly_expenses, SLE_INT64, 3 * 13, 2, SL_MAX_VERSION),
SLE_CONDVAR(Company, is_ai, SLE_BOOL, 2, SL_MAX_VERSION),
- SLE_CONDVAR(Company, is_noai, SLE_BOOL, 107, SL_MAX_VERSION),
+ SLE_CONDNULL(1, 107, 111), ///< is_noai
SLE_CONDNULL(1, 4, 99),
/* Engine renewal settings */
@@ -221,7 +221,7 @@ static void SaveLoad_PLYR(Company *c)
SlObject(c, _company_desc);
/* Keep backwards compatible for savegames, so load the old AI block */
- if (CheckSavegameVersion(107) && !IsHumanCompany(c->index) && !c->is_noai) {
+ if (CheckSavegameVersion(107) && !IsHumanCompany(c->index)) {
CompanyOldAI old_ai;
char nothing;
@@ -275,7 +275,6 @@ static void Load_PLYR()
Company *c = new (index) Company();
SaveLoad_PLYR(c);
_company_colours[index] = c->colour;
- c->is_noai = true;
}
}