summaryrefslogtreecommitdiff
path: root/settings.c
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-04-04 17:53:39 +0000
committermatthijs <matthijs@openttd.org>2005-04-04 17:53:39 +0000
commit6c825df8f76442acf61f0c2f01620bdbff8a776f (patch)
tree99922c71839c7787413ed4d520b38e4542cb1267 /settings.c
parent00c819c0d5e2e64717d6c7968f477cb4642a94d5 (diff)
downloadopenttd-6c825df8f76442acf61f0c2f01620bdbff8a776f.tar.xz
(svn r2147) - Add: [NPF] Give red presignal exit signals a different (higher) penalty, to discourage trains from waiting at presignal exits.
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/settings.c b/settings.c
index 11b7b2f21..a29efea56 100644
--- a/settings.c
+++ b/settings.c
@@ -937,15 +937,18 @@ const SettingDesc patch_settings[] = {
* again, just because the sign at the right side was red. If we take
* a typical 5 length station, this detour is 10 or 11 tiles (not
* sure), so we set the default penalty at 10 (the station tile
- * penalty will further prevent this */
- {"npf_rail_firstred_penalty", SDT_UINT32, (void*)(10 * NPF_TILE_LENGTH), &_patches.npf_rail_firstred_penalty, NULL},
+ * penalty will further prevent this.
+ * We give presignal exits (and combo's) a different (larger) penalty, because we really
+ * don't want trains waiting in front of a presignal exit. */
+ {"npf_rail_firstred_penalty", SDT_UINT32, (void*)(10 * NPF_TILE_LENGTH), &_patches.npf_rail_firstred_penalty, NULL},
+ {"npf_rail_firstred_exit_penalty", SDT_UINT32, (void*)(100 * NPF_TILE_LENGTH), &_patches.npf_rail_firstred_exit_penalty, NULL},
/* This penalty is for when the last signal before the target is red.
* This is useful for train stations, where there are multiple
* platforms to choose from, which lie in different signal blocks.
* Every target in a occupied signal block (ie an occupied platform)
* will get this penalty.
*/
- {"npf_rail_lastred_penalty", SDT_UINT32, (void*)(10 * NPF_TILE_LENGTH), &_patches.npf_rail_lastred_penalty, NULL},
+ {"npf_rail_lastred_penalty", SDT_UINT32, (void*)(10 * NPF_TILE_LENGTH), &_patches.npf_rail_lastred_penalty, NULL},
/* When a train plans a route over a station tile, this penalty is
* applied. We want that trains plan a route around a typical, 4x5
* station, which means two tiles to the right, and two tiles back to
@@ -953,9 +956,9 @@ const SettingDesc patch_settings[] = {
* a penalty of 1 tile for every station tile passed, the route will
* be around it.
*/
- {"npf_rail_station_penalty", SDT_UINT32, (void*)(1 * NPF_TILE_LENGTH), &_patches.npf_rail_station_penalty, NULL},
- {"npf_rail_slope_penalty", SDT_UINT32, (void*)(1 * NPF_TILE_LENGTH), &_patches.npf_rail_slope_penalty, NULL},
- {"npf_rail_curve_penalty", SDT_UINT32, (void*)(1), &_patches.npf_rail_curve_penalty, NULL},
+ {"npf_rail_station_penalty", SDT_UINT32, (void*)(1 * NPF_TILE_LENGTH), &_patches.npf_rail_station_penalty, NULL},
+ {"npf_rail_slope_penalty", SDT_UINT32, (void*)(1 * NPF_TILE_LENGTH), &_patches.npf_rail_slope_penalty, NULL},
+ {"npf_rail_curve_penalty", SDT_UINT32, (void*)(1), &_patches.npf_rail_curve_penalty, NULL},
{NULL, 0, NULL, NULL, NULL}
};