diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 613e54f6d..aca960590 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -2525,6 +2525,9 @@ keymap_toggle_debug (Debug info toggle key) key KEY_F5 # Key for toggling the display of the profiler. Used for development. keymap_toggle_profiler (Profiler toggle key) key KEY_F6 +# Key for toggling the display of mapblock boundaries. +keymap_toggle_block_bounds (Block bounds toggle key) key + # Key for switching between first- and third-person camera. keymap_camera_mode (Toggle camera mode key) key KEY_KEY_C diff --git a/src/client/game.cpp b/src/client/game.cpp index e6e478b04..2e27d6b0d 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -2427,9 +2427,6 @@ void Game::toggleBlockBounds() case Hud::BLOCK_BOUNDS_NEAR: m_game_ui->showTranslatedStatusText("Block bounds shown for nearby blocks"); break; - case Hud::BLOCK_BOUNDS_MAX: - m_game_ui->showTranslatedStatusText("Block bounds shown for all blocks"); - break; default: break; } diff --git a/src/client/hud.cpp b/src/client/hud.cpp index 6bb9c234b..637a2f500 100644 --- a/src/client/hud.cpp +++ b/src/client/hud.cpp @@ -913,7 +913,7 @@ enum Hud::BlockBoundsMode Hud::toggleBlockBounds() { m_block_bounds_mode = static_cast(m_block_bounds_mode + 1); - if (m_block_bounds_mode >= BLOCK_BOUNDS_MAX) { + if (m_block_bounds_mode > BLOCK_BOUNDS_NEAR) { m_block_bounds_mode = BLOCK_BOUNDS_OFF; } return m_block_bounds_mode; diff --git a/src/client/hud.h b/src/client/hud.h index 746a1b33e..b2b5dd09c 100644 --- a/src/client/hud.h +++ b/src/client/hud.h @@ -40,7 +40,6 @@ class Hud BLOCK_BOUNDS_OFF, BLOCK_BOUNDS_CURRENT, BLOCK_BOUNDS_NEAR, - BLOCK_BOUNDS_MAX } m_block_bounds_mode = BLOCK_BOUNDS_OFF; video::SColor crosshair_argb;