From 30a1f1416a868914cc98c03720f4dd80d96dbcd2 Mon Sep 17 00:00:00 2001 From: yexo Date: Wed, 29 Jul 2009 21:48:19 +0000 Subject: (svn r16986) -Fix [NoAI]: AIBridge::GetPrice returned incorrect values --- src/ai/api/ai_bridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3-70-g09d2