]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/player.h
Add mod.conf to preview clientmod (#11020)
[dragonfireclient.git] / src / player.h
index de7f427e91a956fb9219bb1e373ed4ce1618e86f..ec068a8b10faac31b750d248387663470a9290ba 100644 (file)
@@ -35,7 +35,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 struct PlayerFovSpec
 {
        f32 fov;
+
+       // Whether to multiply the client's FOV or to override it
        bool is_multiplier;
+
+       // The time to be take to trasition to the new FOV value.
+       // Transition is instantaneous if omitted. Omitted by default.
+       f32 transition_time;
 };
 
 struct PlayerControl
@@ -51,8 +57,8 @@ struct PlayerControl
                bool a_aux1,
                bool a_sneak,
                bool a_zoom,
-               bool a_LMB,
-               bool a_RMB,
+               bool a_dig,
+               bool a_place,
                float a_pitch,
                float a_yaw,
                float a_sidew_move_joystick_axis,
@@ -67,8 +73,8 @@ struct PlayerControl
                aux1 = a_aux1;
                sneak = a_sneak;
                zoom = a_zoom;
-               LMB = a_LMB;
-               RMB = a_RMB;
+               dig = a_dig;
+               place = a_place;
                pitch = a_pitch;
                yaw = a_yaw;
                sidew_move_joystick_axis = a_sidew_move_joystick_axis;
@@ -82,8 +88,8 @@ struct PlayerControl
        bool aux1 = false;
        bool sneak = false;
        bool zoom = false;
-       bool LMB = false;
-       bool RMB = false;
+       bool dig = false;
+       bool place = false;
        float pitch = 0.0f;
        float yaw = 0.0f;
        float sidew_move_joystick_axis = 0.0f;
@@ -186,12 +192,12 @@ class Player
 
        void setFov(const PlayerFovSpec &spec)
        {
-               m_fov_spec = spec;
+               m_fov_override_spec = spec;
        }
 
        const PlayerFovSpec &getFov() const
        {
-               return m_fov_spec;
+               return m_fov_override_spec;
        }
 
        u32 keyPressed = 0;
@@ -208,7 +214,7 @@ class Player
        char m_name[PLAYERNAME_SIZE];
        v3f m_speed;
        u16 m_wield_index = 0;
-       PlayerFovSpec m_fov_spec = { 0.0f, false };
+       PlayerFovSpec m_fov_override_spec = { 0.0f, false, 0.0f };
 
        std::vector<HudElement *> hud;
 private: