summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-07-29 21:48:19 +0000
committeryexo <yexo@openttd.org>2009-07-29 21:48:19 +0000
commit30a1f1416a868914cc98c03720f4dd80d96dbcd2 (patch)
treea4132b248d0420fff8c33c6cdb14425737082ad2
parentbfcf32c64e0fa8f0d01ffec837499c9f17d227b5 (diff)
downloadopenttd-30a1f1416a868914cc98c03720f4dd80d96dbcd2.tar.xz
(svn r16986) -Fix [NoAI]: AIBridge::GetPrice returned incorrect values
-rw-r--r--src/ai/api/ai_bridge.cpp2
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)