diff options
author | ShadowNinja <shadowninja@minetest.net> | 2017-06-03 14:55:10 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2017-06-03 14:55:10 -0400 |
commit | caecdb681c428c1aab9c0f7eec2570c0460f995c (patch) | |
tree | e5115982ea59bbf2343ba9b35bc4a0cfbb56f407 /src/camera.h | |
parent | 81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (diff) | |
parent | 80dc961d24e1964e25d57039ddb2ba639f9f4d22 (diff) | |
download | minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.gz minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.bz2 minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.zip |
Merge 0.4.16 into stable-0.4
Diffstat (limited to 'src/camera.h')
-rw-r--r-- | src/camera.h | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/camera.h b/src/camera.h index cb0e9686d..1e4800cba 100644 --- a/src/camera.h +++ b/src/camera.h @@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc., class LocalPlayer; struct MapDrawControl; -class IGameDef; +class Client; class WieldMeshSceneNode; struct Nametag { @@ -61,25 +61,9 @@ class Camera { public: Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control, - IGameDef *gamedef); + Client *client); ~Camera(); - // Get player scene node. - // This node is positioned at the player's torso (without any view bobbing), - // as given by Player::m_position. Yaw is applied but not pitch. - inline scene::ISceneNode* getPlayerNode() const - { - return m_playernode; - } - - // Get head scene node. - // It has the eye transformation and pitch applied, - // but no view bobbing. - inline scene::ISceneNode* getHeadNode() const - { - return m_headnode; - } - // Get camera scene node. // It has the eye transformation, pitch and view bobbing applied. inline scene::ICameraSceneNode* getCameraNode() const @@ -161,6 +145,12 @@ public: m_camera_mode = CAMERA_MODE_FIRST; } + // Set the current camera mode + inline void setCameraMode(CameraMode mode) + { + m_camera_mode = mode; + } + //read the current camera mode inline CameraMode getCameraMode() { @@ -172,8 +162,7 @@ public: void removeNametag(Nametag *nametag); - std::list<Nametag *> *getNametags() - { return &m_nametags; } + const std::list<Nametag *> &getNametags() { return m_nametags; } void drawNametags(); @@ -189,7 +178,7 @@ private: // draw control MapDrawControl& m_draw_control; - IGameDef *m_gamedef; + Client *m_client; video::IVideoDriver *m_driver; // Absolute camera position @@ -232,7 +221,6 @@ private: f32 m_cache_view_bobbing_amount; f32 m_cache_fov; f32 m_cache_zoom_fov; - bool m_cache_view_bobbing; std::list<Nametag *> m_nametags; }; |