summaryrefslogtreecommitdiff
path: root/npf.c
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-03-08 19:59:56 +0000
committermatthijs <matthijs@openttd.org>2005-03-08 19:59:56 +0000
commitaea57f2026725e8575c27a7671c3f012e2153dde (patch)
tree8c987666994b0ccd8a17a956af447380d10181c2 /npf.c
parent232e41f2ff867bd1281c76ec3037d11cb5db0e65 (diff)
downloadopenttd-aea57f2026725e8575c27a7671c3f012e2153dde.tar.xz
(svn r1964) - Add: [NPF] Added a penalty
Diffstat (limited to 'npf.c')
-rw-r--r--npf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/npf.c b/npf.c
index ab7cdb5a9..786fef609 100644
--- a/npf.c
+++ b/npf.c
@@ -369,7 +369,10 @@ int32 NPFRailPathCost(AyStar* as, AyStarNode* current, OpenListNode* parent) {
cost += NPFSlopeCost(current);
/* Check for turns */
- //TODO
+ if (current->direction != parent->path.node.direction)
+ cost += _patches.npf_rail_curve_penalty;
+ //TODO, with realistic acceleration, also the amount of straight track between
+ // curves should be taken into account, as this affects the speed limit.
/* Check for occupied track */
//TODO