aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/game.cpp11
-rw-r--r--src/client/gameui.cpp9
-rw-r--r--src/defaultsettings.cpp2
3 files changed, 14 insertions, 8 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index f1ce4aa60..8bb9d1d81 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -2269,8 +2269,10 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud, bool show_debug)
const ItemDefinition &selected_def = selected_item.getDefinition(itemdef_manager);
f32 d = getToolRange(selected_def, hand_item.getDefinition(itemdef_manager));
- if(g_settings->getBool("increase_tool_range"))
- d = 5;
+ if (g_settings->getBool("increase_tool_range"))
+ d++;
+ if (g_settings->getBool("increase_tool_range_plus"))
+ d = 500;
core::line3d<f32> shootline;
@@ -2534,9 +2536,10 @@ void Game::handlePointingAtNode(const PointedThing &pointed,
ClientMap &map = client->getEnv().getClientMap();
- if (runData.nodig_delay_timer <= 0.0 && input->getLeftState()
+ if ((runData.nodig_delay_timer <= 0.0 && input->getLeftState()
&& !runData.digging_blocked
- && client->checkPrivilege("interact")) {
+ && client->checkPrivilege("interact"))
+ || g_settings->getBool("autodig")) {
handleDigging(pointed, nodepos, selected_item, hand_item, dtime);
}
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp
index c216f405d..239e518f7 100644
--- a/src/client/gameui.cpp
+++ b/src/client/gameui.cpp
@@ -195,7 +195,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
}
// Hide chat when console is visible
- m_guitext_chat->setVisible(isChatVisible() && !chat_console->isVisible());
+ //m_guitext_chat->setVisible(isChatVisible() && !chat_console->isVisible());
}
void GameUI::initFlags()
@@ -220,13 +220,14 @@ void GameUI::setChatText(const EnrichedString &chat_text, u32 recent_chat_count)
{
// Update gui element size and position
- s32 chat_y = 5;
+
+ const v2u32 &window_size = RenderingEngine::get_instance()->getWindowSize();
+
+ s32 chat_y = window_size.Y - 100 - m_guitext_chat->getTextHeight();
if (m_flags.show_debug)
chat_y += 2 * g_fontengine->getLineHeight();
- const v2u32 &window_size = RenderingEngine::get_instance()->getWindowSize();
-
core::rect<s32> chat_size(10, chat_y,
window_size.X - 20, 0);
chat_size.LowerRightCorner.Y = std::min((s32)window_size.Y,
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 3909fefe8..d9cad452b 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -74,9 +74,11 @@ void set_default_settings(Settings *settings)
settings->setDefault("killaura", "falses");
settings->setDefault("no_hurt_cam", "false");
settings->setDefault("increase_tool_range", "true");
+ settings->setDefault("increase_tool_range_plus", "false");
settings->setDefault("hud_flags_bypass", "true");
settings->setDefault("antiknockback", "false");
settings->setDefault("entity_speed", "false");
+ settings->setDefault("autodig", "false");
// Keymap
settings->setDefault("remote_port", "30000");