Disable fall bobbing by default; enable using fall_bobbing_amount = 1.0
authorPerttu Ahola <celeron55@gmail.com>
Tue, 23 Apr 2013 20:19:36 +0000 (23:19 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 23 Apr 2013 20:19:36 +0000 (23:19 +0300)
minetest.conf.example
src/camera.cpp
src/defaultsettings.cpp

index 838987c33dc99b725c58396881565f68d26f22b4..36ef31459411ac11b1294024df568cd31e3cc973 100644 (file)
 #screenshot_path = .
 # Amount of view bobbing (0 = no view bobbing, 1.0 = normal, 2.0 = double)
 #view_bobbing_amount = 1.0
+# Amount of fall bobbing (0 = no fall bobbing, 1.0 = normal, 2.0 = double)
+#fall_bobbing_amount = 0.0
 # Anaglyph stereo
 #anaglyph = false
 #anaglyph_strength = 0.1
index 211ecfd70e6e79f3367b0dbca63cd5107e2cb632..6224a2b8ec99b052f11b2919af7f653d21bebaa6 100644 (file)
@@ -263,6 +263,8 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize,
                fall_bobbing = sin(fall_bobbing * 0.5 * M_PI) * -1;
                // Amplify according to the intensity of the impact
                fall_bobbing *= (1 - rangelim(50 / player->camera_impact, 0, 1)) * 5;
+
+               fall_bobbing *= g_settings->getFloat("fall_bobbing_amount");
        }
 
        // Set head node transformation
index 9875c6ecb8a6df4b272aa5c4bf060997ad8f390b..09ec456971cd9cd3b0b6387b5950da1397508b57 100644 (file)
@@ -107,6 +107,7 @@ void set_default_settings(Settings *settings)
        settings->setDefault("enable_clouds", "true");
        settings->setDefault("screenshot_path", ".");
        settings->setDefault("view_bobbing_amount", "1.0");
+       settings->setDefault("fall_bobbing_amount", "0.0");
        settings->setDefault("enable_3d_clouds", "true");
        settings->setDefault("cloud_height", "120");
        settings->setDefault("menu_clouds", "true");