summaryrefslogtreecommitdiff
path: root/src/ai/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api')
-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)