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
commite7af60594b584521d90d504cde4032834734522b (patch)
tree8c987666994b0ccd8a17a956af447380d10181c2 /npf.c
parent6a5495f83c431b4b12dc0e5ce4406571aa524577 (diff)
downloadopenttd-e7af60594b584521d90d504cde4032834734522b.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