changeset 11914:08d3a74525b2 draft

(svn r16316) -Fix (r16287,before): Set the autorenew settings for new AI companies to the default values, not to 0 or the local settings
author yexo <yexo@openttd.org>
date Sat, 16 May 2009 00:16:43 +0000
parents f67b6243e05a
children 20396e959084
files bin/ai/regression/regression.txt src/company_cmd.cpp
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -443,6 +443,12 @@
 	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);