move Chunks from Level to Player

This commit is contained in:
MihailRis 2024-12-17 19:40:00 +03:00
parent b7664b4188
commit 1c18c02092
40 changed files with 450 additions and 220 deletions

View file

@ -11,6 +11,7 @@
class Chunk;
class Level;
struct AABB;
class ContentIndices;
class GlobalChunks {
@ -51,6 +52,8 @@ public:
void putChunk(std::shared_ptr<Chunk> chunk);
const AABB* isObstacleAt(float x, float y, float z) const;
inline Chunk* getChunk(int cx, int cz) const {
const auto& found = chunksMap.find(keyfrom(cx, cz));
if (found == chunksMap.end()) {