diff options
Diffstat (limited to 'src/entity.cpp')
| -rw-r--r-- | src/entity.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/entity.cpp b/src/entity.cpp index 13f19620..8aa3752f 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -170,10 +170,7 @@ bool entity::can_move_to(Vector2i delta, global_coords coord2, Vector2b offset, auto ch = chunk_coords_{coord_.chunk(), coord_.z()}; if (!do_search<false>(&c_, ch, id, min, max)) return false; - constexpr Vector2b offsets[] = { - {-1, -1}, {-1, 0}, { 0, -1}, { 1, 1}, { 1, 0}, { 0, 1}, { 1, -1}, {-1, 1}, - }; - for (const auto& off : offsets) + for (const auto& off : world::neighbor_offsets) if (!do_search(&c_, ch, id, min, max, off)) return false; return true; |
