diff options
author | rubidium <rubidium@openttd.org> | 2009-12-02 16:38:33 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-02 16:38:33 +0000 |
commit | d58e4084de772b16a6bc7414ec6a99616acc0988 (patch) | |
tree | c0ab77a412703dd47beb7979d063f0c83e9ce3ae /src/pathfinder/pathfinder_type.h | |
parent | 81062163a25497e9d83fd354b53234d1796f675d (diff) | |
download | openttd-d58e4084de772b16a6bc7414ec6a99616acc0988.tar.xz |
(svn r18378) -Codechange: move the pathfinder 'length' constants to pathfinder_type.h
Diffstat (limited to 'src/pathfinder/pathfinder_type.h')
-rw-r--r-- | src/pathfinder/pathfinder_type.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/pathfinder/pathfinder_type.h b/src/pathfinder/pathfinder_type.h index 95daf533e..0bb3f2e5d 100644 --- a/src/pathfinder/pathfinder_type.h +++ b/src/pathfinder/pathfinder_type.h @@ -12,6 +12,32 @@ #ifndef PATHFINDER_TYPE_H #define PATHFINDER_TYPE_H +/** Length (penalty) of one tile with NPF */ +static const int NPF_TILE_LENGTH = 100; + +/** + * This penalty is the equivalent of "infite", which means that paths that + * get this penalty will be chosen, but only if there is no other route + * without it. Be careful with not applying this penalty to often, or the + * total path cost might overflow.. + */ +static const int NPF_INFINITE_PENALTY = 1000 * NPF_TILE_LENGTH; + + +/** Length (penalty) of one tile with YAPF */ +static const int YAPF_TILE_LENGTH = 100; + +/** Length (penalty) of a corner with YAPF */ +static const int YAPF_TILE_CORNER_LENGTH = 71; + +/** + * This penalty is the equivalent of "infite", which means that paths that + * get this penalty will be chosen, but only if there is no other route + * without it. Be careful with not applying this penalty to often, or the + * total path cost might overflow.. + */ +static const int YAPF_INFINITE_PENALTY = 1000 * YAPF_TILE_LENGTH; + /** * Helper container to find a depot */ |