aboutsummaryrefslogtreecommitdiff
path: root/src/client/game.cpp
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2019-05-21 20:50:00 +0200
committerParamat <paramat@users.noreply.github.com>2019-05-21 19:50:00 +0100
commit9d09c87f13a197672bd69ede8de987953af945ad (patch)
tree889ab878c662a9593040af508fbd838bb78ab5c2 /src/client/game.cpp
parenta90f2efb12b5131436d22a3627403736e2d326b2 (diff)
downloadminetest-9d09c87f13a197672bd69ede8de987953af945ad.tar.xz
Make autoforward simulate the 'up' key (#8249)
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r--src/client/game.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 0badda535..8c0433283 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -2483,6 +2483,12 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
keypress_bits |= 1U << 4;
}
+ // autoforward if set: simulate "up" key
+ if (player->getPlayerSettings().continuous_forward) {
+ control.up = true;
+ keypress_bits |= 1U << 0;
+ }
+
client->setPlayerControl(control);
player->keyPressed = keypress_bits;