mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-23 15:44:43 +00:00
(svn r5129) Accommodate the default AI for the new railtype: It used hard coded numbers instead of enums to calculate prices
This commit is contained in:
parent
32bf3c7c1c
commit
5fdc69194e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user