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