diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 5dc48c00ea..29a96ab8e7 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -492,10 +492,7 @@ cloud_height (Cloud height) int 120 # Values larger than 26 will start to produce sharp cutoffs at cloud area corners. cloud_radius (Cloud radius) int 12 -# Enables view bobbing when walking. -view_bobbing (Enable view bobbing) bool true - -# Multiplier for view bobbing. +# Enable view bobbing and amount of view bobbing. # For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double. view_bobbing_amount (View bobbing factor) float 1.0 diff --git a/minetest.conf.example b/minetest.conf.example index bdd6fd7f46..ecbadb556a 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -569,11 +569,7 @@ # type: int # cloud_radius = 12 -# Enables view bobbing when walking. -# type: bool -# view_bobbing = true - -# Multiplier for view bobbing. +# Enable view bobbing and amount of view bobbing. # For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double. # type: float # view_bobbing_amount = 1.0 @@ -1815,4 +1811,3 @@ # Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers. # type: int # profiler_print_interval = 0 - diff --git a/po/be/minetest.po b/po/be/minetest.po index 2466caea75..95a39697fd 100644 --- a/po/be/minetest.po +++ b/po/be/minetest.po @@ -3670,7 +3670,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Множнік калыхання пры праглядзе.\n" diff --git a/po/ca/minetest.po b/po/ca/minetest.po index eaf350f890..32b247ffc7 100644 --- a/po/ca/minetest.po +++ b/po/ca/minetest.po @@ -3465,7 +3465,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/cs/minetest.po b/po/cs/minetest.po index c7d1720f04..917bc652b5 100644 --- a/po/cs/minetest.po +++ b/po/cs/minetest.po @@ -3383,7 +3383,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/da/minetest.po b/po/da/minetest.po index b1aa649ba8..c2bbd1477d 100644 --- a/po/da/minetest.po +++ b/po/da/minetest.po @@ -3663,7 +3663,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/de/minetest.po b/po/de/minetest.po index a81fd0d566..ac51254cc6 100644 --- a/po/de/minetest.po +++ b/po/de/minetest.po @@ -3746,7 +3746,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Faktor für Auf- und Abbewegung (grafischer Effekt).\n" diff --git a/po/eo/minetest.po b/po/eo/minetest.po index adf29a0b66..71dd168925 100644 --- a/po/eo/minetest.po +++ b/po/eo/minetest.po @@ -3387,7 +3387,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/es/minetest.po b/po/es/minetest.po index 72438dc26e..6cd0e184e6 100644 --- a/po/es/minetest.po +++ b/po/es/minetest.po @@ -3526,7 +3526,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/et/minetest.po b/po/et/minetest.po index 94c9c7207a..3cde4052b6 100644 --- a/po/et/minetest.po +++ b/po/et/minetest.po @@ -3403,7 +3403,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/fr/minetest.po b/po/fr/minetest.po index f3aec72a66..9d1c0331a0 100644 --- a/po/fr/minetest.po +++ b/po/fr/minetest.po @@ -3709,7 +3709,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Facteur de mouvement de bras.\n" diff --git a/po/he/minetest.po b/po/he/minetest.po index 2e5367a9d7..1b88f91116 100644 --- a/po/he/minetest.po +++ b/po/he/minetest.po @@ -3301,7 +3301,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/hu/minetest.po b/po/hu/minetest.po index a461b6a6bf..b5824cc6b2 100644 --- a/po/hu/minetest.po +++ b/po/hu/minetest.po @@ -3615,7 +3615,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/id/minetest.po b/po/id/minetest.po index 20464ab7af..4a3a24c48f 100644 --- a/po/id/minetest.po +++ b/po/id/minetest.po @@ -3580,7 +3580,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/it/minetest.po b/po/it/minetest.po index b41f38caba..df5a7d0da2 100644 --- a/po/it/minetest.po +++ b/po/it/minetest.po @@ -3720,7 +3720,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Moltiplicatore per l'ondeggiamento visivo.\n" diff --git a/po/ja/minetest.po b/po/ja/minetest.po index f260367491..32e01a81bb 100644 --- a/po/ja/minetest.po +++ b/po/ja/minetest.po @@ -3535,7 +3535,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/jbo/minetest.po b/po/jbo/minetest.po index 12ac80a39b..749d53c356 100644 --- a/po/jbo/minetest.po +++ b/po/jbo/minetest.po @@ -3348,7 +3348,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/ko/minetest.po b/po/ko/minetest.po index 9bee4ee707..34bc7ddec6 100644 --- a/po/ko/minetest.po +++ b/po/ko/minetest.po @@ -3507,7 +3507,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "화면 흔들림 멀티플라이어\n" diff --git a/po/ky/minetest.po b/po/ky/minetest.po index 72c729f8d4..52704f78de 100644 --- a/po/ky/minetest.po +++ b/po/ky/minetest.po @@ -3403,7 +3403,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/lt/minetest.po b/po/lt/minetest.po index 7556e0309e..c00c0df84d 100644 --- a/po/lt/minetest.po +++ b/po/lt/minetest.po @@ -3383,7 +3383,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/minetest.pot b/po/minetest.pot index 46a74b4485..1dddd0a713 100644 --- a/po/minetest.pot +++ b/po/minetest.pot @@ -2279,7 +2279,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/ms/minetest.po b/po/ms/minetest.po index 97f7a75f33..e530395225 100644 --- a/po/ms/minetest.po +++ b/po/ms/minetest.po @@ -2481,7 +2481,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/nb/minetest.po b/po/nb/minetest.po index 28bcb3f90f..d3a8bdc670 100644 --- a/po/nb/minetest.po +++ b/po/nb/minetest.po @@ -3314,7 +3314,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/nl/minetest.po b/po/nl/minetest.po index 68e3e7b6dd..be29ac829e 100644 --- a/po/nl/minetest.po +++ b/po/nl/minetest.po @@ -3719,7 +3719,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Vermenigvuldigingsfactor van loopbeweging.\n" diff --git a/po/pl/minetest.po b/po/pl/minetest.po index 8af82c0d6a..0bf0ea84f1 100644 --- a/po/pl/minetest.po +++ b/po/pl/minetest.po @@ -3674,7 +3674,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/pt/minetest.po b/po/pt/minetest.po index cef1448455..992d0d6082 100644 --- a/po/pt/minetest.po +++ b/po/pt/minetest.po @@ -3509,7 +3509,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/pt_BR/minetest.po b/po/pt_BR/minetest.po index 76d473a965..648b13a1cf 100644 --- a/po/pt_BR/minetest.po +++ b/po/pt_BR/minetest.po @@ -3711,7 +3711,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Multiplicador para sacudir a exibição.\n" diff --git a/po/ro/minetest.po b/po/ro/minetest.po index a9efb035ff..4b0a724ea6 100644 --- a/po/ro/minetest.po +++ b/po/ro/minetest.po @@ -3429,7 +3429,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/ru/minetest.po b/po/ru/minetest.po index 4406ec5a04..c3f2465a31 100644 --- a/po/ru/minetest.po +++ b/po/ru/minetest.po @@ -3628,7 +3628,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/sr_Cyrl/minetest.po b/po/sr_Cyrl/minetest.po index 0a0078f238..2d87396399 100644 --- a/po/sr_Cyrl/minetest.po +++ b/po/sr_Cyrl/minetest.po @@ -3359,7 +3359,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/sw/minetest.po b/po/sw/minetest.po index abf0da24d2..b33e622aae 100644 --- a/po/sw/minetest.po +++ b/po/sw/minetest.po @@ -3644,7 +3644,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "Mengi kwa ajili ya Mwoneko kando.\n" diff --git a/po/tr/minetest.po b/po/tr/minetest.po index 707ce11d93..5db7287d49 100644 --- a/po/tr/minetest.po +++ b/po/tr/minetest.po @@ -3477,7 +3477,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/uk/minetest.po b/po/uk/minetest.po index 0035c792ff..5271f4a5dc 100644 --- a/po/uk/minetest.po +++ b/po/uk/minetest.po @@ -3350,7 +3350,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/zh_CN/minetest.po b/po/zh_CN/minetest.po index 410d980827..0503513e9f 100644 --- a/po/zh_CN/minetest.po +++ b/po/zh_CN/minetest.po @@ -3421,7 +3421,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" diff --git a/po/zh_TW/minetest.po b/po/zh_TW/minetest.po index 7718ae4621..55716950d3 100644 --- a/po/zh_TW/minetest.po +++ b/po/zh_TW/minetest.po @@ -3608,7 +3608,7 @@ msgstr "" #: src/settings_translation_file.cpp msgid "" -"Multiplier for view bobbing.\n" +"Enable view bobbing and amount of view bobbing.\n" "For example: 0 for no view bobbing; 1.0 for normal; 2.0 for double." msgstr "" "視野晃動的倍數。\n" diff --git a/src/camera.cpp b/src/camera.cpp index 7e83dadebf..b119bbfbbe 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -102,7 +102,6 @@ Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control, m_cache_view_bobbing_amount = g_settings->getFloat("view_bobbing_amount"); m_cache_fov = g_settings->getFloat("fov"); m_cache_zoom_fov = g_settings->getFloat("zoom_fov"); - m_cache_view_bobbing = g_settings->getBool("view_bobbing"); m_nametags.clear(); } @@ -280,8 +279,8 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, v3f rel_cam_target = v3f(0,0,1); v3f rel_cam_up = v3f(0,1,0); - if (m_view_bobbing_anim != 0 && m_camera_mode < CAMERA_MODE_THIRD) - { + if (m_cache_view_bobbing_amount != 0.0f && m_view_bobbing_anim != 0.0f && + m_camera_mode < CAMERA_MODE_THIRD) { f32 bobfrac = my_modf(m_view_bobbing_anim * 2); f32 bobdir = (m_view_bobbing_anim < 0.5) ? 1.0 : -1.0; @@ -467,9 +466,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, const bool swimming = (movement_XZ || player->swimming_vertical) && player->in_liquid; const bool climbing = movement_Y && player->is_climbing; if ((walking || swimming || climbing) && - m_cache_view_bobbing && - (!g_settings->getBool("free_move") || !m_client->checkLocalPrivilege("fly"))) - { + (!g_settings->getBool("free_move") || !m_client->checkLocalPrivilege("fly"))) { // Start animation m_view_bobbing_state = 1; m_view_bobbing_speed = MYMIN(speed.getLength(), 70); diff --git a/src/camera.h b/src/camera.h index f57efdf10a..e4c1d0b25e 100644 --- a/src/camera.h +++ b/src/camera.h @@ -231,7 +231,6 @@ private: f32 m_cache_view_bobbing_amount; f32 m_cache_fov; f32 m_cache_zoom_fov; - bool m_cache_view_bobbing; std::list m_nametags; }; diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 573b5e2d82..d45e386cf8 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -171,7 +171,6 @@ void set_default_settings(Settings *settings) // Effects settings->setDefault("directional_colored_fog", "true"); - settings->setDefault("view_bobbing", "true"); settings->setDefault("inventory_items_animations", "false"); settings->setDefault("mip_map", "false"); settings->setDefault("anisotropic_filter", "false"); diff --git a/src/settings_translation_file.cpp b/src/settings_translation_file.cpp index d34665181f..47601135d4 100644 --- a/src/settings_translation_file.cpp +++ b/src/settings_translation_file.cpp @@ -242,7 +242,7 @@ fake_function() { gettext("Enable view bobbing"); gettext("Enables view bobbing when walking."); gettext("View bobbing factor"); - gettext("Multiplier for view bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); + gettext("Enable view bobbing and amount of view bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); gettext("Fall bobbing factor"); gettext("Multiplier for fall bobbing.\nFor example: 0 for no view bobbing; 1.0 for normal; 2.0 for double."); gettext("3D mode");