1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Restore old inconsistent minimum digging time behavior (#14777)

and restore default of 0.16 for repeat_place_time since it was only changed to be in line with repeat_dig_time.
This commit is contained in:
grorp 2024-06-30 20:39:28 +02:00 committed by GitHub
parent 868b548dd0
commit 7709d92289
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 38 additions and 9 deletions

View file

@ -3987,8 +3987,12 @@ void Game::handleDigging(const PointedThing &pointed, const v3s16 &nodepos,
runData.nodig_delay_timer =
runData.dig_time_complete / (float)crack_animation_length;
// Don't add a corresponding delay to very time consuming nodes.
runData.nodig_delay_timer = std::min(runData.nodig_delay_timer, 0.3f);
// We don't want a corresponding delay to very time consuming nodes
// and nodes without digging time (e.g. torches) get a fixed delay.
if (runData.nodig_delay_timer > 0.3f)
runData.nodig_delay_timer = 0.3f;
else if (runData.dig_instantly)
runData.nodig_delay_timer = 0.15f;
// Ensure that the delay between breaking nodes
// (dig_time_complete + nodig_delay_timer) is at least the
@ -4392,8 +4396,8 @@ void Game::readSettings()
m_cache_enable_fog = g_settings->getBool("enable_fog");
m_cache_mouse_sensitivity = g_settings->getFloat("mouse_sensitivity", 0.001f, 10.0f);
m_cache_joystick_frustum_sensitivity = std::max(g_settings->getFloat("joystick_frustum_sensitivity"), 0.001f);
m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.15f, 2.0f);
m_repeat_dig_time = g_settings->getFloat("repeat_dig_time", 0.15f, 2.0f);
m_repeat_place_time = g_settings->getFloat("repeat_place_time", 0.16f, 2.0f);
m_repeat_dig_time = g_settings->getFloat("repeat_dig_time", 0.0f, 2.0f);
m_cache_enable_noclip = g_settings->getBool("noclip");
m_cache_enable_free_move = g_settings->getBool("free_move");