From 9e56348975dbdaf1cce9dd688129208a61fd4eb5 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Fri, 21 Jul 2017 19:49:56 +0500 Subject: 2017-07-21 --- include/world/World.hpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'include/world/World.hpp') diff --git a/include/world/World.hpp b/include/world/World.hpp index 6e5eedb..6b09f1f 100644 --- a/include/world/World.hpp +++ b/include/world/World.hpp @@ -11,17 +11,14 @@ #include class World { - //utility vars - World(const World &other); - - World &operator=(const World &other); - - //game vars + std::map sections; + std::map sectionMutexes; int dimension = 0; - //game methods Section ParseSection(StreamInput *data, Vector position); + World(const World &other); + World &operator=(const World &other); public: World(); @@ -29,7 +26,13 @@ public: void ParseChunkData(std::shared_ptr packet); - std::map sections; - bool isPlayerCollides(double X, double Y, double Z); + + Block &GetBlock(Vector pos); + + std::vector GetSectionsList(); + + Section &GetSection(Vector sectionPos); + + glm::vec3 Raycast(glm::vec3 position, glm::vec3 direction, float maxLength = 1000.0f, float minPrecision = 0.01f); }; \ No newline at end of file -- cgit v1.2.3