summaryrefslogtreecommitdiff
path: root/settings.c
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-04-15 15:28:01 +0000
committermatthijs <matthijs@openttd.org>2005-04-15 15:28:01 +0000
commitbb22f72ad9dc4ed37c7868e512b6498ae5bdc12e (patch)
treecfc007fd56ab1bff8677aaacda9b708846b81a3c /settings.c
parent3c3507c822d0f2bc3231ddd6f0c85a9cd75dc139 (diff)
downloadopenttd-bb22f72ad9dc4ed37c7868e512b6498ae5bdc12e.tar.xz
(svn r2204) - Add: [NPF] NPF now has a maximum number of nodes it will search. The default value is 5000 for now, which is an educated guess. Probably needs some finetuning. Hopefully this "feature" can be removed later on, when more sophisticated means of limiting the pathfinder have been implemented. This should make ships and larger networks playable for now, though.
Diffstat (limited to 'settings.c')
-rw-r--r--settings.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/settings.c b/settings.c
index 02085cb96..0c285a2c0 100644
--- a/settings.c
+++ b/settings.c
@@ -926,6 +926,9 @@ const SettingDesc patch_settings[] = {
/* New Path Finding */
{"new_pathfinding_all", SDT_BOOL, (void*)false, &_patches.new_pathfinding_all, NULL},
+ /* The maximum number of nodes to search */
+ {"npf_max_search_nodes", SDT_UINT32, (void*)10000, &_patches.npf_max_search_nodes, NULL},
+
/* When a red signal is encountered, a small detour can be made around
* it. This specifically occurs when a track is doubled, in which case
* the detour is typically 2 tiles. It is also often used at station