diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-06-17 23:55:21 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-06-17 23:55:21 +0300 |
commit | e7580d2804d29afb486f4eb2bd4dfb94f7181824 (patch) | |
tree | e9e6468c12b9acfb46e424d10ee24fa362bb9338 /src/game.cpp | |
parent | 6b1f059ccd91acd87e41a83c811b88acbb4b4bc8 (diff) | |
download | minetest-e7580d2804d29afb486f4eb2bd4dfb94f7181824.tar.gz minetest-e7580d2804d29afb486f4eb2bd4dfb94f7181824.tar.bz2 minetest-e7580d2804d29afb486f4eb2bd4dfb94f7181824.zip |
added in-game key shortcuts for toggling free_move and fast_move (default K and J)
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index eef27c805..09f06f4f6 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1190,6 +1190,32 @@ void the_game( &g_menumgr, dest, L""))->drop(); } + else if(input->wasKeyDown(getKeySetting("keymap_freemove"))) + { + if(g_settings.getBool("free_move")) + { + g_settings.set("free_move","false"); + chat_lines.push_back(ChatLine(L"free_move disabled")); + } + else + { + g_settings.set("free_move","true"); + chat_lines.push_back(ChatLine(L"free_move enabled")); + } + } + else if(input->wasKeyDown(getKeySetting("keymap_fastmove"))) + { + if(g_settings.getBool("fast_move")) + { + g_settings.set("fast_move","false"); + chat_lines.push_back(ChatLine(L"fast_move disabled")); + } + else + { + g_settings.set("fast_move","true"); + chat_lines.push_back(ChatLine(L"fast_move enabled")); + } + } // Item selection with mouse wheel { |