From 561a01cc2a8ca0b83b37975a048d34dcfd0d41e1 Mon Sep 17 00:00:00 2001 From: paramat Date: Mon, 28 Aug 2017 22:46:12 +0100 Subject: Zoom: Move enabling zoom to a new player object property Default enabled for no change in default behaviour. Remove 'zoom' privilege. --- src/localplayer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/localplayer.h') diff --git a/src/localplayer.h b/src/localplayer.h index 3521512af..35c8b64ba 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -124,11 +124,9 @@ public: v3s16 getLightPosition() const; void setYaw(f32 yaw) { m_yaw = yaw; } - f32 getYaw() const { return m_yaw; } void setPitch(f32 pitch) { m_pitch = pitch; } - f32 getPitch() const { return m_pitch; } inline void setPosition(const v3f &position) @@ -143,6 +141,9 @@ public: void setCollisionbox(const aabb3f &box) { m_collisionbox = box; } + bool getCanZoom() const { return m_can_zoom; } + void setCanZoom(bool can_zoom) { m_can_zoom = can_zoom; } + private: void accelerateHorizontal(const v3f &target_speed, const f32 max_increase); void accelerateVertical(const v3f &target_speed, const f32 max_increase); @@ -178,6 +179,7 @@ private: bool camera_barely_in_ceiling = false; aabb3f m_collisionbox = aabb3f(-BS * 0.30f, 0.0f, -BS * 0.30f, BS * 0.30f, BS * 1.75f, BS * 0.30f); + bool m_can_zoom = true; GenericCAO *m_cao = nullptr; Client *m_client; -- cgit v1.2.3