Make autoforward simulate the 'up' key (#8249)

This commit is contained in:
DS
2019-05-21 20:50:00 +02:00
committed by Paramat
parent a90f2efb12
commit 9d09c87f13
2 changed files with 8 additions and 11 deletions

View File

@@ -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;