summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-10-16 10:36:33 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-10-16 10:36:33 +0200
commitd0b8c9beb47c4c2e52afa07549823ffa3f97b178 (patch)
tree62483496694ae4354e4b95152f8ffc53ca5e1efb /src
parentcbc7fbf0ce84886a8c9d95b35f59d0f237c627e8 (diff)
a
Diffstat (limited to 'src')
-rw-r--r--src/path-search-dijkstra.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/path-search-dijkstra.cpp b/src/path-search-dijkstra.cpp
index df8dd65b..26e6b742 100644
--- a/src/path-search-dijkstra.cpp
+++ b/src/path-search-dijkstra.cpp
@@ -115,9 +115,9 @@ path_search_result astar::Dijkstra(world& w, const point from_, const point to_,
clear();
cache.allocate(from_, max_dist);
- 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)Math::max(Vector2ui(iTILE_SIZE2*11/10), own_size * 2).length();
+ constexpr auto min_size = Vector2ui{div_size*3/2};
+ const auto own_size = Math::max(Vector2ui(own_size_), min_size);
+ constexpr auto goal_distance = (div_size*3/2).length();
const auto [from, from_offset] = from_;
const auto [to, to_offset] = to_;