Changeset - r11909:ed0a218be8e2
[Not reviewed]
master
0 2 0
yexo - 15 years ago 2009-05-16 00:16:43
yexo@openttd.org
(svn r16316) -Fix (r16287,before): Set the autorenew settings for new AI companies to the default values, not to 0 or the local settings
2 files changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin/ai/regression/regression.txt
Show inline comments
 
@@ -1069,13 +1069,13 @@
 
  GetLastErrorString():        ERR_AREA_NOT_CLEAR
 
  GetAutoRenewStatus();        false
 
  SetAutoRenewStatus(true);    true
 
  GetAutoRenewStatus();        true
 
  SetAutoRenewStatus(true);    false
 
  SetAutoRenewStatus(false);   true
 
  GetAutoRenewMonths();        -6
 
  GetAutoRenewMonths();        6
 
  SetAutoRenewMonths(-12);     true
 
  GetAutoRenewMonths();        -12
 
  SetAutoRenewMonths(-12);     false
 
  SetAutoRenewMonths(6);       true
 
  GetAutoRenewMoney();         100000
 
  SetAutoRenewMoney(200000);   true
src/company_cmd.cpp
Show inline comments
 
@@ -440,12 +440,18 @@ Company *DoStartupNewCompany(bool is_ai)
 

	
 
	c->avail_railtypes = GetCompanyRailtypes(c->index);
 
	c->avail_roadtypes = GetCompanyRoadtypes(c->index);
 
	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);
 
	InvalidateWindow(WC_TOOLBAR_MENU, 0);
 
	InvalidateWindow(WC_CLIENT_LIST, 0);
 

	
0 comments (0 inline, 0 general)