summaryrefslogtreecommitdiffhomepage
path: root/src/path-search.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-09-12 05:52:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-09-12 05:52:55 +0200
commitaae112ae02b415483ac03c59629dc9290bd833cf (patch)
treea4763c87cdb7fd00109255a618177c30d1f0fa73 /src/path-search.cpp
parent7c56df7eed83af63e018be1be5507c1ca8cf1b99 (diff)
a
Diffstat (limited to 'src/path-search.cpp')
-rw-r--r--src/path-search.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/path-search.cpp b/src/path-search.cpp
index 1f9b5bf9..8a4c52f0 100644
--- a/src/path-search.cpp
+++ b/src/path-search.cpp
@@ -94,11 +94,10 @@ bool search::sample_rtree(world& w, global_coords coord, Vector2b offset, Vector
auto search::make_neighbor_tile_bbox(Vector2i coord, Vector2ub own_size, rotation r) -> bbox
{
- constexpr auto full_tile = Vector2ui(iTILE_SIZE2*3/4);
- constexpr auto tx = full_tile.x()*2u, ty = full_tile.y()*2u;
+ constexpr auto tx = iTILE_SIZE2.x()/2, ty = iTILE_SIZE2.y()/2;
- const auto s = Math::max(Vector2ui(own_size), full_tile);
- const auto sx = s[0], sy = s[1];
+ const auto s = Math::max(Vector2ui(own_size), Vector2ui(iTILE_SIZE2));
+ const auto sx = s.x(), sy = s.y();
Vector2i off;
Vector2ui size;