diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index d0f5fb630..97df2f5e5 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -663,24 +663,24 @@ namespace UserConfigParams "If the kart is driving backwards faster than this value,\n" "switch automatically to reverse camera (set to 0 to disable).") ); - PARAM_PREFIX FloatUserConfigParam m_camera_direction_speed - PARAM_DEFAULT( FloatUserConfigParam(0.003f, "rotation_speed", + PARAM_PREFIX FloatUserConfigParam m_fspcam_direction_speed + PARAM_DEFAULT( FloatUserConfigParam(0.003f, "fspcam_rotation_speed", &m_camera, "How fast the first person camera's direction speed changes when\n" "moving the mouse (means acceleration).") ); - PARAM_PREFIX FloatUserConfigParam m_camera_smooth_direction_max_speed - PARAM_DEFAULT( FloatUserConfigParam(0.04f, "smooth_rotation_max_speed", + PARAM_PREFIX FloatUserConfigParam m_fspcam_smooth_direction_max_speed + PARAM_DEFAULT( FloatUserConfigParam(0.04f, "fspcam_smooth_rotation_max_speed", &m_camera, "How fast the first person camera's direction can change.") ); - PARAM_PREFIX FloatUserConfigParam m_camera_angular_velocity - PARAM_DEFAULT( FloatUserConfigParam(0.02f, "angular_velocity", + PARAM_PREFIX FloatUserConfigParam m_fspcam_angular_velocity + PARAM_DEFAULT( FloatUserConfigParam(0.02f, "fspcam_angular_velocity", &m_camera, "How fast the first person camera's rotation speed changes.") ); - PARAM_PREFIX FloatUserConfigParam m_camera_max_angular_velocity - PARAM_DEFAULT( FloatUserConfigParam(1.0f, "max_angular_velocity", + PARAM_PREFIX FloatUserConfigParam m_fspcam_max_angular_velocity + PARAM_DEFAULT( FloatUserConfigParam(1.0f, "fspcam_max_angular_velocity", &m_camera, "How fast the first person camera can rotate.") ); diff --git a/src/graphics/camera.cpp b/src/graphics/camera.cpp index 674f8500e..9b362bbb0 100644 --- a/src/graphics/camera.cpp +++ b/src/graphics/camera.cpp @@ -501,13 +501,13 @@ void Camera::update(float dt) // Angular velocity if (m_angular_velocity < m_target_angular_velocity) { - m_angular_velocity += UserConfigParams::m_camera_angular_velocity; + m_angular_velocity += UserConfigParams::m_fspcam_angular_velocity; if (m_angular_velocity > m_target_angular_velocity) m_angular_velocity = m_target_angular_velocity; } else if (m_angular_velocity > m_target_angular_velocity) { - m_angular_velocity -= UserConfigParams::m_camera_angular_velocity; + m_angular_velocity -= UserConfigParams::m_fspcam_angular_velocity; if (m_angular_velocity < m_target_angular_velocity) m_angular_velocity = m_target_angular_velocity; } @@ -525,13 +525,13 @@ void Camera::update(float dt) diff = m_target_direction - direction; if (diff.X != 0 || diff.Y != 0 || diff.Z != 0) { - diff.setLength(UserConfigParams::m_camera_direction_speed); + diff.setLength(UserConfigParams::m_fspcam_direction_speed); m_direction_velocity += diff; if (m_direction_velocity.getLengthSQ() > - UserConfigParams::m_camera_smooth_direction_max_speed * - UserConfigParams::m_camera_smooth_direction_max_speed) + UserConfigParams::m_fspcam_smooth_direction_max_speed * + UserConfigParams::m_fspcam_smooth_direction_max_speed) m_direction_velocity.setLength( - UserConfigParams::m_camera_smooth_direction_max_speed); + UserConfigParams::m_fspcam_smooth_direction_max_speed); direction += m_direction_velocity; m_target_direction = direction; } @@ -541,9 +541,9 @@ void Camera::update(float dt) if (diff.X != 0 || diff.Y != 0 || diff.Z != 0) { if (diff.getLengthSQ() > - UserConfigParams::m_camera_angular_velocity * - UserConfigParams::m_camera_angular_velocity) - diff.setLength(UserConfigParams::m_camera_angular_velocity); + UserConfigParams::m_fspcam_angular_velocity * + UserConfigParams::m_fspcam_angular_velocity) + diff.setLength(UserConfigParams::m_fspcam_angular_velocity); up += diff; } } diff --git a/src/input/input_manager.cpp b/src/input/input_manager.cpp index 511dcd04b..b9b92a2df 100644 --- a/src/input/input_manager.cpp +++ b/src/input/input_manager.cpp @@ -215,7 +215,7 @@ void InputManager::handleStaticAction(int key, int value) Camera *active_cam = Camera::getActiveCamera(); active_cam->setAngularVelocity(value ? - UserConfigParams::m_camera_max_angular_velocity : 0); + UserConfigParams::m_fspcam_max_angular_velocity : 0); break; } case KEY_KEY_E: @@ -225,7 +225,7 @@ void InputManager::handleStaticAction(int key, int value) Camera *active_cam = Camera::getActiveCamera(); active_cam->setAngularVelocity(value ? - -UserConfigParams::m_camera_max_angular_velocity : 0); + -UserConfigParams::m_fspcam_max_angular_velocity : 0); break; } @@ -971,9 +971,9 @@ EventPropagation InputManager::input(const SEvent& event) int diff_x = event.MouseInput.X - m_mouse_val_x; int diff_y = event.MouseInput.Y - m_mouse_val_y; float mouse_x = ((float) diff_x) * - UserConfigParams::m_camera_direction_speed; + UserConfigParams::m_fspcam_direction_speed; float mouse_y = ((float) diff_y) * - -UserConfigParams::m_camera_direction_speed; + -UserConfigParams::m_fspcam_direction_speed; // No movement the first time it's used // At the moment there's also a hard limit because the mouse // gets reset to the middle of the screen and sometimes there