summaryrefslogtreecommitdiffstats
path: root/src/World.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/World.hpp15
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