Mercurial > hg > openttd
changeset 12548:5f4aa917387f draft
(svn r16986) -Fix [NoAI]: AIBridge::GetPrice returned incorrect values
author | yexo <yexo@openttd.org> |
---|---|
date | Wed, 29 Jul 2009 21:48:19 +0000 |
parents | 6e43a44a20f6 |
children | 093cab6ec4c8 |
files | src/ai/api/ai_bridge.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ai/api/ai_bridge.cpp +++ b/src/ai/api/ai_bridge.cpp @@ -139,7 +139,7 @@ { 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)