Mercurial > hg > openttd
changeset 11887:f0409562d9e2 draft
(svn r16287) -Fix: fix possible (in theory) desync related to autorenew settings
author | yexo <yexo@openttd.org> |
---|---|
date | Tue, 12 May 2009 22:32:22 +0000 |
parents | d2b0ae6a0c72 |
children | e9b0ac8343f1 |
files | src/company_cmd.cpp src/openttd.cpp |
diffstat | 2 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -445,13 +445,6 @@ c->inaugurated_year = _cur_year; RandomCompanyManagerFaceBits(c->face, (GenderEthnicity)Random(), false); // create a random company manager face - /* Engine renewal settings */ - c->engine_renew_list = NULL; - c->renew_keep_length = false; - c->engine_renew = _settings_client.gui.autorenew; - c->engine_renew_months = _settings_client.gui.autorenew_months; - c->engine_renew_money = _settings_client.gui.autorenew_money; - GeneratePresidentName(c); InvalidateWindow(WC_GRAPH_LEGEND, 0);
--- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -754,6 +754,11 @@ /* Create a single company */ DoStartupNewCompany(false); + Company *c = GetCompany(COMPANY_FIRST); + c->engine_renew = _settings_client.gui.autorenew; + c->engine_renew_months = _settings_client.gui.autorenew_months; + c->engine_renew_money = _settings_client.gui.autorenew_money; + IConsoleCmdExec("exec scripts/game_start.scr 0"); SetLocalCompany(COMPANY_FIRST);