summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-09-11 11:47:18 +0000
committeryexo <yexo@openttd.org>2011-09-11 11:47:18 +0000
commit40d5419cd209cd84e2ff28a0585bc4ec44688981 (patch)
tree8e6481ace71e161a28ac8148fff330b00f9aa6f4 /src/ai
parent07077dc56ea335a8521bfb1953b5a883bd1d507d (diff)
downloadopenttd-40d5419cd209cd84e2ff28a0585bc4ec44688981.tar.xz
(svn r22920) -Cleanup: replace two very old town variables taht were rarely used by small functions that compute there value on-the-fly when necessary
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_town.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp
index 6ad9401de..51dbc37c5 100644
--- a/src/ai/api/ai_town.cpp
+++ b/src/ai/api/ai_town.cpp
@@ -99,8 +99,8 @@
const Town *t = ::Town::Get(town_id);
switch (AICargo::GetTownEffect(cargo_id)) {
- case AICargo::TE_PASSENGERS: return ::ToPercent8(t->pct_pass_transported);
- case AICargo::TE_MAIL: return ::ToPercent8(t->pct_mail_transported);
+ case AICargo::TE_PASSENGERS: return ::ToPercent8(t->GetPercentPassTransported());
+ case AICargo::TE_MAIL: return ::ToPercent8(t->GetPercentMailTransported());
default: return -1;
}
}