Footsteps without view bobbing (#5645)
authorLouis Pearson <desttinghimgame@gmail.com>
Tue, 25 Apr 2017 11:11:51 +0000 (06:11 -0500)
committerZeno- <kde.psych@gmail.com>
Tue, 25 Apr 2017 11:11:51 +0000 (21:11 +1000)
* Remove redundant view_bobbing setting

Also fixes bug where disabling view_bobbing disables footstep sounds.

* Removes redundant view_bobbing setting

Setting view_bobbing amount to 0 is now the only way to
turn view_bobbing on and off. Also fixed a bug where footstep
sounds would not play when view_bobbing was disabled.

39 files changed:
builtin/settingtypes.txt
minetest.conf.example
po/be/minetest.po
po/ca/minetest.po
po/cs/minetest.po
po/da/minetest.po
po/de/minetest.po
po/eo/minetest.po
po/es/minetest.po
po/et/minetest.po
po/fr/minetest.po
po/he/minetest.po
po/hu/minetest.po
po/id/minetest.po
po/it/minetest.po
po/ja/minetest.po
po/jbo/minetest.po
po/ko/minetest.po
po/ky/minetest.po
po/lt/minetest.po
po/minetest.pot
po/ms/minetest.po
po/nb/minetest.po
po/nl/minetest.po
po/pl/minetest.po
po/pt/minetest.po
po/pt_BR/minetest.po
po/ro/minetest.po
po/ru/minetest.po
po/sr_Cyrl/minetest.po
po/sw/minetest.po
po/tr/minetest.po
po/uk/minetest.po
po/zh_CN/minetest.po
po/zh_TW/minetest.po
src/camera.cpp
src/camera.h
src/defaultsettings.cpp
src/settings_translation_file.cpp

index 5dc48c00ead98da0300e049fd37a92e844ac9c8a..29a96ab8e73ed0ecfaf8dad9243b944e464e93e3 100644 (file)
@@ -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
 
index bdd6fd7f463de50030c0c1aaf9f391066ab31dd6..ecbadb556adc85a61a02b7fb3fc2065364385dcc 100644 (file)
 #    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
 #    Print the engine's profiling data in regular intervals (in seconds). 0 = disable. Useful for developers.
 #    type: int
 # profiler_print_interval = 0
-
index 2466caea75747f47a619fd8111472fef4b5ca65e..95a39697fdbfb23792add956970ac612b2bd75bd 100644 (file)
@@ -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"
index eaf350f890dfa569da449d62cf2bea1d91529eab..32b247ffc70dbc60b3a5a4cdd00d89921c6948ba 100644 (file)
@@ -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 ""
 
index c7d1720f048fbfadbf9955ac1a4224c4612d5587..917bc652b5b7a75b58208f83972951c131aa3c47 100644 (file)
@@ -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 ""
 
index b1aa649ba83946365df8bcdf240b2f08a50d6a11..c2bbd1477dbb7991edbeb29c189b5a786f12256f 100644 (file)
@@ -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 ""
 
index a81fd0d566363a2c58a33a54b371953ab43ae495..ac51254cc66dd8a6c8ed67e684f72cd882302216 100644 (file)
@@ -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"
index adf29a0b6606540f19318945b3f1dbb2b4769516..71dd168925000d3c89387c4b67dac6a3109ac761 100644 (file)
@@ -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 ""
 
index 72438dc26e43f2d0c3b6c6281b5b45eb82206e7f..6cd0e184e68543bae5b002abdd8b7ffd15ded9ea 100644 (file)
@@ -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 ""
 
index 94c9c7207a0504bb8f3c89034ab9e2e40349cdf5..3cde4052b60a98fbc5ad9951e7c26033044a65dc 100644 (file)
@@ -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 ""
 
index f3aec72a66772cf6110610b01493ccfd7711d582..9d1c0331a0e221a4d3d47b2c9892dccf7dc12fc1 100644 (file)
@@ -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"
index 2e5367a9d79f6426c479ecd20bc467fee54d7829..1b88f911162fa9cceed43ada812514e43613ac6b 100644 (file)
@@ -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 ""
 
index a461b6a6bfa56f070c6df34b5315b0f20ec80e61..b5824cc6b2a984f704d6a02c570774049a7b89de 100644 (file)
@@ -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 ""
 
index 20464ab7afe026d617987563c31655d371475563..4a3a24c48f21c57450b6d68b076d8644e3f737db 100644 (file)
@@ -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 ""
 
index b41f38cabaf5bc81d7be0fb494694e6a7c09913f..df5a7d0da28c763ff751e9ac6f9cf25147043453 100644 (file)
@@ -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"
index f260367491f7a57cb5d26f5eb2b5bac79a477f59..32e01a81bb73a0952eb90b2f153146c0db763d2a 100644 (file)
@@ -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 ""
 
index 12ac80a39b026d44d3889637e8e1ab12d860f655..749d53c35672e54324a1bc96b8c240f649257fea 100644 (file)
@@ -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 ""
 
index 9bee4ee707f62d5028184447fc284904bd1e7096..34bc7ddec60b7884bcb13f26166ea30ba845e384 100644 (file)
@@ -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"
index 72c729f8d46b917f72965c85baedb995d769fc50..52704f78de8a0e3fd589bf5cd40908d9412c0004 100644 (file)
@@ -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 ""
 
index 7556e0309eac03c624bda57342283e6fc6fb0ce7..c00c0df84d13bb0bde97298f6ac6e583082a2009 100644 (file)
@@ -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 ""
 
index 46a74b4485d7ecde6ab45f579fedbd2770a986af..1dddd0a71376eeaed73f9bb04c771bf57e586bc6 100644 (file)
@@ -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 ""
 
index 97f7a75f33b7b1dc3c4085a3bb8932694f1d6778..e530395225a09bcdbd2698b8ca20d96c8414f4f6 100644 (file)
@@ -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 ""
 
index 28bcb3f90f374e2e832540e83e3e1ca251351267..d3a8bdc670115441148d740f2faf07a288203176 100644 (file)
@@ -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 ""
 
index 68e3e7b6ddbbaf267696a268ebd87cffd042f904..be29ac829ec13e1089065e1b6df6a71eafe89d27 100644 (file)
@@ -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"
index 8af82c0d6a200559e1e8ae9bff491b57e67c9427..0bf0ea84f1affbda9763434f144dc13933e69f58 100644 (file)
@@ -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 ""
 
index cef144845548e5b7c9dc142a90878b9749a6689e..992d0d6082a93dc78a5fb4a267746994bcd8e3c4 100644 (file)
@@ -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 ""
 
index 76d473a965532ad9f9030351480b7675c7ffb0bb..648b13a1cf8776ac9600bc7a13a86e42c994081a 100644 (file)
@@ -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"
index a9efb035ff187271e039b1760dca6f1f5935a0c9..4b0a724ea68ec82b6c09df25af8d597514324c48 100644 (file)
@@ -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 ""
 
index 4406ec5a04d0c32cc76478a25a971d54b32dc79e..c3f2465a31803c4ec4ac8085e6a7658355c34d69 100644 (file)
@@ -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 ""
 
index 0a0078f238eae30d3db9e79b3986a3f25cb0d3f4..2d8739639924a31eb0c556da00f572402b2a0ff3 100644 (file)
@@ -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 ""
 
index abf0da24d21b385201349e8039b493b9c300a395..b33e622aaef580deb526eed4f801a2d3d579c313 100644 (file)
@@ -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"
index 707ce11d93edaf0241146f60788496c86962f406..5db7287d4997c55b85ad50c1a2ec95c2fb308e30 100644 (file)
@@ -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 ""
 
index 0035c792ffbea9b2399608aefbd33aeca9a675fd..5271f4a5dcb54b4551c5b29e70bbbf8417a2ac8b 100644 (file)
@@ -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 ""
 
index 410d980827dc010cb0969a068199c6a99681ed6b..0503513e9f67c46c4008fede6d7209990caa353c 100644 (file)
@@ -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 ""
 
index 7718ae4621cf8d9176f35790aaffed92f7ac0f01..55716950d3c01afa4e276313c2cd5fb42b043598 100644 (file)
@@ -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"
index 7e83dadebf949ef6010a24f197df51a493e373e4..b119bbfbbeda6a70247a0e8fa5a0d7996a55a30e 100644 (file)
@@ -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);
index f57efdf10a1854a5fec8967daab71a7f276aafde..e4c1d0b25e64def18bc6cd57485e81c063e4aa62 100644 (file)
@@ -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<Nametag *> m_nametags;
 };
index 573b5e2d823993b836f6220879d890600e3905f9..d45e386cf817d8a30d7b0635d73cd16cc5b0418b 100644 (file)
@@ -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");
index d34665181fc01a552befb6049da1239e3f7ea0fb..47601135d4fb91ba80b0a761f9dcc9d5e5bca168 100644 (file)
@@ -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");