From 3e6eb265a018fd0422b59ca9ea1b8918abee5c16 Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 15 Feb 2024 12:32:03 +0100 Subject: Not every valid block position is within a chunk, `ChunkRegistry::find` should reflect that --- src/World/ChunkRegistry.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/World/ChunkRegistry.hpp') diff --git a/src/World/ChunkRegistry.hpp b/src/World/ChunkRegistry.hpp index d583765..b6d1613 100644 --- a/src/World/ChunkRegistry.hpp +++ b/src/World/ChunkRegistry.hpp @@ -48,8 +48,8 @@ public: Data& get(ChunkIndex index); - Data& find(Position::BlockWorld pos); - Data& find(Position::World pos); + Data* find(Position::BlockWorld pos); + Data* find(Position::World pos); private: std::unordered_map m_chunks; }; -- cgit 1.4.1