diff options
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 */ |