diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-10-15 16:32:24 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-10-15 16:32:24 +0300 |
commit | 7c2639ddd9c345c7fb218a662c1ac4fc2bdd03c0 (patch) | |
tree | e9927102b7710145d629016c79b91cc508f2c6f3 /src | |
parent | 3f58028d3198e77ce26d09680f0a637188610871 (diff) | |
download | minetest-7c2639ddd9c345c7fb218a662c1ac4fc2bdd03c0.tar.gz minetest-7c2639ddd9c345c7fb218a662c1ac4fc2bdd03c0.tar.bz2 minetest-7c2639ddd9c345c7fb218a662c1ac4fc2bdd03c0.zip |
Make view bobbing amount configurable
Diffstat (limited to 'src')
-rw-r--r-- | src/camera.cpp | 1 | ||||
-rw-r--r-- | src/defaultsettings.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/camera.cpp b/src/camera.cpp index 6fc7c16cd..634a7cc9f 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -221,6 +221,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, v2u32 screensize) //rel_cam_target += 0.03 * bobvec; //rel_cam_up.rotateXYBy(0.02 * bobdir * bobtmp * PI); float f = 1.0; + f *= g_settings->getFloat("view_bobbing_amount"); rel_cam_pos += bobvec * f; //rel_cam_target += 0.995 * bobvec * f; rel_cam_target += bobvec * f; diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 2f4147a99..be787dd6b 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -74,6 +74,7 @@ void set_default_settings(Settings *settings) settings->setDefault("enable_clouds", "true"); settings->setDefault("invisible_stone", "false"); settings->setDefault("screenshot_path", "."); + settings->setDefault("view_bobbing_amount", "1.0"); // Server stuff // "map-dir" doesn't exist by default. |