summaryrefslogtreecommitdiff
path: root/settings.c
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-05-07 22:00:36 +0000
committermatthijs <matthijs@openttd.org>2005-05-07 22:00:36 +0000
commit0e08878a68c51db31ee39852d40c0d1d1ff4fb77 (patch)
treeea2c82a9f54adb580c94594906be4727b4d72723 /settings.c
parentf2bc27718a6c89f4395b7f3b27bab5bd70fa2704 (diff)
downloadopenttd-0e08878a68c51db31ee39852d40c0d1d1ff4fb77.tar.xz
(svn r2281) - Fix: [ 1115204 ] [NPF] When pressing the goto depot button, trains will now also look behind it if there is no depot in front. If so, the train reverses immediately. This also work anywhere, not just at stations.
- Add: [NPF] Reversing inside of depots now has a penalty. It also applies to trains only, other vehicles shouldn't bother reversing. - Fix: [NPF] When checking whether to reverse a train, the trackdir of the first loc was used instead of the last vehicle as a starting node for pathfindig. This might have caused some trains not reversing when they should have (or vice versa). Typo introduced when converting to GetVehicleTrackdir() in r2256. - CodeChange: [NPF] Removed duplicate code by letting NPFRouteTjoStationOrTile() call NPFRouteToStationOrTileTwoWay(). - Add: [NPF] NPFRouteToDepotBreadthFirstTwoWay() to find a depot while also looking backwards. - Add: It is now possibly to specify a path cost for aystar starting nodes.
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/settings.c b/settings.c
index 2b6d52787..68411f2ab 100644
--- a/settings.c
+++ b/settings.c
@@ -966,6 +966,10 @@ const SettingDesc patch_settings[] = {
* sure that it has a minimal impact on the pathfinding, only when two
* paths have equal length it will make a difference */
{"npf_rail_curve_penalty", SDT_UINT32, (void*)(1), &_patches.npf_rail_curve_penalty, NULL},
+ /* Ths penalty is applied when a vehicle reverses inside a depot (doesn't
+ * apply to ships, as they can just come out the other end). XXX: Is this a
+ * good value? */
+ {"npf_rail_depot_reverse_penalty", SDT_UINT32, (void*)(NPF_TILE_LENGTH * 50), &_patches.npf_rail_depot_reverse_penalty, NULL},
{"npf_buoy_penalty", SDT_UINT32, (void*)(2 * NPF_TILE_LENGTH), &_patches.npf_buoy_penalty, NULL},
/* This penalty is applied when a ship makes a turn. It is bigger than the
* rail curve penalty, since ships (realisticly) have more trouble with