aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2013-04-23 23:19:36 +0300
committerPerttu Ahola <celeron55@gmail.com>2013-04-23 23:19:36 +0300
commit36747794ab981e5d1cc085075979ef981e783b55 (patch)
tree7efdd3f17369865d4f1861e0a7f8c3b4583b21f5 /src
parentc03c296dc7afe0e4ded65484221072ad6715e2be (diff)
downloadminetest-36747794ab981e5d1cc085075979ef981e783b55.tar.gz
minetest-36747794ab981e5d1cc085075979ef981e783b55.tar.bz2
minetest-36747794ab981e5d1cc085075979ef981e783b55.zip
Disable fall bobbing by default; enable using fall_bobbing_amount = 1.0
Diffstat (limited to 'src')
-rw-r--r--src/camera.cpp2
-rw-r--r--src/defaultsettings.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/camera.cpp b/src/camera.cpp
index 211ecfd70..6224a2b8e 100644
--- a/src/camera.cpp
+++ b/src/camera.cpp
@@ -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
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 9875c6ecb..09ec45697 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -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");