mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Make autoforward simulate the 'up' key (#8249)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user