Client-side autojump. Remove Android-only stepheight autojump (#7228)
Works by detecting a collision while moving forward and then simulating a jump. If the simulated jump is more successful, an artificial jump key press is injected in the client. Includes setting and key change GUI element for enabling and disabling this feature.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user