diff options
author | michi_cc <michi_cc@openttd.org> | 2011-11-15 20:47:53 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2011-11-15 20:47:53 +0000 |
commit | 6548ec6e9ecf0f6d608d0b738213f62b1ce6e584 (patch) | |
tree | d8e94705bf49526712eda2cc81588d9b5fac8ee3 /src/ai/api | |
parent | 88aaeb4092e563f9e894608fc27d507d4693f188 (diff) | |
download | openttd-6548ec6e9ecf0f6d608d0b738213f62b1ce6e584.tar.xz |
(svn r23233) -Codechange: Refactor maximum and actually transported cargo amount of towns into a reusable struct.
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_town.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/api/ai_town.cpp b/src/ai/api/ai_town.cpp index 51dbc37c5..e78d7dfc7 100644 --- a/src/ai/api/ai_town.cpp +++ b/src/ai/api/ai_town.cpp @@ -71,8 +71,8 @@ const Town *t = ::Town::Get(town_id); switch (AICargo::GetTownEffect(cargo_id)) { - case AICargo::TE_PASSENGERS: return t->max_pass; - case AICargo::TE_MAIL: return t->max_mail; + case AICargo::TE_PASSENGERS: return t->pass.old_max; + case AICargo::TE_MAIL: return t->mail.old_max; default: return -1; } } @@ -85,8 +85,8 @@ const Town *t = ::Town::Get(town_id); switch (AICargo::GetTownEffect(cargo_id)) { - case AICargo::TE_PASSENGERS: return t->act_pass; - case AICargo::TE_MAIL: return t->act_mail; + case AICargo::TE_PASSENGERS: return t->pass.old_act; + case AICargo::TE_MAIL: return t->mail.old_act; default: return -1; } } |