From 5fdc69194ec63ee301403afef4d4bd1edafe81c9 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 5 Jun 2006 15:47:08 +0000 Subject: [PATCH] (svn r5129) Accommodate the default AI for the new railtype: It used hard coded numbers instead of enums to calculate prices --- ai/default/default.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ai/default/default.c b/ai/default/default.c index 50b2b7fc74..c71b0b1cd1 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;