summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortukkek <tukkek@gmail.com>2018-06-06 09:31:34 -0300
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-06-06 14:31:34 +0200
commit9f8582dcdf24600b54e8c178de37f3a222c31df2 (patch)
tree6f432f8f50408c0532c3094e83441366fa337e1c /src
parentccc3af128cb4b6213b8111115c570fe988d3523b (diff)
downloadminetest-9f8582dcdf24600b54e8c178de37f3a222c31df2.tar.gz
minetest-9f8582dcdf24600b54e8c178de37f3a222c31df2.tar.bz2
minetest-9f8582dcdf24600b54e8c178de37f3a222c31df2.zip
Stop autoforward on BACKWARD key-press (#7417)
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 648c71774..0da8e1661 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1861,6 +1861,9 @@ void Game::processKeyInput()
dropSelectedItem(isKeyDown(KeyType::SNEAK));
} else if (wasKeyDown(KeyType::AUTOFORWARD)) {
toggleAutoforward();
+ } else if (wasKeyDown(KeyType::BACKWARD)) {
+ if (g_settings->getBool("continuous_forward"))
+ toggleAutoforward();
} else if (wasKeyDown(KeyType::INVENTORY)) {
openInventory();
} else if (input->cancelPressed()) {