diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-11-06 19:42:17 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-11-06 19:42:17 +0100 |
| commit | 6a767c3bd65fa552f6f39b88f7515ebe3f19641f (patch) | |
| tree | 063791c96c7f6802c3c6dd2f290b9010612c0d8b /src/common/Collision/RegularGrid.h | |
| parent | 556505d59acb2d0badd3f4524f45bf16489c2dd5 (diff) | |
Core/MMaps: Implemented dynamic mmap tile rebuilding for destructible objects
Diffstat (limited to 'src/common/Collision/RegularGrid.h')
| -rw-r--r-- | src/common/Collision/RegularGrid.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/Collision/RegularGrid.h b/src/common/Collision/RegularGrid.h index 459388d2662..94f97b2cb5a 100644 --- a/src/common/Collision/RegularGrid.h +++ b/src/common/Collision/RegularGrid.h @@ -210,6 +210,13 @@ public: if (Node* node = nodes[cell.x][cell.y].get()) node->intersectRay(ray, intersectCallback, max_dist); } + + std::span<T const* const> getObjects(int x, int y) const + { + if (Node* n = nodes[x][y].get()) + return n->getObjects(); + return {}; + } }; #undef CELL_SIZE |
