diff options
author | yexo <yexo@openttd.org> | 2009-07-29 21:48:19 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-07-29 21:48:19 +0000 |
commit | 30a1f1416a868914cc98c03720f4dd80d96dbcd2 (patch) | |
tree | a4132b248d0420fff8c33c6cdb14425737082ad2 /src/ai/api | |
parent | bfcf32c64e0fa8f0d01ffec837499c9f17d227b5 (diff) | |
download | openttd-30a1f1416a868914cc98c03720f4dd80d96dbcd2.tar.xz |
(svn r16986) -Fix [NoAI]: AIBridge::GetPrice returned incorrect values
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_bridge.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_bridge.cpp b/src/ai/api/ai_bridge.cpp index 916fd6d7a..411247ea1 100644 --- a/src/ai/api/ai_bridge.cpp +++ b/src/ai/api/ai_bridge.cpp @@ -139,7 +139,7 @@ static void _DoCommandReturnBuildBridge1(class AIInstance *instance) { if (!IsValidBridge(bridge_id)) return -1; - return length * _price.build_bridge * ::GetBridgeSpec(bridge_id)->price >> 8; + return ::CalcBridgeLenCostFactor(length) * _price.build_bridge * ::GetBridgeSpec(bridge_id)->price >> 8; } /* static */ int32 AIBridge::GetMaxLength(BridgeID bridge_id) |