mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Make autoforward simulate the 'up' key (#8249)
This commit is contained in:
parent
a90f2efb12
commit
9d09c87f13
2 changed files with 8 additions and 11 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue