diff options
author | tron <tron@openttd.org> | 2006-06-05 15:47:08 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-05 15:47:08 +0000 |
commit | 3e696786bb2790fd83aa8b233bdb971159ece03c (patch) | |
tree | 5bff7adfd16652a61f61fe13ea101896c9e14b14 /ai | |
parent | edfd4e63e1d0746c0b2f5fee4612a93c3546ee82 (diff) | |
download | openttd-3e696786bb2790fd83aa8b233bdb971159ece03c.tar.xz |
(svn r5129) Accommodate the default AI for the new railtype: It used hard coded numbers instead of enums to calculate prices
Diffstat (limited to 'ai')
-rw-r--r-- | ai/default/default.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ai/default/default.c b/ai/default/default.c index 50b2b7fc7..c71b0b1cd 100644 --- a/ai/default/default.c +++ b/ai/default/default.c @@ -220,8 +220,11 @@ static int32 AiGetBasePrice(Player *p) // adjust base price when more expensive vehicles are available switch (p->ai.railtype_to_use) { - case 1: base = (base * 3) >> 1; break; - case 2: base *= 2; break; + default: NOT_REACHED(); + case RAILTYPE_RAIL: break; + case RAILTYPE_ELECTRIC: break; + case RAILTYPE_MONO: base = (base * 3) >> 1; break; + case RAILTYPE_MAGLEV: base *= 2; break; } return base; |