diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 227b21db5..1cb9a1650 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2449,8 +2449,15 @@ void Game::updatePlayerControl(const CameraOrientation &cam) } #endif - client->setPlayerControl(control); LocalPlayer *player = client->getEnv().getLocalPlayer(); + + // autojump if set: simulate "jump" key + if (player->getAutojump()) { + control.jump = true; + keypress_bits |= 1U << 4; + } + + client->setPlayerControl(control); player->keyPressed = keypress_bits; //tt.stop(); |