X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FPlayerController.hpp;h=b9d3b2bd6cf6854f53cf5586b07fa49dcc72cc12;hb=80a9a59d71a7b144c12f64cbef4644751bd54745;hp=b29795b7313cf9cb5b8d2308e72cfcfa0f03a182;hpb=c1da86ebab41895bf49ed747c75ecf722e8c5586;p=blank.git diff --git a/src/ui/PlayerController.hpp b/src/ui/PlayerController.hpp index b29795b..b9d3b2b 100644 --- a/src/ui/PlayerController.hpp +++ b/src/ui/PlayerController.hpp @@ -17,6 +17,8 @@ class PlayerController { public: PlayerController(World &, Player &); + World &GetWorld() noexcept { return world; } + const World &GetWorld() const noexcept { return world; } Player &GetPlayer() noexcept { return player; } const Player &GetPlayer() const noexcept { return player; } @@ -33,9 +35,9 @@ public: void TurnHead(float pitch, float yaw) noexcept; /// get player pitch in radians, normalized to [-PI/2,PI/2] - float GetPitch() const noexcept { return pitch; } + float GetPitch() const noexcept; /// get player yaw in radians, normalized to [-PI,PI] - float GetYaw() const noexcept { return yaw; } + float GetYaw() const noexcept; /// start doing primary action /// what exactly this means depends on the active item @@ -60,8 +62,6 @@ private: World &world; Player &player; glm::vec3 move_dir; - float pitch; - float yaw; bool dirty; WorldCollision aim_world;