diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-15 14:52:54 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-15 15:09:09 +0100 |
commit | 2e0c0009806860e4e8ac24663afdc5d926d1213f (patch) | |
tree | 24a88dfa818e52179b0955a463da4b9cfa834b4d /src/chunk.cpp | |
parent | c6c3c887e99c57fb567252053190ce4a24f65455 (diff) |
src: add O(1) chunk access from entity
Diffstat (limited to 'src/chunk.cpp')
-rw-r--r-- | src/chunk.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/chunk.cpp b/src/chunk.cpp index 6edced05..7f8623dc 100644 --- a/src/chunk.cpp +++ b/src/chunk.cpp @@ -89,7 +89,10 @@ void chunk::mark_modified() noexcept mark_scenery_modified(); } -chunk::chunk() noexcept = default; +chunk::chunk(struct world& w) noexcept : _world{&w} +{ +} + chunk::~chunk() noexcept { _teardown = true; |