diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-09 05:55:35 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-09 05:55:35 +0200 |
commit | 6942c8282a2d863c452db4f2f031a45c36ca097b (patch) | |
tree | 4754403d8137e5bd512a06cd8100968a159d0c7e /src | |
parent | c2ecf0af2b3603376c32f24c8e26bebbdd082ad2 (diff) |
cccc
Diffstat (limited to 'src')
-rw-r--r-- | src/path-search-dijkstra.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path-search-dijkstra.cpp b/src/path-search-dijkstra.cpp index 37d8e562..444d5ee7 100644 --- a/src/path-search-dijkstra.cpp +++ b/src/path-search-dijkstra.cpp @@ -12,7 +12,6 @@ using visited = astar::visited; namespace { constexpr auto div_size = path_search::div_size; -constexpr auto goal_distance = div_size; template<typename T> requires std::is_arithmetic_v<T> @@ -175,6 +174,7 @@ path_search_result astar::Dijkstra(world& w, point from_, point to_, object_id o constexpr auto min_size_ = Vector2ui{Vector2(div_size) * 1.5f + Vector2{.5f}}; const auto own_size = Math::max(Vector2ui{Vector2{own_size_}*1.5f + Vector2{.5f}}, min_size_); + const auto goal_distance = (uint32_t)(own_size * 2).length(); const auto [from, from_offset] = from_; const auto [to, to_offset] = to_; |