mirror of
https://github.com/minetest/minetest.git
synced 2024-11-26 17:43:45 +01:00
Footsteps without view bobbing (#5645)
* 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.
This commit is contained in:
parent
a7e131f53e
commit
db17225a97
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user