diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-10-09 18:39:48 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2018-01-13 03:39:32 +0100 |
commit | a81bcb1942ddad5989115061338e72211443e633 (patch) | |
tree | cb1cc6feadb7dfb49f96cbc9b2a4f2bfb9ad8488 /src/GameState.hpp | |
parent | 2017-10-07 (diff) | |
download | AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.gz AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.bz2 AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.lz AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.xz AltCraft-a81bcb1942ddad5989115061338e72211443e633.tar.zst AltCraft-a81bcb1942ddad5989115061338e72211443e633.zip |
Diffstat (limited to 'src/GameState.hpp')
-rw-r--r-- | src/GameState.hpp | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/src/GameState.hpp b/src/GameState.hpp index 31ec928..0551f1c 100644 --- a/src/GameState.hpp +++ b/src/GameState.hpp @@ -11,13 +11,17 @@ #include "Window.hpp" class GameState { - std::shared_ptr<NetworkClient> nc; + std::mutex packetsMutex; + std::queue<std::shared_ptr<Packet>> packets; public: - GameState(std::shared_ptr<NetworkClient> networkClient); + + GameState() = default; + + ~GameState() = default; void Update(float deltaTime); - void UpdatePacket(); + void UpdatePacket(NetworkClient *nc); enum Direction { FORWARD, BACKWARD, LEFT, RIGHT, JUMP @@ -26,19 +30,6 @@ public: void HandleRotation(double yaw, double pitch); glm::mat4 GetViewMatrix(); Entity* player; - /*void updateCameraVectors(); - - float Yaw(); - float Pitch(); - void SetYaw(float yaw); - void SetPitch(float pitch); - - glm::vec3 Position(); - void SetPosition(glm::vec3 Position); - glm::vec3 Front; - glm::vec3 Up; - glm::vec3 Right; - glm::vec3 WorldUp;*/ World world; @@ -59,23 +50,11 @@ public: bool g_PlayerCreativeMode = false; float g_PlayerFlyingSpeed = 0; float g_PlayerFovModifier = 0; - /*float g_PlayerPitch = 0; - float g_PlayerYaw = 0; - double g_PlayerX = 0; - double g_PlayerY = 0; - double g_PlayerZ = 0;*/ float g_PlayerHealth = 0; - /*bool g_OnGround = true; - double g_PlayerVelocityX = 0; - double g_PlayerVelocityY = 0; - double g_PlayerVelocityZ = 0;*/ - long long WorldAge = 0; long long TimeOfDay = 0; - std::shared_ptr<GameState> gs; - Window playerInventory; std::vector<Window> openedWindows; }; |