mirror of https://github.com/OpenTTD/OpenTTD
(svn r16287) -Fix: fix possible (in theory) desync related to autorenew settings
parent
095a30efb0
commit
90ba8e1bc8
|
@ -445,13 +445,6 @@ Company *DoStartupNewCompany(bool is_ai)
|
||||||
c->inaugurated_year = _cur_year;
|
c->inaugurated_year = _cur_year;
|
||||||
RandomCompanyManagerFaceBits(c->face, (GenderEthnicity)Random(), false); // create a random company manager face
|
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);
|
GeneratePresidentName(c);
|
||||||
|
|
||||||
InvalidateWindow(WC_GRAPH_LEGEND, 0);
|
InvalidateWindow(WC_GRAPH_LEGEND, 0);
|
||||||
|
|
|
@ -754,6 +754,11 @@ static void MakeNewGameDone()
|
||||||
/* Create a single company */
|
/* Create a single company */
|
||||||
DoStartupNewCompany(false);
|
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");
|
IConsoleCmdExec("exec scripts/game_start.scr 0");
|
||||||
|
|
||||||
SetLocalCompany(COMPANY_FIRST);
|
SetLocalCompany(COMPANY_FIRST);
|
||||||
|
|
Loading…
Reference in New Issue