X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fworld.hpp;h=b5c4a29cc66688f9c7a10b0a9150c71122c37718;hb=3072e2cd49ad1614100d1a1c73afe6a4888fb875;hp=ccd743dd4f1321955410ef1e055f5354140bdb16;hpb=374843f5b3ae60c0d02704a8da5100ac8abe7f1a;p=blank.git diff --git a/src/world.hpp b/src/world.hpp index ccd743d..b5c4a29 100644 --- a/src/world.hpp +++ b/src/world.hpp @@ -8,6 +8,7 @@ #include "shader.hpp" #include "shape.hpp" +#include #include @@ -28,8 +29,10 @@ public: BlockTypeRegistry &BlockTypes() { return blockType; } - Entity &Player() { return player; } + Entity &Player() { return *player; } + Entity &AddEntity() { entities.emplace_back(); return entities.back(); } + Chunk &PlayerChunk(); Chunk &Next(const Chunk &to, const glm::tvec3 &dir); void Update(int dt); @@ -45,7 +48,8 @@ private: Generator generate; ChunkLoader chunks; - Entity player; + Entity *player; + std::list entities; };