diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-12 17:09:16 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-12 17:09:16 +0200 |
commit | 45de7d0537d2caec7d0a7ede48e2b72301bc9da9 (patch) | |
tree | af17dd093da09dc77a3a07a3d4835a1b5e5b85f6 /src/World.hpp | |
parent | 2017-08-07 (diff) | |
download | AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.gz AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.bz2 AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.lz AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.xz AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.tar.zst AltCraft-45de7d0537d2caec7d0a7ede48e2b72301bc9da9.zip |
Diffstat (limited to 'src/World.hpp')
-rw-r--r-- | src/World.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/World.hpp b/src/World.hpp index 805084c..2415610 100644 --- a/src/World.hpp +++ b/src/World.hpp @@ -2,9 +2,12 @@ #include <map> #include <bitset> +#include <queue> #include <easylogging++.h> + +#include "Entity.hpp" #include "Block.hpp" #include "Section.hpp" #include "Packet.hpp" @@ -17,6 +20,14 @@ class World { int dimension = 0; Section ParseSection(StreamInput *data, Vector position); + + void ParserFunc(); + + std::queue<Section> toParse; + std::mutex parseMutex; + + bool isRunning = true; + std::thread parser; public: World(); @@ -34,4 +45,8 @@ public: Section &GetSection(Vector sectionPos); glm::vec3 Raycast(glm::vec3 position, glm::vec3 direction, float maxLength = 1000.0f, float minPrecision = 0.01f); + + std::vector<Entity> entities; + + void UpdatePhysics(float delta); };
\ No newline at end of file |