Skip to content

Commit

Permalink
Camera: Fix wieldmesh glitch after teleporting (#6138)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbith authored and nerzhul committed Jul 15, 2017
1 parent 84aa845 commit ecbc972
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/camera.cpp
Expand Up @@ -215,7 +215,8 @@ static inline v2f dir(const v2f &pos_dist)

void Camera::addArmInertia(f32 player_yaw)
{
m_cam_vel.X = std::fabs((m_last_cam_pos.X - player_yaw) / 0.016f) * 0.01f;
m_cam_vel.X = std::fabs(rangelim(m_last_cam_pos.X - player_yaw,
-100.0f, 100.0f) / 0.016f) * 0.01f;
m_cam_vel.Y = std::fabs((m_last_cam_pos.Y - m_camera_direction.Y) / 0.016f);
f32 gap_X = std::fabs(WIELDMESH_OFFSET_X - m_wieldmesh_offset.X);
f32 gap_Y = std::fabs(WIELDMESH_OFFSET_Y - m_wieldmesh_offset.Y);
Expand Down

0 comments on commit ecbc972

Please sign in to comment.