diff options
author | yexo <yexo@openttd.org> | 2009-05-16 00:16:43 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-05-16 00:16:43 +0000 |
commit | c299a38e1f33464fd8c521915bc2391623b56971 (patch) | |
tree | f0ed796a3f17d90fe27429810dde473b08f32ffc | |
parent | 31eff1d4c30803e09083320886630da8b28690d1 (diff) | |
download | openttd-c299a38e1f33464fd8c521915bc2391623b56971.tar.xz |
(svn r16316) -Fix (r16287,before): Set the autorenew settings for new AI companies to the default values, not to 0 or the local settings
-rw-r--r-- | bin/ai/regression/regression.txt | 2 | ||||
-rw-r--r-- | src/company_cmd.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/bin/ai/regression/regression.txt b/bin/ai/regression/regression.txt index 2f5613f3b..d19c93605 100644 --- a/bin/ai/regression/regression.txt +++ b/bin/ai/regression/regression.txt @@ -1072,7 +1072,7 @@ GetAutoRenewStatus(); true SetAutoRenewStatus(true); false SetAutoRenewStatus(false); true - GetAutoRenewMonths(); -6 + GetAutoRenewMonths(); 6 SetAutoRenewMonths(-12); true GetAutoRenewMonths(); -12 SetAutoRenewMonths(-12); false diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 77e8ddeb3..0fab4b840 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -443,6 +443,12 @@ Company *DoStartupNewCompany(bool is_ai) c->inaugurated_year = _cur_year; RandomCompanyManagerFaceBits(c->face, (GenderEthnicity)Random(), false); // create a random company manager face + /* Settings for non-ai companies are copied from the client settings later. */ + if (is_ai) { + c->settings.engine_renew_money = 100000; + c->settings.engine_renew_months = 6; + } + GeneratePresidentName(c); InvalidateWindow(WC_GRAPH_LEGEND, 0); |