1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-16 01:45:36 +02:00

Add Arm Inertia (#6050)

This commit is contained in:
kilbith
2017-06-26 20:03:48 +02:00
committed by Loïc Blot
parent 936d67dad4
commit 1d1d922a7a
5 changed files with 99 additions and 3 deletions

View File

@@ -166,6 +166,8 @@ public:
void drawNametags();
inline void add_arm_inertia(f32 player_yaw, f32 frametime);
private:
// Nodes
scene::ISceneNode *m_playernode = nullptr;
@@ -188,6 +190,12 @@ private:
// Camera offset
v3s16 m_camera_offset;
v2f m_wieldmesh_offset = v2f(55.0f, -35.0f);
v2f m_timer;
v2f m_cam_vel;
v2f m_cam_vel_old;
v2f m_last_cam_pos;
// Field of view and aspect ratio stuff
f32 m_aspect = 1.0f;
f32 m_fov_x = 1.0f;
@@ -221,6 +229,7 @@ private:
f32 m_cache_view_bobbing_amount;
f32 m_cache_fov;
f32 m_cache_zoom_fov;
bool m_arm_inertia;
std::list<Nametag *> m_nametags;
};