diff options
author | yexo <yexo@openttd.org> | 2009-05-15 23:55:06 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-05-15 23:55:06 +0000 |
commit | 31eff1d4c30803e09083320886630da8b28690d1 (patch) | |
tree | b8c0c563425389a5e9514760bb5e1cc9cf0013c1 /src/ai | |
parent | aea2fcd0a09fa47caf022934ba8029ec327906f7 (diff) | |
download | openttd-31eff1d4c30803e09083320886630da8b28690d1.tar.xz |
(svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/api/ai_company.cpp | 6 | ||||
-rw-r--r-- | src/ai/api/ai_group.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/api/ai_company.cpp b/src/ai/api/ai_company.cpp index 32e13caef..89ad2d728 100644 --- a/src/ai/api/ai_company.cpp +++ b/src/ai/api/ai_company.cpp @@ -156,7 +156,7 @@ company = ResolveCompanyID(company); if (company == COMPANY_INVALID) return false; - return ::GetCompany((CompanyID)company)->engine_renew; + return ::GetCompany((CompanyID)company)->settings.engine_renew; } /* static */ bool AICompany::SetAutoRenewMonths(int16 months) @@ -169,7 +169,7 @@ company = ResolveCompanyID(company); if (company == COMPANY_INVALID) return 0; - return ::GetCompany((CompanyID)company)->engine_renew_months; + return ::GetCompany((CompanyID)company)->settings.engine_renew_months; } /* static */ bool AICompany::SetAutoRenewMoney(uint32 money) @@ -182,5 +182,5 @@ company = ResolveCompanyID(company); if (company == COMPANY_INVALID) return 0; - return ::GetCompany((CompanyID)company)->engine_renew_money; + return ::GetCompany((CompanyID)company)->settings.engine_renew_money; } diff --git a/src/ai/api/ai_group.cpp b/src/ai/api/ai_group.cpp index 23846d815..71df52a43 100644 --- a/src/ai/api/ai_group.cpp +++ b/src/ai/api/ai_group.cpp @@ -100,7 +100,7 @@ /* static */ bool AIGroup::HasWagonRemoval() { - return ::GetCompany(_current_company)->renew_keep_length; + return ::GetCompany(_current_company)->settings.renew_keep_length; } /* static */ bool AIGroup::SetAutoReplace(GroupID group_id, EngineID engine_id_old, EngineID engine_id_new) |