summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-18 19:54:35 +0000
committersmatz <smatz@openttd.org>2009-07-18 19:54:35 +0000
commitaf13707e0085ff0b273a1f1577c4e1855dedfbe1 (patch)
tree23f18152ec75a44d0ba7074cb092c18979a24c09 /src/ai
parent3fcfb9b248bd228d5885974858a14724205626ad (diff)
downloadopenttd-af13707e0085ff0b273a1f1577c4e1855dedfbe1.tar.xz
(svn r16877) -Codechange: use Subsidy::IsAwarded() instead of testing subsidy's age
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_subsidy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_subsidy.cpp b/src/ai/api/ai_subsidy.cpp
index de7616367..6e43982c3 100644
--- a/src/ai/api/ai_subsidy.cpp
+++ b/src/ai/api/ai_subsidy.cpp
@@ -17,7 +17,7 @@
{
if (!IsValidSubsidy(subsidy_id)) return false;
- return Subsidy::Get(subsidy_id)->age >= 12;
+ return Subsidy::Get(subsidy_id)->IsAwarded();
}
/* static */ AICompany::CompanyID AISubsidy::GetAwardedTo(SubsidyID subsidy_id)